[wp-trac] [WordPress Trac] #39101: Customize: edit shortcuts for custom menu widgets do not work
WordPress Trac
noreply at wordpress.org
Mon Dec 19 05:08:59 UTC 2016
#39101: Customize: edit shortcuts for custom menu widgets do not work
------------------------------+--------------------------
Reporter: celloexpressions | Owner: westonruter
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.7.1
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses:
------------------------------+--------------------------
Comment (by westonruter):
@sirbrillig @celloexpressions I found the underlying problem was that the
`showControl` logic was only accounting for `wp_nav_menu()` instances that
referenced a given `theme_location`. The Custom Menu widgets never have a
`theme_location` but rather instead refer to a given `menu` by ID
directly. So the fix is just to add support for `menu` if `theme_location`
is not set. This will also fix the edit shortcuts for any `wp_nav_menu()`
instances that use `menu` in places other than the Custom Menu widget. See
[attachment:39101.3.diff].
This new patch also fixes an issue where `showControl` would end up
focusing on the last control that it found to be associated with a given
setting. In this new patch, it will first sort the controls by their
priority to then focus on the one that hast the priority with the smallest
number, and thus the controls that appear at the top. For nav menus this
ensures that the focus is given to the nav menu name control as opposed to
the last checkbox control in the nav menu section.
Please confirm and I'll go ahead and commit.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39101#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list