Docs: Remove extra spaces from @param tags.

Per the documentation standards, `@param` tags should be aligned with each other, but not with the `@return` tag.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48110


git-svn-id: http://core.svn.wordpress.org/trunk@47879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-06-20 12:58:10 +00:00
parent b16368c268
commit be16bb9fba
35 changed files with 181 additions and 180 deletions

View File

@ -1490,7 +1490,7 @@ endif;
* *
* @since 4.9.0 * @since 4.9.0
* *
* @param array $object A crop attachment object. * @param array $object A crop attachment object.
* @return int|false An attachment ID if one exists. False if none. * @return int|false An attachment ID if one exists. False if none.
*/ */
public function get_previous_crop( $object ) { public function get_previous_crop( $object ) {

View File

@ -300,7 +300,7 @@ class WP_Community_Events {
* *
* @since 4.8.0 * @since 4.8.0
* *
* @param array $location Should contain 'latitude' and 'longitude' indexes. * @param array $location Should contain 'latitude' and 'longitude' indexes.
* @return bool|string false on failure, or a string on success. * @return bool|string false on failure, or a string on success.
*/ */
protected function get_events_transient_key( $location ) { protected function get_events_transient_key( $location ) {
@ -361,7 +361,7 @@ class WP_Community_Events {
* *
* @since 4.8.0 * @since 4.8.0
* *
* @param array $response_body The response which contains the events. * @param array $response_body The response which contains the events.
* @return array The response with dates and times formatted. * @return array The response with dates and times formatted.
*/ */
protected function format_event_data_time( $response_body ) { protected function format_event_data_time( $response_body ) {
@ -436,7 +436,7 @@ class WP_Community_Events {
* @since 4.8.0 * @since 4.8.0
* @since 4.9.7 Stick a WordCamp to the final list. * @since 4.9.7 Stick a WordCamp to the final list.
* *
* @param array $response_body The response body which contains the events. * @param array $response_body The response body which contains the events.
* @return array The response body with events trimmed. * @return array The response body with events trimmed.
*/ */
protected function trim_events( $response_body ) { protected function trim_events( $response_body ) {

View File

@ -346,8 +346,8 @@ class WP_Upgrader {
* @since 4.9.0 * @since 4.9.0
* @access protected * @access protected
* *
* @param array $nested_files Array of files as returned by WP_Filesystem::dirlist() * @param array $nested_files Array of files as returned by WP_Filesystem::dirlist().
* @param string $path Relative path to prepend to child nodes. Optional. * @param string $path Relative path to prepend to child nodes. Optional.
* @return array A flattened array of the $nested_files specified. * @return array A flattened array of the $nested_files specified.
*/ */
protected function flatten_dirlist( $nested_files, $path = '' ) { protected function flatten_dirlist( $nested_files, $path = '' ) {

View File

@ -420,8 +420,8 @@ function display_plugins_table() {
* *
* @since 3.0.0 * @since 3.0.0
* *
* @param array|object $api Data about the plugin retrieved from the API. * @param array|object $api Data about the plugin retrieved from the API.
* @param bool $loop Optional. Disable further loops. Default false. * @param bool $loop Optional. Disable further loops. Default false.
* @return array { * @return array {
* Plugin installation status data. * Plugin installation status data.
* *

View File

@ -413,10 +413,10 @@
* *
* @memberof imageEdit * @memberof imageEdit
* *
* @param {number} postid The post ID. * @param {number} postid The post ID.
* @param {string} nonce The nonce to verify the request. * @param {string} nonce The nonce to verify the request.
* @param {string} action The action to perform on the image. * @param {string} action The action to perform on the image.
* The possible actions are: "scale" and "restore". * The possible actions are: "scale" and "restore".
* *
* @return {boolean|void} Executes a post request that refreshes the page * @return {boolean|void} Executes a post request that refreshes the page
* when the action is performed. * when the action is performed.

View File

@ -389,9 +389,9 @@ window.wp = window.wp || {};
* *
* @since 2.7.0 * @since 2.7.0
* *
* @param {int} id The ID for the post that has been changed. * @param {int} id The ID for the post that has been changed.
* @return {boolean} False, so the form does not submit when pressing * @return {boolean} False, so the form does not submit when pressing
* Enter on a focused field. * Enter on a focused field.
*/ */
save : function(id) { save : function(id) {
var params, fields, page = $('.post_status_page').val() || ''; var params, fields, page = $('.post_status_page').val() || '';
@ -503,8 +503,8 @@ window.wp = window.wp || {};
* *
* @memberof inlineEditPost * @memberof inlineEditPost
* *
* @param {Object} o DOM row object to get the ID for. * @param {Object} o DOM row object to get the ID for.
* @return {string} The post ID extracted from the table row in the object. * @return {string} The post ID extracted from the table row in the object.
*/ */
getId : function(o) { getId : function(o) {
var id = $(o).closest('tr').attr('id'), var id = $(o).closest('tr').attr('id'),

View File

@ -429,7 +429,7 @@
* Refreshes advanced accessibility buttons for one menu item. * Refreshes advanced accessibility buttons for one menu item.
* Shows or hides buttons based on the location of the menu item. * Shows or hides buttons based on the location of the menu item.
* *
* @param {object} itemToRefresh The menu item that might need its advanced accessibility buttons refreshed * @param {object} itemToRefresh The menu item that might need its advanced accessibility buttons refreshed
*/ */
refreshAdvancedAccessibilityOfItem : function( itemToRefresh ) { refreshAdvancedAccessibilityOfItem : function( itemToRefresh ) {
@ -1292,7 +1292,8 @@
/** /**
* Remove a menu item. * Remove a menu item.
* @param {object} el The element to be removed as a jQuery object. *
* @param {object} el The element to be removed as a jQuery object.
* *
* @fires document#menu-removing-item Passes the element to be removed. * @fires document#menu-removing-item Passes the element to be removed.
*/ */

View File

@ -188,8 +188,8 @@ class WP_Block_Type {
* *
* @since 5.0.0 * @since 5.0.0
* *
* @param array $attributes Original block attributes. * @param array $attributes Original block attributes.
* @return array Prepared block attributes. * @return array Prepared block attributes.
*/ */
public function prepare_attributes_for_render( $attributes ) { public function prepare_attributes_for_render( $attributes ) {
// If there are no attribute definitions for the block type, skip // If there are no attribute definitions for the block type, skip

View File

@ -1100,7 +1100,7 @@ final class WP_Customize_Widgets {
* *
* @since 4.2.0 * @since 4.2.0
* *
* @param array $nonces Array of nonces. * @param array $nonces Array of nonces.
* @return array Array of nonces. * @return array Array of nonces.
*/ */
public function refresh_nonces( $nonces ) { public function refresh_nonces( $nonces ) {
@ -1388,7 +1388,7 @@ final class WP_Customize_Widgets {
* @global array $wp_registered_widget_updates * @global array $wp_registered_widget_updates
* @global array $wp_registered_widget_controls * @global array $wp_registered_widget_controls
* *
* @param string $widget_id Widget ID. * @param string $widget_id Widget ID.
* @return array|WP_Error Array containing the updated widget information. * @return array|WP_Error Array containing the updated widget information.
* A WP_Error object, otherwise. * A WP_Error object, otherwise.
*/ */

View File

@ -240,7 +240,7 @@ class WP_Date_Query {
* *
* @since 4.1.0 * @since 4.1.0
* *
* @param array $query Query clause. * @param array $query Query clause.
* @return bool True if this is a first-order clause. * @return bool True if this is a first-order clause.
*/ */
protected function is_first_order_clause( $query ) { protected function is_first_order_clause( $query ) {
@ -275,7 +275,7 @@ class WP_Date_Query {
* *
* @since 4.1.0 * @since 4.1.0
* *
* @param array $date_query The date_query array. * @param array $date_query The date_query array.
* @return bool True if all values in the query are valid, false if one or more fail. * @return bool True if all values in the query are valid, false if one or more fail.
*/ */
public function validate_date_values( $date_query = array() ) { public function validate_date_values( $date_query = array() ) {
@ -677,7 +677,7 @@ class WP_Date_Query {
* *
* @since 3.7.0 * @since 3.7.0
* *
* @param array $query Date query arguments. * @param array $query Date query arguments.
* @return array { * @return array {
* Array containing JOIN and WHERE SQL clauses to append to the main query. * Array containing JOIN and WHERE SQL clauses to append to the main query.
* *
@ -694,8 +694,8 @@ class WP_Date_Query {
* *
* @since 4.1.0 * @since 4.1.0
* *
* @param array $query Date query clause. * @param array $query Date query clause.
* @param array $parent_query Parent query of the current date query. * @param array $parent_query Parent query of the current date query.
* @return array { * @return array {
* Array containing JOIN and WHERE SQL clauses to append to the main query. * Array containing JOIN and WHERE SQL clauses to append to the main query.
* *

View File

@ -146,9 +146,9 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
* *
* @since 3.5.0 * @since 3.5.0
* *
* @param int|null $max_w Image width. * @param int|null $max_w Image width.
* @param int|null $max_h Image height. * @param int|null $max_h Image height.
* @param bool $crop * @param bool $crop
* @return true|WP_Error * @return true|WP_Error
*/ */
public function resize( $max_w, $max_h, $crop = false ) { public function resize( $max_w, $max_h, $crop = false ) {

View File

@ -241,9 +241,9 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* *
* @since 3.5.0 * @since 3.5.0
* *
* @param int|null $max_w Image width. * @param int|null $max_w Image width.
* @param int|null $max_h Image height. * @param int|null $max_h Image height.
* @param bool $crop * @param bool $crop
* @return bool|WP_Error * @return bool|WP_Error
*/ */
public function resize( $max_w, $max_h, $crop = false ) { public function resize( $max_w, $max_h, $crop = false ) {

View File

@ -90,9 +90,9 @@ abstract class WP_Image_Editor {
* @since 3.5.0 * @since 3.5.0
* @abstract * @abstract
* *
* @param int|null $max_w Image width. * @param int|null $max_w Image width.
* @param int|null $max_h Image height. * @param int|null $max_h Image height.
* @param bool $crop * @param bool $crop
* @return bool|WP_Error * @return bool|WP_Error
*/ */
abstract public function resize( $max_w, $max_h, $crop = false ); abstract public function resize( $max_w, $max_h, $crop = false );

View File

@ -79,7 +79,7 @@ class WP_MatchesMapRegex {
/** /**
* preg_replace_callback hook * preg_replace_callback hook
* *
* @param array $matches preg_replace regexp matches * @param array $matches preg_replace regexp matches
* @return string * @return string
*/ */
public function callback( $matches ) { public function callback( $matches ) {

View File

@ -780,9 +780,9 @@ class WP_Meta_Query {
* *
* @since 4.1.0 * @since 4.1.0
* *
* @param array $clause Query clause. * @param array $clause Query clause.
* @param array $parent_query Parent query of $clause. * @param array $parent_query Parent query of $clause.
* @return string|bool Table alias if found, otherwise false. * @return string|false Table alias if found, otherwise false.
*/ */
protected function find_compatible_table_alias( $clause, $parent_query ) { protected function find_compatible_table_alias( $clause, $parent_query ) {
$alias = false; $alias = false;

View File

@ -497,8 +497,8 @@ class WP_Tax_Query {
* *
* @since 4.1.0 * @since 4.1.0
* *
* @param array $clause Query clause. * @param array $clause Query clause.
* @param array $parent_query Parent query of $clause. * @param array $parent_query Parent query of $clause.
* @return string|false Table alias if found, otherwise false. * @return string|false Table alias if found, otherwise false.
*/ */
protected function find_compatible_table_alias( $clause, $parent_query ) { protected function find_compatible_table_alias( $clause, $parent_query ) {

View File

@ -154,8 +154,8 @@ function check_comment( $author, $email, $url, $comment, $user_ip, $user_agent,
* @since 2.0.0 * @since 2.0.0
* @since 4.1.0 Refactored to leverage WP_Comment_Query over a direct query. * @since 4.1.0 Refactored to leverage WP_Comment_Query over a direct query.
* *
* @param int $post_id The ID of the post. * @param int $post_id The ID of the post.
* @param array $args Optional. See WP_Comment_Query::__construct() for information on accepted arguments. * @param array $args Optional. See WP_Comment_Query::__construct() for information on accepted arguments.
* @return int|array The approved comments, or number of comments if `$count` * @return int|array The approved comments, or number of comments if `$count`
* argument is true. * argument is true.
*/ */
@ -3560,7 +3560,7 @@ function wp_comments_personal_data_exporter( $email_address, $page = 1 ) {
* *
* @since 4.9.6 * @since 4.9.6
* *
* @param array $erasers An array of personal data erasers. * @param array $erasers An array of personal data erasers.
* @return array An array of personal data erasers. * @return array An array of personal data erasers.
*/ */
function wp_register_comment_personal_data_eraser( $erasers ) { function wp_register_comment_personal_data_eraser( $erasers ) {
@ -3577,8 +3577,8 @@ function wp_register_comment_personal_data_eraser( $erasers ) {
* *
* @since 4.9.6 * @since 4.9.6
* *
* @param string $email_address The comment author email address. * @param string $email_address The comment author email address.
* @param int $page Comment page. * @param int $page Comment page.
* @return array * @return array
*/ */
function wp_comments_personal_data_eraser( $email_address, $page = 1 ) { function wp_comments_personal_data_eraser( $email_address, $page = 1 ) {

View File

@ -2832,7 +2832,7 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
* *
* @since 3.0.0 * @since 3.0.0
* *
* @param array $mime_to_ext Array of image mime types and their matching extensions. * @param array $mime_to_ext Array of image mime types and their matching extensions.
*/ */
$mime_to_ext = apply_filters( $mime_to_ext = apply_filters(
'getimagesize_mimes_to_exts', 'getimagesize_mimes_to_exts',
@ -4417,7 +4417,7 @@ function wp_parse_id_list( $list ) {
* *
* @since 4.7.0 * @since 4.7.0
* *
* @param array|string $list List of slugs. * @param array|string $list List of slugs.
* @return string[] Sanitized array of slugs. * @return string[] Sanitized array of slugs.
*/ */
function wp_parse_slug_list( $list ) { function wp_parse_slug_list( $list ) {
@ -6403,10 +6403,10 @@ function wp_is_stream( $path ) {
* *
* @link https://www.php.net/manual/en/function.checkdate.php * @link https://www.php.net/manual/en/function.checkdate.php
* *
* @param int $month Month number. * @param int $month Month number.
* @param int $day Day number. * @param int $day Day number.
* @param int $year Year number. * @param int $year Year number.
* @param string $source_date The date to filter. * @param string $source_date The date to filter.
* @return bool True if valid date, false if not valid date. * @return bool True if valid date, false if not valid date.
*/ */
function wp_checkdate( $month, $day, $year, $source_date ) { function wp_checkdate( $month, $day, $year, $source_date ) {
@ -7069,9 +7069,9 @@ All at ###SITENAME###
* *
* @since 4.9.6 Abstracted from `WP_Community_Events::get_unsafe_client_ip()`. * @since 4.9.6 Abstracted from `WP_Community_Events::get_unsafe_client_ip()`.
* *
* @param string $ip_addr The IPv4 or IPv6 address to be anonymized. * @param string $ip_addr The IPv4 or IPv6 address to be anonymized.
* @param bool $ipv6_fallback Optional. Whether to return the original IPv6 address if the needed functions * @param bool $ipv6_fallback Optional. Whether to return the original IPv6 address if the needed functions
* to anonymize it are not present. Default false, return `::` (unspecified address). * to anonymize it are not present. Default false, return `::` (unspecified address).
* @return string The anonymized IP address. * @return string The anonymized IP address.
*/ */
function wp_privacy_anonymize_ip( $ip_addr, $ipv6_fallback = false ) { function wp_privacy_anonymize_ip( $ip_addr, $ipv6_fallback = false ) {
@ -7139,8 +7139,8 @@ function wp_privacy_anonymize_ip( $ip_addr, $ipv6_fallback = false ) {
* *
* @since 4.9.6 * @since 4.9.6
* *
* @param string $type The type of data to be anonymized. * @param string $type The type of data to be anonymized.
* @param string $data Optional The data to be anonymized. * @param string $data Optional The data to be anonymized.
* @return string The anonymous data for the requested type. * @return string The anonymous data for the requested type.
*/ */
function wp_privacy_anonymize_data( $type, $data = '' ) { function wp_privacy_anonymize_data( $type, $data = '' ) {

View File

@ -2415,8 +2415,8 @@ function the_date( $format = '', $before = '', $after = '', $echo = true ) {
* *
* @since 3.0.0 * @since 3.0.0
* *
* @param string $format Optional. PHP date format defaults to the date_format option if not specified. * @param string $format Optional. PHP date format defaults to the date_format option if not specified.
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
* @return string|false Date the current post was written. False on failure. * @return string|false Date the current post was written. False on failure.
*/ */
function get_the_date( $format = '', $post = null ) { function get_the_date( $format = '', $post = null ) {

View File

@ -17,10 +17,10 @@ window.wp = window.wp || {};
* Similar to `goog.inherits`, but uses a hash of prototype properties and * Similar to `goog.inherits`, but uses a hash of prototype properties and
* class properties to be extended. * class properties to be extended.
* *
* @param object parent Parent class constructor to inherit from. * @param object parent Parent class constructor to inherit from.
* @param object protoProps Properties to apply to the prototype for use as class instance properties. * @param object protoProps Properties to apply to the prototype for use as class instance properties.
* @param object staticProps Properties to apply directly to the class constructor. * @param object staticProps Properties to apply directly to the class constructor.
* @return child The subclassed constructor. * @return child The subclassed constructor.
*/ */
inherits = function( parent, protoProps, staticProps ) { inherits = function( parent, protoProps, staticProps ) {
var child; var child;
@ -108,9 +108,9 @@ window.wp = window.wp || {};
/** /**
* Creates a subclass of the class. * Creates a subclass of the class.
* *
* @param object protoProps Properties to apply to the prototype. * @param object protoProps Properties to apply to the prototype.
* @param object staticProps Properties to apply directly to the class. * @param object staticProps Properties to apply directly to the class.
* @return child The subclass. * @return child The subclass.
*/ */
api.Class.extend = function( protoProps, classProps ) { api.Class.extend = function( protoProps, classProps ) {
var child = inherits( this, protoProps, classProps ); var child = inherits( this, protoProps, classProps );
@ -354,11 +354,11 @@ window.wp = window.wp || {};
* *
* @see {api.Values.when} * @see {api.Values.when}
* *
* @param {string} id ID of the item. * @param {string} id ID of the item.
* @param {...} Zero or more IDs of items to wait for and a callback * @param {...} Zero or more IDs of items to wait for and a callback
* function to invoke when they're available. Optional. * function to invoke when they're available. Optional.
* @return {mixed} The item instance if only one ID was supplied. * @return {mixed} The item instance if only one ID was supplied.
* A Deferred Promise object if a callback function is supplied. * A Deferred Promise object if a callback function is supplied.
*/ */
instance: function( id ) { instance: function( id ) {
if ( arguments.length === 1 ) { if ( arguments.length === 1 ) {
@ -371,8 +371,8 @@ window.wp = window.wp || {};
/** /**
* Get the instance of an item. * Get the instance of an item.
* *
* @param {string} id The ID of the item. * @param {string} id The ID of the item.
* @return {[type]} [description] * @return {[type]} [description]
*/ */
value: function( id ) { value: function( id ) {
return this._value[ id ]; return this._value[ id ];
@ -381,7 +381,7 @@ window.wp = window.wp || {};
/** /**
* Whether the collection has an item with the given ID. * Whether the collection has an item with the given ID.
* *
* @param {string} id The ID of the item to look for. * @param {string} id The ID of the item to look for.
* @return {Boolean} * @return {Boolean}
*/ */
has: function( id ) { has: function( id ) {
@ -435,9 +435,9 @@ window.wp = window.wp || {};
* Create a new item of the collection using the collection's default constructor * Create a new item of the collection using the collection's default constructor
* and store it in the collection. * and store it in the collection.
* *
* @param {string} id The ID of the item. * @param {string} id The ID of the item.
* @param {mixed} value Any extra arguments are passed into the item's initialize method. * @param {mixed} value Any extra arguments are passed into the item's initialize method.
* @return {mixed} The new item's instance. * @return {mixed} The new item's instance.
*/ */
create: function( id ) { create: function( id ) {
return this.add( id, new this.defaultConstructor( api.Class.applicator, slice.call( arguments, 1 ) ) ); return this.add( id, new this.defaultConstructor( api.Class.applicator, slice.call( arguments, 1 ) ) );
@ -446,8 +446,8 @@ window.wp = window.wp || {};
/** /**
* Iterate over all items in the collection invoking the provided callback. * Iterate over all items in the collection invoking the provided callback.
* *
* @param {Function} callback Function to invoke. * @param {Function} callback Function to invoke.
* @param {object} context Object context to invoke the function with. Optional. * @param {object} context Object context to invoke the function with. Optional.
*/ */
each: function( callback, context ) { each: function( callback, context ) {
context = typeof context === 'undefined' ? this : context; context = typeof context === 'undefined' ? this : context;
@ -460,7 +460,7 @@ window.wp = window.wp || {};
/** /**
* Remove an item from the collection. * Remove an item from the collection.
* *
* @param {string} id The ID of the item to remove. * @param {string} id The ID of the item to remove.
*/ */
remove: function( id ) { remove: function( id ) {
var value = this.value( id ); var value = this.value( id );
@ -670,10 +670,10 @@ window.wp = window.wp || {};
/** /**
* Create a new Value. * Create a new Value.
* *
* @param {string} key Unique identifier. * @param {string} key Unique identifier.
* @param {mixed} initial Initial value. * @param {mixed} initial Initial value.
* @param {mixed} options Options hash. Optional. * @param {mixed} options Options hash. Optional.
* @return {Value} Class instance of the Value. * @return {Value} Class instance of the Value.
*/ */
add: function( key, initial, options ) { add: function( key, initial, options ) {
return this[ key ] = new api.Value( initial, options ); return this[ key ] = new api.Value( initial, options );
@ -682,11 +682,11 @@ window.wp = window.wp || {};
/** /**
* Initialize Messenger. * Initialize Messenger.
* *
* @param {object} params - Parameters to configure the messenger. * @param {object} params - Parameters to configure the messenger.
* {string} params.url - The URL to communicate with. * {string} params.url - The URL to communicate with.
* {window} params.targetWindow - The window instance to communicate with. Default window.parent. * {window} params.targetWindow - The window instance to communicate with. Default window.parent.
* {string} params.channel - If provided, will send the channel with each message and only accept messages a matching channel. * {string} params.channel - If provided, will send the channel with each message and only accept messages a matching channel.
* @param {object} options - Extend any instance parameter or method with this object. * @param {object} options - Extend any instance parameter or method with this object.
*/ */
initialize: function( params, options ) { initialize: function( params, options ) {
// Target the parent frame by default, but only if a parent frame exists. // Target the parent frame by default, but only if a parent frame exists.
@ -747,7 +747,7 @@ window.wp = window.wp || {};
/** /**
* Receive data from the other window. * Receive data from the other window.
* *
* @param {jQuery.Event} event Event with embedded data. * @param {jQuery.Event} event Event with embedded data.
*/ */
receive: function( event ) { receive: function( event ) {
var message; var message;
@ -786,8 +786,8 @@ window.wp = window.wp || {};
/** /**
* Send data to the other window. * Send data to the other window.
* *
* @param {string} id The event name. * @param {string} id The event name.
* @param {object} data Data. * @param {object} data Data.
*/ */
send: function( id, data ) { send: function( id, data ) {
var message; var message;

View File

@ -106,7 +106,7 @@ window.wp = window.wp || {};
/** /**
* Open the Customizer overlay for a specific URL. * Open the Customizer overlay for a specific URL.
* *
* @param string src URL to load in the Customizer. * @param string src URL to load in the Customizer.
*/ */
open: function( src ) { open: function( src ) {

View File

@ -631,7 +631,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
* @memberOf wp.customize.widgetsPreview * @memberOf wp.customize.widgetsPreview
* *
* @since 3.9.0 * @since 3.9.0
* @param {string} widgetId ID of the widget. * @param {string} widgetId ID of the widget.
* *
* @return {void} * @return {void}
*/ */

View File

@ -116,7 +116,7 @@ window.wp = window.wp || {};
* @memberOf wp * @memberOf wp
* @namespace * @namespace
* *
* @param {object} attributes The properties passed to the main media controller. * @param {object} attributes The properties passed to the main media controller.
* @return {wp.media.view.MediaFrame} A media workflow. * @return {wp.media.view.MediaFrame} A media workflow.
*/ */
media = wp.media = function( attributes ) { media = wp.media = function( attributes ) {
@ -185,13 +185,13 @@ media.model.Selection = __webpack_require__( 28 );
* *
* Used to order models within a collection - @see wp.media.model.Attachments.comparator(). * Used to order models within a collection - @see wp.media.model.Attachments.comparator().
* *
* @param {mixed} a The primary parameter to compare. * @param {mixed} a The primary parameter to compare.
* @param {mixed} b The primary parameter to compare. * @param {mixed} b The primary parameter to compare.
* @param {string} ac The fallback parameter to compare, a's cid. * @param {string} ac The fallback parameter to compare, a's cid.
* @param {string} bc The fallback parameter to compare, b's cid. * @param {string} bc The fallback parameter to compare, b's cid.
* @return {number} -1: a should come before b. * @return {number} -1: a should come before b.
* 0: a and b are of the same rank. * 0: a and b are of the same rank.
* 1: b should come before a. * 1: b should come before a.
*/ */
media.compare = function( a, b, ac, bc ) { media.compare = function( a, b, ac, bc ) {
if ( _.isEqual( a, b ) ) { if ( _.isEqual( a, b ) ) {
@ -1187,7 +1187,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
/** /**
* Fetch more attachments from the server for the collection. * Fetch more attachments from the server for the collection.
* *
* @param {object} [options={}] * @param {object} [options={}]
* @return {Promise} * @return {Promise}
*/ */
more: function( options ) { more: function( options ) {

View File

@ -2890,7 +2890,7 @@ var Frame = wp.media.View.extend(/** @lends wp.media.view.Frame.prototype */{
/** /**
* Check if a mode is enabled on the frame. * Check if a mode is enabled on the frame.
* *
* @param string mode Mode ID. * @param string mode Mode ID.
* @return bool * @return bool
*/ */
isModeActive: function( mode ) { isModeActive: function( mode ) {
@ -5236,7 +5236,7 @@ EditorUploader = View.extend(/** @lends wp.media.view.EditorUploader.prototype *
* When a file is dropped on the editor uploader, open up an editor media workflow * When a file is dropped on the editor uploader, open up an editor media workflow
* and upload the file immediately. * and upload the file immediately.
* *
* @param {jQuery.Event} event The 'drop' event. * @param {jQuery.Event} event The 'drop' event.
*/ */
drop: function( event ) { drop: function( event ) {
var $wrap, uploadView; var $wrap, uploadView;
@ -7008,8 +7008,8 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
* Add the model if it isn't in the selection, if it is in the selection, * Add the model if it isn't in the selection, if it is in the selection,
* remove it. * remove it.
* *
* @param {[type]} event [description] * @param {[type]} event [description]
* @return {[type]} [description] * @return {[type]} [description]
*/ */
checkClickHandler: function ( event ) { checkClickHandler: function ( event ) {
var selection = this.options.selection; var selection = this.options.selection;

View File

@ -115,9 +115,9 @@ window.wp = window.wp || {};
* *
* @since 5.3.0 * @since 5.3.0
* *
* @param {string} message Error message. * @param {string} message Error message.
* @param {object} data Error data from Plupload. * @param {object} data Error data from Plupload.
* @param {plupload.File} file File that was uploaded. * @param {plupload.File} file File that was uploaded.
*/ */
tryAgain = function( message, data, file ) { tryAgain = function( message, data, file ) {
var times, id; var times, id;
@ -203,10 +203,10 @@ window.wp = window.wp || {};
* Add a new error to the errors collection, so other modules can track * Add a new error to the errors collection, so other modules can track
* and display errors. @see wp.Uploader.errors. * and display errors. @see wp.Uploader.errors.
* *
* @param {string} message Error message. * @param {string} message Error message.
* @param {object} data Error data from Plupload. * @param {object} data Error data from Plupload.
* @param {plupload.File} file File that was uploaded. * @param {plupload.File} file File that was uploaded.
* @param {string} retry Whether to try again to create image sub-sizes. Passing 'no-retry' will prevent it. * @param {string} retry Whether to try again to create image sub-sizes. Passing 'no-retry' will prevent it.
*/ */
error = function( message, data, file, retry ) { error = function( message, data, file, retry ) {
var isImage = file.type && file.type.indexOf( 'image/' ) === 0, var isImage = file.type && file.type.indexOf( 'image/' ) === 0,

View File

@ -52,9 +52,9 @@
/** /**
* Escapes characters for use in a Regular Expression. * Escapes characters for use in a Regular Expression.
* *
* @param {String} string Characters to escape * @param {String} string Characters to escape
* *
* @return {String} Escaped characters * @return {String} Escaped characters
*/ */
function escapeRegExp( string ) { function escapeRegExp( string ) {
return string.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' ); return string.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' );

View File

@ -360,11 +360,11 @@
/** /**
* Build a helper function to retrieve related model. * Build a helper function to retrieve related model.
* *
* @param {string} parentModel The parent model. * @param {string} parentModel The parent model.
* @param {int} modelId The model ID if the object to request * @param {int} modelId The model ID if the object to request
* @param {string} modelName The model name to use when constructing the model. * @param {string} modelName The model name to use when constructing the model.
* @param {string} embedSourcePoint Where to check the embedds object for _embed data. * @param {string} embedSourcePoint Where to check the embedds object for _embed data.
* @param {string} embedCheckField Which model field to check to see if the model has data. * @param {string} embedCheckField Which model field to check to see if the model has data.
* *
* @return {Deferred.promise} A promise which resolves to the constructed model. * @return {Deferred.promise} A promise which resolves to the constructed model.
*/ */
@ -414,12 +414,12 @@
/** /**
* Build a helper to retrieve a collection. * Build a helper to retrieve a collection.
* *
* @param {string} parentModel The parent model. * @param {string} parentModel The parent model.
* @param {string} collectionName The name to use when constructing the collection. * @param {string} collectionName The name to use when constructing the collection.
* @param {string} embedSourcePoint Where to check the embedds object for _embed data. * @param {string} embedSourcePoint Where to check the embedds object for _embed data.
* @param {string} embedIndex An addiitonal optional index for the _embed data. * @param {string} embedIndex An addiitonal optional index for the _embed data.
* *
* @return {Deferred.promise} A promise which resolves to the constructed collection. * @return {Deferred.promise} A promise which resolves to the constructed collection.
*/ */
buildCollectionGetter = function( parentModel, collectionName, embedSourcePoint, embedIndex ) { buildCollectionGetter = function( parentModel, collectionName, embedSourcePoint, embedIndex ) {
/** /**

View File

@ -23,8 +23,8 @@ window.wp = window.wp || {};
* *
* @class * @class
* *
* @param {wp.Backbone.View} view The main view. * @param {wp.Backbone.View} view The main view.
* @param {Array|Object} views The subviews for the main view. * @param {Array|Object} views The subviews for the main view.
*/ */
wp.Backbone.Subviews = function( view, views ) { wp.Backbone.Subviews = function( view, views ) {
this.view = view; this.view = view;

View File

@ -235,8 +235,8 @@ wpList = {
* data[3] - 66cc66 * data[3] - 66cc66
* data[4] - unspam=1 * data[4] - unspam=1
* *
* @param {HTMLElement} element The DOM element. * @param {HTMLElement} element The DOM element.
* @param {string} type The type of data to look for: 'list', 'add', 'delete', or 'dim'. * @param {string} type The type of data to look for: 'list', 'add', 'delete', or 'dim'.
* @return {Array} Extracted list item data. * @return {Array} Extracted list item data.
*/ */
parseData: function( element, type ) { parseData: function( element, type ) {

View File

@ -16,9 +16,9 @@ window.wp = window.wp || {};
* *
* Fetch a JavaScript template for an id, and return a templating function for it. * Fetch a JavaScript template for an id, and return a templating function for it.
* *
* @param {string} id A string that corresponds to a DOM element with an id prefixed with "tmpl-". * @param {string} id A string that corresponds to a DOM element with an id prefixed with "tmpl-".
* For example, "attachment" maps to "tmpl-attachment". * For example, "attachment" maps to "tmpl-attachment".
* @return {function} A function that lazily-compiles the template requested. * @return {function} A function that lazily-compiles the template requested.
*/ */
wp.template = _.memoize(function ( id ) { wp.template = _.memoize(function ( id ) {
var compiled, var compiled,
@ -56,11 +56,11 @@ window.wp = window.wp || {};
* *
* Sends a POST request to WordPress. * Sends a POST request to WordPress.
* *
* @param {(string|object)} action The slug of the action to fire in WordPress or options passed * @param {(string|object)} action The slug of the action to fire in WordPress or options passed
* to jQuery.ajax. * to jQuery.ajax.
* @param {object=} data Optional. The data to populate $_POST with. * @param {object=} data Optional. The data to populate $_POST with.
* @return {$.promise} A jQuery promise that represents the request, * @return {$.promise} A jQuery promise that represents the request,
* decorated with an abort() method. * decorated with an abort() method.
*/ */
post: function( action, data ) { post: function( action, data ) {
return wp.ajax.send({ return wp.ajax.send({
@ -73,11 +73,11 @@ window.wp = window.wp || {};
* *
* Sends a POST request to WordPress. * Sends a POST request to WordPress.
* *
* @param {(string|object)} action The slug of the action to fire in WordPress or options passed * @param {(string|object)} action The slug of the action to fire in WordPress or options passed
* to jQuery.ajax. * to jQuery.ajax.
* @param {object=} options Optional. The options passed to jQuery.ajax. * @param {object=} options Optional. The options passed to jQuery.ajax.
* @return {$.promise} A jQuery promise that represents the request, * @return {$.promise} A jQuery promise that represents the request,
* decorated with an abort() method. * decorated with an abort() method.
*/ */
send: function( action, options ) { send: function( action, options ) {
var promise, deferred; var promise, deferred;

View File

@ -3144,9 +3144,9 @@ function the_comments_pagination( $args = array() ) {
* *
* @since 3.0.0 * @since 3.0.0
* *
* @param string $path Optional. Path relative to the home URL. Default empty. * @param string $path Optional. Path relative to the home URL. Default empty.
* @param string|null $scheme Optional. Scheme to give the home URL context. Accepts * @param string|null $scheme Optional. Scheme to give the home URL context. Accepts
* 'http', 'https', 'relative', 'rest', or null. Default null. * 'http', 'https', 'relative', 'rest', or null. Default null.
* @return string Home URL link with optional path appended. * @return string Home URL link with optional path appended.
*/ */
function home_url( $path = '', $scheme = null ) { function home_url( $path = '', $scheme = null ) {
@ -3164,10 +3164,10 @@ function home_url( $path = '', $scheme = null ) {
* *
* @global string $pagenow * @global string $pagenow
* *
* @param int $blog_id Optional. Site ID. Default null (current site). * @param int $blog_id Optional. Site ID. Default null (current site).
* @param string $path Optional. Path relative to the home URL. Default empty. * @param string $path Optional. Path relative to the home URL. Default empty.
* @param string|null $scheme Optional. Scheme to give the home URL context. Accepts * @param string|null $scheme Optional. Scheme to give the home URL context. Accepts
* 'http', 'https', 'relative', 'rest', or null. Default null. * 'http', 'https', 'relative', 'rest', or null. Default null.
* @return string Home URL link with optional path appended. * @return string Home URL link with optional path appended.
*/ */
function get_home_url( $blog_id = null, $path = '', $scheme = null ) { function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
@ -3383,11 +3383,11 @@ function content_url( $path = '' ) {
* *
* @since 2.6.0 * @since 2.6.0
* *
* @param string $path Optional. Extra path appended to the end of the URL, including * @param string $path Optional. Extra path appended to the end of the URL, including
* the relative directory if $plugin is supplied. Default empty. * the relative directory if $plugin is supplied. Default empty.
* @param string $plugin Optional. A full path to a file inside a plugin or mu-plugin. * @param string $plugin Optional. A full path to a file inside a plugin or mu-plugin.
* The URL will be relative to its directory. Default empty. * The URL will be relative to its directory. Default empty.
* Typically this is done by passing `__FILE__` as the argument. * Typically this is done by passing `__FILE__` as the argument.
* @return string Plugins URL link with optional paths appended. * @return string Plugins URL link with optional paths appended.
*/ */
function plugins_url( $path = '', $plugin = '' ) { function plugins_url( $path = '', $plugin = '' ) {
@ -3485,9 +3485,9 @@ function network_site_url( $path = '', $scheme = null ) {
* *
* @since 3.0.0 * @since 3.0.0
* *
* @param string $path Optional. Path relative to the home URL. Default empty. * @param string $path Optional. Path relative to the home URL. Default empty.
* @param string $scheme Optional. Scheme to give the home URL context. Accepts * @param string $scheme Optional. Scheme to give the home URL context. Accepts
* 'http', 'https', or 'relative'. Default null. * 'http', 'https', or 'relative'. Default null.
* @return string Home URL link with optional path appended. * @return string Home URL link with optional path appended.
*/ */
function network_home_url( $path = '', $scheme = null ) { function network_home_url( $path = '', $scheme = null ) {

View File

@ -4541,8 +4541,8 @@ function wp_register_media_personal_data_exporter( $exporters ) {
* *
* @since 4.9.6 * @since 4.9.6
* *
* @param string $email_address The attachment owner email address. * @param string $email_address The attachment owner email address.
* @param int $page Attachment page. * @param int $page Attachment page.
* @return array An array of personal data. * @return array An array of personal data.
*/ */
function wp_media_personal_data_exporter( $email_address, $page = 1 ) { function wp_media_personal_data_exporter( $email_address, $page = 1 ) {

View File

@ -2577,8 +2577,8 @@ function is_upload_space_available() {
* *
* @since 3.0.0 * @since 3.0.0
* *
* @param int $size Upload size limit in bytes. * @param int $size Upload size limit in bytes.
* @return int Upload size limit in bytes. * @return int Upload size limit in bytes.
*/ */
function upload_size_limit_filter( $size ) { function upload_size_limit_filter( $size ) {
$fileupload_maxk = KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ); $fileupload_maxk = KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 );

View File

@ -717,8 +717,8 @@ function rest_send_allow_header( $response, $server, $request ) {
* *
* @since 5.3.0 * @since 5.3.0
* *
* @param array $array1 The array with master keys to check. * @param array $array1 The array with master keys to check.
* @param array $array2 An array to compare keys against. * @param array $array2 An array to compare keys against.
* @return array An associative array containing all the entries of array1 which have keys * @return array An associative array containing all the entries of array1 which have keys
* that are present in all arguments. * that are present in all arguments.
*/ */
@ -1062,9 +1062,9 @@ function rest_authorization_required_code() {
* *
* @since 4.7.0 * @since 4.7.0
* *
* @param mixed $value * @param mixed $value
* @param WP_REST_Request $request * @param WP_REST_Request $request
* @param string $param * @param string $param
* @return true|WP_Error * @return true|WP_Error
*/ */
function rest_validate_request_arg( $value, $request, $param ) { function rest_validate_request_arg( $value, $request, $param ) {
@ -1082,9 +1082,9 @@ function rest_validate_request_arg( $value, $request, $param ) {
* *
* @since 4.7.0 * @since 4.7.0
* *
* @param mixed $value * @param mixed $value
* @param WP_REST_Request $request * @param WP_REST_Request $request
* @param string $param * @param string $param
* @return mixed * @return mixed
*/ */
function rest_sanitize_request_arg( $value, $request, $param ) { function rest_sanitize_request_arg( $value, $request, $param ) {
@ -1105,9 +1105,9 @@ function rest_sanitize_request_arg( $value, $request, $param ) {
* *
* @since 4.7.0 * @since 4.7.0
* *
* @param mixed $value * @param mixed $value
* @param WP_REST_Request $request * @param WP_REST_Request $request
* @param string $param * @param string $param
* @return mixed * @return mixed
*/ */
function rest_parse_request_arg( $value, $request, $param ) { function rest_parse_request_arg( $value, $request, $param ) {
@ -1129,7 +1129,7 @@ function rest_parse_request_arg( $value, $request, $param ) {
* *
* @since 4.7.0 * @since 4.7.0
* *
* @param string $ip IP address. * @param string $ip IP address.
* @return string|false The valid IP address, otherwise false. * @return string|false The valid IP address, otherwise false.
*/ */
function rest_is_ip_address( $ip ) { function rest_is_ip_address( $ip ) {
@ -1633,9 +1633,9 @@ function rest_sanitize_value_from_schema( $value, $args ) {
* *
* @since 5.0.0 * @since 5.0.0
* *
* @param array $memo Reduce accumulator. * @param array $memo Reduce accumulator.
* @param string $path REST API path to preload. * @param string $path REST API path to preload.
* @return array Modified reduce accumulator. * @return array Modified reduce accumulator.
*/ */
function rest_preload_api_request( $memo, $path ) { function rest_preload_api_request( $memo, $path ) {
// array_reduce() doesn't support passing an array in PHP 5.2, // array_reduce() doesn't support passing an array in PHP 5.2,

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-alpha-48109'; $wp_version = '5.5-alpha-48110';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.