mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 07:22:01 +01:00
Unlimited number of pages and custom links for nav-menu. Todo: AJAX-based autocomplete, so this scales better. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
411734437a
commit
94bcf51d32
@ -98,7 +98,7 @@ function wp_nav_menu_create_metabox() { ?>
|
||||
* @since 3.0.0
|
||||
*/
|
||||
function wp_nav_menu_item_link_metabox() {
|
||||
$args = array( 'post_status' => 'any', 'post_type' => 'nav_menu_item', 'meta_value' => 'custom' );
|
||||
$args = array( 'post_status' => 'any', 'post_type' => 'nav_menu_item', 'meta_value' => 'custom', 'showposts' => -1 );
|
||||
|
||||
// @todo transient caching of these results with proper invalidation on updating links
|
||||
$query = new WP_Query( $args );
|
||||
@ -145,7 +145,7 @@ function wp_nav_menu_item_link_metabox() {
|
||||
* @param string $post_type The post type object.
|
||||
*/
|
||||
function wp_nav_menu_item_post_type_metabox( $object, $post_type ) {
|
||||
$args = array( 'post_type' => $post_type['args']->name, 'post_status' => 'publish' );
|
||||
$args = array( 'post_type' => $post_type['args']->name, 'post_status' => 'publish', 'showposts' => -1 );
|
||||
|
||||
if ( 'attachment' == $post_type['args']->name )
|
||||
$args['post_status'] = 'any';
|
||||
|
Loading…
Reference in New Issue
Block a user