Customize: Simplify condition for returning `nav_menus_invalid_post_type` error.

Props swissspidy.
See #16075.

Built from https://develop.svn.wordpress.org/trunk@35501


git-svn-id: http://core.svn.wordpress.org/trunk@35465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2015-11-04 07:29:25 +00:00
parent 77e365efbf
commit 154e3d4593
2 changed files with 3 additions and 4 deletions

View File

@ -107,10 +107,9 @@ final class WP_Customize_Nav_Menus {
$items = array();
if ( 'post_type' === $type ) {
if ( ! get_post_type_object( $object ) ) {
$post_type = get_post_type_object( $object );
if ( ! $post_type ) {
return new WP_Error( 'nav_menus_invalid_post_type' );
} else {
$post_type = get_post_type_object( $object );
}
if ( 0 === $page && 'page' === $object ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta2-35500';
$wp_version = '4.4-beta2-35501';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.