Created
October 1, 2014 10:22
-
-
Save lenasterg/64989b9711273fbd9844 to your computer and use it in GitHub Desktop.
Wordpress Nav menus administration. Open all metaboxes by default.
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
/** | |
* Show by default posts,tags and post-format meta-boxes on wp-admin/nav-menus.php | |
* @param array $meta_boxes | |
* @return array | |
* @author Stergatu Lena <stergatu@cti.gr> | |
* @version 1, 25/9/2014 | |
*/ | |
function ls_initial_nav_menu_meta_boxes( $meta_boxes ) { | |
if ( ! (in_array( 'add-post', $meta_boxes )) ) { | |
$meta_boxes[] = 'add-post'; | |
} | |
if ( ! (in_array( 'add-post_tag', $meta_boxes )) ) { | |
$meta_boxes[] = 'add-post_tag'; | |
} | |
if ( ! (in_array( 'add-post_format', $meta_boxes )) ) { | |
$meta_boxes[] = 'add-post_format'; | |
} | |
return $meta_boxes; | |
} | |
add_filter( 'initial_nav_menu_meta_boxes', 'ls_initial_nav_menu_meta_boxes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment