When using 'show_in_menu' as a default value for 'show_in_admin_bar' in register_post_type(), cast to boolean instead of requiring a strict match.
props ipm-frommen. fixes #30092. git-svn-id: https://develop.svn.wordpress.org/trunk@30041 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a32ed9e1ea
commit
6cbc9e03e1
@ -1352,7 +1352,7 @@ function register_post_type( $post_type, $args = array() ) {
|
||||
|
||||
// If not set, default to the whether the full UI is shown.
|
||||
if ( null === $args->show_in_admin_bar )
|
||||
$args->show_in_admin_bar = true === $args->show_in_menu;
|
||||
$args->show_in_admin_bar = (bool) $args->show_in_menu;
|
||||
|
||||
// If not set, default to the setting for public.
|
||||
if ( null === $args->show_in_nav_menus )
|
||||
|
Loading…
Reference in New Issue
Block a user