[wp-trac] [WordPress Trac] #33742: Menu Customizer: Adding draft items?

WordPress Trac noreply at wordpress.org
Fri Sep 2 05:58:20 UTC 2016


#33742: Menu Customizer: Adding draft items?
--------------------------+-----------------------------
 Reporter:  pavelevap     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7
Component:  Menus         |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+-----------------------------
Changes (by westonruter):

 * keywords:  has-patch dev-feedback => has-patch


Comment:

 I'm inclined to agree with @welcher that it is a bug to be able to add
 non-publish posts to a nav menu, and so [attachment:33742.diff] is the way
 to go. But actually, the underlying issue here is that the following logic
 isn't getting applied to searches like it is for when
 `wp_nav_menu_item_post_type_meta_box` runs:

 {{{#!php
 <?php
 if ( isset( $box['args']->_default_query ) )
                 $args = array_merge($args, (array)
 $box['args']->_default_query );
 }}}

 So the fix I think is to make sure the same `_default_query` is merged
 with the query vars when a search as done, just as when the list
 generated. See [attachment:33742.2.diff] which does this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33742#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list