Docs: Document more parameters and properties using typed array notation.

See #41756

Built from https://develop.svn.wordpress.org/trunk@42876


git-svn-id: http://core.svn.wordpress.org/trunk@42706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2018-03-25 19:33:31 +00:00
parent b13e73d05c
commit 2361ca884f
27 changed files with 124 additions and 126 deletions

View File

@ -374,7 +374,7 @@ class WP_Embed {
*
* @since 2.9.0
*
* @param array $post_types Array of post types to cache oEmbed results for. Defaults to post types with `show_ui` set to true.
* @param string[] $post_types Array of post type names to cache oEmbed results for. Defaults to post types with `show_ui` set to true.
*/
if ( empty( $post->ID ) || ! in_array( $post->post_type, apply_filters( 'embed_cache_oembed_types', $post_types ) ) ) {
return;

View File

@ -72,7 +72,7 @@ class WP_HTTP_IXR_Client extends IXR_Client {
*
* @since 4.4.0
*
* @param array $headers Array of headers to be sent.
* @param string[] $headers Associative array of headers to be sent.
*/
$args['headers'] = apply_filters( 'wp_http_ixr_client_headers', $args['headers'] );

View File

@ -259,7 +259,7 @@ class WP_Network_Query {
*
* @since 4.6.0
*
* @param array $_networks An array of WP_Network objects.
* @param WP_Network[] $_networks An array of WP_Network objects.
* @param WP_Network_Query $this Current instance of WP_Network_Query (passed by reference).
*/
$_networks = apply_filters_ref_array( 'the_networks', array( $_networks, &$this ) );
@ -399,7 +399,7 @@ class WP_Network_Query {
*
* @since 4.6.0
*
* @param array $pieces A compacted array of network query clauses.
* @param string[] $pieces An associative array of network query clauses.
* @param WP_Network_Query $this Current instance of WP_Network_Query (passed by reference).
*/
$clauses = apply_filters_ref_array( 'networks_clauses', array( compact( $pieces ), &$this ) );
@ -478,8 +478,8 @@ class WP_Network_Query {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $string Search string.
* @param array $columns Columns to search.
* @param string $string Search string.
* @param string[] $columns Array of columns to search.
*
* @return string Search SQL.
*/

View File

@ -403,12 +403,12 @@ class WP_Network {
*
* @since 3.9.0
*
* @param null|bool|object $network Network value to return by path.
* @param string $domain The requested domain.
* @param string $path The requested path, in full.
* @param int|null $segments The suggested number of paths to consult.
* Default null, meaning the entire path was to be consulted.
* @param array $paths The paths to search for, based on $path and $segments.
* @param null|bool|WP_Network $network Network value to return by path.
* @param string $domain The requested domain.
* @param string $path The requested path, in full.
* @param int|null $segments The suggested number of paths to consult.
* Default null, meaning the entire path was to be consulted.
* @param string[] $paths Array of paths to search for, based on `$path` and `$segments`.
*/
$pre = apply_filters( 'pre_get_network_by_path', null, $domain, $path, $segments, $paths );
if ( null !== $pre ) {

View File

@ -1379,7 +1379,7 @@ class WP_Query {
*
* @since 3.7.0
*
* @param array $terms Terms to check.
* @param string[] $terms Array of terms to check.
* @return array Terms that are not stopwords.
*/
protected function parse_search_terms( $terms ) {
@ -1447,7 +1447,7 @@ class WP_Query {
*
* @since 3.7.0
*
* @param array $stopwords Stopwords.
* @param string[] $stopwords Array of stopwords.
*/
$this->stopwords = apply_filters( 'wp_search_stopwords', $stopwords );
return $this->stopwords;
@ -2694,7 +2694,7 @@ class WP_Query {
*
* @since 3.1.0
*
* @param array $clauses The list of clauses for the query.
* @param string[] $clauses Associative array of the clauses for the query.
* @param WP_Query $this The WP_Query instance (passed by reference).
*/
$clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
@ -2818,7 +2818,7 @@ class WP_Query {
*
* @since 3.1.0
*
* @param array $pieces The pieces of the query.
* @param string[] $pieces Associative array of the pieces of the query.
* @param WP_Query $this The WP_Query instance (passed by reference).
*/
$clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
@ -2965,8 +2965,8 @@ class WP_Query {
*
* @since 2.3.0
*
* @param array $posts The post results array.
* @param WP_Query $this The WP_Query instance (passed by reference).
* @param WP_Post[] $posts Array of post objects.
* @param WP_Query $this The WP_Query instance (passed by reference).
*/
$this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) );
}
@ -3102,8 +3102,8 @@ class WP_Query {
*
* @since 1.5.0
*
* @param array $posts The array of retrieved posts.
* @param WP_Query $this The WP_Query instance (passed by reference).
* @param WP_Post[] $posts Array of post objects.
* @param WP_Query $this The WP_Query instance (passed by reference).
*/
$this->posts = apply_filters_ref_array( 'the_posts', array( $this->posts, &$this ) );
}
@ -4177,9 +4177,8 @@ class WP_Query {
*
* @since 4.4.0
*
* @param array $pages Array of "pages" derived from the post content.
* of `<!-- nextpage -->` tags..
* @param WP_Post $post Current post object.
* @param string[] $pages Array of "pages" from the post content split by `<!-- nextpage -->` tags.
* @param WP_Post $post Current post object.
*/
$pages = apply_filters( 'content_pagination', $pages, $post );

View File

@ -94,7 +94,7 @@ class WP_Role {
*
* @since 2.0.0
*
* @param array $capabilities Array of role capabilities.
* @param bool[] $capabilities Associative array of capabilities for the role.
* @param string $cap Capability name.
* @param string $name Role name.
*/

View File

@ -307,7 +307,7 @@ class WP_Site_Query {
*
* @since 4.6.0
*
* @param array $_sites An array of WP_Site objects.
* @param WP_Site[] $_sites An array of WP_Site objects.
* @param WP_Site_Query $this Current instance of WP_Site_Query (passed by reference).
*/
$_sites = apply_filters_ref_array( 'the_sites', array( $_sites, &$this ) );
@ -509,7 +509,7 @@ class WP_Site_Query {
*
* @since 4.6.0
*
* @param array $search_columns Array of column names to be searched.
* @param string[] $search_columns Array of column names to be searched.
* @param string $search Text being searched.
* @param WP_Site_Query $this The current WP_Site_Query instance.
*/
@ -535,7 +535,7 @@ class WP_Site_Query {
*
* @since 4.6.0
*
* @param array $pieces A compacted array of site query clauses.
* @param string[] $pieces An associative array of site query clauses.
* @param WP_Site_Query $this Current instance of WP_Site_Query (passed by reference).
*/
$clauses = apply_filters_ref_array( 'sites_clauses', array( compact( $pieces ), &$this ) );
@ -614,8 +614,8 @@ class WP_Site_Query {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $string Search string.
* @param array $columns Columns to search.
* @param string $string Search string.
* @param string[] $columns Array of columns to search.
* @return string Search SQL.
*/
protected function get_search_sql( $string, $columns ) {

View File

@ -246,9 +246,9 @@ final class WP_Taxonomy {
*
* @since 4.4.0
*
* @param array $args Array of arguments for registering a taxonomy.
* @param string $taxonomy Taxonomy key.
* @param array $object_type Array of names of object types for the taxonomy.
* @param array $args Array of arguments for registering a taxonomy.
* @param string $taxonomy Taxonomy key.
* @param string[] $object_type Array of names of object types for the taxonomy.
*/
$args = apply_filters( 'register_taxonomy_args', $args, $this->name, (array) $object_type );

View File

@ -238,8 +238,8 @@ class WP_Term_Query {
*
* @since 4.4.0
*
* @param array $defaults An array of default get_terms() arguments.
* @param array $taxonomies An array of taxonomies.
* @param array $defaults An array of default get_terms() arguments.
* @param string[] $taxonomies An array of taxonomy names.
*/
$this->query_var_defaults = apply_filters( 'get_terms_defaults', $this->query_var_defaults, $taxonomies );
@ -351,8 +351,8 @@ class WP_Term_Query {
*
* @since 3.1.0
*
* @param array $args An array of get_terms() arguments.
* @param array $taxonomies An array of taxonomies.
* @param array $args An array of get_terms() arguments.
* @param string[] $taxonomies An array of taxonomy names.
*/
$args = apply_filters( 'get_terms_args', $args, $taxonomies );
@ -463,9 +463,9 @@ class WP_Term_Query {
*
* @since 2.3.0
*
* @param string $exclusions `NOT IN` clause of the terms query.
* @param array $args An array of terms query arguments.
* @param array $taxonomies An array of taxonomies.
* @param string $exclusions `NOT IN` clause of the terms query.
* @param array $args An array of terms query arguments.
* @param string[] $taxonomies An array of taxonomy names.
*/
$exclusions = apply_filters( 'list_terms_exclusions', $exclusions, $args, $taxonomies );
@ -627,9 +627,9 @@ class WP_Term_Query {
*
* @since 2.8.0
*
* @param array $selects An array of fields to select for the terms query.
* @param array $args An array of term query arguments.
* @param array $taxonomies An array of taxonomies.
* @param string[] $selects An array of fields to select for the terms query.
* @param array $args An array of term query arguments.
* @param string[] $taxonomies An array of taxonomy names.
*/
$fields = implode( ', ', apply_filters( 'get_terms_fields', $selects, $args, $taxonomies ) );
@ -646,9 +646,9 @@ class WP_Term_Query {
*
* @since 3.1.0
*
* @param array $pieces Terms query SQL clauses.
* @param array $taxonomies An array of taxonomies.
* @param array $args An array of terms query arguments.
* @param string[] $pieces Array of query SQL clauses.
* @param string[] $taxonomies An array of taxonomy names.
* @param array $args An array of term query arguments.
*/
$clauses = apply_filters( 'terms_clauses', compact( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' ), $taxonomies, $args );
@ -859,9 +859,9 @@ class WP_Term_Query {
*
* @since 2.8.0
*
* @param string $orderby `ORDERBY` clause of the terms query.
* @param array $args An array of terms query arguments.
* @param array $taxonomies An array of taxonomies.
* @param string $orderby `ORDERBY` clause of the terms query.
* @param array $args An array of term query arguments.
* @param string[] $taxonomies An array of taxonomy names.
*/
$orderby = apply_filters( 'get_terms_orderby', $orderby, $this->query_vars, $this->query_vars['taxonomy'] );

View File

@ -1191,7 +1191,7 @@ final class WP_Theme implements ArrayAccess {
* @since 4.4.0 Converted to allow complete control over the `$page_templates` array.
* @since 4.7.0 Added the `$post_type` parameter.
*
* @param array $post_templates Array of page templates. Keys are filenames,
* @param string[] $post_templates Array of page templates. Keys are filenames,
* values are translated names.
* @param WP_Theme $this The theme object.
* @param WP_Post|null $post The post being edited, provided for context, or null.
@ -1239,7 +1239,7 @@ final class WP_Theme implements ArrayAccess {
*
* @since 4.7.4
*
* @param array $exclusions Array of excluded directories and files.
* @param string[] $exclusions Array of excluded directories and files.
*/
$exclusions = (array) apply_filters( 'theme_scandir_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );
@ -1356,7 +1356,7 @@ final class WP_Theme implements ArrayAccess {
* @since 3.4.0
*
* @param int $blog_id Optional. ID of the site. Defaults to the current site.
* @return array Array of stylesheet names.
* @return string[] Array of stylesheet names.
*/
public static function get_allowed( $blog_id = null ) {
/**
@ -1367,8 +1367,8 @@ final class WP_Theme implements ArrayAccess {
*
* @since 4.5.0
*
* @param array $allowed_themes An array of theme stylesheet names.
* @param int $blog_id ID of the site.
* @param string[] $allowed_themes An array of theme stylesheet names.
* @param int $blog_id ID of the site.
*/
$network = (array) apply_filters( 'network_allowed_themes', self::get_allowed_on_network(), $blog_id );
return $network + self::get_allowed_on_site( $blog_id );
@ -1381,7 +1381,7 @@ final class WP_Theme implements ArrayAccess {
*
* @staticvar array $allowed_themes
*
* @return array Array of stylesheet names.
* @return string[] Array of stylesheet names.
*/
public static function get_allowed_on_network() {
static $allowed_themes;
@ -1394,7 +1394,7 @@ final class WP_Theme implements ArrayAccess {
*
* @since MU (3.0.0)
*
* @param array $allowed_themes An array of theme stylesheet names.
* @param string[] $allowed_themes An array of theme stylesheet names.
*/
$allowed_themes = apply_filters( 'allowed_themes', $allowed_themes );
@ -1409,7 +1409,7 @@ final class WP_Theme implements ArrayAccess {
* @staticvar array $allowed_themes
*
* @param int $blog_id Optional. ID of the site. Defaults to the current site.
* @return array Array of stylesheet names.
* @return string[] Array of stylesheet names.
*/
public static function get_allowed_on_site( $blog_id = null ) {
static $allowed_themes = array();
@ -1424,8 +1424,8 @@ final class WP_Theme implements ArrayAccess {
*
* @since 4.5.0
*
* @param array $allowed_themes An array of theme stylesheet names.
* @param int $blog_id ID of the site. Defaults to current site.
* @param string[] $allowed_themes An array of theme stylesheet names.
* @param int $blog_id ID of the site. Defaults to current site.
*/
return (array) apply_filters( 'site_allowed_themes', $allowed_themes[ $blog_id ], $blog_id );
}
@ -1486,7 +1486,7 @@ final class WP_Theme implements ArrayAccess {
*
* @since 4.6.0
*
* @param string|array $stylesheets Stylesheet name or array of stylesheet names.
* @param string|string[] $stylesheets Stylesheet name or array of stylesheet names.
*/
public static function network_enable_theme( $stylesheets ) {
if ( ! is_multisite() ) {
@ -1510,7 +1510,7 @@ final class WP_Theme implements ArrayAccess {
*
* @since 4.6.0
*
* @param string|array $stylesheets Stylesheet name or array of stylesheet names.
* @param string|string[] $stylesheets Stylesheet name or array of stylesheet names.
*/
public static function network_disable_theme( $stylesheets ) {
if ( ! is_multisite() ) {

View File

@ -541,7 +541,7 @@ class WP_User_Query {
*
* @since 3.6.0
*
* @param array $search_columns Array of column names to be searched.
* @param string[] $search_columns Array of column names to be searched.
* @param string $search Text being searched.
* @param WP_User_Query $this The current WP_User_Query instance.
*/

View File

@ -610,9 +610,9 @@ class WP_User {
* @since 2.9.0
* @since 3.6.0 Added $old_roles to include an array of the user's previous roles.
*
* @param int $user_id The user ID.
* @param string $role The new role.
* @param array $old_roles An array of the user's previous roles.
* @param int $user_id The user ID.
* @param string $role The new role.
* @param string[] $old_roles An array of the user's previous roles.
*/
do_action( 'set_user_role', $this->ID, $role, $old_roles );
}
@ -750,10 +750,10 @@ class WP_User {
* @since 2.0.0
* @since 3.7.0 Added the user object.
*
* @param array $allcaps An array of all the user's capabilities.
* @param array $caps Actual capabilities for meta capability.
* @param array $args Optional parameters passed to has_cap(), typically object ID.
* @param WP_User $user The user object.
* @param bool[] $allcaps An array of all the user's capabilities.
* @param string[] $caps Actual capabilities for meta capability.
* @param array $args Optional parameters passed to has_cap(), typically object ID.
* @param WP_User $user The user object.
*/
$capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );

View File

@ -12,7 +12,7 @@ class WP {
* Long list of public query variables.
*
* @since 2.0.0
* @var array
* @var string[]
*/
public $public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' );
@ -22,7 +22,7 @@ class WP {
* Long list of private query variables.
*
* @since 2.0.0
* @var array
* @var string[]
*/
public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in', 'title', 'fields' );
@ -282,7 +282,7 @@ class WP {
*
* @since 1.5.0
*
* @param array $public_query_vars The array of whitelisted query variables.
* @param string[] $public_query_vars The array of whitelisted query variable names.
*/
$this->public_query_vars = apply_filters( 'query_vars', $this->public_query_vars );
@ -477,8 +477,8 @@ class WP {
*
* @since 2.8.0
*
* @param array $headers The list of headers to be sent.
* @param WP $this Current WordPress environment instance.
* @param string[] $headers Associative array of headers to be sent.
* @param WP $this Current WordPress environment instance.
*/
$headers = apply_filters( 'wp_headers', $headers, $this );

View File

@ -203,7 +203,7 @@ class WP_Dependencies {
*
* @param string $handle Name of the item. Should be unique.
* @param string $src Full URL of the item, or path of the item relative to the WordPress root directory.
* @param array $deps Optional. An array of registered item handles this item depends on. Default empty array.
* @param string[] $deps Optional. An array of registered item handles this item depends on. Default empty array.
* @param string|bool|null $ver Optional. String specifying item version number, if it has one, which is added to the URL
* as a query string for cache busting purposes. If version is set to false, a version
* number is automatically added equal to current installed WordPress version.
@ -329,8 +329,8 @@ class WP_Dependencies {
*
* @since 4.0.0
*
* @param array $queue An array of queued _WP_Dependency handle objects.
* @param string $handle Name of the item. Should be unique.
* @param string[] $queue An array of queued _WP_Dependency handles.
* @param string $handle Name of the item. Should be unique.
* @return bool Whether the handle is found after recursively searching the dependency tree.
*/
protected function recurse_deps( $queue, $handle ) {

View File

@ -496,7 +496,7 @@ class WP_Scripts extends WP_Dependencies {
*
* @since 2.3.0
*
* @param array $to_do An array of script dependencies.
* @param string[] $to_do An array of script dependency handles.
*/
$this->to_do = apply_filters( 'print_scripts_array', $this->to_do );
}

View File

@ -306,7 +306,7 @@ class WP_Styles extends WP_Dependencies {
*
* @since 2.6.0
*
* @param array $to_do The list of enqueued styles about to be processed.
* @param string[] $to_do The list of enqueued style handles about to be processed.
*/
$this->to_do = apply_filters( 'print_styles_array', $this->to_do );
}

View File

@ -523,7 +523,7 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
*
* @since 2.7.0
*
* @param array $classes An array of comment classes.
* @param string[] $classes An array of comment classes.
* @param string $class A comma-separated list of additional classes added to the list.
* @param int $comment_id The comment id.
* @param WP_Comment $comment The comment object.
@ -2280,7 +2280,7 @@ function comment_form( $args = array(), $post_id = null ) {
*
* @since 3.0.0
*
* @param array $fields The default comment fields.
* @param string[] $fields Array of the default comment fields.
*/
$fields = apply_filters( 'comment_form_default_fields', $fields );
$defaults = array(

View File

@ -517,7 +517,7 @@ function update_comment_meta( $comment_id, $meta_key, $meta_value, $prev_value =
*
* @since 4.5.0
*
* @param array $comments Array of comment objects.
* @param WP_Comment[] $comments Array of comment objects.
*/
function wp_queue_comments_for_comment_meta_lazyload( $comments ) {
// Don't use `wp_list_pluck()` to avoid by-reference manipulation.
@ -918,8 +918,8 @@ function wp_check_comment_flood( $is_flood, $ip, $email, $date, $avoid_die = fal
*
* @since 2.7.0
*
* @param array $comments Array of comments
* @return array Array of comments keyed by comment_type.
* @param WP_Comment[] $comments Array of comments
* @return WP_Comment[] Array of comments keyed by comment_type.
*/
function separate_comments( &$comments ) {
$comments_by_type = array(
@ -952,9 +952,9 @@ function separate_comments( &$comments ) {
*
* @global WP_Query $wp_query
*
* @param array $comments Optional array of WP_Comment objects. Defaults to $wp_query->comments
* @param int $per_page Optional comments per page.
* @param bool $threaded Optional control over flat or threaded comments.
* @param WP_Comment[] $comments Optional. Array of WP_Comment objects. Defaults to $wp_query->comments.
* @param int $per_page Optional. Comments per page.
* @param bool $threaded Optional. Control over flat or threaded comments.
* @return int Number of comment pages.
*/
function get_comment_pages_count( $comments = null, $per_page = null, $threaded = null ) {
@ -2740,9 +2740,9 @@ function pingback( $content, $post_id ) {
*
* @since 2.0.0
*
* @param array $post_links An array of post links to be checked (passed by reference).
* @param array $pung Whether a link has already been pinged (passed by reference).
* @param int $post_ID The post ID.
* @param string[] $post_links Array of link URLs to be checked (passed by reference).
* @param string[] $pung Array of link URLs already pinged (passed by reference).
* @param int $post_ID The post ID.
*/
do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post->ID ) );
@ -2932,8 +2932,8 @@ function clean_comment_cache( $ids ) {
* @since 2.3.0
* @since 4.4.0 Introduced the `$update_meta_cache` parameter.
*
* @param array $comments Array of comment row objects
* @param bool $update_meta_cache Whether to update commentmeta cache. Default true.
* @param WP_Comment[] $comments Array of comment objects
* @param bool $update_meta_cache Whether to update commentmeta cache. Default true.
*/
function update_comment_cache( $comments, $update_meta_cache = true ) {
foreach ( (array) $comments as $comment ) {
@ -2959,7 +2959,7 @@ function update_comment_cache( $comments, $update_meta_cache = true ) {
* @see update_comment_cache()
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $comment_ids Array of comment IDs.
* @param int[] $comment_ids Array of comment IDs.
* @param bool $update_meta_cache Optional. Whether to update the meta cache. Default true.
*/
function _prime_comment_caches( $comment_ids, $update_meta_cache = true ) {
@ -2997,7 +2997,7 @@ function _close_comments_for_old_posts( $posts, $query ) {
*
* @since 3.2.0
*
* @param array $post_types An array of registered post types. Default array with 'post'.
* @param string[] $post_types An array of post type names.
*/
$post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
if ( ! in_array( $posts[0]->post_type, $post_types ) ) {

View File

@ -468,10 +468,10 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
*
* @see wp_get_nav_menu_items()
*
* @param array $items An array of menu item post objects.
* @param object $menu The menu object.
* @param array $args An array of arguments used to retrieve menu item objects.
* @return array Array of menu items,
* @param WP_Post[] $items An array of menu item post objects.
* @param WP_Term $menu The menu object.
* @param array $args An array of arguments used to retrieve menu item objects.
* @return WP_Post[] Array of menu item objects.
*/
public function filter_wp_get_nav_menu_items( $items, $menu, $args ) {
$this_item = $this->value();
@ -541,10 +541,10 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
*
* @see wp_get_nav_menu_items()
*
* @param array $items An array of menu item post objects.
* @param object $menu The menu object.
* @param array $args An array of arguments used to retrieve menu item objects.
* @return array Array of menu items,
* @param WP_Post[] $items An array of menu item post objects.
* @param WP_Term $menu The menu object.
* @param array $args An array of arguments used to retrieve menu item objects.
* @return WP_Post[] Array of menu item objects.
*/
public static function sort_wp_get_nav_menu_items( $items, $menu, $args ) {
// @todo We should probably re-apply some constraints imposed by $args.

View File

@ -232,9 +232,9 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
*
* @see wp_get_nav_menus()
*
* @param array $menus An array of menu objects.
* @param array $args An array of arguments used to retrieve menu objects.
* @return array
* @param WP_Term[] $menus An array of menu objects.
* @param array $args An array of arguments used to retrieve menu objects.
* @return WP_Term[] Array of menu objects.
*/
public function filter_wp_get_nav_menus( $menus, $args ) {
if ( get_current_blog_id() !== $this->_previewed_blog_id ) {

View File

@ -218,8 +218,8 @@ final class WP_Customize_Selective_Refresh {
*
* @see WP_Customize_Manager::add_dynamic_settings()
*
* @param array $partial_ids The partial ID to add.
* @return array Added WP_Customize_Partial instances.
* @param string[] $partial_ids Array of the partial IDs to add.
* @return WP_Customize_Partial[] Array of added WP_Customize_Partial instances.
*/
public function add_dynamic_partials( $partial_ids ) {
$new_partials = array();

View File

@ -499,10 +499,10 @@ class WP_Date_Query {
* @since 3.7.0
* @since 4.1.0 Added 'user_registered' to the default recognized columns.
*
* @param array $valid_columns An array of valid date query columns. Defaults
* are 'post_date', 'post_date_gmt', 'post_modified',
* 'post_modified_gmt', 'comment_date', 'comment_date_gmt',
* 'user_registered'
* @param string[] $valid_columns An array of valid date query columns. Defaults
* are 'post_date', 'post_date_gmt', 'post_modified',
* 'post_modified_gmt', 'comment_date', 'comment_date_gmt',
* 'user_registered'
*/
if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ) ) ) {
$column = 'post_date';

View File

@ -76,7 +76,7 @@ function wp_embed_defaults( $url = '' ) {
*
* @since 2.9.0
*
* @param array $size An array of embed width and height values
* @param int[] $size An array of embed width and height values
* in pixels (in that order).
* @param string $url The URL that should be embedded.
*/

View File

@ -5457,15 +5457,14 @@ function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pr
}
/**
* Retrieve ids that are not already present in the cache.
* Retrieve IDs that are not already present in the cache.
*
* @since 3.4.0
* @access private
*
* @param array $object_ids ID list.
* @param int[] $object_ids Array of IDs.
* @param string $cache_key The cache bucket to check against.
*
* @return array List of ids not present in the cache.
* @return int[] Array of IDs not present in the cache.
*/
function _get_non_cached_ids( $object_ids, $cache_key ) {
$clean = array();

View File

@ -549,8 +549,8 @@ function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' )
*
* @since 1.5.0
*
* @global array $l10n An array of all currently loaded text domains.
* @global array $l10n_unloaded An array of all text domains that have been unloaded again.
* @global MO[] $l10n An array of all currently loaded text domains.
* @global MO[] $l10n_unloaded An array of all text domains that have been unloaded again.
*
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
* @param string $mofile Path to the .mo file.
@ -623,8 +623,8 @@ function load_textdomain( $domain, $mofile ) {
*
* @since 3.0.0
*
* @global array $l10n An array of all currently loaded text domains.
* @global array $l10n_unloaded An array of all text domains that have been unloaded again.
* @global MO[] $l10n An array of all currently loaded text domains.
* @global MO[] $l10n_unloaded An array of all text domains that have been unloaded again.
*
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
* @return bool Whether textdomain was unloaded.
@ -856,7 +856,7 @@ function load_child_theme_textdomain( $domain, $path = false ) {
* @access private
*
* @see get_translations_for_domain()
* @global array $l10n_unloaded An array of all text domains that have been unloaded again.
* @global MO[] $l10n_unloaded An array of all text domains that have been unloaded again.
*
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
* @return bool True when the textdomain is successfully loaded, false otherwise.
@ -964,7 +964,7 @@ function _get_path_to_translation_from_lang_dir( $domain ) {
*
* @since 2.8.0
*
* @global array $l10n
* @global MO[] $l10n
* @staticvar NOOP_Translations $noop_translations
*
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
@ -989,7 +989,7 @@ function get_translations_for_domain( $domain ) {
*
* @since 3.0.0
*
* @global array $l10n
* @global MO[] $l10n
*
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
* @return bool Whether there are translations.

View File

@ -1043,7 +1043,7 @@ function get_post_type_object( $post_type ) {
* @param string $operator Optional. The logical operation to perform. 'or' means only one
* element from the array needs to match; 'and' means all elements
* must match; 'not' means no elements may match. Default 'and'.
* @return array A list of post type names or objects.
* @return string[]|WP_Post_Type[] An array of post type names or objects.
*/
function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) {
global $wp_post_types;
@ -4341,7 +4341,7 @@ function get_enclosed( $post_id ) {
* @since 4.7.0 `$post_id` can be a WP_Post object.
*
* @param int|WP_Post $post_id Post ID or object.
* @return array
* @return bool|string[] Array of URLs already pinged for the given post, false if the post is not found.
*/
function get_pung( $post_id ) {
$post = get_post( $post_id );
@ -4357,7 +4357,7 @@ function get_pung( $post_id ) {
*
* @since 2.0.0
*
* @param array $pung Array of URLs already pinged for the given post.
* @param string[] $pung Array of URLs already pinged for the given post.
*/
return apply_filters( 'get_pung', $pung );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42875';
$wp_version = '5.0-alpha-42876';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.