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. git-svn-id: https://develop.svn.wordpress.org/trunk@34788 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
066eed4902
commit
2ef0449316
|
@ -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 ] );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue