mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-07-11 18:46:05 +09:00
@@ -6,6 +6,12 @@ add_action('admin_menu', 'ss_add_inpost_metabox');
|
|||||||
*/
|
*/
|
||||||
function ss_add_inpost_metabox() {
|
function ss_add_inpost_metabox() {
|
||||||
|
|
||||||
|
global $wp_registered_sidebars;
|
||||||
|
|
||||||
|
if( ! array_key_exists( 'sidebar', $wp_registered_sidebars ) && ! array_key_exists( 'sidebar-alt', $wp_registered_sidebars ) ){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) {
|
foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) {
|
||||||
|
|
||||||
if ( post_type_supports( $type, 'genesis-simple-sidebars' ) || $type == 'post' || $type == 'page' ) {
|
if ( post_type_supports( $type, 'genesis-simple-sidebars' ) || $type == 'post' || $type == 'page' ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user