From eadb61542ac6e34f20dc593bdb6a861a70c4a44b Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 16 Feb 2024 21:47:12 +0000 Subject: [PATCH] Docs: Various improvements and corrections to inline documentation. See #59651 Built from https://develop.svn.wordpress.org/trunk@57644 git-svn-id: http://core.svn.wordpress.org/trunk@57145 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- ...ss-wp-application-passwords-list-table.php | 2 +- .../includes/class-wp-comments-list-table.php | 2 +- .../includes/class-wp-filesystem-base.php | 2 +- .../includes/class-wp-filesystem-direct.php | 2 +- .../includes/class-wp-filesystem-ftpext.php | 2 +- .../class-wp-filesystem-ftpsockets.php | 2 +- .../includes/class-wp-filesystem-ssh2.php | 2 +- wp-admin/includes/class-wp-list-table.php | 6 ++-- .../includes/class-wp-ms-sites-list-table.php | 8 ++--- wp-admin/includes/plugin.php | 17 +++++++--- wp-admin/includes/revision.php | 2 +- wp-admin/includes/theme.php | 2 +- wp-admin/includes/update.php | 4 +-- wp-includes/block-template-utils.php | 32 +++++++++---------- wp-includes/blocks.php | 1 + wp-includes/class-wp-customize-nav-menus.php | 8 ++--- wp-includes/class-wp-date-query.php | 2 +- wp-includes/class-wp-http.php | 6 ++-- .../class-wp-paused-extensions-storage.php | 2 +- wp-includes/class-wp-script-modules.php | 4 +-- wp-includes/class-wp-site-query.php | 10 +++--- wp-includes/class-wp-tax-query.php | 2 +- wp-includes/class-wp-user.php | 2 +- wp-includes/comment.php | 2 +- wp-includes/general-template.php | 14 ++++---- wp-includes/post.php | 2 +- wp-includes/script-modules.php | 4 +-- wp-includes/taxonomy.php | 2 +- wp-includes/version.php | 2 +- 29 files changed, 79 insertions(+), 69 deletions(-) diff --git a/wp-admin/includes/class-wp-application-passwords-list-table.php b/wp-admin/includes/class-wp-application-passwords-list-table.php index 6c0bf26f76..9a60853016 100644 --- a/wp-admin/includes/class-wp-application-passwords-list-table.php +++ b/wp-admin/includes/class-wp-application-passwords-list-table.php @@ -146,7 +146,7 @@ class WP_Application_Passwords_List_Table extends WP_List_Table { * * @since 5.6.0 * - * @param string $which The location of the bulk actions: 'top' or 'bottom'. + * @param string $which The location of the bulk actions: Either 'top' or 'bottom'. */ protected function display_tablenav( $which ) { ?> diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 993fb7cafc..d4970e2f59 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -437,7 +437,7 @@ class WP_Comments_List_Table extends WP_List_Table { * @since 5.6.0 The `$which` parameter was added. * * @param string $comment_status The comment status name. Default 'All'. - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ do_action( 'manage_comments_nav', $comment_status, $which ); diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 8b291279e1..125c2d3b9a 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -836,7 +836,7 @@ class WP_Filesystem_Base { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index 9fdfeb95cb..2efd5b000a 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -599,7 +599,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 7db0685fc5..0294720ccd 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -731,7 +731,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index c69d8012ca..9a37d88c11 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -625,7 +625,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index b8daad1ab1..9e0cb885b0 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -745,7 +745,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 30d7c854cb..4b86a9b286 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -564,7 +564,7 @@ class WP_List_Table { * * @since 3.1.0 * - * @param string $which The location of the bulk actions: 'top' or 'bottom'. + * @param string $which The location of the bulk actions: Either 'top' or 'bottom'. * This is designated as optional for backward compatibility. */ protected function bulk_actions( $which = '' ) { @@ -1012,7 +1012,7 @@ class WP_List_Table { * * @since 3.1.0 * - * @param string $which + * @param string $which The location of the pagination: Either 'top' or 'bottom'. */ protected function pagination( $which ) { if ( empty( $this->_pagination_args ) ) { @@ -1663,7 +1663,7 @@ class WP_List_Table { * Generates the table navigation above or below the table * * @since 3.1.0 - * @param string $which + * @param string $which The location of the navigation: Either 'top' or 'bottom'. */ protected function display_tablenav( $which ) { if ( 'top' === $which ) { diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php index ffa22318ce..c0d65a60d4 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -302,7 +302,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { /** * @global string $mode List table view mode. * - * @param string $which The location of the pagination nav markup: 'top' or 'bottom'. + * @param string $which The location of the pagination nav markup: Either 'top' or 'bottom'. */ protected function pagination( $which ) { global $mode; @@ -319,7 +319,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { * * @since 5.3.0 * - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ protected function extra_tablenav( $which ) { ?> @@ -333,7 +333,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { * * @since 5.3.0 * - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ do_action( 'restrict_manage_sites', $which ); @@ -353,7 +353,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { * * @since 5.3.0 * - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ do_action( 'manage_sites_extra_tablenav', $which ); } diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index af5f085b2e..fa3fa09f09 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -493,14 +493,23 @@ function get_dropins() { } /** - * Returns drop-ins that WordPress uses. + * Returns drop-in plugins that WordPress uses. * * Includes Multisite drop-ins only when is_multisite() * * @since 3.0.0 - * @return array[] Key is file name. The value is an array, with the first value the - * purpose of the drop-in and the second value the name of the constant that must be - * true for the drop-in to be used, or true if no constant is required. + * + * @return array[] { + * Key is file name. The value is an array of data about the drop-in. + * + * @type array ...$0 { + * Data about the drop-in. + * + * @type string $0 The purpose of the drop-in. + * @type string|true $1 Name of the constant that must be true for the drop-in + * to be used, or true if no constant is required. + * } + * } */ function _get_dropins() { $dropins = array( diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php index 8ed45fd193..a0f2c0e875 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -85,7 +85,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { * @param string $field The current revision field. * @param WP_Post $compare_from The revision post object to compare to or from. * @param string $context The context of whether the current revision is the old - * or the new one. Values are 'to' or 'from'. + * or the new one. Either 'to' or 'from'. */ $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : ''; diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 70abab68ad..0249fb4fe1 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -448,7 +448,7 @@ function get_theme_feature_list( $api = true ) { * * @since 2.8.0 * - * @param string $action API action to perform: 'query_themes', 'theme_information', + * @param string $action API action to perform: Accepts 'query_themes', 'theme_information', * 'hot_tags' or 'feature_list'. * @param array|object $args { * Optional. Array or object of arguments to serialize for the Themes API. Default empty array. diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 7e68440b8e..ba27ddd0c1 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -1076,7 +1076,7 @@ function wp_recovery_mode_nag() { * * @since 5.5.0 * - * @param string $type The type of update being checked: 'theme' or 'plugin'. + * @param string $type The type of update being checked: Either 'theme' or 'plugin'. * @return bool True if auto-updates are enabled for `$type`, false otherwise. */ function wp_is_auto_update_enabled_for_type( $type ) { @@ -1116,7 +1116,7 @@ function wp_is_auto_update_enabled_for_type( $type ) { * * @since 5.6.0 * - * @param string $type The type of update being checked: 'theme' or 'plugin'. + * @param string $type The type of update being checked: Either 'theme' or 'plugin'. * @param bool|null $update Whether to update. The value of null is internally used * to detect whether nothing has hooked into this filter. * @param object $item The update offer. diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index 89a2f04fb2..01416c19c6 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -174,7 +174,7 @@ function get_default_block_template_types() { ); /** - * Filters the list of template types. + * Filters the list of default template types. * * @since 5.9.0 * @@ -248,7 +248,7 @@ function _get_block_templates_paths( $base_directory ) { * @since 5.9.0 * @access private * - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @param string $slug Template slug. * @return array|null { * Array with template metadata if $template_type is one of 'wp_template' or 'wp_template_part', @@ -305,7 +305,7 @@ function _get_block_template_file( $template_type, $slug ) { * @since 6.3.0 Added the `$query` parameter. * @access private * - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @param array $query { * Arguments to retrieve templates. Optional, empty by default. * @@ -520,7 +520,7 @@ function _remove_theme_attribute_from_template_part_block( &$block ) { * @access private * * @param array $template_file Theme file. - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @return WP_Block_Template Template. */ function _build_block_template_result_from_file( $template_file, $template_type ) { @@ -925,7 +925,7 @@ function _build_block_template_result_from_post( $post ) { * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @return WP_Block_Template[] Array of block templates. */ function get_block_templates( $query = array(), $template_type = 'wp_template' ) { @@ -946,7 +946,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' ) * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $templates = apply_filters( 'pre_get_block_templates', null, $query, $template_type ); if ( ! is_null( $templates ) ) { @@ -1051,7 +1051,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' ) * @since 5.8.0 * * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'. * Default 'wp_template'. * @return WP_Block_Template|null Template. */ @@ -1066,7 +1066,7 @@ function get_block_template( $id, $template_type = 'wp_template' ) { * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, * or null to allow WP to run its normal queries. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type ); if ( ! is_null( $block_template ) ) { @@ -1112,7 +1112,7 @@ function get_block_template( $id, $template_type = 'wp_template' ) { * * @param WP_Block_Template|null $block_template The found block template, or null if there isn't one. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param array $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ return apply_filters( 'get_block_template', $block_template, $id, $template_type ); } @@ -1125,7 +1125,7 @@ function get_block_template( $id, $template_type = 'wp_template' ) { * @since 5.9.0 * * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'. * Default 'wp_template'. * @return WP_Block_Template|null The found block template, or null if there isn't one. */ @@ -1140,7 +1140,7 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, * or null to allow WP to run its normal queries. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type ); if ( ! is_null( $block_template ) ) { @@ -1174,7 +1174,7 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { * * @param WP_Block_Template|null $block_template The found block template, or null if there is none. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ return apply_filters( 'get_block_file_template', $block_template, $id, $template_type ); } @@ -1184,7 +1184,7 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { * * @since 5.9.0 * - * @param string $part The block template part to print. Use "header" or "footer". + * @param string $part The block template part to print. Either 'header' or 'footer'. */ function block_template_part( $part ) { $template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' ); @@ -1218,7 +1218,7 @@ function block_footer_area() { * @since 6.0.0 * * @param string $path The path of the file in the theme. - * @return Bool Whether this file is in an ignored directory. + * @return bool Whether this file is in an ignored directory. */ function wp_is_theme_directory_ignored( $path ) { $directories_to_ignore = array( '.DS_Store', '.svn', '.git', '.hg', '.bzr', 'node_modules', 'vendor' ); @@ -1347,8 +1347,8 @@ function wp_generate_block_templates_export_file() { * * @since 6.1.0 * - * @param string $slug The template slug to be created. - * @param boolean $is_custom Optional. Indicates if a template is custom or + * @param string $slug The template slug to be created. + * @param bool $is_custom Optional. Indicates if a template is custom or * part of the template hierarchy. Default false. * @param string $template_prefix Optional. The template prefix for the created template. * Used to extract the main template type, e.g. diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index 7b981d2e69..7931061086 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -1757,6 +1757,7 @@ function block_version( $content ) { * @param array $style_properties Array containing the properties of the style name, label, * style_handle (name of the stylesheet to be enqueued), * inline_style (string containing the CSS to be added). + * See WP_Block_Styles_Registry::register(). * @return bool True if the block style was registered with success and false otherwise. */ function register_block_style( $block_name, $style_properties ) { diff --git a/wp-includes/class-wp-customize-nav-menus.php b/wp-includes/class-wp-customize-nav-menus.php index 20f88f8440..019ebe7128 100644 --- a/wp-includes/class-wp-customize-nav-menus.php +++ b/wp-includes/class-wp-customize-nav-menus.php @@ -937,10 +937,10 @@ final class WP_Customize_Nav_Menus { * @param array $postarr { * Post array. Note that post_status is overridden to be `auto-draft`. * - * @var string $post_title Post title. Required. - * @var string $post_type Post type. Required. - * @var string $post_name Post name. - * @var string $post_content Post content. + * @type string $post_title Post title. Required. + * @type string $post_type Post type. Required. + * @type string $post_name Post name. + * @type string $post_content Post content. * } * @return WP_Post|WP_Error Inserted auto-draft post object or error. */ diff --git a/wp-includes/class-wp-date-query.php b/wp-includes/class-wp-date-query.php index 751bab187d..b8ae95461c 100644 --- a/wp-includes/class-wp-date-query.php +++ b/wp-includes/class-wp-date-query.php @@ -1057,7 +1057,7 @@ class WP_Date_Query { * @since 6.0.3 * * @param string $relation Raw relation key from the query argument. - * @return string Sanitized relation ('AND' or 'OR'). + * @return string Sanitized relation. Either 'AND' or 'OR'. */ public function sanitize_relation( $relation ) { if ( 'OR' === strtoupper( $relation ) ) { diff --git a/wp-includes/class-wp-http.php b/wp-includes/class-wp-http.php index bbb6dd41ae..48580680ba 100644 --- a/wp-includes/class-wp-http.php +++ b/wp-includes/class-wp-http.php @@ -611,7 +611,7 @@ class WP_Http { * @param string $url The request URL. * @param string|array $args Optional. Override the defaults. * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. - * A WP_Error instance upon error. + * A WP_Error instance upon error. See WP_Http::response() for details. */ public function post( $url, $args = array() ) { $defaults = array( 'method' => 'POST' ); @@ -629,7 +629,7 @@ class WP_Http { * @param string $url The request URL. * @param string|array $args Optional. Override the defaults. * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. - * A WP_Error instance upon error. + * A WP_Error instance upon error. See WP_Http::response() for details. */ public function get( $url, $args = array() ) { $defaults = array( 'method' => 'GET' ); @@ -647,7 +647,7 @@ class WP_Http { * @param string $url The request URL. * @param string|array $args Optional. Override the defaults. * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. - * A WP_Error instance upon error. + * A WP_Error instance upon error. See WP_Http::response() for details. */ public function head( $url, $args = array() ) { $defaults = array( 'method' => 'HEAD' ); diff --git a/wp-includes/class-wp-paused-extensions-storage.php b/wp-includes/class-wp-paused-extensions-storage.php index 4658277289..a1b2b6d5ae 100644 --- a/wp-includes/class-wp-paused-extensions-storage.php +++ b/wp-includes/class-wp-paused-extensions-storage.php @@ -15,7 +15,7 @@ class WP_Paused_Extensions_Storage { /** - * Type of extension. Used to key extension storage. + * Type of extension. Used to key extension storage. Either 'plugin' or 'theme'. * * @since 5.2.0 * @var string diff --git a/wp-includes/class-wp-script-modules.php b/wp-includes/class-wp-script-modules.php index 6770597c1b..9bf6ce33e7 100644 --- a/wp-includes/class-wp-script-modules.php +++ b/wp-includes/class-wp-script-modules.php @@ -44,7 +44,7 @@ class WP_Script_Modules { * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain @@ -109,7 +109,7 @@ class WP_Script_Modules { * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain diff --git a/wp-includes/class-wp-site-query.php b/wp-includes/class-wp-site-query.php index 6598866162..10a9b18339 100644 --- a/wp-includes/class-wp-site-query.php +++ b/wp-includes/class-wp-site-query.php @@ -158,11 +158,11 @@ class WP_Site_Query { * @type string $path Limit results to those affiliated with a given path. Default empty. * @type string[] $path__in Array of paths to include affiliated sites for. Default empty. * @type string[] $path__not_in Array of paths to exclude affiliated sites for. Default empty. - * @type int $public Limit results to public sites. Accepts '1' or '0'. Default empty. - * @type int $archived Limit results to archived sites. Accepts '1' or '0'. Default empty. - * @type int $mature Limit results to mature sites. Accepts '1' or '0'. Default empty. - * @type int $spam Limit results to spam sites. Accepts '1' or '0'. Default empty. - * @type int $deleted Limit results to deleted sites. Accepts '1' or '0'. Default empty. + * @type int $public Limit results to public sites. Accepts 1 or 0. Default empty. + * @type int $archived Limit results to archived sites. Accepts 1 or 0. Default empty. + * @type int $mature Limit results to mature sites. Accepts 1 or 0. Default empty. + * @type int $spam Limit results to spam sites. Accepts 1 or 0. Default empty. + * @type int $deleted Limit results to deleted sites. Accepts 1 or 0. Default empty. * @type int $lang_id Limit results to a language ID. Default empty. * @type string[] $lang__in Array of language IDs to include affiliated sites for. Default empty. * @type string[] $lang__not_in Array of language IDs to exclude affiliated sites for. Default empty. diff --git a/wp-includes/class-wp-tax-query.php b/wp-includes/class-wp-tax-query.php index 58e53ea4a2..5a489f5662 100644 --- a/wp-includes/class-wp-tax-query.php +++ b/wp-includes/class-wp-tax-query.php @@ -202,7 +202,7 @@ class WP_Tax_Query { * @since 4.1.0 * * @param string $relation Raw relation key from the query argument. - * @return string Sanitized relation ('AND' or 'OR'). + * @return string Sanitized relation. Either 'AND' or 'OR'. */ public function sanitize_relation( $relation ) { if ( 'OR' === strtoupper( $relation ) ) { diff --git a/wp-includes/class-wp-user.php b/wp-includes/class-wp-user.php index a3e40df164..0be1b3ed02 100644 --- a/wp-includes/class-wp-user.php +++ b/wp-includes/class-wp-user.php @@ -191,7 +191,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: Accepts 'id', 'ID', 'slug', 'email' or 'login'. * @param string|int $value The field value. * @return object|false Raw user object. */ diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 37d36364ce..3d11867b07 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -278,7 +278,7 @@ function get_comment_statuses() { * * @param string $post_type Optional. Post type. Default 'post'. * @param string $comment_type Optional. Comment type. Default 'comment'. - * @return string Expected return value is 'open' or 'closed'. + * @return string Either 'open' or 'closed'. */ function get_default_comment_status( $post_type = 'post', $comment_type = 'comment' ) { switch ( $comment_type ) { diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index ddc34db34f..702c4345ff 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1319,7 +1319,7 @@ function _wp_render_title_tag() { * @param string $sep Optional. How to separate the various items within the page title. * Default '»'. * @param bool $display Optional. Whether to display or retrieve title. Default true. - * @param string $seplocation Optional. Location of the separator ('left' or 'right'). + * @param string $seplocation Optional. Location of the separator (either 'left' or 'right'). * @return string|void String when `$display` is false, nothing otherwise. */ function wp_title( $sep = '»', $display = true, $seplocation = '' ) { @@ -1439,7 +1439,7 @@ function wp_title( $sep = '»', $display = true, $seplocation = '' ) { * * @param string $title Page title. * @param string $sep Title separator. - * @param string $seplocation Location of the separator ('left' or 'right'). + * @param string $seplocation Location of the separator (either 'left' or 'right'). */ $title = apply_filters( 'wp_title', $title, $sep, $seplocation ); @@ -3463,7 +3463,7 @@ function wp_resource_hints() { $unique_urls = array(); /** - * Filters domains and URLs for resource hints of relation type. + * Filters domains and URLs for resource hints of the given relation type. * * @since 4.6.0 * @since 4.7.0 The `$urls` parameter accepts arrays of specific HTML attributes @@ -3483,8 +3483,8 @@ function wp_resource_hints() { * @type string $type Type of the resource (`text/html`, `text/css`, etc). * } * } - * @param string $relation_type The relation type the URLs are printed for, - * e.g. 'preconnect' or 'prerender'. + * @param string $relation_type The relation type the URLs are printed for. One of + * 'dns-prefetch', 'preconnect', 'prefetch', or 'prerender'. */ $urls = apply_filters( 'wp_resource_hints', $urls, $relation_type ); @@ -3757,12 +3757,12 @@ function user_can_richedit() { /** * Finds out which editor should be displayed by default. * - * Works out which of the two editors to display as the current editor for a + * Works out which of the editors to display as the current editor for a * user. The 'html' setting is for the "Text" editor tab. * * @since 2.5.0 * - * @return string Either 'tinymce', or 'html', or 'test' + * @return string Either 'tinymce', 'html', or 'test' */ function wp_default_editor() { $r = user_can_richedit() ? 'tinymce' : 'html'; // Defaults. diff --git a/wp-includes/post.php b/wp-includes/post.php index 90b8df4f6e..04fb143a1d 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1600,7 +1600,7 @@ function get_post_type_object( $post_type ) { * * @param array|string $args Optional. An array of key => value arguments to match against * the post type objects. Default empty array. - * @param string $output Optional. The type of output to return. Accepts post type 'names' + * @param string $output Optional. The type of output to return. Either 'names' * or 'objects'. Default 'names'. * @param string $operator Optional. The logical operation to perform. 'or' means only one * element from the array needs to match; 'and' means all elements diff --git a/wp-includes/script-modules.php b/wp-includes/script-modules.php index f8efb9484b..0aceb51f62 100644 --- a/wp-includes/script-modules.php +++ b/wp-includes/script-modules.php @@ -44,7 +44,7 @@ function wp_script_modules(): WP_Script_Modules { * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain @@ -81,7 +81,7 @@ function wp_register_script_module( string $id, string $src, array $deps = array * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 6943f2b303..85ca5c30da 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -272,7 +272,7 @@ function create_initial_taxonomies() { * * @param array $args Optional. An array of `key => value` arguments to match against the taxonomy objects. * Default empty array. - * @param string $output Optional. The type of output to return in the array. Accepts either taxonomy 'names' + * @param string $output Optional. The type of output to return in the array. Either 'names' * or 'objects'. Default 'names'. * @param string $operator Optional. The logical operation to perform. Accepts 'and' or 'or'. 'or' means only * one element from the array needs to match; 'and' means all elements must match. diff --git a/wp-includes/version.php b/wp-includes/version.php index 6c4c19ed61..e916c856db 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-beta1-57643'; +$wp_version = '6.5-beta1-57644'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.