Docs: Another pass at some inline docs fixes mostly made by PHPCBF.

See #49572, #50744
Built from https://develop.svn.wordpress.org/trunk@48590


git-svn-id: http://core.svn.wordpress.org/trunk@48352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2020-07-23 21:11:05 +00:00
parent 3f04e3bf5c
commit 9bc7d0a776
33 changed files with 216 additions and 214 deletions

View File

@ -77,16 +77,16 @@ class WP_Upgrader {
* @since 2.8.0
*
* @var array|WP_Error $result {
* @type string $source The full path to the source the files were installed from.
* @type string $source_files List of all the files in the source directory.
* @type string $destination The full path to the installation destination folder.
* @type string $destination_name The name of the destination folder, or empty if `$destination`
* and `$local_destination` are the same.
* @type string $local_destination The full local path to the destination folder. This is usually
* the same as `$destination`.
* @type string $remote_destination The full remote path to the destination folder
* (i.e., from `$wp_filesystem`).
* @type bool $clear_destination Whether the destination folder was cleared.
* @type string $source The full path to the source the files were installed from.
* @type string $source_files List of all the files in the source directory.
* @type string $destination The full path to the installation destination folder.
* @type string $destination_name The name of the destination folder, or empty if `$destination`
* and `$local_destination` are the same.
* @type string $local_destination The full local path to the destination folder. This is usually
* the same as `$destination`.
* @type string $remote_destination The full remote path to the destination folder
* (i.e., from `$wp_filesystem`).
* @type bool $clear_destination Whether the destination folder was cleared.
* }
*/
public $result = array();

View File

@ -5945,7 +5945,7 @@ final class WP_Customize_Manager {
*
* @since 4.7.0
*
* @param string $value Repeat value.
* @param string $value Repeat value.
* @param WP_Customize_Setting $setting Setting.
* @return string|WP_Error Background value or validation error.
*/
@ -5987,9 +5987,9 @@ final class WP_Customize_Manager {
*
* @since 4.7.0
*
* @param array $response Response.
* @param array $response Response.
* @param WP_Customize_Selective_Refresh $selective_refresh Selective refresh component.
* @param array $partials Array of partials.
* @param array $partials Array of partials.
* @return array
*/
public function export_header_video_settings( $response, $selective_refresh, $partials ) {

View File

@ -848,7 +848,7 @@ class WP_Customize_Setting {
*
* @param array $root
* @param array $keys
* @param bool $create Default false.
* @param bool $create Default false.
* @return array|void Keys are 'root', 'node', and 'key'.
*/
final protected function multidimensional( &$root, $keys, $create = false ) {

View File

@ -41,9 +41,11 @@ final class WP_Recovery_Mode_Email_Service {
*
* @param int $rate_limit Number of seconds before another email can be sent.
* @param array $error Error details from {@see error_get_last()}
* @param array $extension The extension that caused the error. {
* @type string $slug The extension slug. The plugin or theme's directory.
* @type string $type The extension type. Either 'plugin' or 'theme'.
* @param array $extension {
* The extension that caused the error.
*
* @type string $slug The extension slug. The plugin or theme's directory.
* @type string $type The extension type. Either 'plugin' or 'theme'.
* }
* @return true|WP_Error True if email sent, WP_Error otherwise.
*/

View File

@ -341,8 +341,10 @@ class WP_Recovery_Mode {
*
* @param array $error Error that was triggered.
* @return array|false {
* @type string $slug The extension slug. This is the plugin or theme's directory.
* @type string $type The extension type. Either 'plugin' or 'theme'.
* Extension details.
*
* @type string $slug The extension slug. This is the plugin or theme's directory.
* @type string $type The extension type. Either 'plugin' or 'theme'.
* }
*/
protected function get_extension_for_error( $error ) {

View File

@ -181,8 +181,8 @@ final class WP_Theme implements ArrayAccess {
*
* @global array $wp_theme_directories
*
* @param string $theme_dir Directory of the theme within the theme_root.
* @param string $theme_root Theme root.
* @param string $theme_dir Directory of the theme within the theme_root.
* @param string $theme_root Theme root.
* @param WP_Theme|null $_child If this theme is a parent theme, the child may be passed for validation purposes.
*/
public function __construct( $theme_dir, $theme_root, $_child = null ) {
@ -681,7 +681,7 @@ final class WP_Theme implements ArrayAccess {
*
* @since 3.4.0
*
* @param string $key Type of data to store (theme, screenshot, headers, post_templates)
* @param string $key Type of data to store (theme, screenshot, headers, post_templates)
* @param array|string $data Data to store
* @return bool Return value from wp_cache_add()
*/
@ -773,9 +773,9 @@ final class WP_Theme implements ArrayAccess {
*
* @since 3.4.0
*
* @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
* @param bool $markup Optional. Whether to mark up the header. Defaults to true.
* @param bool $translate Optional. Whether to translate the header. Defaults to true.
* @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
* @param bool $markup Optional. Whether to mark up the header. Defaults to true.
* @param bool $translate Optional. Whether to translate the header. Defaults to true.
* @return string|array|false Processed header. An array for Tags if `$markup` is false, string otherwise.
* False on failure.
*/
@ -1159,11 +1159,11 @@ final class WP_Theme implements ArrayAccess {
*
* @since 3.4.0
*
* @param string[]|string $type Optional. Array of extensions to find, string of a single extension,
* or null for all extensions. Default null.
* @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth).
* -1 depth is infinite.
* @param bool $search_parent Optional. Whether to return parent files. Default false.
* @param string[]|string $type Optional. Array of extensions to find, string of a single extension,
* or null for all extensions. Default null.
* @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth).
* -1 depth is infinite.
* @param bool $search_parent Optional. Whether to return parent files. Default false.
* @return string[] Array of files, keyed by the path to the file relative to the theme's directory, with the values
* being absolute paths.
*/
@ -1387,9 +1387,9 @@ final class WP_Theme implements ArrayAccess {
*
* @since 3.4.0
*
* @param string $check Optional. Whether to check only the 'network'-wide settings, the 'site'
* settings, or 'both'. Defaults to 'both'.
* @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current site.
* @param string $check Optional. Whether to check only the 'network'-wide settings, the 'site'
* settings, or 'both'. Defaults to 'both'.
* @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current site.
* @return bool Whether the theme is allowed for the network. Returns true in single-site.
*/
public function is_allowed( $check = 'both', $blog_id = null ) {
@ -1636,8 +1636,8 @@ final class WP_Theme implements ArrayAccess {
*
* @since 3.4.0
*
* @param string $a First name.
* @param string $b Second name.
* @param WP_Theme $a First theme.
* @param WP_Theme $b Second theme.
* @return int Negative if `$a` falls lower in the natural order than `$b`. Zero if they fall equally.
* Greater than 0 if `$a` falls higher in the natural order than `$b`. Used with usort().
*/
@ -1650,8 +1650,8 @@ final class WP_Theme implements ArrayAccess {
*
* @since 3.4.0
*
* @param string $a First name.
* @param string $b Second name.
* @param WP_Theme $a First theme.
* @param WP_Theme $b Second theme.
* @return int Negative if `$a` falls lower in the natural order than `$b`. Zero if they fall equally.
* Greater than 0 if `$a` falls higher in the natural order than `$b`. Used with usort().
*/

View File

@ -680,7 +680,7 @@ class WP_User_Query {
* @since 3.5.0
*
* @param string $query_var Query variable key.
* @param mixed $value Query variable value.
* @param mixed $value Query variable value.
*/
public function set( $query_var, $value ) {
$this->query_vars[ $query_var ] = $value;
@ -880,8 +880,8 @@ class WP_User_Query {
*
* @since 4.0.0
*
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @return mixed Return value of the callback, false otherwise.
*/
public function __call( $name, $arguments ) {

View File

@ -115,9 +115,9 @@ class WP_User {
*
* @since 2.0.0
*
* @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB.
* @param string $name Optional. User's username
* @param int $site_id Optional Site ID, defaults to current site.
* @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB.
* @param string $name Optional. User's username
* @param int $site_id Optional Site ID, defaults to current site.
*/
public function __construct( $id = 0, $name = '', $site_id = '' ) {
if ( ! isset( self::$back_compat_keys ) ) {
@ -181,7 +181,7 @@ class WP_User {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $field The field to query against: 'id', 'ID', 'slug', 'email' or 'login'.
* @param string $field The field to query against: 'id', 'ID', 'slug', 'email' or 'login'.
* @param string|int $value The field value
* @return object|false Raw user object
*/
@ -439,8 +439,8 @@ class WP_User {
*
* @since 4.3.0
*
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @return mixed|false Return value of the callback, false otherwise.
*/
public function __call( $name, $arguments ) {
@ -637,7 +637,7 @@ class WP_User {
*
* @since 2.0.0
*
* @param int $max Max level of user.
* @param int $max Max level of user.
* @param string $item Level capability name.
* @return int Max Level.
*/
@ -672,8 +672,8 @@ class WP_User {
*
* @since 2.0.0
*
* @param string $cap Capability name.
* @param bool $grant Whether to grant capability to user.
* @param string $cap Capability name.
* @param bool $grant Whether to grant capability to user.
*/
public function add_cap( $cap, $grant = true ) {
$this->caps[ $cap ] = $grant;

View File

@ -425,7 +425,7 @@ class Walker {
* @since 2.7.0
*
* @param object $e
* @param array $children_elements
* @param array $children_elements
*/
public function unset_children( $e, &$children_elements ) {
if ( ! $e || ! $children_elements ) {

View File

@ -171,8 +171,8 @@ class wp_xmlrpc_server extends IXR_Server {
*
* @since 4.0.0
*
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @return array|IXR_Error|false Return value of the callback, false otherwise.
*/
public function __call( $name, $arguments ) {
@ -369,8 +369,8 @@ class wp_xmlrpc_server extends IXR_Server {
*
* @since 2.5.0
*
* @param int $post_id Post ID.
* @param array $fields Custom fields.
* @param int $post_id Post ID.
* @param array $fields Custom fields.
*/
public function set_custom_fields( $post_id, $fields ) {
$post_id = (int) $post_id;
@ -436,8 +436,8 @@ class wp_xmlrpc_server extends IXR_Server {
*
* @since 4.9.0
*
* @param int $term_id Term ID.
* @param array $fields Custom fields.
* @param int $term_id Term ID.
* @param array $fields Custom fields.
*/
public function set_term_custom_fields( $term_id, $fields ) {
$term_id = (int) $term_id;
@ -744,7 +744,7 @@ class wp_xmlrpc_server extends IXR_Server {
* Prepares taxonomy data for return in an XML-RPC object.
*
* @param object $taxonomy The unprepared taxonomy data.
* @param array $fields The subset of taxonomy fields to return.
* @param array $fields The subset of taxonomy fields to return.
* @return array The prepared taxonomy data.
*/
protected function _prepare_taxonomy( $taxonomy, $fields ) {
@ -5603,7 +5603,7 @@ class wp_xmlrpc_server extends IXR_Server {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $post_ID Post ID.
* @param int $post_ID Post ID.
* @param string $post_content Post Content for attachment.
*/
public function attach_uploads( $post_ID, $post_content ) {

View File

@ -111,8 +111,8 @@ class WP {
*
* @since 2.3.0
*
* @param string $key Query variable name.
* @param mixed $value Query variable value.
* @param string $key Query variable name.
* @param mixed $value Query variable value.
*/
public function set_query_var( $key, $value ) {
$this->query_vars[ $key ] = $value;

View File

@ -544,9 +544,9 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
* @since 1.5.0
* @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
*
* @param string $format Optional. The format of the date. Default user's setting.
* @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the date.
* Default current comment.
* @param string $format Optional. The format of the date. Default user's setting.
* @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the date.
* Default current comment.
* @return string The comment's date.
*/
function get_comment_date( $format = '', $comment_ID = 0 ) {
@ -962,9 +962,9 @@ function get_comments_number_text( $zero = false, $one = false, $more = false, $
*
* @see Walker_Comment::comment()
*
* @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the text.
* Default current comment.
* @param array $args Optional. An array of arguments. Default empty array.
* @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the text.
* Default current comment.
* @param array $args Optional. An array of arguments. Default empty array.
* @return string The comment content.
*/
function get_comment_text( $comment_ID = 0, $args = array() ) {
@ -1008,9 +1008,9 @@ function get_comment_text( $comment_ID = 0, $args = array() ) {
*
* @see Walker_Comment::comment()
*
* @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the text.
* Default current comment.
* @param array $args Optional. An array of arguments. Default empty array.
* @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the text.
* Default current comment.
* @param array $args Optional. An array of arguments. Default empty array.
*/
function comment_text( $comment_ID = 0, $args = array() ) {
$comment = get_comment( $comment_ID );
@ -1633,7 +1633,7 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
* @since 2.7.0
* @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object.
*
* @param array $args {
* @param array $args {
* Optional. Override default arguments.
*
* @type string $add_below The first part of the selector used to identify the comment to respond below.
@ -1778,7 +1778,7 @@ function comment_reply_link( $args = array(), $comment = null, $post = null ) {
*
* @since 2.7.0
*
* @param array $args {
* @param array $args {
* Optional. Override default arguments.
*
* @type string $add_below The first part of the selector used to identify the comment to respond below.

View File

@ -1062,15 +1062,16 @@ function get_comment_pages_count( $comments = null, $per_page = null, $threaded
*
* @param int $comment_ID Comment ID.
* @param array $args {
* Array of optional arguments.
* @type string $type Limit paginated comments to those matching a given type.
* Accepts 'comment', 'trackback', 'pingback', 'pings'
* (trackbacks and pingbacks), or 'all'. Default 'all'.
* @type int $per_page Per-page count to use when calculating pagination.
* Defaults to the value of the 'comments_per_page' option.
* @type int|string $max_depth If greater than 1, comment page will be determined
* for the top-level parent `$comment_ID`.
* Defaults to the value of the 'thread_comments_depth' option.
* Array of optional arguments.
*
* @type string $type Limit paginated comments to those matching a given type.
* Accepts 'comment', 'trackback', 'pingback', 'pings'
* (trackbacks and pingbacks), or 'all'. Default 'all'.
* @type int $per_page Per-page count to use when calculating pagination.
* Defaults to the value of the 'comments_per_page' option.
* @type int|string $max_depth If greater than 1, comment page will be determined
* for the top-level parent `$comment_ID`.
* Defaults to the value of the 'thread_comments_depth' option.
* } *
* @return int|null Comment page number or null on error.
*/
@ -2114,9 +2115,9 @@ function wp_filter_comment( $commentdata ) {
*
* @since 2.1.0
*
* @param bool $block Whether plugin has already blocked comment.
* @param int $time_lastcomment Timestamp for last comment.
* @param int $time_newcomment Timestamp for new comment.
* @param bool $block Whether plugin has already blocked comment.
* @param int $time_lastcomment Timestamp for last comment.
* @param int $time_newcomment Timestamp for new comment.
* @return bool Whether comment should be blocked.
*/
function wp_throttle_comment_flood( $block, $time_lastcomment, $time_newcomment ) {
@ -2172,8 +2173,8 @@ function wp_throttle_comment_flood( $block, $time_lastcomment, $time_newcomment
* @type string $comment_author_IP Comment author IP address in IPv4 format. Default is the value of
* 'REMOTE_ADDR' in the `$_SERVER` superglobal sent in the original request.
* }
* @param bool $wp_error Should errors be returned as WP_Error objects instead of
* executing wp_die()? Default false.
* @param bool $wp_error Should errors be returned as WP_Error objects instead of
* executing wp_die()? Default false.
* @return int|false|WP_Error The ID of the comment on success, false or WP_Error on failure.
*/
function wp_new_comment( $commentdata, $wp_error = false ) {
@ -2710,8 +2711,8 @@ function wp_update_comment_count_now( $post_id ) {
*
* @since 1.5.0
*
* @param string $url URL to ping.
* @param int $deprecated Not Used.
* @param string $url URL to ping.
* @param int $deprecated Not Used.
* @return string|false String containing URI on success, false on failure.
*/
function discover_pingback_server_uri( $url, $deprecated = '' ) {
@ -2940,7 +2941,7 @@ function generic_ping( $post_id = 0 ) {
* @since 0.71
* @since 4.7.0 `$post_id` can be a WP_Post object.
*
* @param string $content Post content to check for links. If empty will retrieve from post.
* @param string $content Post content to check for links. If empty will retrieve from post.
* @param int|WP_Post $post_id Post Object or ID.
*/
function pingback( $content, $post_id ) {
@ -3067,9 +3068,9 @@ function privacy_ping_filter( $sites ) {
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $trackback_url URL to send trackbacks.
* @param string $title Title of post.
* @param string $excerpt Excerpt of post.
* @param int $ID Post ID.
* @param string $title Title of post.
* @param string $excerpt Excerpt of post.
* @param int $ID Post ID.
* @return int|false|void Database query from update.
*/
function trackback( $trackback_url, $title, $excerpt, $ID ) {
@ -3286,8 +3287,8 @@ function _close_comments_for_old_posts( $posts, $query ) {
* @since 2.7.0
* @access private
*
* @param bool $open Comments open or closed
* @param int $post_id Post ID
* @param bool $open Comments open or closed.
* @param int $post_id Post ID.
* @return bool $open
*/
function _close_comments_for_old_post( $open, $post_id ) {

View File

@ -851,7 +851,7 @@ function wp_get_schedules() {
* @since 5.1.0 {@see 'get_schedule'} filter added.
*
* @param string $hook Action hook to identify the event.
* @param array $args Optional. Arguments passed to the event's callback function.
* @param array $args Optional. Arguments passed to the event's callback function.
* @return string|false False, if no schedule. Schedule name on success.
*/
function wp_get_schedule( $hook, $args = array() ) {

View File

@ -30,7 +30,7 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
*
* @param string $id
* @param string $label
* @param mixed $callback
* @param mixed $callback
*/
public function add_tab( $id, $label, $callback ) {
_deprecated_function( __METHOD__, '4.1.0' );

View File

@ -746,8 +746,8 @@ function _get_wptexturize_shortcode_regex( $tagnames ) {
*
* @since 4.2.3
*
* @param string $haystack The text which has to be formatted.
* @param array $replace_pairs In the form array('from' => 'to', ...).
* @param string $haystack The text which has to be formatted.
* @param array $replace_pairs In the form array('from' => 'to', ...).
* @return string The formatted text.
*/
function wp_replace_in_html_tags( $haystack, $replace_pairs ) {
@ -1090,8 +1090,8 @@ function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {
*
* @since 2.8.0
*
* @param string $string The text which is to be checked.
* @param bool $strip Optional. Whether to attempt to strip out invalid UTF8. Default false.
* @param string $string The text which is to be checked.
* @param bool $strip Optional. Whether to attempt to strip out invalid UTF8. Default false.
* @return string The checked text.
*/
function wp_check_invalid_utf8( $string, $strip = false ) {
@ -4923,7 +4923,6 @@ function map_deep( $value, $callback ) {
/**
* Parses a string into variables to be stored in an array.
*
*
* @since 2.2.1
*
* @param string $string The string to be parsed.
@ -5363,8 +5362,8 @@ function sanitize_textarea_field( $str ) {
* @since 4.7.0
* @access private
*
* @param string $str String to sanitize.
* @param bool $keep_newlines optional Whether to keep newlines. Default: false.
* @param string $str String to sanitize.
* @param bool $keep_newlines Optional. Whether to keep newlines. Default: false.
* @return string Sanitized string.
*/
function _sanitize_text_fields( $str, $keep_newlines = false ) {

View File

@ -298,7 +298,6 @@ function wp_date( $format, $timestamp = null, $timezone = null ) {
* @param string $format Format to display the date.
* @param int $timestamp Unix timestamp.
* @param DateTimeZone $timezone Timezone.
*
*/
$date = apply_filters( 'wp_date', $date, $format, $timestamp, $timezone );
@ -834,8 +833,8 @@ function wp_extract_urls( $content ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $content Post content. If `null`, the `post_content` field from `$post` is used.
* @param int|WP_Post $post Post ID or post object.
* @param string $content Post content. If `null`, the `post_content` field from `$post` is used.
* @param int|WP_Post $post Post ID or post object.
* @return null|bool Returns false if post is not found.
*/
function do_enclose( $content = null, $post ) {
@ -2641,10 +2640,10 @@ function _wp_check_existing_file_names( $filename, $files ) {
*
* @since 2.0.0
*
* @param string $name Filename.
* @param null|string $deprecated Never used. Set to null.
* @param string $bits File content
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
* @param string $name Filename.
* @param null|string $deprecated Never used. Set to null.
* @param string $bits File content
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
* @return array {
* Information about the newly-uploaded file.
*
@ -7524,11 +7523,11 @@ function get_dirsize( $directory, $max_execution_time = null ) {
* @since 4.3.0 $exclude parameter added.
* @since 5.2.0 $max_execution_time parameter added.
*
* @param string $directory Full path of a directory.
* @param string|array $exclude Optional. Full path of a subdirectory to exclude from the total, or array of paths.
* Expected without trailing slash(es).
* @param int $max_execution_time Maximum time to run before giving up. In seconds.
* The timeout is global and is measured from the moment WordPress started to load.
* @param string $directory Full path of a directory.
* @param string|array $exclude Optional. Full path of a subdirectory to exclude from the total, or array of
* paths. Expected without trailing slash(es).
* @param int $max_execution_time Maximum time to run before giving up. In seconds.
* The timeout is global and is measured from the moment WordPress started to load.
* @return int|false|null Size in bytes if a valid directory. False if not. Null if timeout.
*/
function recurse_dirsize( $directory, $exclude = null, $max_execution_time = null ) {

View File

@ -207,7 +207,7 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_f
* @param string $handle Script handle the data will be attached to.
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.
* Example: '/[a-zA-Z0-9_]+/'.
* @param array $l10n The data itself. The data can be either a single or multi-dimensional array.
* @param array $l10n The data itself. The data can be either a single or multi-dimensional array.
* @return bool True if the script was successfully localized, false otherwise.
*/
function wp_localize_script( $handle, $object_name, $l10n ) {

View File

@ -2329,8 +2329,8 @@ function get_next_posts_page_link( $max_page = 0 ) {
*
* @since 0.71
*
* @param int $max_page Optional. Max pages. Default 0.
* @param bool $echo Optional. Whether to echo the link. Default true.
* @param int $max_page Optional. Max pages. Default 0.
* @param bool $echo Optional. Whether to echo the link. Default true.
* @return string|void The link URL for next posts page if `$echo = false`.
*/
function next_posts( $max_page = 0, $echo = true ) {

View File

@ -155,7 +155,6 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
* and was therefore added, true on successful update,
* false on failure or if the value passed to the function
* is the same as the one that is already in the database.
*/
function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_value = '' ) {
global $wpdb;
@ -1098,7 +1097,7 @@ function wp_metadata_lazyloader() {
*
* @see WP_Meta_Query
*
* @param array $meta_query A meta query.
* @param array $meta_query A meta query.
* @param string $type Type of meta.
* @param string $primary_table Primary database table name.
* @param string $primary_id_column Primary ID column name.
@ -1227,10 +1226,10 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* @since 4.9.8 The `$object_subtype` argument was added to the arguments array.
* @since 5.3.0 Valid meta types expanded to include "array" and "object".
*
* @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
* or any other object type with an associated meta table.
* @param string $meta_key Meta key to register.
* @param array $args {
* @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
* or any other object type with an associated meta table.
* @param string $meta_key Meta key to register.
* @param array $args {
* Data used to describe the meta key when registered.
*
* @type string $object_subtype A subtype; e.g. if the object type is "post", the post type. If left empty,

View File

@ -503,12 +503,12 @@ function update_option( $option, $value, $autoload = null ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $option Name of the option to add. Expected to not be SQL-escaped.
* @param mixed $value Optional. Option value. Must be serializable if non-scalar.
* Expected to not be SQL-escaped.
* @param string $deprecated Optional. Description. Not used anymore.
* @param string|bool $autoload Optional. Whether to load the option when WordPress starts up.
* Default is enabled. Accepts 'no' to disable for legacy reasons.
* @param string $option Name of the option to add. Expected to not be SQL-escaped.
* @param mixed $value Optional. Option value. Must be serializable if non-scalar.
* Expected to not be SQL-escaped.
* @param string $deprecated Optional. Description. Not used anymore.
* @param string|bool $autoload Optional. Whether to load the option when WordPress starts up.
* Default is enabled. Accepts 'no' to disable for legacy reasons.
* @return bool True if the option was added, false otherwise.
*/
function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
@ -1303,9 +1303,9 @@ function update_site_option( $option, $value ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option to retrieve. Expected to not be SQL-escaped.
* @param mixed $default Optional. Value to return if the option doesn't exist. Default false.
* @param int $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option to retrieve. Expected to not be SQL-escaped.
* @param mixed $default Optional. Value to return if the option doesn't exist. Default false.
* @return mixed Value set for the option.
*/
function get_network_option( $network_id, $option, $default = false ) {
@ -1655,9 +1655,9 @@ function delete_network_option( $network_id, $option ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option. Expected to not be SQL-escaped.
* @param mixed $value Option value. Expected to not be SQL-escaped.
* @param int $network_id ID of the network. Can be null to default to the current network ID.
* @param string $option Name of the option. Expected to not be SQL-escaped.
* @param mixed $value Option value. Expected to not be SQL-escaped.
* @return bool True if the value was updated, false otherwise.
*/
function update_network_option( $network_id, $option, $value ) {
@ -2433,9 +2433,9 @@ function get_registered_settings() {
*
* @since 4.7.0
*
* @param mixed $default Existing default value to return.
* @param string $option Option name.
* @param bool $passed_default Was `get_option()` passed a default value?
* @param mixed $default Existing default value to return.
* @param string $option Option name.
* @param bool $passed_default Was `get_option()` passed a default value?
* @return mixed Filtered default value.
*/
function filter_default_option( $default, $option, $passed_default ) {

View File

@ -1489,8 +1489,8 @@ if ( ! function_exists( 'wp_notify_postauthor' ) ) :
*
* @since 1.0.0
*
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
* @param string $deprecated Not used
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
* @param string $deprecated Not used
* @return bool True on completion. False if no email addresses were specified.
*/
function wp_notify_postauthor( $comment_id, $deprecated = null ) {
@ -2582,17 +2582,17 @@ if ( ! function_exists( 'get_avatar' ) ) :
* @since 2.5.0
* @since 4.2.0 Optional `$args` parameter added.
*
* @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
* user email, WP_User object, WP_Post object, or WP_Comment object.
* @param int $size Optional. Height and width of the avatar image file in pixels. Default 96.
* @param string $default Optional. URL for the default image or a default type. Accepts '404'
* (return a 404 instead of a default image), 'retro' (8bit), 'monsterid'
* (monster), 'wavatar' (cartoon face), 'indenticon' (the "quilt"),
* 'mystery', 'mm', or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF),
* or 'gravatar_default' (the Gravatar logo). Default is the value of the
* 'avatar_default' option, with a fallback of 'mystery'.
* @param string $alt Optional. Alternative text to use in <img> tag. Default empty.
* @param array $args {
* @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
* user email, WP_User object, WP_Post object, or WP_Comment object.
* @param int $size Optional. Height and width of the avatar image file in pixels. Default 96.
* @param string $default Optional. URL for the default image or a default type. Accepts '404'
* (return a 404 instead of a default image), 'retro' (8bit), 'monsterid'
* (monster), 'wavatar' (cartoon face), 'indenticon' (the "quilt"),
* 'mystery', 'mm', or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF),
* or 'gravatar_default' (the Gravatar logo). Default is the value of the
* 'avatar_default' option, with a fallback of 'mystery'.
* @param string $alt Optional. Alternative text to use in img tag. Default empty.
* @param array $args {
* Optional. Extra arguments to retrieve the avatar.
*
* @type int $height Display height of the avatar in pixels. Defaults to $size.
@ -2602,7 +2602,7 @@ if ( ! function_exists( 'get_avatar' ) ) :
* judged in that order. Default is the value of the 'avatar_rating' option.
* @type string $scheme URL scheme to use. See set_url_scheme() for accepted values.
* Default null.
* @type array|string $class Array or string of additional classes to add to the <img> element.
* @type array|string $class Array or string of additional classes to add to the img element.
* Default null.
* @type bool $force_display Whether to always show the avatar - ignores the show_avatars option.
* Default false.

View File

@ -71,8 +71,8 @@ if ( ! class_exists( 'PO', false ) ) :
/**
* Same as {@link export}, but writes the result to a file
*
* @param string $filename where to write the PO string
* @param bool $include_headers whether to include tje headers in the export
* @param string $filename Where to write the PO string.
* @param bool $include_headers Whether to include the headers in the export.
* @return bool true on success, false on error
*/
function export_to_file( $filename, $include_headers = true ) {

View File

@ -1002,7 +1002,7 @@ function _wp_privacy_statuses() {
*
* @global array $wp_post_statuses Inserts new post status object into the list
*
* @param string $post_status Name of the post status.
* @param string $post_status Name of the post status.
* @param array|string $args {
* Optional. Array or string of post status arguments.
*
@ -1296,9 +1296,9 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
* .
* @global array $wp_post_types List of post types.
*
* @param string $post_type Post type key. Must not exceed 20 characters and may
* only contain lowercase alphanumeric characters, dashes,
* and underscores. See sanitize_key().
* @param string $post_type Post type key. Must not exceed 20 characters and may
* only contain lowercase alphanumeric characters, dashes,
* and underscores. See sanitize_key().
* @param array|string $args {
* Array or string of arguments for registering a post type.
*
@ -4964,7 +4964,7 @@ function get_pung( $post_id ) {
* @since 4.7.0 `$post_id` can be a WP_Post object.
*
* @param int|WP_Post $post_id Post Object or ID
* @param string[] List of URLs yet to ping.
* @return string[]|false List of URLs yet to ping.
*/
function get_to_ping( $post_id ) {
$post = get_post( $post_id );

View File

@ -119,8 +119,8 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
*
* @param string|array $object_type Object(s) the field is being registered
* to, "post"|"term"|"comment" etc.
* @param string $attribute The attribute name.
* @param array $args {
* @param string $attribute The attribute name.
* @param array $args {
* Optional. An array of arguments used to handle the registered field.
*
* @type callable|null $get_callback Optional. The callback function used to retrieve the field value. Default is

View File

@ -365,9 +365,9 @@ function do_shortcode_tag( $m ) {
*
* @since 4.2.3
*
* @param string $content Content to search for shortcodes
* @param bool $ignore_html When true, all square braces inside elements will be encoded.
* @param array $tagnames List of shortcodes to find.
* @param string $content Content to search for shortcodes.
* @param bool $ignore_html When true, all square braces inside elements will be encoded.
* @param array $tagnames List of shortcodes to find.
* @return string Content with shortcodes filtered out.
*/
function do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames ) {

View File

@ -839,14 +839,15 @@ function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) {
*
* @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param.
*
* @param int|WP_Term|object $term If integer, term data will be fetched from the database, or from the cache if
* available. If stdClass object (as in the results of a database query), will apply
* filters and return a `WP_Term` object corresponding to the `$term` data. If `WP_Term`,
* will return `$term`.
* @param string $taxonomy Optional. Taxonomy name that $term is part of.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
* a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
* @param string $filter Optional. How to sanitize term fields. Default 'raw'.
* @param int|WP_Term|object $term If integer, term data will be fetched from the database, or from the cache if
* available. If stdClass object (as in the results of a database query), will apply
* filters and return a `WP_Term` object corresponding to the `$term` data. If
* `WP_Term`, will return `$term`.
* @param string $taxonomy Optional. Taxonomy name that $term is part of.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
* correspond toa WP_Term object, an associative array, or a numeric array
* respectively. Default OBJECT.
* @param string $filter Optional. How to sanitize term fields. Default 'raw'.
* @return WP_Term|array|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT',
* a WP_Term instance is returned. If taxonomy does not exist, a WP_Error is
* returned. Returns null for miscellaneous failure.
@ -4433,8 +4434,8 @@ function the_taxonomies( $args = array() ) {
* @since 2.5.0
*
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @param array $args {
* Optional. Arguments about how to format the list of taxonomies. Default empty array.
* @param array $args {
* Optional. Arguments about how to format the list of taxonomies. Default empty array.
*
* @type string $template Template for displaying a taxonomy label and list of terms.
* Default is "Label: Terms."

View File

@ -3023,29 +3023,29 @@ function require_if_theme_supports( $feature, $include ) {
*
* @param string $feature The name uniquely identifying the feature. See add_theme_support()
* for the list of possible values.
* @param array $args {
* Data used to describe the theme.
* @param array $args {
* Data used to describe the theme.
*
* @type string $type The type of data associated with this feature.
* Valid values are 'string', 'boolean', 'integer',
* 'number', 'array', and 'object'. Defaults to 'boolean'.
* @type boolean $variadic Does this feature utilize the variadic support
* of add_theme_support(), or are all arguments specified
* as the second parameter. Must be used with the "array" type.
* @type string $description A short description of the feature. Included in
* the Themes REST API schema. Intended for developers.
* @type bool|array $show_in_rest {
* Whether this feature should be included in the Themes REST API endpoint.
* Defaults to not being included. When registering an 'array' or 'object' type,
* this argument must be an array with the 'schema' key.
* @type string $type The type of data associated with this feature.
* Valid values are 'string', 'boolean', 'integer',
* 'number', 'array', and 'object'. Defaults to 'boolean'.
* @type boolean $variadic Does this feature utilize the variadic support
* of add_theme_support(), or are all arguments specified
* as the second parameter. Must be used with the "array" type.
* @type string $description A short description of the feature. Included in
* the Themes REST API schema. Intended for developers.
* @type bool|array $show_in_rest {
* Whether this feature should be included in the Themes REST API endpoint.
* Defaults to not being included. When registering an 'array' or 'object' type,
* this argument must be an array with the 'schema' key.
*
* @type array $schema Specifies the JSON Schema definition describing
* the feature. If any objects in the schema do not include
* the 'additionalProperties' keyword, it is set to false.
* @type string $name An alternate name to be used as the property name
* in the REST API.
* @type callable $prepare_callback A function used to format the theme support in the REST API.
* Receives the raw theme support value.
* @type array $schema Specifies the JSON Schema definition describing
* the feature. If any objects in the schema do not include
* the 'additionalProperties' keyword, it is set to false.
* @type string $name An alternate name to be used as the property name
* in the REST API.
* @type callable $prepare_callback A function used to format the theme support in the REST API.
* Receives the raw theme support value.
* }
* }
* @return true|WP_Error True if the theme feature was successfully registered, a WP_Error object if not.

View File

@ -2463,7 +2463,7 @@ function check_password_reset_key( $key, $login ) {
* @since 2.5.0
*
* @param WP_User $user The user
* @param string $new_pass New password for the user in plaintext
* @param string $new_pass New password for the user in plaintext
*/
function reset_password( $user, $new_pass ) {
/**

View File

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

View File

@ -1485,8 +1485,8 @@ function _wp_remove_unregistered_widgets( $sidebars_widgets, $allowed_widget_ids
*
* @since 2.5.0
*
* @param string|array|object $rss RSS url.
* @param array $args Widget arguments.
* @param string|array|object $rss RSS url.
* @param array $args Widget arguments.
*/
function wp_widget_rss_output( $rss, $args = array() ) {
if ( is_string( $rss ) ) {
@ -1596,8 +1596,8 @@ function wp_widget_rss_output( $rss, $args = array() ) {
*
* @since 2.5.0
*
* @param array|string $args Values for input fields.
* @param array $inputs Override default display options.
* @param array|string $args Values for input fields.
* @param array $inputs Override default display options.
*/
function wp_widget_rss_form( $args, $inputs = null ) {
$default_inputs = array(

View File

@ -2222,7 +2222,7 @@ class wpdb {
* A format is one of '%d', '%f', '%s' (integer, float, string).
* If omitted, all values in $data will be treated as strings unless otherwise
* specified in wpdb::$field_types.
* @param string $type Optional. Type of operation. Possible values include 'INSERT' or 'REPLACE'.
* @param string $type Optional. Type of operation. Possible values include 'INSERT' or 'REPLACE'.
* Default 'INSERT'.
* @return int|false The number of rows affected, or false on error.
*/
@ -2661,7 +2661,6 @@ class wpdb {
* return an associative array of row objects keyed by the value
* of each row's first column's value. Duplicate keys are discarded.
* @return array|object|null Database query results.
*
*/
public function get_results( $query = null, $output = OBJECT ) {
$this->func_call = "\$db->get_results(\"$query\", $output)";
@ -3395,11 +3394,11 @@ class wpdb {
*
* @since 0.71
*
* @param string $info_type Optional. Possible values include 'name', 'table', 'def', 'max_length',
* 'not_null', 'primary_key', 'multiple_key', 'unique_key', 'numeric',
* 'blob', 'type', 'unsigned', 'zerofill'. Default 'name'.
* @param int $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length.
* 3: if the col is numeric. 4: col's type. Default -1.
* @param string $info_type Optional. Possible values include 'name', 'table', 'def', 'max_length',
* 'not_null', 'primary_key', 'multiple_key', 'unique_key', 'numeric',
* 'blob', 'type', 'unsigned', 'zerofill'. Default 'name'.
* @param int $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length.
* 3: if the col is numeric. 4: col's type. Default -1.
* @return mixed Column results.
*/
public function get_col_info( $info_type = 'name', $col_offset = -1 ) {

View File

@ -811,12 +811,12 @@ function validate_blog_signup() {
*
* @since MU (3.0.0)
*
* @param string $domain The domain URL
* @param string $path The site root path
* @param string $blog_title The new site title
* @param string $user_name The user's username
* @param string $user_email The user's email address
* @param array $meta Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup()
* @param string $domain The domain URL.
* @param string $path The site root path.
* @param string $blog_title The new site title.
* @param string $user_name The user's username.
* @param string $user_email The user's email address.
* @param array $meta Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup().
*/
function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) {
?>