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
This commit is contained in:
Weston Ruter 2015-10-03 00:15:24 +00:00
parent 27dbbdfba4
commit d9cca27386
3 changed files with 8 additions and 4 deletions

View File

@ -1132,7 +1132,11 @@
}
});
if ( settingValue ) {
element.set( settingValue[ property ] );
if ( ( property === 'classes' || property === 'xfn' ) && _.isArray( settingValue[ property ] ) ) {
element.set( settingValue[ property ].join( ' ' ) );
} else {
element.set( settingValue[ property ] );
}
}
});

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34787';
$wp_version = '4.4-alpha-34788';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.