[wp-trac] [WordPress Trac] #42115: Customize Menus: Add "Your theme already has a basic menu" view

WordPress Trac noreply at wordpress.org
Wed Oct 18 19:51:59 UTC 2017


#42115: Customize Menus: Add "Your theme already has a basic menu" view
-------------------------+-----------------------------
 Reporter:  melchoyce    |       Owner:  bpayton
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  Future Release
Component:  Customize    |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  ui
-------------------------+-----------------------------
Changes (by westonruter):

 * type:  task (blessed) => enhancement
 * milestone:  4.9 => Future Release


Comment:

 Correction: Fallback menus don't //yet// get selective refresh partials.
 There is a patch for this in #39665. In that patch there is a
 `echo_preview_nav_menu_args_fallback_with_partial_refresh` method that
 wraps the original `fallback_cb` and calls it. So inside of this function
 we'd be able to look to see if a `theme_location` param is present, and if
 so, then tally that location similar to how we
 [https://github.com/WordPress/wordpress-
 develop/blob/dcb6ef8aa43e020154612aeb07b04e10983caf63/src/wp-includes
 /class-wp-customize-widgets.php#L1225-L1249 tally sidebar calls] and then
 [https://github.com/WordPress/wordpress-
 develop/blob/dcb6ef8aa43e020154612aeb07b04e10983caf63/src/wp-includes
 /class-wp-customize-widgets.php#L1147 export] them to JS in the preview,
 and then it could be sent to the controls window via
 `wp.customize.preview.send( 'nav-menu-locations-with-fallbacks', locations
 )` which then can be listened to in the controls pane via
 `wp.customize.previewer.bind( 'nav-menu-locations-with-fallbacks',
 function() { … } )`. This listener can then toggle whether or not the
 additional text should be displayed.

 Nevertheless, this isn't going to land in in 4.9 due to the dependency
 here on #39665.

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


More information about the wp-trac mailing list