Make WordPress Core

Ticket #35465: 35465.6.diff

File 35465.6.diff, 2.8 KB (added by birgire, 5 years ago)
  • src/wp-includes/js/wp-backbone.js

    diff --git src/wp-includes/js/wp-backbone.js src/wp-includes/js/wp-backbone.js
    index 8b47f4e..9788674 100644
    window.wp = window.wp || {}; 
    197197                 * @since 3.5.0
    198198                 *
    199199                 * @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.
    201201                 * @param {Object}       options  Options for call.  To insert `views` at a
    202202                 *                                specific index, use `options.at`. If
    203203                 *                                `options.silent` is true, no DOM modifications
    window.wp = window.wp || {}; 
    273273                },
    274274
    275275                /**
    276                  * Renders all subviews
     276                 * Renders all subviews.
    277277                 *
    278278                 * Used in conjunction with `Views.detach()`.
    279279                 *
    window.wp = window.wp || {}; 
    295295                },
    296296
    297297                /**
    298                  * Removes all subviews
     298                 * Removes all subviews.
    299299                 *
    300300                 * Triggers the `remove()` method on all subviews. Detaches the master
    301301                 * view from its parent. Resets the internals of the views manager.
    window.wp = window.wp || {}; 
    344344                },
    345345
    346346                /**
    347                  * Insert subviews into a selector
     347                 * Insert subviews into a selector.
    348348                 *
    349349                 * By default, appends the subview `els` to the end of the `$target`
    350350                 * selector. If `options.at` is set, inserts the subview `els` at the
    window.wp = window.wp || {}; 
    404404                 *
    405405                 * @private
    406406                 *
    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.
    411411                 *
    412412                 * @return {wp.Backbone.Subviews} The current Subviews instance.
    413413                 */
    window.wp = window.wp || {}; 
    433433                        // Insert or replace the views.
    434434                        this[ options.add ? 'insert' : 'replace' ]( $selector, _.pluck( views, 'el' ), options );
    435435
    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                         */
    438440                        _.each( managers, function( manager ) {
    439441                                manager.attached = true;
    440442
    window.wp = window.wp || {}; 
    452454                 *
    453455                 * @private
    454456                 *
    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.
    456458                 */
    457459                _isReady: function() {
    458460                        var node = this.view.el;