Make WordPress Core

Ticket #48305: 48305.3.diff

File 48305.3.diff, 17.2 KB (added by Shital Patel, 5 years ago)
  • js/_enqueues/wp/customize/widgets.js

     
    20602060                },
    20612061
    20622062                /**
    2063                  * @param {string} widgetId or an id_base for adding a previously non-existing widget
     2063                 * @param {string} widgetId or an id_base for adding a previously non-existing widget.
    20642064                 * @returns {object|false} widget_form control instance, or false on error
    20652065                 */
    20662066                addWidget: function( widgetId ) {
  • js/media/controllers/region.js

     
    7777         * @fires Region#create
    7878         * @fires Region#render
    7979         *
    80          * @returns {wp.media.controller.Region} Returns itself to allow chaining
     80         * @returns {wp.media.controller.Region} Returns itself to allow chaining.
    8181         */
    8282        render: function( mode ) {
    8383                // If the mode isn't active, activate it.
  • js/media/controllers/state-machine.js

     
    6565         * @fires wp.media.controller.State#deactivate
    6666         * @fires wp.media.controller.State#activate
    6767         *
    68          * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining
     68         * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
    6969         */
    7070        setState: function( id ) {
    7171                var previous = this.state();
  • js/media/models/attachments.js

     
    172172         *
    173173         * @param {wp.media.model.Attachment} attachment
    174174         * @param {Object} options
    175          * @returns {wp.media.model.Attachments} Returns itself to allow chaining
     175         * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
    176176         */
    177177        validate: function( attachment, options ) {
    178178                var valid = this.validator( attachment ),
     
    195195         *
    196196         * @fires wp.media.model.Attachments#reset
    197197         *
    198          * @returns {wp.media.model.Attachments} Returns itself to allow chaining
     198         * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
    199199         */
    200200        validateAll: function( attachments, options ) {
    201201                options = options || {};
     
    229229         * Stop replicating collection change events from another attachments collection.
    230230         *
    231231         * @param {wp.media.model.Attachments} The attachments collection to stop observing.
    232          * @returns {wp.media.model.Attachments} Returns itself to allow chaining
     232         * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
    233233         */
    234234        unobserve: function( attachments ) {
    235235                if ( attachments ) {
     
    252252         * @param {wp.media.model.Attachments} attachments
    253253         * @param {Object} options
    254254         *
    255          * @returns {wp.media.model.Attachments} Returns itself to allow chaining
     255         * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
    256256         */
    257257        _validateHandler: function( attachment, attachments, options ) {
    258258                // If we're not mirroring this `attachments` collection,
     
    268268         *
    269269         * @param {wp.media.model.Attachments} attachments
    270270         * @param {Object} options
    271          * @returns {wp.media.model.Attachments} Returns itself to allow chaining
     271         * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
    272272         */
    273273        _validateAllHandler: function( attachments, options ) {
    274274                return this.validateAll( attachments, options );
     
    278278         * in the collection.
    279279         *
    280280         * @param {wp.media.model.Attachments} The attachments collection to mirror.
    281          * @returns {wp.media.model.Attachments} Returns itself to allow chaining
     281         * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
    282282         */
    283283        mirror: function( attachments ) {
    284284                if ( this.mirroring && this.mirroring === attachments ) {
  • js/media/views/attachment-compat.js

     
    2828                this.listenTo( this.model, 'change:compat', this.render );
    2929        },
    3030        /**
    31          * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining
     31         * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
    3232         */
    3333        dispose: function() {
    3434                if ( this.$(':focus').length ) {
     
    4040                return View.prototype.dispose.apply( this, arguments );
    4141        },
    4242        /**
    43          * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining
     43         * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
    4444         */
    4545        render: function() {
    4646                var compat = this.model.get('compat');
  • js/media/views/attachment.js

     
    6969                this.listenTo( this.controller.states, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
    7070        },
    7171        /**
    72          * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     72         * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
    7373         */
    7474        dispose: function() {
    7575                var selection = this.options.selection;
     
    8787                return this;
    8888        },
    8989        /**
    90          * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     90         * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
    9191         */
    9292        render: function() {
    9393                var options = _.defaults( this.model.toJSON(), {
     
    434434        },
    435435        /**
    436436         * @param {string} status
    437          * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     437         * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
    438438         */
    439439        updateSave: function( status ) {
    440440                var save = this._save = this._save || { status: 'ready' };
     
    529529         *
    530530         * @param {Backbone.Model} model
    531531         * @param {string} value
    532          * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     532         * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
    533533         */
    534534        /**
    535535         * @function _syncTitle
     
    538538         *
    539539         * @param {Backbone.Model} model
    540540         * @param {string} value
    541          * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     541         * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
    542542         */
    543543        /**
    544544         * @function _syncArtist
     
    547547         *
    548548         * @param {Backbone.Model} model
    549549         * @param {string} value
    550          * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     550         * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
    551551         */
    552552        /**
    553553         * @function _syncAlbum
     
    556556         *
    557557         * @param {Backbone.Model} model
    558558         * @param {string} value
    559          * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     559         * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
    560560         */
    561561        Attachment.prototype[ method ] = function( model, value ) {
    562562                var $setting = this.$('[data-setting="' + setting + '"]');
  • js/media/views/button.js

     
    4747                this.listenTo( this.model, 'change', this.render );
    4848        },
    4949        /**
    50          * @returns {wp.media.view.Button} Returns itself to allow chaining
     50         * @returns {wp.media.view.Button} Returns itself to allow chaining.
    5151         */
    5252        render: function() {
    5353                var classes = [ 'button', this.className ],
  • js/media/views/frame.js

     
    8080        /**
    8181         * Reset all states on the frame to their defaults.
    8282         *
    83          * @returns {wp.media.view.Frame} Returns itself to allow chaining
     83         * @returns {wp.media.view.Frame} Returns itself to allow chaining.
    8484         */
    8585        reset: function() {
    8686                this.states.invoke( 'trigger', 'reset' );
  • js/media/views/iframe.js

     
    1111var Iframe = wp.media.View.extend(/** @lends wp.media.view.Iframe.prototype */{
    1212        className: 'media-iframe',
    1313        /**
    14          * @returns {wp.media.view.Iframe} Returns itself to allow chaining
     14         * @returns {wp.media.view.Iframe} Returns itself to allow chaining.
    1515         */
    1616        render: function() {
    1717                this.views.detach();
  • js/media/views/media-details.js

     
    123123        },
    124124
    125125        /**
    126          * @returns {media.view.MediaDetails} Returns itself to allow chaining
     126         * @returns {media.view.MediaDetails} Returns itself to allow chaining.
    127127         */
    128128        render: function() {
    129129                AttachmentDisplay.prototype.render.apply( this, arguments );
  • js/media/views/media-frame.js

     
    143143        },
    144144
    145145        /**
    146          * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining
     146         * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
    147147         */
    148148        render: function() {
    149149                // Activate the default state if no active state exists.
     
    316316         * @memberOf wp.media.view.MediaFrame
    317317         * @instance
    318318         *
    319          * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining
     319         * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
    320320         */
    321321        /**
    322322         * @function close
     
    323323         * @memberOf wp.media.view.MediaFrame
    324324         * @instance
    325325         *
    326          * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining
     326         * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
    327327         */
    328328        /**
    329329         * @function attach
     
    330330         * @memberOf wp.media.view.MediaFrame
    331331         * @instance
    332332         *
    333          * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining
     333         * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
    334334         */
    335335        /**
    336336         * @function detach
     
    337337         * @memberOf wp.media.view.MediaFrame
    338338         * @instance
    339339         *
    340          * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining
     340         * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
    341341         */
    342342        /**
    343343         * @function escape
     
    344344         * @memberOf wp.media.view.MediaFrame
    345345         * @instance
    346346         *
    347          * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining
     347         * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
    348348         */
    349349        MediaFrame.prototype[ method ] = function() {
    350350                if ( this.modal ) {
  • js/media/views/modal.js

     
    4747        },
    4848
    4949        /**
    50          * @returns {wp.media.view.Modal} Returns itself to allow chaining
     50         * @returns {wp.media.view.Modal} Returns itself to allow chaining.
    5151         */
    5252        attach: function() {
    5353                if ( this.views.attached ) {
     
    6868        },
    6969
    7070        /**
    71          * @returns {wp.media.view.Modal} Returns itself to allow chaining
     71         * @returns {wp.media.view.Modal} Returns itself to allow chaining.
    7272         */
    7373        detach: function() {
    7474                if ( this.$el.is(':visible') ) {
     
    8181        },
    8282
    8383        /**
    84          * @returns {wp.media.view.Modal} Returns itself to allow chaining
     84         * @returns {wp.media.view.Modal} Returns itself to allow chaining.
    8585         */
    8686        open: function() {
    8787                var $el = this.$el,
     
    125125
    126126        /**
    127127         * @param {Object} options
    128          * @returns {wp.media.view.Modal} Returns itself to allow chaining
     128         * @returns {wp.media.view.Modal} Returns itself to allow chaining.
    129129         */
    130130        close: function( options ) {
    131131                if ( ! this.views.attached || ! this.$el.is(':visible') ) {
     
    164164                return this;
    165165        },
    166166        /**
    167          * @returns {wp.media.view.Modal} Returns itself to allow chaining
     167         * @returns {wp.media.view.Modal} Returns itself to allow chaining.
    168168         */
    169169        escape: function() {
    170170                return this.close({ escape: true });
     
    179179
    180180        /**
    181181         * @param {Array|Object} content Views to register to '.media-modal-content'
    182          * @returns {wp.media.view.Modal} Returns itself to allow chaining
     182         * @returns {wp.media.view.Modal} Returns itself to allow chaining.
    183183         */
    184184        content: function( content ) {
    185185                this.views.set( '.media-modal-content', content );
     
    191191         * forwards events to the modal's controller.
    192192         *
    193193         * @param {string} id
    194          * @returns {wp.media.view.Modal} Returns itself to allow chaining
     194         * @returns {wp.media.view.Modal} Returns itself to allow chaining.
    195195         */
    196196        propagate: function( id ) {
    197197                this.trigger( id );
  • js/media/views/priority-list.js

     
    2525         * @param {string} id
    2626         * @param {wp.media.View|Object} view
    2727         * @param {Object} options
    28          * @returns {wp.media.view.PriorityList} Returns itself to allow chaining
     28         * @returns {wp.media.view.PriorityList} Returns itself to allow chaining.
    2929         */
    3030        set: function( id, view, options ) {
    3131                var priority, views, index;
  • js/media/views/search.js

     
    2424        },
    2525
    2626        /**
    27          * @returns {wp.media.view.Search} Returns itself to allow chaining
     27         * @returns {wp.media.view.Search} Returns itself to allow chaining.
    2828         */
    2929        render: function() {
    3030                this.el.value = this.model.escape('search');
  • js/media/views/settings.js

     
    3131                }, this.options );
    3232        },
    3333        /**
    34          * @returns {wp.media.view.Settings} Returns itself to allow chaining
     34         * @returns {wp.media.view.Settings} Returns itself to allow chaining.
    3535         */
    3636        render: function() {
    3737                View.prototype.render.apply( this, arguments );
  • js/media/views/settings/attachment-display.js

     
    4242                Settings.prototype.dispose.apply( this, arguments );
    4343        },
    4444        /**
    45          * @returns {wp.media.view.AttachmentDisplay} Returns itself to allow chaining
     45         * @returns {wp.media.view.AttachmentDisplay} Returns itself to allow chaining.
    4646         */
    4747        render: function() {
    4848                var attachment = this.options.attachment;
  • js/media/views/toolbar.js

     
    7474         * @param {string} id
    7575         * @param {Backbone.View|Object} view
    7676         * @param {Object} [options={}]
    77          * @returns {wp.media.view.Toolbar} Returns itself to allow chaining
     77         * @returns {wp.media.view.Toolbar} Returns itself to allow chaining.
    7878         */
    7979        set: function( id, view, options ) {
    8080                var list;
     
    116116        /**
    117117         * @param {string} id
    118118         * @param {Object} options
    119          * @returns {wp.media.view.Toolbar} Returns itself to allow chaining
     119         * @returns {wp.media.view.Toolbar} Returns itself to allow chaining.
    120120         */
    121121        unset: function( id, options ) {
    122122                delete this._views[ id ];
  • js/media/views/uploader/inline.js

     
    6060                return data;
    6161        },
    6262        /**
    63          * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining
     63         * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining.
    6464         */
    6565        dispose: function() {
    6666                if ( this.disposing ) {
     
    7777                return this.remove();
    7878        },
    7979        /**
    80          * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining
     80         * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining.
    8181         */
    8282        remove: function() {
    8383                /**
  • js/media/views/view.js

     
    2828         *       before Backbone 0.9.8 came out. Figure out if Backbone core takes
    2929         *       care of this in Backbone.View now.
    3030         *
    31          * @returns {wp.media.View} Returns itself to allow chaining
     31         * @returns {wp.media.View} Returns itself to allow chaining.
    3232         */
    3333        dispose: function() {
    3434                // Undelegating events, removing events from the model, and
     
    5252                return this;
    5353        },
    5454        /**
    55          * @returns {wp.media.View} Returns itself to allow chaining
     55         * @returns {wp.media.View} Returns itself to allow chaining.
    5656         */
    5757        remove: function() {
    5858                this.dispose();