From 6cbc9e03e1b521af3b34be005dcecd2c74d6cd2a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 27 Oct 2014 13:07:38 +0000 Subject: [PATCH] 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 --- src/wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index e9d93172fe..8e6ec606a9 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -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 )