Weston Ruter
31a394fcf7
Customizer: Reset horizontal scroll position when finished dragging a nav menu item.
...
Props karinedo, austinginder, adamsilverstein, tyxla.
Fixes #33367 .
Built from https://develop.svn.wordpress.org/trunk@34834
git-svn-id: http://core.svn.wordpress.org/trunk@34799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 20:46:27 +00:00
Weston Ruter
d9cca27386
Customize: Fix `nav_menu_item` CSS `classes` array being incorrectly presented in input field as comma-delimited list.
...
Instead of using `Array.toString()` to serialize an array with comma delimiters, explicitly `join` the array using spaces instead. Also ensure that `xfn` is handled properly if it ever gets stored as an array.
Props tyxla, westonruter.
Fixes #34111 .
Built from https://develop.svn.wordpress.org/trunk@34788
git-svn-id: http://core.svn.wordpress.org/trunk@34753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 00:15:24 +00:00
Weston Ruter
a2d9547825
Customizer: Prevent JS error during init when `nav_menus` panel is removed by plugin.
...
Fixes #33411 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33753
git-svn-id: http://core.svn.wordpress.org/trunk@33721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 06:43:22 +00:00
Helen Hou-Sandí
1880411a0b
Menu customizer: Ensure the search results section is full height.
...
fixes #33375 .
Built from https://develop.svn.wordpress.org/trunk@33618
git-svn-id: http://core.svn.wordpress.org/trunk@33585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-14 21:32:25 +00:00
Weston Ruter
9ee7f050e9
Customize: Fix keyboard accessibility for toggling screen options and contextual help.
...
Also fix layout of search results in mobile.
Props valendesigns, afercia, adamsilverstein.
Fixes #33184 .
Built from https://develop.svn.wordpress.org/trunk@33617
git-svn-id: http://core.svn.wordpress.org/trunk@33584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-14 21:23:27 +00:00
Helen Hou-Sandí
7e2cec4edb
Customizer: Rename `WP_New_Menu_Customize_Control` to `WP_Customize_New_Menu_Control` for consistency.
...
props DrewAPicture.
fixes #33324 .
Built from https://develop.svn.wordpress.org/trunk@33602
git-svn-id: http://core.svn.wordpress.org/trunk@33569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-10 18:06:25 +00:00
Helen Hou-Sandí
e7b4ca0630
Remove debug cruft from [33511].
...
see #32710 .
Built from https://develop.svn.wordpress.org/trunk@33515
git-svn-id: http://core.svn.wordpress.org/trunk@33482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 23:53:49 +00:00
Helen Hou-Sandí
ea8f8acc79
Menu customizer: More clearly separate search results from available items.
...
Available items now fade from view while you're searching, and there is an explicit way to clear search results. No results gives a better message, though still brief this time around.
props valendesigns, designsimply, DH-Shredder, helen.
fixes #32710 .
Built from https://develop.svn.wordpress.org/trunk@33511
git-svn-id: http://core.svn.wordpress.org/trunk@33478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 23:40:25 +00:00
Weston Ruter
a4bc3daa9e
Customizer: Update `nav_menu_locations[...]` controls to remove placeholder menus from the dropdown options upon Save & Publish.
...
See #32814 .
Fixes #33176 .
Built from https://develop.svn.wordpress.org/trunk@33496
git-svn-id: http://core.svn.wordpress.org/trunk@33463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 19:34:25 +00:00
Weston Ruter
bf9d1485ee
Customizer: Ensure that all existing menus are shown in the Custom Menu widget's dropdown.
...
* Ensure that a Custom Menu widget selecting a newly-inserted menu gets updated to use the new menu ID upon Save & Publish.
* Dynamically update the visibility of the Custom Menu widget's "no menus" message when the number of menus changes between 0 and 1+.
* Send all dirty Customized settings in `update-widget` Ajax request and `preview()` them so that the widget update/form callbacks have access to any data dependencies in the current Customizer session (such as newly created unsaved menus).
* Update link in Custom Menu widget to point to Menus panel as opposed to Menus admin page, when in the Customizer.
* Fix an issue with extra space at top immediately after creating new menu.
* Fix doubled `update-widget` Ajax requests when changing select dropdown; prevent initial from being aborted.
* Add missing `wp_get_nav_menus()` hooks to preview Customizer updates/inserts for `nav_menu` settings; includes tests.
* Update `wp_get_nav_menu_object()` to allow a menu object to be passed in (and thus passed through).
Props westonruter, adamsilverstein.
Fixes #32814 .
Built from https://develop.svn.wordpress.org/trunk@33488
git-svn-id: http://core.svn.wordpress.org/trunk@33455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 16:03:24 +00:00
Dominik Schilling
a5ed94ab62
Customizer: Add an `aria-expanded` attribute to Edit menu item toggles.
...
props afercia.
fixes #33129 .
Built from https://develop.svn.wordpress.org/trunk@33483
git-svn-id: http://core.svn.wordpress.org/trunk@33450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 09:50:24 +00:00
Dominik Schilling
de86d6b18d
Customizer: Add missing text or labels to some nav menu UI controls.
...
props afercia, celloexpressions, westonruter.
fixes #32715 .
Built from https://develop.svn.wordpress.org/trunk@33413
git-svn-id: http://core.svn.wordpress.org/trunk@33381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-24 20:28:25 +00:00
Dominik Schilling
edf256fa96
Customizer: Hide inactive reorder buttons for menu items from assistive technologies.
...
props afercia.
fixes #33114 .
Built from https://develop.svn.wordpress.org/trunk@33412
git-svn-id: http://core.svn.wordpress.org/trunk@33380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-24 17:57:24 +00:00
Weston Ruter
3a97d2a7de
Customizer: Update JS variable to reference renamed data attribute for available nav menu object.
...
Fixes regression for a change that was missed in [33366].
Props valendesigns.
Fixes #32708 .
Built from https://develop.svn.wordpress.org/trunk@33392
git-svn-id: http://core.svn.wordpress.org/trunk@33360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-23 06:02:24 +00:00
Weston Ruter
d5ce83c94c
Customizer: Introduce `customize_nav_menu_available_item_types` and `customize_nav_menu_available_items` filters.
...
Allows for new available menu item types/objects to be registered in addition to filtering the available items that are returned for each menu item type/object.
Props valendesigns, imath, westonruter.
See #32832 .
Fixes #32708 .
Built from https://develop.svn.wordpress.org/trunk@33366
git-svn-id: http://core.svn.wordpress.org/trunk@33338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 20:29:25 +00:00
Konstantin Obenland
146befe7bf
Customizer: Add label for menu names when editing a menu.
...
Props celloexpressions.
Fixes #32726 .
Built from https://develop.svn.wordpress.org/trunk@33346
git-svn-id: http://core.svn.wordpress.org/trunk@33318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 17:02:24 +00:00
Dominik Schilling
4dcfd3ec83
Customizer: Avoid duplicate IDs and remove role presentation from menu items reorder button. Follow-up to [33074].
...
props afercia.
fixes #32725 .
Built from https://develop.svn.wordpress.org/trunk@33339
git-svn-id: http://core.svn.wordpress.org/trunk@33311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 11:37:26 +00:00
Weston Ruter
910092531b
Customizer: Indicate when there are no nav menu items available for a given type.
...
Props celloexpressions, valendesigns, rittesh.patel.
Fixes #32810 .
Built from https://develop.svn.wordpress.org/trunk@33323
git-svn-id: http://core.svn.wordpress.org/trunk@33295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-19 00:06:24 +00:00
Weston Ruter
0f37c66077
Customizer: Defer updating nav menu item `tabIndex` attributes until pane is reflowed.
...
Introduces `pane-contents-reflowed` Customizer event.
Props valendesigns, westonruter.
Fixes #32943 .
Built from https://develop.svn.wordpress.org/trunk@33283
git-svn-id: http://core.svn.wordpress.org/trunk@33255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-15 20:05:25 +00:00
Weston Ruter
4cb73cf347
Customizer: Fix element focus after menu item is deleted for keyboard accessibility.
...
Also restores box shadow on focus.
Props valendesigns.
Fixes #32740 .
Built from https://develop.svn.wordpress.org/trunk@33279
git-svn-id: http://core.svn.wordpress.org/trunk@33251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-15 18:44:25 +00:00
Weston Ruter
ae50d09585
Customizer: Disambiguate a menu's auto-add pages option from preceding menu location checkboxes.
...
Creates a separate `nav_menu_auto_add` control type following the pattern of the `nav_menu_name` control type.
Props valendesigns.
Fixes #32820 .
Built from https://develop.svn.wordpress.org/trunk@33189
git-svn-id: http://core.svn.wordpress.org/trunk@33161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 08:40:26 +00:00
Weston Ruter
a62cc940ea
Customizer: Register controls and settings for `nav_menu_locations` even when there are no menus yet.
...
This change ensures that the first menu created can be assigned to a location without first saving and reloading the Customizer.
Props markoheijnen.
Fixes #32858 .
Built from https://develop.svn.wordpress.org/trunk@33094
git-svn-id: http://core.svn.wordpress.org/trunk@33065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-06 19:13:25 +00:00
Dominik Schilling
340f1e121e
Customizer: Fix `tabindex` of reorder buttons for menu items with depth 1 and 10.
...
props celloexpressions.
fixes #32767 .
Built from https://develop.svn.wordpress.org/trunk@33077
git-svn-id: http://core.svn.wordpress.org/trunk@33048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 22:21:24 +00:00
Dominik Schilling
200463d781
Customizer: Improve descriptive text and focus for menu items reorder button.
...
props afercia.
fixes #32725 .
Built from https://develop.svn.wordpress.org/trunk@33074
git-svn-id: http://core.svn.wordpress.org/trunk@33045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 21:24:25 +00:00
Weston Ruter
912b434198
Customizer: Fix saving menus with empty names or names that are already used.
...
Adds validation for initially-supplied nav menu name, blocking empty names from being supplied. If later an empty name is supplied and the nav menu is saved, the name "(unnamed)" will be supplied instead and supplied back to the client. If a name is supplied for the menu which is currently used by another menu, then the name conflict is resolved by adding a numerical counter similar to how `post_name` conflicts are resolved. Includes unit tests.
Fixes #32760 .
Built from https://develop.svn.wordpress.org/trunk@33071
git-svn-id: http://core.svn.wordpress.org/trunk@33042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 20:47:25 +00:00
Dominik Schilling
93a334b361
Customizer: Remove some non-functional code.
...
props afercia.
fixes #32839 .
Built from https://develop.svn.wordpress.org/trunk@33070
git-svn-id: http://core.svn.wordpress.org/trunk@33041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 20:37:25 +00:00
Dominik Schilling
78167b8a4c
Customizer: Make reordering menu items via drag and drop easier.
...
Introduce `wpNavMenu.options.targetTolerance` to define a tolerance when dragging items where no margins between the sortable items exists.
props adamsilverstein.
fixes #32821 .
Built from https://develop.svn.wordpress.org/trunk@33030
git-svn-id: http://core.svn.wordpress.org/trunk@33001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 16:44:24 +00:00
Dominik Schilling
2ecb586214
Customizer: Add an `aria-expanded` attribute to the Add Menu button to improve accessibility.
...
props afercia.
fixes #32791 .
Built from https://develop.svn.wordpress.org/trunk@32971
git-svn-id: http://core.svn.wordpress.org/trunk@32942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 10:05:24 +00:00
Dominik Schilling
a6b7a691be
Customizer: Prevent dragging menu items above the main heading.
...
Improve targeting for the `sortableItems`, resolving an issue where the first `<li>` in the control became a sortable target, allowing the user to drag a single top level menu outside the intended sortable area.
props adamsilverstein.
fixes #32738 .
#wceu
Built from https://develop.svn.wordpress.org/trunk@32955
git-svn-id: http://core.svn.wordpress.org/trunk@32926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 17:11:24 +00:00
Dominik Schilling
baeadbb6fb
Customizer: Accessibility improvements for menu item searches.
...
* Add a description and an `aria-describedby` attribute to inform users this is a "live" search.
* Announce the number of search results via `wp.a11y.speak`.
* Use `aria-busy` attribute to stop screen readers announcing content while the "loading more results" is running.
* Increase the search debounce wait interval to 500ms to be consistent with other live searches.
* If a search fails don't call `wp.a11y.speak` with an undefined variable.
props afercia.
see #32720 .
Built from https://develop.svn.wordpress.org/trunk@32891
git-svn-id: http://core.svn.wordpress.org/trunk@32862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:22:25 +00:00
Dominik Schilling
4a13015c98
Customizer: Don't add a menu item twice when using the keyboard.
...
Buttons don't need keyboard events, they natively support keyboard interaction and they just need a click event.
fixes #32665 .
Built from https://develop.svn.wordpress.org/trunk@32890
git-svn-id: http://core.svn.wordpress.org/trunk@32861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:01:25 +00:00
Dominik Schilling
f5fa907f77
Customizer: Improve accessibility of Add Menu Items button and its panel.
...
props afercia, ocean90.
fixes #32682 .
Built from https://develop.svn.wordpress.org/trunk@32848
git-svn-id: http://core.svn.wordpress.org/trunk@32819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 20:52:24 +00:00
Dominik Schilling
5864a7ad44
Customizer: Fix keyboard events for the menu items search field.
...
Replace the `change` event with `keyup`, see https://core.trac.wordpress.org/ticket/26600#comment:59 for background.
props tywayne.
fixes #32677 .
Built from https://develop.svn.wordpress.org/trunk@32824
git-svn-id: http://core.svn.wordpress.org/trunk@32795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-17 21:37:27 +00:00
Ella Iseulde Van Dorpe
1a4c6ad45d
JSHint after [32806]
...
See #32576 .
Built from https://develop.svn.wordpress.org/trunk@32815
git-svn-id: http://core.svn.wordpress.org/trunk@32786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-17 04:15:26 +00:00
Dominik Schilling
ac33d71623
Fix a typo in [32806].
...
see #32576 .
Built from https://develop.svn.wordpress.org/trunk@32808
git-svn-id: http://core.svn.wordpress.org/trunk@32779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 23:09:25 +00:00
Dominik Schilling
62e3a0c15c
Add menu management to the Customizer.
...
This brings in the Menu Customizer plugin: https://wordpress.org/plugins/menu-customizer/ .
props celloexpressions, westonruter, valendesigns, voldemortensen, ocean90, adamsilverstein, kucrut, jorbin, designsimply, afercia, davidakennedy, obenland.
see #32576 .
Built from https://develop.svn.wordpress.org/trunk@32806
git-svn-id: http://core.svn.wordpress.org/trunk@32777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 22:08:26 +00:00