mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-07-12 02:56:12 +09:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed788e7432 | |||
| 7395bd6db3 | |||
| ee29d99335 | |||
| 5300ec9601 | |||
| ff6077078d |
@@ -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