-
-
Save billerickson/3e5d9cd79acf9ec8140deea1349d3da7 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Re-prioritise Genesis SEO metabox from high to default. | |
* | |
* Copied and amended from /lib/admin/inpost-metaboxes.php, version 2.0.0. | |
* | |
* @since 1.0.0 | |
*/ | |
function ea_add_inpost_seo_box() { | |
if ( genesis_detect_seo_plugins() ) | |
return; | |
foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) { | |
if ( post_type_supports( $type, 'genesis-seo' ) ) | |
add_meta_box( 'genesis_inpost_seo_box', __( 'Theme SEO Settings', 'genesis' ), 'genesis_inpost_seo_box', $type, 'normal', 'default' ); | |
} | |
} | |
add_action( 'admin_menu', 'ea_add_inpost_seo_box' ); | |
remove_action( 'admin_menu', 'genesis_add_inpost_seo_box' ); | |
/** | |
* Re-prioritise layout metabox from high to default. | |
* | |
* Copied and amended from /lib/admin/inpost-metaboxes.php, version 2.0.0. | |
* | |
* @since 1.0.0 | |
*/ | |
function ea_add_inpost_layout_box() { | |
if ( ! current_theme_supports( 'genesis-inpost-layouts' ) ) | |
return; | |
foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) { | |
if ( post_type_supports( $type, 'genesis-layouts' ) ) | |
add_meta_box( 'genesis_inpost_layout_box', __( 'Layout Settings', 'genesis' ), 'genesis_inpost_layout_box', $type, 'normal', 'default' ); | |
} | |
} | |
add_action( 'admin_menu', 'ea_add_inpost_layout_box' ); | |
remove_action( 'admin_menu', 'genesis_add_inpost_layout_box' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment