Make WordPress Core

Ticket #40831: 40831.patch

File 40831.patch, 2.3 KB (added by vishalkakadiya, 7 years ago)

Some documentation and code improvements.

  • wp-includes/js/customize-base.js

    diff --git a/wp-includes/js/customize-base.js b/wp-includes/js/customize-base.js
    index 628d267..13d1ae2 100644
    a b window.wp = window.wp || {}; 
    1313         * Similar to `goog.inherits`, but uses a hash of prototype properties and
    1414         * class properties to be extended.
    1515         *
    16          * @param  object parent      Parent class constructor to inherit from.
    17          * @param  object protoProps  Properties to apply to the prototype for use as class instance properties.
    18          * @param  object staticProps Properties to apply directly to the class constructor.
     16         * @param  {object} parent      Parent class constructor to inherit from.
     17         * @param  {object} protoProps  Properties to apply to the prototype for use as class instance properties.
     18         * @param  {object} staticProps Properties to apply directly to the class constructor.
    1919         * @return child              The subclassed constructor.
    2020         */
    2121        inherits = function( parent, protoProps, staticProps ) {
    window.wp = window.wp || {}; 
    9898        /**
    9999         * Creates a subclass of the class.
    100100         *
    101          * @param  object protoProps Properties to apply to the prototype.
    102          * @param  object staticProps Properties to apply directly to the class.
     101         * @param {object} protoProps Properties to apply to the prototype.
     102         * @param {object} classProps Properties to apply directly to the class.
    103103         * @return child              The subclass.
    104104         */
    105105        api.Class.extend = function( protoProps, classProps ) {
    window.wp = window.wp || {}; 
    539539        /**
    540540         * Cast a string to a jQuery collection if it isn't already.
    541541         *
    542          * @param {string|jQuery collection} element
     542         * @param {string|jQuery} element
    543543         */
    544544        api.ensure = function( element ) {
    545                 return typeof element == 'string' ? $( element ) : element;
     545                return typeof element === 'string' ? $( element ) : element;
    546546        };
    547547
    548548        /**
  • wp-includes/js/customize-loader.js

    diff --git a/wp-includes/js/customize-loader.js b/wp-includes/js/customize-loader.js
    index 9d0aad8..4f05aab 100644
    a b window.wp = window.wp || {}; 
    101101                /**
    102102                 * Open the Customizer overlay for a specific URL.
    103103                 *
    104                  * @param  string src URL to load in the Customizer.
     104                 * @param  {string} src URL to load in the Customizer.
    105105                 */
    106106                open: function( src ) {
    107107