[wp-trac] [WordPress Trac] #38955: Customize Menus: post type archive menu items lose their labels when loading the customizer

WordPress Trac noreply at wordpress.org
Sun Nov 27 01:20:40 UTC 2016


#38955: Customize Menus: post type archive menu items lose their labels when
loading the customizer
----------------------------------------+--------------------------
 Reporter:  celloexpressions            |       Owner:  westonruter
     Type:  defect (bug)                |      Status:  accepted
 Priority:  normal                      |   Milestone:  4.7
Component:  Customize                   |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+--------------------------
Changes (by westonruter):

 * keywords:  needs-patch => has-patch needs-unit-tests


Comment:

 @celloexpressions good catch. The problem was introduced in r38618 for
 #38015. The clearing of the nav menu item's title is expected per this
 logic in `wp_update_nav_menu_item()` which has been around since WP 3.0:

 {{{#!php
 <?php
 if ( $args['menu-item-title'] == $original_title )
         $args['menu-item-title'] = '';
 }}}

 The shortcomings in the r38618 was that it accounted for `post_type` and
 `taxonomy` nav menu item types, but not `post_type_archive`.

 Please give [attachment:38955.0.diff] a try. The expected behavior you
 should see now is that the initial title/label should be supplied as a
 placeholder as opposed to the input value, since it is the same as the
 `original_title`.

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


More information about the wp-trac mailing list