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:
Sergey Biryukov 2014-10-27 13:08:19 +00:00
parent 3badb558f6
commit 64d1fd2a8f
2 changed files with 2 additions and 2 deletions

View File

@ -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 )

View File

@ -4,7 +4,7 @@
*
* @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.