Make WordPress Core

Ticket #47478: 47478.2.diff

File 47478.2.diff, 6.0 KB (added by adamsilverstein, 5 years ago)
  • package-lock.json

    diff --git package-lock.json package-lock.json
    index c09426b894..444d08baf5 100644
     
    43144314                        "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
    43154315                },
    43164316                "backbone": {
    4317                         "version": "1.3.3",
    4318                         "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.3.3.tgz",
    4319                         "integrity": "sha1-TMgOp8sWMaxHSInOQPL4vGg7KZk=",
     4317                        "version": "1.4.0",
     4318                        "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz",
     4319                        "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==",
    43204320                        "requires": {
    43214321                                "underscore": ">=1.8.3"
    43224322                        }
  • package.json

    diff --git package.json package.json
    index 4bf1a8435c..71a8b5e185 100644
     
    101101                "@wordpress/url": "2.5.0",
    102102                "@wordpress/viewport": "2.3.0",
    103103                "@wordpress/wordcount": "2.2.0",
    104                 "backbone": "1.3.3",
     104                "backbone": "1.4.0",
    105105                "clipboard": "2.0.4",
    106106                "element-closest": "^2.0.2",
    107107                "formdata-polyfill": "3.0.13",
  • src/js/media/controllers/state-machine.js

    diff --git src/js/media/controllers/state-machine.js src/js/media/controllers/state-machine.js
    index 626f6c33ce..bb7fb31b27 100644
     
    1414 * @augments Backbone.Model
    1515 * @mixin
    1616 * @mixes Backbone.Events
    17  *
    18  * @param {Array} states
    1917 */
    20 var StateMachine = function( states ) {
    21         // @todo This is dead code. The states collection gets created in media.view.Frame._createStates.
    22         this.states = new Backbone.Collection( states );
     18var StateMachine = function() {
     19        return {
     20                // Use Backbone's self-propagating `extend` inheritance method.
     21                extend: Backbone.Model.extend
     22        };
    2323};
    2424
    25 // Use Backbone's self-propagating `extend` inheritance method.
    26 StateMachine.extend = Backbone.Model.extend;
    27 
    2825_.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller.StateMachine.prototype */{
    2926        /**
    3027         * Fetch a state.
  • src/js/media/views/attachment.js

    diff --git src/js/media/views/attachment.js src/js/media/views/attachment.js
    index 240f05c0ee..14d5e460db 100644
    Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{ 
    6666                        this.details( this.model, this.controller.state().get('selection') );
    6767                }
    6868
    69                 this.listenTo( this.controller, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
     69                this.listenTo( this.controller.states, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
    7070        },
    7171        /**
    7272         * @returns {wp.media.view.Attachment} Returns itself to allow chaining
  • src/js/media/views/media-details.js

    diff --git src/js/media/views/media-details.js src/js/media/views/media-details.js
    index 4b9a7c1a0d..ae643a3941 100644
    MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.pr 
    1919        initialize: function() {
    2020                _.bindAll(this, 'success');
    2121                this.players = [];
    22                 this.listenTo( this.controller, 'close', wp.media.mixin.unsetPlayers );
     22                this.listenTo( this.controller.states, 'close', wp.media.mixin.unsetPlayers );
    2323                this.on( 'ready', this.setPlayer );
    2424                this.on( 'media:setting:remove', wp.media.mixin.unsetPlayers, this );
    2525                this.on( 'media:setting:remove', this.render );
  • src/wp-includes/class-wp-user-query.php

    diff --git src/wp-includes/class-wp-user-query.php src/wp-includes/class-wp-user-query.php
    index cde7811c88..64776e10e8 100644
    class WP_User_Query { 
    159159         *     @type string       $search              Search keyword. Searches for possible string matches on columns.
    160160         *                                             When `$search_columns` is left empty, it tries to determine which
    161161         *                                             column to search in based on search string. Default empty.
    162          *     @type array        $search_columns      Array of column names to be searched. Accepts 'ID', 'user_login',
    163          *                                             'user_email', 'user_url', 'user_nicename', 'display_name'.
    164          *                                             Default empty array.
     162         *     @type array        $search_columns      Array of column names to be searched. Accepts 'ID', 'login',
     163         *                                             'nicename', 'email', 'url'. Default empty array.
    165164         *     @type string|array $orderby             Field(s) to sort the retrieved users by. May be a single value,
    166165         *                                             an array of values, or a multi-dimensional array with fields as
    167166         *                                             keys and orders ('ASC' or 'DESC') as values. Accepted values are
    class WP_User_Query { 
    538537                        /**
    539538                         * Filters the columns to search in a WP_User_Query search.
    540539                         *
    541                          * The default columns depend on the search term, and include 'ID', 'user_login',
    542                          * 'user_email', 'user_url', 'user_nicename', and 'display_name'.
     540                         * The default columns depend on the search term, and include 'user_email',
     541                         * 'user_login', 'ID', 'user_url', 'display_name', and 'user_nicename'.
    543542                         *
    544543                         * @since 3.6.0
    545544                         *
  • src/wp-includes/script-loader.php

    diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
    index 5366bfbcd0..eeb76639a7 100644
    function wp_default_scripts( &$scripts ) { 
    11701170        did_action( 'init' ) && $scripts->add_data( 'json2', 'conditional', 'lt IE 8' );
    11711171
    11721172        $scripts->add( 'underscore', "/wp-includes/js/underscore$dev_suffix.js", array(), '1.8.3', 1 );
    1173         $scripts->add( 'backbone', "/wp-includes/js/backbone$dev_suffix.js", array( 'underscore', 'jquery' ), '1.2.3', 1 );
     1173        $scripts->add( 'backbone', "/wp-includes/js/backbone$dev_suffix.js", array( 'underscore', 'jquery' ), '1.4.0', 1 );
    11741174
    11751175        $scripts->add( 'wp-util', "/wp-includes/js/wp-util$suffix.js", array( 'underscore', 'jquery' ), false, 1 );
    11761176        did_action( 'init' ) && $scripts->localize(