-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from AyeCode/master
pull
- Loading branch information
Showing
4 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* A file for common functions. | ||
*/ | ||
|
||
/** | ||
* Return an array of global $pagenow page names that should be used to exclude register_widgets. | ||
* | ||
* Used to block the loading of widgets on certain wp-admin pages to save on memory. | ||
* | ||
* @return mixed|void | ||
*/ | ||
function sd_pagenow_exclude(){ | ||
return apply_filters( 'sd_pagenow_exclude', array( | ||
'upload.php', | ||
'edit-comments.php', | ||
'edit-tags.php', | ||
'index.php', | ||
'media-new.php', | ||
'options-discussion.php', | ||
'options-writing.php', | ||
'edit.php', | ||
'themes.php', | ||
'users.php', | ||
) ); | ||
} | ||
|
||
|
||
/** | ||
* Return an array of widget class names that should be excluded. | ||
* | ||
* Used to conditionally load widgets code. | ||
* | ||
* @return mixed|void | ||
*/ | ||
function sd_widget_exclude(){ | ||
return apply_filters( 'sd_widget_exclude', array() ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters