Created
October 16, 2016 19:26
-
-
Save stephanieleary/9f1c783d0b0d62d7336f9d7b144aed10 to your computer and use it in GitHub Desktop.
Turn off some screen options; turn ON others
This file contains hidden or 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 | |
add_filter( 'default_hidden_meta_boxes', 'scl_toggle_meta_boxes', 10, 2 ); | |
function scl_toggle_meta_boxes( $hidden, $screen ) { | |
$hide_these = array( | |
'people_typediv', | |
'facility_typediv', | |
'genesis-theme-settings-version', | |
'genesis-theme-settings-feeds', | |
'genesis_inpost_scripts_box', | |
'commentstatusdiv', | |
'slugdiv', | |
'authordiv', | |
'postcustom', | |
'trackbacksdiv', | |
'sharing_meta' | |
); | |
if ( $screen->base == 'nav-menus' ) { | |
$show_these = array( | |
'add-post-type-course', | |
'add-post-type-people', | |
'add-post-type-publication', | |
'add-post-type-facility', | |
'add-post-type-research', | |
'add-people_type', | |
'add-organization', | |
'add-subject_area', | |
'add-facility_type', | |
'add-service', | |
'add-student_type', | |
'add-publication_type', | |
'add-committee', | |
'add-groups', | |
'hptal-metabox', // Post Type Archive Links box | |
); | |
$hidden = array_diff( $hidden, $show_these ); | |
} | |
return array_merge( $hidden, $hide_these ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment