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
This commit is contained in:
John Blackbourn 2024-02-16 21:47:12 +00:00
parent d98b1b3db4
commit eadb61542a
29 changed files with 79 additions and 69 deletions

View File

@ -146,7 +146,7 @@ class WP_Application_Passwords_List_Table extends WP_List_Table {
* *
* @since 5.6.0 * @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 ) { protected function display_tablenav( $which ) {
?> ?>

View File

@ -437,7 +437,7 @@ class WP_Comments_List_Table extends WP_List_Table {
* @since 5.6.0 The `$which` parameter was added. * @since 5.6.0 The `$which` parameter was added.
* *
* @param string $comment_status The comment status name. Default 'All'. * @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 ); do_action( 'manage_comments_nav', $comment_status, $which );

View File

@ -836,7 +836,7 @@ class WP_Filesystem_Base {
* @return array|false { * @return array|false {
* Array of arrays containing file information. False if unable to list directory contents. * 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. * Array of file information. Note that some elements may not be available on all filesystems.
* *
* @type string $name Name of the file or directory. * @type string $name Name of the file or directory.

View File

@ -599,7 +599,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
* @return array|false { * @return array|false {
* Array of arrays containing file information. False if unable to list directory contents. * 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. * Array of file information. Note that some elements may not be available on all filesystems.
* *
* @type string $name Name of the file or directory. * @type string $name Name of the file or directory.

View File

@ -731,7 +731,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
* @return array|false { * @return array|false {
* Array of arrays containing file information. False if unable to list directory contents. * 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. * Array of file information. Note that some elements may not be available on all filesystems.
* *
* @type string $name Name of the file or directory. * @type string $name Name of the file or directory.

View File

@ -625,7 +625,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
* @return array|false { * @return array|false {
* Array of arrays containing file information. False if unable to list directory contents. * 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. * Array of file information. Note that some elements may not be available on all filesystems.
* *
* @type string $name Name of the file or directory. * @type string $name Name of the file or directory.

View File

@ -745,7 +745,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
* @return array|false { * @return array|false {
* Array of arrays containing file information. False if unable to list directory contents. * 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. * Array of file information. Note that some elements may not be available on all filesystems.
* *
* @type string $name Name of the file or directory. * @type string $name Name of the file or directory.

View File

@ -564,7 +564,7 @@ class WP_List_Table {
* *
* @since 3.1.0 * @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. * This is designated as optional for backward compatibility.
*/ */
protected function bulk_actions( $which = '' ) { protected function bulk_actions( $which = '' ) {
@ -1012,7 +1012,7 @@ class WP_List_Table {
* *
* @since 3.1.0 * @since 3.1.0
* *
* @param string $which * @param string $which The location of the pagination: Either 'top' or 'bottom'.
*/ */
protected function pagination( $which ) { protected function pagination( $which ) {
if ( empty( $this->_pagination_args ) ) { if ( empty( $this->_pagination_args ) ) {
@ -1663,7 +1663,7 @@ class WP_List_Table {
* Generates the table navigation above or below the table * Generates the table navigation above or below the table
* *
* @since 3.1.0 * @since 3.1.0
* @param string $which * @param string $which The location of the navigation: Either 'top' or 'bottom'.
*/ */
protected function display_tablenav( $which ) { protected function display_tablenav( $which ) {
if ( 'top' === $which ) { if ( 'top' === $which ) {

View File

@ -302,7 +302,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
/** /**
* @global string $mode List table view mode. * @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 ) { protected function pagination( $which ) {
global $mode; global $mode;
@ -319,7 +319,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
* *
* @since 5.3.0 * @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 ) { protected function extra_tablenav( $which ) {
?> ?>
@ -333,7 +333,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
* *
* @since 5.3.0 * @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 ); do_action( 'restrict_manage_sites', $which );
@ -353,7 +353,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
* *
* @since 5.3.0 * @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 ); do_action( 'manage_sites_extra_tablenav', $which );
} }

View File

@ -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() * Includes Multisite drop-ins only when is_multisite()
* *
* @since 3.0.0 * @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 * @return array[] {
* true for the drop-in to be used, or true if no constant is required. * 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() { function _get_dropins() {
$dropins = array( $dropins = array(

View File

@ -85,7 +85,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
* @param string $field The current revision field. * @param string $field The current revision field.
* @param WP_Post $compare_from The revision post object to compare to or from. * @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 * @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' ) : ''; $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : '';

View File

@ -448,7 +448,7 @@ function get_theme_feature_list( $api = true ) {
* *
* @since 2.8.0 * @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'. * 'hot_tags' or 'feature_list'.
* @param array|object $args { * @param array|object $args {
* Optional. Array or object of arguments to serialize for the Themes API. Default empty array. * Optional. Array or object of arguments to serialize for the Themes API. Default empty array.

View File

@ -1076,7 +1076,7 @@ function wp_recovery_mode_nag() {
* *
* @since 5.5.0 * @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. * @return bool True if auto-updates are enabled for `$type`, false otherwise.
*/ */
function wp_is_auto_update_enabled_for_type( $type ) { 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 * @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 * @param bool|null $update Whether to update. The value of null is internally used
* to detect whether nothing has hooked into this filter. * to detect whether nothing has hooked into this filter.
* @param object $item The update offer. * @param object $item The update offer.

View File

@ -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 * @since 5.9.0
* *
@ -248,7 +248,7 @@ function _get_block_templates_paths( $base_directory ) {
* @since 5.9.0 * @since 5.9.0
* @access private * @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. * @param string $slug Template slug.
* @return array|null { * @return array|null {
* Array with template metadata if $template_type is one of 'wp_template' or 'wp_template_part', * 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. * @since 6.3.0 Added the `$query` parameter.
* @access private * @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 { * @param array $query {
* Arguments to retrieve templates. Optional, empty by default. * Arguments to retrieve templates. Optional, empty by default.
* *
@ -520,7 +520,7 @@ function _remove_theme_attribute_from_template_part_block( &$block ) {
* @access private * @access private
* *
* @param array $template_file Theme file. * @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. * @return WP_Block_Template Template.
*/ */
function _build_block_template_result_from_file( $template_file, $template_type ) { 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 $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. * @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. * @return WP_Block_Template[] Array of block templates.
*/ */
function get_block_templates( $query = array(), $template_type = 'wp_template' ) { 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 $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. * @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 ); $templates = apply_filters( 'pre_get_block_templates', null, $query, $template_type );
if ( ! is_null( $templates ) ) { if ( ! is_null( $templates ) ) {
@ -1051,7 +1051,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' )
* @since 5.8.0 * @since 5.8.0
* *
* @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @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'. * Default 'wp_template'.
* @return WP_Block_Template|null 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, * @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. * or null to allow WP to run its normal queries.
* @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @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 ); $block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type );
if ( ! is_null( $block_template ) ) { 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 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 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 ); 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 * @since 5.9.0
* *
* @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @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'. * Default 'wp_template'.
* @return WP_Block_Template|null The found block template, or null if there isn't one. * @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, * @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. * or null to allow WP to run its normal queries.
* @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @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 ); $block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type );
if ( ! is_null( $block_template ) ) { 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 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 $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 ); 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 * @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 ) { function block_template_part( $part ) {
$template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' ); $template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' );
@ -1218,7 +1218,7 @@ function block_footer_area() {
* @since 6.0.0 * @since 6.0.0
* *
* @param string $path The path of the file in the theme. * @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 ) { function wp_is_theme_directory_ignored( $path ) {
$directories_to_ignore = array( '.DS_Store', '.svn', '.git', '.hg', '.bzr', 'node_modules', 'vendor' ); $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 * @since 6.1.0
* *
* @param string $slug The template slug to be created. * @param string $slug The template slug to be created.
* @param boolean $is_custom Optional. Indicates if a template is custom or * @param bool $is_custom Optional. Indicates if a template is custom or
* part of the template hierarchy. Default false. * part of the template hierarchy. Default false.
* @param string $template_prefix Optional. The template prefix for the created template. * @param string $template_prefix Optional. The template prefix for the created template.
* Used to extract the main template type, e.g. * Used to extract the main template type, e.g.

View File

@ -1757,6 +1757,7 @@ function block_version( $content ) {
* @param array $style_properties Array containing the properties of the style name, label, * @param array $style_properties Array containing the properties of the style name, label,
* style_handle (name of the stylesheet to be enqueued), * style_handle (name of the stylesheet to be enqueued),
* inline_style (string containing the CSS to be added). * 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. * @return bool True if the block style was registered with success and false otherwise.
*/ */
function register_block_style( $block_name, $style_properties ) { function register_block_style( $block_name, $style_properties ) {

View File

@ -937,10 +937,10 @@ final class WP_Customize_Nav_Menus {
* @param array $postarr { * @param array $postarr {
* Post array. Note that post_status is overridden to be `auto-draft`. * Post array. Note that post_status is overridden to be `auto-draft`.
* *
* @var string $post_title Post title. Required. * @type string $post_title Post title. Required.
* @var string $post_type Post type. Required. * @type string $post_type Post type. Required.
* @var string $post_name Post name. * @type string $post_name Post name.
* @var string $post_content Post content. * @type string $post_content Post content.
* } * }
* @return WP_Post|WP_Error Inserted auto-draft post object or error. * @return WP_Post|WP_Error Inserted auto-draft post object or error.
*/ */

View File

@ -1057,7 +1057,7 @@ class WP_Date_Query {
* @since 6.0.3 * @since 6.0.3
* *
* @param string $relation Raw relation key from the query argument. * @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 ) { public function sanitize_relation( $relation ) {
if ( 'OR' === strtoupper( $relation ) ) { if ( 'OR' === strtoupper( $relation ) ) {

View File

@ -611,7 +611,7 @@ class WP_Http {
* @param string $url The request URL. * @param string $url The request URL.
* @param string|array $args Optional. Override the defaults. * @param string|array $args Optional. Override the defaults.
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. * @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() ) { public function post( $url, $args = array() ) {
$defaults = array( 'method' => 'POST' ); $defaults = array( 'method' => 'POST' );
@ -629,7 +629,7 @@ class WP_Http {
* @param string $url The request URL. * @param string $url The request URL.
* @param string|array $args Optional. Override the defaults. * @param string|array $args Optional. Override the defaults.
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. * @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() ) { public function get( $url, $args = array() ) {
$defaults = array( 'method' => 'GET' ); $defaults = array( 'method' => 'GET' );
@ -647,7 +647,7 @@ class WP_Http {
* @param string $url The request URL. * @param string $url The request URL.
* @param string|array $args Optional. Override the defaults. * @param string|array $args Optional. Override the defaults.
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. * @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() ) { public function head( $url, $args = array() ) {
$defaults = array( 'method' => 'HEAD' ); $defaults = array( 'method' => 'HEAD' );

View File

@ -15,7 +15,7 @@
class WP_Paused_Extensions_Storage { 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 * @since 5.2.0
* @var string * @var string

View File

@ -44,7 +44,7 @@ class WP_Script_Modules {
* @param array $deps { * @param array $deps {
* Optional. List of dependencies. * Optional. List of dependencies.
* *
* @type string|array $0... { * @type string|array ...$0 {
* An array of script module identifiers of the dependencies of this script * An array of script module identifiers of the dependencies of this script
* module. The dependencies can be strings or arrays. If they are arrays, * 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 * they need an `id` key with the script module identifier, and can contain
@ -109,7 +109,7 @@ class WP_Script_Modules {
* @param array $deps { * @param array $deps {
* Optional. List of dependencies. * Optional. List of dependencies.
* *
* @type string|array $0... { * @type string|array ...$0 {
* An array of script module identifiers of the dependencies of this script * An array of script module identifiers of the dependencies of this script
* module. The dependencies can be strings or arrays. If they are arrays, * 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 * they need an `id` key with the script module identifier, and can contain

View File

@ -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 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__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 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 $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 $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 $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 $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 $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 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__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. * @type string[] $lang__not_in Array of language IDs to exclude affiliated sites for. Default empty.

View File

@ -202,7 +202,7 @@ class WP_Tax_Query {
* @since 4.1.0 * @since 4.1.0
* *
* @param string $relation Raw relation key from the query argument. * @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 ) { public function sanitize_relation( $relation ) {
if ( 'OR' === strtoupper( $relation ) ) { if ( 'OR' === strtoupper( $relation ) ) {

View File

@ -191,7 +191,7 @@ class WP_User {
* *
* @global wpdb $wpdb WordPress database abstraction object. * @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. * @param string|int $value The field value.
* @return object|false Raw user object. * @return object|false Raw user object.
*/ */

View File

@ -278,7 +278,7 @@ function get_comment_statuses() {
* *
* @param string $post_type Optional. Post type. Default 'post'. * @param string $post_type Optional. Post type. Default 'post'.
* @param string $comment_type Optional. Comment type. Default 'comment'. * @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' ) { function get_default_comment_status( $post_type = 'post', $comment_type = 'comment' ) {
switch ( $comment_type ) { switch ( $comment_type ) {

View File

@ -1319,7 +1319,7 @@ function _wp_render_title_tag() {
* @param string $sep Optional. How to separate the various items within the page title. * @param string $sep Optional. How to separate the various items within the page title.
* Default '»'. * Default '»'.
* @param bool $display Optional. Whether to display or retrieve title. Default true. * @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. * @return string|void String when `$display` is false, nothing otherwise.
*/ */
function wp_title( $sep = '»', $display = true, $seplocation = '' ) { 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 $title Page title.
* @param string $sep Title separator. * @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 ); $title = apply_filters( 'wp_title', $title, $sep, $seplocation );
@ -3463,7 +3463,7 @@ function wp_resource_hints() {
$unique_urls = array(); $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.6.0
* @since 4.7.0 The `$urls` parameter accepts arrays of specific HTML attributes * @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). * @type string $type Type of the resource (`text/html`, `text/css`, etc).
* } * }
* } * }
* @param string $relation_type The relation type the URLs are printed for, * @param string $relation_type The relation type the URLs are printed for. One of
* e.g. 'preconnect' or 'prerender'. * 'dns-prefetch', 'preconnect', 'prefetch', or 'prerender'.
*/ */
$urls = apply_filters( 'wp_resource_hints', $urls, $relation_type ); $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. * 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. * user. The 'html' setting is for the "Text" editor tab.
* *
* @since 2.5.0 * @since 2.5.0
* *
* @return string Either 'tinymce', or 'html', or 'test' * @return string Either 'tinymce', 'html', or 'test'
*/ */
function wp_default_editor() { function wp_default_editor() {
$r = user_can_richedit() ? 'tinymce' : 'html'; // Defaults. $r = user_can_richedit() ? 'tinymce' : 'html'; // Defaults.

View File

@ -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 * @param array|string $args Optional. An array of key => value arguments to match against
* the post type objects. Default empty array. * 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'. * or 'objects'. Default 'names'.
* @param string $operator Optional. The logical operation to perform. 'or' means only one * @param string $operator Optional. The logical operation to perform. 'or' means only one
* element from the array needs to match; 'and' means all elements * element from the array needs to match; 'and' means all elements

View File

@ -44,7 +44,7 @@ function wp_script_modules(): WP_Script_Modules {
* @param array $deps { * @param array $deps {
* Optional. List of dependencies. * Optional. List of dependencies.
* *
* @type string|array $0... { * @type string|array ...$0 {
* An array of script module identifiers of the dependencies of this script * An array of script module identifiers of the dependencies of this script
* module. The dependencies can be strings or arrays. If they are arrays, * 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 * 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 { * @param array $deps {
* Optional. List of dependencies. * Optional. List of dependencies.
* *
* @type string|array $0... { * @type string|array ...$0 {
* An array of script module identifiers of the dependencies of this script * An array of script module identifiers of the dependencies of this script
* module. The dependencies can be strings or arrays. If they are arrays, * 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 * they need an `id` key with the script module identifier, and can contain

View File

@ -272,7 +272,7 @@ function create_initial_taxonomies() {
* *
* @param array $args Optional. An array of `key => value` arguments to match against the taxonomy objects. * @param array $args Optional. An array of `key => value` arguments to match against the taxonomy objects.
* Default empty array. * 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'. * or 'objects'. Default 'names'.
* @param string $operator Optional. The logical operation to perform. Accepts 'and' or 'or'. 'or' means only * @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. * one element from the array needs to match; 'and' means all elements must match.

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.