wordpress-develop/src/wp-includes/customize
Robert Anderson ac71fffac0 Customize: Ensure multiple CSS classes are passed to nav_menu_link_attributes as an array
When multiple CSS classes are added to a menu item, the nav_menu_link_attributes
filter should be called with $item->classes set to an array of CSS class names.

When previewing in the Customizer, however, a single string was being passed to
$item->classes because WP_Customize_Nav_Menu_Item_Setting::preview() bypasses
wp_update_nav_menu_item() and instead uses filter_wp_get_nav_menu_items().

The fix is to make filter_wp_get_nav_menu_items() match what
wp_update_nav_menu_item() does and split the string into an array.

Fixes #43113.
Props dlh.


git-svn-id: https://develop.svn.wordpress.org/trunk@49624 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-17 04:29:02 +00:00
..
class-wp-customize-background-image-control.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
class-wp-customize-background-image-setting.php
class-wp-customize-background-position-control.php Code is Poetry. 2017-11-30 23:09:33 +00:00
class-wp-customize-code-editor-control.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:05:20 +00:00
class-wp-customize-color-control.php Docs: Add a @see reference to WP_Customize_Control::__construct() in child class constructors. 2020-02-26 13:29:01 +00:00
class-wp-customize-cropped-image-control.php
class-wp-customize-custom-css-setting.php Docs: Consistently use third-person singular verbs for various filter descriptions, per the documentation standards. 2020-08-11 00:32:22 +00:00
class-wp-customize-date-time-control.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
class-wp-customize-filter-setting.php
class-wp-customize-header-image-control.php Customize: Add / character to <img> tag in WP_Customize_Manager and WP_Customize_Header_Image_Control JS templates. 2020-08-20 13:11:36 +00:00
class-wp-customize-header-image-setting.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
class-wp-customize-image-control.php Docs: Another pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 21:09:04 +00:00
class-wp-customize-media-control.php Coding Standards: Use strict type check for in_array() and array_search() where strings are involved. 2020-04-05 03:00:44 +00:00
class-wp-customize-nav-menu-auto-add-control.php Customize: Improve the menu creation flow. 2017-10-05 02:21:22 +00:00
class-wp-customize-nav-menu-control.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:39:13 +00:00
class-wp-customize-nav-menu-item-control.php Docs: Add a reference to WP_Customize_Control::__construct() for information on accepted arguments in WP_Customize_Manager::add_control(). 2020-02-25 16:39:36 +00:00
class-wp-customize-nav-menu-item-setting.php Customize: Ensure multiple CSS classes are passed to nav_menu_link_attributes as an array 2020-11-17 04:29:02 +00:00
class-wp-customize-nav-menu-location-control.php Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes. 2019-07-02 23:41:16 +00:00
class-wp-customize-nav-menu-locations-control.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:39:13 +00:00
class-wp-customize-nav-menu-name-control.php Customize: Improve the menu creation flow. 2017-10-05 02:21:22 +00:00
class-wp-customize-nav-menu-section.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
class-wp-customize-nav-menu-setting.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
class-wp-customize-nav-menus-panel.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:39:13 +00:00
class-wp-customize-new-menu-control.php Docs: Add a @see reference to WP_Customize_Control::__construct() in child class constructors. 2020-02-26 13:29:01 +00:00
class-wp-customize-new-menu-section.php Docs: Use a consistent description for the $manager parameter in various Customizer class constructions. 2020-02-26 15:31:19 +00:00
class-wp-customize-partial.php Docs: Add a reference to WP_Customize_Partial::__construct() for information on accepted arguments in WP_Customize_Selective_Refresh::add_partial(). 2020-07-25 19:38:34 +00:00
class-wp-customize-selective-refresh.php Docs: Add a reference to WP_Customize_Partial::__construct() for information on accepted arguments in WP_Customize_Selective_Refresh::add_partial(). 2020-07-25 19:38:34 +00:00
class-wp-customize-sidebar-section.php Code is Poetry. 2017-11-30 23:09:33 +00:00
class-wp-customize-site-icon-control.php Docs: Add a @see reference to WP_Customize_Control::__construct() in child class constructors. 2020-02-26 13:29:01 +00:00
class-wp-customize-theme-control.php Themes: Include theme name in available update messages, for better accessibility and consistency with other similar messages. 2020-07-28 11:29:28 +00:00
class-wp-customize-themes-panel.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:39:13 +00:00
class-wp-customize-themes-section.php Text Changes: Unify various "Back to..." vs. "Return to..." vs. "Go to..." strings. 2020-11-09 10:51:52 +00:00
class-wp-customize-upload-control.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
class-wp-widget-area-customize-control.php
class-wp-widget-form-customize-control.php Bootstrap/Load: Remove duplicate leading slashes on inclusion of various files under ABSPATH. 2019-04-13 04:45:05 +00:00