diff --git a/src/wp-admin/js/customize-nav-menus.js b/src/wp-admin/js/customize-nav-menus.js index 71052a1397..d8ab2eb254 100644 --- a/src/wp-admin/js/customize-nav-menus.js +++ b/src/wp-admin/js/customize-nav-menus.js @@ -397,6 +397,8 @@ } self.pages[ type + ':' + object ] = -1; return; + } else if ( 'page' === object ) { + availableMenuItemContainer.find( '.accordion-section-title > button' ).click(); } items = new api.Menus.AvailableItemCollection( items ); // @todo Why is this collection created and then thrown away? self.collection.add( items.models ); diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php index f102cd80f0..0bc95da58a 100644 --- a/src/wp-includes/class-wp-customize-nav-menus.php +++ b/src/wp-includes/class-wp-customize-nav-menus.php @@ -895,70 +895,112 @@ final class WP_Customize_Nav_Menus { -
- -
- - - -

- - - - -

-
-
available_item_types(); + $page_item_type = null; + foreach ( $item_types as $i => $item_type ) { + if ( isset( $item_type['object'] ) && 'page' === $item_type['object'] ) { + $page_item_type = $item_type; + unset( $item_types[ $i ] ); + } + } + + if ( $page_item_type ) { + $this->print_post_type_container( $page_item_type ); + } + $this->print_custom_links_available_menu_item(); // Containers for per-post-type item browsing; items are added with JS. - foreach ( $this->available_item_types() as $available_item_type ) { - $id = sprintf( 'available-menu-items-%s-%s', $available_item_type['type'], $available_item_type['object'] ); - ?> -
- -
- - - cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?> -
- - -
- - - -
-
- print_post_type_container( $item_type ); } ?> +
+ +
+ + + cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?> +
+ + +
+ + + +
+
+ +
+ +
+ + + +

+ + + + +

+
+
+