From 9af5e46627cc036468b22971d491d92c2e6f20c8 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 26 Jun 2020 18:38:51 +0000 Subject: [PATCH] Docs: Miscellaneous docblock improvements. See #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48184 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-plugins-list-table.php | 23 ++++++++++--------- src/wp-admin/includes/file.php | 6 ++--- src/wp-includes/canonical.php | 12 +++++----- src/wp-includes/class-wp-http-proxy.php | 12 +++++----- 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index f59ece0bc1..f257354db6 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -1011,9 +1011,10 @@ class WP_Plugins_List_Table extends WP_List_Table { * the version, author, author URI, and plugin URI. * @param string $plugin_file Path to the plugin file relative to the plugins directory. * @param array $plugin_data An array of plugin data. - * @param string $status Status of the plugin. Defaults are 'All', 'Active', - * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', - * 'Drop-ins', 'Search', 'Paused'. + * @param string $status Status filter currently applied to the plugin list. Possible + * values are: 'all', 'active', 'inactive', 'recently_activated', + * 'upgrade', 'mustuse', 'dropins', 'search', 'paused', + * 'auto-update-enabled', 'auto-update-disabled'. */ $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); @@ -1131,10 +1132,10 @@ class WP_Plugins_List_Table extends WP_List_Table { * * @param string $plugin_file Path to the plugin file relative to the plugins directory. * @param array $plugin_data An array of plugin data. - * @param string $status Status of the plugin. Defaults are 'All', 'Active', - * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', - * 'Drop-ins', 'Search', 'Paused', 'Auto-updates Enabled', - * 'Auto-updates Disabled'. + * @param string $status Status filter currently applied to the plugin list. Possible + * values are: 'all', 'active', 'inactive', 'recently_activated', + * 'upgrade', 'mustuse', 'dropins', 'search', 'paused', + * 'auto-update-enabled', 'auto-update-disabled'. */ do_action( 'after_plugin_row', $plugin_file, $plugin_data, $status ); @@ -1149,10 +1150,10 @@ class WP_Plugins_List_Table extends WP_List_Table { * * @param string $plugin_file Path to the plugin file relative to the plugins directory. * @param array $plugin_data An array of plugin data. - * @param string $status Status of the plugin. Defaults are 'All', 'Active', - * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', - * 'Drop-ins', 'Search', 'Paused', 'Auto-updates Enabled', - * 'Auto-updates Disabled'. + * @param string $status Status filter currently applied to the plugin list. Possible + * values are: 'all', 'active', 'inactive', 'recently_activated', + * 'upgrade', 'mustuse', 'dropins', 'search', 'paused', + * 'auto-update-enabled', 'auto-update-disabled'. */ do_action( "after_plugin_row_{$plugin_file}", $plugin_file, $plugin_data, $status ); } diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index e4c032f72e..c879acba44 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -888,7 +888,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) { * @param mixed $move_new_file If null (default) move the file after the upload. * @param string[] $file An array of data for a single file. * @param string $new_file Filename of the newly-uploaded file. - * @param string $type File type. + * @param string $type Mime type of the newly-uploaded file. */ $move_new_file = apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type ); @@ -940,8 +940,8 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) { * Array of upload data. * * @type string $file Filename of the newly-uploaded file. - * @type string $url URL of the uploaded file. - * @type string $type File type. + * @type string $url URL of the newly-uploaded file. + * @type string $type Mime type of the newly-uploaded file. * } * @param string $context The type of upload action. Values include 'upload' or 'sideload'. */ diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php index 6f9e3f9204..8e1c46d781 100644 --- a/src/wp-includes/canonical.php +++ b/src/wp-includes/canonical.php @@ -850,7 +850,7 @@ function redirect_guess_404_permalink() { * Filters whether to attempt to guess a redirect URL for a 404 request. * * Passing a false value to the filter will disable the URL guessing - * and return early. + * and return early without performing a redirect. * * @since 5.5.0 * @@ -862,15 +862,15 @@ function redirect_guess_404_permalink() { } /** - * Filters whether to short-circuit redirect URL guessing for 404 requests. + * Short-circuits the redirect URL guessing for 404 requests. * * Passing a non-null value to the filter will effectively short-circuit * the URL guessing, returning the passed value instead. * * @since 5.5.0 * - * @param null|string $pre Whether to short-circuit redirect guess 404 permalink. - * Default null to continue with the URL guessing. + * @param null|string|false $pre Whether to short-circuit guessing the redirect for a 404. + * Default null to continue with the URL guessing. */ $pre = apply_filters( 'pre_redirect_guess_404_permalink', null ); if ( null !== $pre ) { @@ -879,13 +879,13 @@ function redirect_guess_404_permalink() { if ( get_query_var( 'name' ) ) { /** - * Filters whether to perform a strict or loose guess. + * Filters whether to perform a strict guess for a 404 redirect. * * Passing a truthy value to the filter will redirect only exact post_name matches. * * @since 5.5.0 * - * @param bool $strict_guess Whether to perform a strict/exact guess. Default false (loose guess). + * @param bool $strict_guess Whether to perform a strict guess. Default false (loose guess). */ $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false ); diff --git a/src/wp-includes/class-wp-http-proxy.php b/src/wp-includes/class-wp-http-proxy.php index a1b3418d77..0f7d96fb8c 100644 --- a/src/wp-includes/class-wp-http-proxy.php +++ b/src/wp-includes/class-wp-http-proxy.php @@ -160,8 +160,8 @@ class WP_HTTP_Proxy { * * @since 2.8.0 * - * @param string $uri URI to check. - * @return bool True, to send through the proxy and false if, the proxy should not be used. + * @param string $uri URL of the request. + * @return bool Whether to send the request through the proxy. */ public function send_through_proxy( $uri ) { $check = parse_url( $uri ); @@ -181,10 +181,10 @@ class WP_HTTP_Proxy { * * @since 3.5.0 * - * @param bool|null $override Whether to override the request result. Default null. - * @param string $uri URL to check. - * @param array $check Associative array result of parsing the request URI. - * @param array $home Associative array result of parsing the site URL. + * @param bool|null $override Whether to send the request through the proxy. Default null. + * @param string $uri URL of the request. + * @param array $check Associative array result of parsing the request URL with `parse_url()`. + * @param array $home Associative array result of parsing the site URL with `parse_url()`. */ $result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home ); if ( ! is_null( $result ) ) {