wp/wp-includes/js/customize-base.js
changeset 21 48c4eec2b7e6
parent 18 be944660c56a
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
   389 		},
   389 		},
   390 
   390 
   391 		/**
   391 		/**
   392 		 * Add an item to the collection.
   392 		 * Add an item to the collection.
   393 		 *
   393 		 *
   394 		 * @param {string|wp.customize.Class} item - The item instance to add, or the ID for the instance to add. When an ID string is supplied, then itemObject must be provided.
   394 		 * @param {string|wp.customize.Class} item         - The item instance to add, or the ID for the instance to add.
   395 		 * @param {wp.customize.Class}        [itemObject] - The item instance when the first argument is a ID string.
   395 		 *                                                   When an ID string is supplied, then itemObject must be provided.
       
   396 		 * @param {wp.customize.Class}        [itemObject] - The item instance when the first argument is an ID string.
   396 		 * @return {wp.customize.Class} The new item's instance, or an existing instance if already added.
   397 		 * @return {wp.customize.Class} The new item's instance, or an existing instance if already added.
   397 		 */
   398 		 */
   398 		add: function( item, itemObject ) {
   399 		add: function( item, itemObject ) {
   399 			var collection = this, id, instance;
   400 			var collection = this, id, instance;
   400 			if ( 'string' === typeof item ) {
   401 			if ( 'string' === typeof item ) {