diff --git src/wp-includes/js/customize-base.js src/wp-includes/js/customize-base.js
index d2488dd..648204c 100644
|
|
window.wp = window.wp || {}; |
316 | 316 | return this.add( id, new this.defaultConstructor( api.Class.applicator, slice.call( arguments, 1 ) ) ); |
317 | 317 | }, |
318 | 318 | |
| 319 | /** |
| 320 | * Iterate over each value in the collection. |
| 321 | * |
| 322 | * @param {Function} callback, passed the value, key, and context |
| 323 | * @param {Object} [context] defaults to this |
| 324 | * @returns {wp.customize.Values} |
| 325 | */ |
319 | 326 | each: function( callback, context ) { |
320 | | context = typeof context === 'undefined' ? this : context; |
| 327 | context = ( typeof context === 'undefined' ? this : context ); |
| 328 | return _.each( this._value, callback, context ); |
| 329 | }, |
321 | 330 | |
322 | | $.each( this._value, function( key, obj ) { |
323 | | callback.call( context, obj, key ); |
324 | | }); |
| 331 | /** |
| 332 | * Run a callback on each value and return an array of the return values. |
| 333 | * |
| 334 | * @param {Function} callback |
| 335 | * @param {Object} [context] defaults to this |
| 336 | * @param {Array} Return the results of applying the iteratee to each element. |
| 337 | */ |
| 338 | map: function ( callback, context ) { |
| 339 | context = ( typeof context === 'undefined' ? this : context ); |
| 340 | return _.map( this._value, callback, context ); |
325 | 341 | }, |
326 | 342 | |
327 | 343 | remove: function( id ) { |