diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index c39135316978f..a255673aad601 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1412,6 +1412,21 @@ function wp_edit_attachments_query_vars( $q = false ) { * @type array $0 Post mime types. See get_post_mime_types(). * @type string[] $1 Available post mime types. * } + * + * @phpstan-return array{ + * 0: array, + * 1: string[], + * } */ function wp_edit_attachments_query( $q = false ) { wp( wp_edit_attachments_query_vars( $q ) ); diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index b4c40d2ac971f..dbb1ff8ab0d2c 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -896,7 +896,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) { } elseif ( isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) { // If no callback exists, look for the old-style single_text and multiple_text arguments. // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSingular,WordPress.WP.I18n.NonSingularStringLiteralPlural - $translate_nooped_plural = _n_noop( $args['single_text'], $args['multiple_text'] ); + $translate_nooped_plural = _n_noop( $args['single_text'], $args['multiple_text'] ); // @phpstan-ignore argument.type, argument.type (These are runtime values, so there is nothing to extract for translation.) } else { // This is the default for when no callback, plural, or argument is passed in. /* translators: %s: Number of items (tags). */ diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 10bb778bbd30a..3708c578ea8d0 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -1503,7 +1503,7 @@ function register_post_status( $post_status, $args = array() ) { if ( false === $args->label_count ) { // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSingular,WordPress.WP.I18n.NonSingularStringLiteralPlural - $args->label_count = _n_noop( $args->label, $args->label ); + $args->label_count = _n_noop( $args->label, $args->label ); // @phpstan-ignore argument.type, argument.type (The label is a runtime value, so there is nothing to extract for translation.) } $wp_post_statuses[ $post_status ] = $args; @@ -3654,6 +3654,18 @@ function wp_count_attachments( $mime_type = '' ) { * value is a three-item array: the plural name of the * group, the label for its "Manage" screen, and the * translatable count strings returned by _n_noop(). + * + * @phpstan-return array */ function get_post_mime_types() { $post_mime_types = array( // array( adj, noun ) @@ -3748,6 +3760,18 @@ function get_post_mime_types() { * * @param array $post_mime_types Default list of post mime types. * See {@see get_post_mime_types()}. + * + * @phpstan-param array $post_mime_types */ return apply_filters( 'post_mime_types', $post_mime_types ); }