Changeset 41958
- Timestamp:
- 10/20/2017 09:47:13 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r41957 r41958 3342 3342 * @class 3343 3343 * @augments wp.customize.Class 3344 *3345 * @param {string} id - Unique identifier for the control instance.3346 * @param {object} options - Options hash for the control instance.3347 * @param {object} options.type - Type of control (e.g. text, radio, dropdown-pages, etc.)3348 * @param {string} [options.content] - The HTML content for the control or at least its container. This should normally be left blank and instead supplying a templateId.3349 * @param {string} [options.templateId] - Template ID for control's content.3350 * @param {string} [options.priority=10] - Order of priority to show the control within the section.3351 * @param {string} [options.active=true] - Whether the control is active.3352 * @param {string} options.section - The ID of the section the control belongs to.3353 * @param {mixed} [options.setting] - The ID of the main setting or an instance of this setting.3354 * @param {mixed} options.settings - An object with keys (e.g. default) that maps to setting IDs or Setting/Value objects, or an array of setting IDs or Setting/Value objects.3355 * @param {mixed} options.settings.default - The ID of the setting the control relates to.3356 * @param {string} options.settings.data - @todo Is this used?3357 * @param {string} options.label - Label.3358 * @param {string} options.description - Description.3359 * @param {number} [options.instanceNumber] - Order in which this instance was created in relation to other instances.3360 * @param {object} [options.params] - Deprecated wrapper for the above properties.3361 3344 */ 3362 3345 api.Control = api.Class.extend({ … … 3370 3353 }, 3371 3354 3355 /** 3356 * Initialize. 3357 * 3358 * @param {string} id - Unique identifier for the control instance. 3359 * @param {object} options - Options hash for the control instance. 3360 * @param {object} options.type - Type of control (e.g. text, radio, dropdown-pages, etc.) 3361 * @param {string} [options.content] - The HTML content for the control or at least its container. This should normally be left blank and instead supplying a templateId. 3362 * @param {string} [options.templateId] - Template ID for control's content. 3363 * @param {string} [options.priority=10] - Order of priority to show the control within the section. 3364 * @param {string} [options.active=true] - Whether the control is active. 3365 * @param {string} options.section - The ID of the section the control belongs to. 3366 * @param {mixed} [options.setting] - The ID of the main setting or an instance of this setting. 3367 * @param {mixed} options.settings - An object with keys (e.g. default) that maps to setting IDs or Setting/Value objects, or an array of setting IDs or Setting/Value objects. 3368 * @param {mixed} options.settings.default - The ID of the setting the control relates to. 3369 * @param {string} options.settings.data - @todo Is this used? 3370 * @param {string} options.label - Label. 3371 * @param {string} options.description - Description. 3372 * @param {number} [options.instanceNumber] - Order in which this instance was created in relation to other instances. 3373 * @param {object} [options.params] - Deprecated wrapper for the above properties. 3374 * @returns {void} 3375 */ 3372 3376 initialize: function( id, options ) { 3373 3377 var control = this, deferredSettingIds = [], settings, gatherSettings; … … 5115 5119 5116 5120 /** 5121 * Initialize. 5122 * 5123 * @since 4.9.0 5124 * @param {string} id - Unique identifier for the control instance. 5125 * @param {object} options - Options hash for the control instance. 5126 * @returns {void} 5127 */ 5128 initialize: function( id, options ) { 5129 var control = this; 5130 api.Control.prototype.initialize.call( this, id, options ); 5131 control.deferred.codemirror = $.Deferred(); 5132 }, 5133 5134 /** 5117 5135 * Initialize the editor when the containing section is ready and expanded. 5118 5136 * … … 5273 5291 } 5274 5292 }); 5293 5294 control.deferred.codemirror.resolveWith( control, [ control.editor.codemirror ] ); 5275 5295 }, 5276 5296 … … 5381 5401 event.preventDefault(); 5382 5402 }); 5403 5404 control.deferred.codemirror.rejectWith( control ); 5383 5405 } 5384 5406 });
Note: See TracChangeset
for help on using the changeset viewer.