Customize: Allow control subclasses to add to the `deferred` object before the base class initializes.
Update the `CodeEditorControl`'s `codemirror` deferred to be set before calling the parent class's `initialize` method. Since the `ready` method may be called directly by `initialize` it may be too late to add a new `Deferred` to the control's `deferred` property after calling the base control class's `initialize`. Amends [41958]. See #41897. Built from https://develop.svn.wordpress.org/trunk@41960 git-svn-id: http://core.svn.wordpress.org/trunk@41794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
45655bb928
commit
1f735509af
|
@ -3419,9 +3419,9 @@
|
|||
control.templateSelector = 'customize-control-' + control.params.type + '-content';
|
||||
}
|
||||
|
||||
control.deferred = {
|
||||
control.deferred = _.extend( control.deferred || {}, {
|
||||
embedded: new $.Deferred()
|
||||
};
|
||||
} );
|
||||
control.section = new api.Value();
|
||||
control.priority = new api.Value();
|
||||
control.active = new api.Value();
|
||||
|
@ -5127,8 +5127,10 @@
|
|||
*/
|
||||
initialize: function( id, options ) {
|
||||
var control = this;
|
||||
api.Control.prototype.initialize.call( this, id, options );
|
||||
control.deferred.codemirror = $.Deferred();
|
||||
control.deferred = _.extend( control.deferred || {}, {
|
||||
codemirror: $.Deferred()
|
||||
} );
|
||||
api.Control.prototype.initialize.call( control, id, options );
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-beta3-41959';
|
||||
$wp_version = '4.9-beta3-41960';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue