Skip to content

Commit

Permalink
Renamed the filter and added API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Jun 29, 2014
1 parent 8342eed commit 3a00c89
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions wp-seo-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,14 @@ function wpseo_admin_init() {
}
}

if ( in_array( $pagenow, array( 'edit.php', 'post.php', 'post-new.php' ) ) || apply_filters( 'wpseo_always_load_metaboxes_on_admin', false ) ) {
/**
* Filter: 'wpseo_always_register_metaboxes_on_admint' - Allow developers to change whether
* the WPSEO metaboxes are only registered on the typical pages (lean loading) or always
* registered when in admin.
*
* @api bool Whether to always register the metaboxes or not. Defaults to false.
*/
if ( in_array( $pagenow, array( 'edit.php', 'post.php', 'post-new.php' ) ) || apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) ) {
$GLOBALS['wpseo_metabox'] = new WPSEO_Metabox;
if ( $options['opengraph'] === true ) {
$GLOBALS['wpseo_social'] = new WPSEO_Social_Admin;
Expand All @@ -268,7 +275,6 @@ function wpseo_admin_init() {
if ( $options['enablexmlsitemap'] === true ) {
$GLOBALS['wpseo_sitemaps_admin'] = new WPSEO_Sitemaps_Admin;
}

}

if ( ! function_exists( 'spl_autoload_register' ) ) {
Expand Down

0 comments on commit 3a00c89

Please sign in to comment.