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. Built from https://develop.svn.wordpress.org/trunk@30041 git-svn-id: http://core.svn.wordpress.org/trunk@30041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3badb558f6
commit
64d1fd2a8f
|
@ -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 not set, default to the whether the full UI is shown.
|
||||||
if ( null === $args->show_in_admin_bar )
|
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 not set, default to the setting for public.
|
||||||
if ( null === $args->show_in_nav_menus )
|
if ( null === $args->show_in_nav_menus )
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-alpha-30040';
|
$wp_version = '4.1-alpha-30041';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue