diff --git src/wp-includes/js/wp-backbone.js src/wp-includes/js/wp-backbone.js
index 8b47f4e..d373f78 100644
|
|
window.wp = window.wp || {}; |
91 | 91 | * Accepts an `options` object, which has a significant effect on the |
92 | 92 | * resulting behavior. |
93 | 93 | * |
94 | | * `options.silent` – *boolean, `false`* |
95 | | * > If `options.silent` is true, no DOM modifications will be made. |
| 94 | * `options.silent` - *boolean, `false`* |
| 95 | * If `options.silent` is true, no DOM modifications will be made. |
96 | 96 | * |
97 | | * `options.add` – *boolean, `false`* |
98 | | * > Use `Views.add()` as a shortcut for setting `options.add` to true. |
| 97 | * `options.add` - *boolean, `false`* |
| 98 | * Use `Views.add()` as a shortcut for setting `options.add` to true. |
99 | 99 | * |
100 | | * > By default, the provided `views` will replace |
101 | | * any existing views associated with the selector. If `options.add` |
102 | | * is true, the provided `views` will be added to the existing views. |
| 100 | * By default, the provided `views` will replace any existing views |
| 101 | * associated with the selector. If `options.add` is true, the provided |
| 102 | * `views` will be added to the existing views. |
103 | 103 | * |
104 | | * `options.at` – *integer, `undefined`* |
105 | | * > When adding, to insert `views` at a specific index, use |
106 | | * `options.at`. By default, `views` are added to the end of the array. |
| 104 | * `options.at` - *integer, `undefined`* |
| 105 | * When adding, to insert `views` at a specific index, use `options.at`. |
| 106 | * By default, `views` are added to the end of the array. |
107 | 107 | * |
108 | 108 | * @since 3.5.0 |
109 | 109 | * |
… |
… |
window.wp = window.wp || {}; |
197 | 197 | * @since 3.5.0 |
198 | 198 | * |
199 | 199 | * @param {string} selector A jQuery selector. |
200 | | * @param {array|object} views The subviews for the main view. |
| 200 | * @param {array|Object} views The subviews for the main view. |
201 | 201 | * @param {Object} options Options for call. To insert `views` at a |
202 | 202 | * specific index, use `options.at`. If |
203 | 203 | * `options.silent` is true, no DOM modifications |
… |
… |
window.wp = window.wp || {}; |
273 | 273 | }, |
274 | 274 | |
275 | 275 | /** |
276 | | * Renders all subviews |
| 276 | * Renders all subviews. |
277 | 277 | * |
278 | 278 | * Used in conjunction with `Views.detach()`. |
279 | 279 | * |
… |
… |
window.wp = window.wp || {}; |
295 | 295 | }, |
296 | 296 | |
297 | 297 | /** |
298 | | * Removes all subviews |
| 298 | * Removes all subviews. |
299 | 299 | * |
300 | 300 | * Triggers the `remove()` method on all subviews. Detaches the master |
301 | 301 | * view from its parent. Resets the internals of the views manager. |
… |
… |
window.wp = window.wp || {}; |
344 | 344 | }, |
345 | 345 | |
346 | 346 | /** |
347 | | * Insert subviews into a selector |
| 347 | * Insert subviews into a selector. |
348 | 348 | * |
349 | 349 | * By default, appends the subview `els` to the end of the `$target` |
350 | 350 | * selector. If `options.at` is set, inserts the subview `els` at the |
… |
… |
window.wp = window.wp || {}; |
404 | 404 | * |
405 | 405 | * @private |
406 | 406 | * |
407 | | * @param {string} selector A jQuery selector. |
408 | | * @param {array|object} views The subviews for the main view. |
409 | | * @param {Object} options Options for call. |
410 | | * @param {boolean} options.add If true the provided views will be added. |
| 407 | * @param {string} selector A jQuery selector. |
| 408 | * @param {array|object} views The subviews for the main view. |
| 409 | * @param {Object} options Options for call. |
| 410 | * @param {boolean} options.add If true the provided views will be added. |
411 | 411 | * |
412 | 412 | * @return {wp.Backbone.Subviews} The current Subviews instance. |
413 | 413 | */ |
… |
… |
window.wp = window.wp || {}; |
433 | 433 | // Insert or replace the views. |
434 | 434 | this[ options.add ? 'insert' : 'replace' ]( $selector, _.pluck( views, 'el' ), options ); |
435 | 435 | |
436 | | // Set attached and trigger ready if the current view is already |
437 | | // attached to the DOM. |
| 436 | /* |
| 437 | * Set attached and trigger ready if the current view is already |
| 438 | * attached to the DOM. |
| 439 | */ |
438 | 440 | _.each( managers, function( manager ) { |
439 | 441 | manager.attached = true; |
440 | 442 | |
… |
… |
window.wp = window.wp || {}; |
452 | 454 | * |
453 | 455 | * @private |
454 | 456 | * |
455 | | * @returns {boolean} Whether or not the current view is in the DOM. |
| 457 | * @return {boolean} Whether or not the current view is in the DOM. |
456 | 458 | */ |
457 | 459 | _isReady: function() { |
458 | 460 | var node = this.view.el; |
… |
… |
window.wp = window.wp || {}; |
483 | 485 | * @memberOf wp.Backbone |
484 | 486 | * |
485 | 487 | * @constructs |
486 | | * @augments Backbone.View |
| 488 | * @augments Backbone.View |
487 | 489 | * |
488 | 490 | * @param {Object} options The options for this view. |
489 | 491 | */ |