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:
parent
27dbbdfba4
commit
d9cca27386
|
@ -1132,8 +1132,12 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ( settingValue ) {
|
if ( settingValue ) {
|
||||||
|
if ( ( property === 'classes' || property === 'xfn' ) && _.isArray( settingValue[ property ] ) ) {
|
||||||
|
element.set( settingValue[ property ].join( ' ' ) );
|
||||||
|
} else {
|
||||||
element.set( settingValue[ property ] );
|
element.set( settingValue[ property ] );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
control.setting.bind(function( to, from ) {
|
control.setting.bind(function( to, from ) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue