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. Cherry-picks [34788]. Props tyxla, westonruter. Fixes #34111 for 4.3. Built from https://develop.svn.wordpress.org/branches/4.3@34789 git-svn-id: http://core.svn.wordpress.org/branches/4.3@34754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0b2de83d41
commit
20596916c3
|
@ -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
Loading…
Reference in New Issue