From 9a982b4ae8e844fbd0d285a5dc3fda365fe1ca99 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 1 Dec 2021 12:17:00 +0000 Subject: [PATCH] Docs: Various docblock corrections. See #53399 Built from https://develop.svn.wordpress.org/trunk@52299 git-svn-id: http://core.svn.wordpress.org/trunk@51891 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/image.php | 4 ++-- wp-admin/includes/post.php | 4 ++-- wp-includes/class-wp-block.php | 4 ++-- wp-includes/class-wp-http-proxy.php | 16 ++++++++++------ wp-includes/class-wp-query.php | 4 ++-- wp-includes/comment.php | 2 +- wp-includes/media.php | 2 +- wp-includes/ms-functions.php | 2 +- wp-includes/pomo/entry.php | 2 +- wp-includes/taxonomy.php | 8 ++++---- wp-includes/version.php | 2 +- 11 files changed, 27 insertions(+), 23 deletions(-) diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 9cab18a22a..48f3055fba 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -687,8 +687,8 @@ function wp_exif_frac2dec( $str ) { * * @since 2.5.0 * - * @param string $str - * @return int + * @param string $str A date string expected to be in Exif format (Y:m:d H:i:s). + * @return int|false The unix timestamp, or false on failure. */ function wp_exif_date2ts( $str ) { list( $date, $time ) = explode( ' ', trim( $str ) ); diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index f84b24c27f..3cf0aacf51 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -209,8 +209,8 @@ function _wp_translate_postdata( $update = false, $post_data = null ) { * * @since 5.0.1 * - * @param array|null $post_data Optional. The array of post data to process. - * Defaults to the `$_POST` superglobal. + * @param array|WP_Error|null $post_data The array of post data to process, or an error object. + * Defaults to the `$_POST` superglobal. * @return array|WP_Error Array of post data on success, WP_Error on failure. */ function _wp_get_allowed_postdata( $post_data = null ) { diff --git a/wp-includes/class-wp-block.php b/wp-includes/class-wp-block.php index ed5b0f0767..90148f7613 100644 --- a/wp-includes/class-wp-block.php +++ b/wp-includes/class-wp-block.php @@ -196,9 +196,9 @@ class WP_Block { * @since 5.5.0 * * @param array $options { - * Optional options object. + * Optional options object. * - * @type bool $dynamic Defaults to 'true'. Optionally set to false to avoid using the block's render_callback. + * @type bool $dynamic Defaults to 'true'. Optionally set to false to avoid using the block's render_callback. * } * @return string Rendered block output. */ diff --git a/wp-includes/class-wp-http-proxy.php b/wp-includes/class-wp-http-proxy.php index 71c9abcb40..4408b9ba26 100644 --- a/wp-includes/class-wp-http-proxy.php +++ b/wp-includes/class-wp-http-proxy.php @@ -44,10 +44,12 @@ class WP_HTTP_Proxy { /** * Whether proxy connection should be used. * - * @since 2.8.0 + * Constants which control this behaviour: * - * @use WP_PROXY_HOST - * @use WP_PROXY_PORT + * - `WP_PROXY_HOST` + * - `WP_PROXY_PORT` + * + * @since 2.8.0 * * @return bool */ @@ -58,10 +60,12 @@ class WP_HTTP_Proxy { /** * Whether authentication should be used. * - * @since 2.8.0 + * Constants which control this behaviour: * - * @use WP_PROXY_USERNAME - * @use WP_PROXY_PASSWORD + * - `WP_PROXY_USERNAME` + * - `WP_PROXY_PASSWORD` + * + * @since 2.8.0 * * @return bool */ diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index 83351762eb..91f774d1d8 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -2826,7 +2826,7 @@ class WP_Query { * Filters all query clauses at once, for convenience. * * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT, - * fields (SELECT), and LIMITS clauses. + * fields (SELECT), and LIMIT clauses. * * @since 3.1.0 * @@ -2950,7 +2950,7 @@ class WP_Query { * For use by caching plugins. * * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT, - * fields (SELECT), and LIMITS clauses. + * fields (SELECT), and LIMIT clauses. * * @since 3.1.0 * diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 1cb0e4f0f5..f5c0d6afbe 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -366,7 +366,7 @@ function get_lastcommentmodified( $timezone = 'server' ) { * * @param int $post_id Optional. Restrict the comment counts to the given post. Default 0, which indicates that * comment counts for the whole site will be retrieved. - * @return array() { + * @return array { * The number of comments keyed by their status. * * @type int $approved The number of approved comments. diff --git a/wp-includes/media.php b/wp-includes/media.php index 0450b4512f..184f5fc1a0 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -4224,7 +4224,7 @@ function wp_prepare_attachment_for_js( $attachment ) { * @param array $args { * Arguments for enqueuing media scripts. * - * @type int|WP_Post A post object or ID. + * @type int|WP_Post $post A post object or ID. * } */ function wp_enqueue_media( $args = array() ) { diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index e38b53e6fc..825495c538 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1307,7 +1307,7 @@ function wp_delete_signup_on_user_delete( $id, $reassign, $user ) { * This function runs when a user self-registers as well as when * a Super Admin creates a new user. Hook to {@see 'wpmu_new_user'} for events * that should affect all new users, but only on Multisite (otherwise - * use {@see'user_register'}). + * use {@see 'user_register'}). * * @since MU (3.0.0) * diff --git a/wp-includes/pomo/entry.php b/wp-includes/pomo/entry.php index d30a4bda13..f48b2b3d26 100644 --- a/wp-includes/pomo/entry.php +++ b/wp-includes/pomo/entry.php @@ -16,7 +16,7 @@ if ( ! class_exists( 'Translation_Entry', false ) ) : /** * Whether the entry contains a string and its plural form, default is false * - * @var boolean + * @var bool */ public $is_plural = false; diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 8d4d9bec33..7923003e9b 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -4636,10 +4636,10 @@ function get_term_link( $term, $taxonomy = '' ) { * Arguments about which post to use and how to format the output. Shares all of the arguments * supported by get_the_taxonomies(), in addition to the following. * - * @type int|WP_Post $post Post ID or object to get taxonomies of. Default current post. - * @type string $before Displays before the taxonomies. Default empty string. - * @type string $sep Separates each taxonomy. Default is a space. - * @type string $after Displays after the taxonomies. Default empty string. + * @type int|WP_Post $post Post ID or object to get taxonomies of. Default current post. + * @type string $before Displays before the taxonomies. Default empty string. + * @type string $sep Separates each taxonomy. Default is a space. + * @type string $after Displays after the taxonomies. Default empty string. * } */ function the_taxonomies( $args = array() ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 25443e2b86..75f6070c6d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-beta1-52298'; +$wp_version = '5.9-beta1-52299'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.