Customize: Improve back-compat for `wp.customize.Control` subclasses that expect `options.params` to be present for direct manipulation before calling parent `initialize` method.
Fixes known incompatibility with Make theme. Amends [41726]. See #30741. Built from https://develop.svn.wordpress.org/trunk@41961 git-svn-id: http://core.svn.wordpress.org/trunk@41795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1f735509af
commit
0c1c0980e7
|
@ -7635,20 +7635,23 @@
|
|||
|
||||
// Create Panels
|
||||
$.each( api.settings.panels, function ( id, data ) {
|
||||
var Constructor = api.panelConstructor[ data.type ] || api.Panel;
|
||||
api.panel.add( new Constructor( id, data ) );
|
||||
var Constructor = api.panelConstructor[ data.type ] || api.Panel, options;
|
||||
options = _.extend( { params: data }, data ); // Inclusion of params alias is for back-compat for custom panels that expect to augment this property.
|
||||
api.panel.add( new Constructor( id, options ) );
|
||||
});
|
||||
|
||||
// Create Sections
|
||||
$.each( api.settings.sections, function ( id, data ) {
|
||||
var Constructor = api.sectionConstructor[ data.type ] || api.Section;
|
||||
api.section.add( new Constructor( id, data ) );
|
||||
var Constructor = api.sectionConstructor[ data.type ] || api.Section, options;
|
||||
options = _.extend( { params: data }, data ); // Inclusion of params alias is for back-compat for custom sections that expect to augment this property.
|
||||
api.section.add( new Constructor( id, options ) );
|
||||
});
|
||||
|
||||
// Create Controls
|
||||
$.each( api.settings.controls, function( id, data ) {
|
||||
var Constructor = api.controlConstructor[ data.type ] || api.Control;
|
||||
api.control.add( new Constructor( id, data ) );
|
||||
var Constructor = api.controlConstructor[ data.type ] || api.Control, options;
|
||||
options = _.extend( { params: data }, data ); // Inclusion of params alias is for back-compat for custom controls that expect to augment this property.
|
||||
api.control.add( new Constructor( id, options ) );
|
||||
});
|
||||
|
||||
// Focus the autofocused element
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-beta3-41960';
|
||||
$wp_version = '4.9-beta3-41961';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue