Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created July 1, 2016 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/3e5d9cd79acf9ec8140deea1349d3da7 to your computer and use it in GitHub Desktop.
Save billerickson/3e5d9cd79acf9ec8140deea1349d3da7 to your computer and use it in GitHub Desktop.
<?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