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.


git-svn-id: https://develop.svn.wordpress.org/trunk@33094 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2015-07-06 19:12:48 +00:00
parent 63f025a07b
commit 17854c6464
2 changed files with 27 additions and 29 deletions
+1
View File
@@ -2545,6 +2545,7 @@
* @returns {string}
*/
function displayNavMenuName( name ) {
name = name || '';
name = $( '<div>' ).text( name ).html(); // Emulate esc_html() which is used in wp-admin/nav-menus.php.
name = $.trim( name );
return name || api.Menus.data.l10n.unnamed;