Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/wp-admin/includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,21 @@ function wp_edit_attachments_query_vars( $q = false ) {
* @type array<string, array{0: string, 1: string, 2: array}> $0 Post mime types. See get_post_mime_types().
* @type string[] $1 Available post mime types.
* }
*
* @phpstan-return array{
* 0: array<string, array{
* 0: string,
* 1: string,
* 2: array{
* singular: literal-string,
* plural: literal-string,
* context: literal-string|null,
* domain: literal-string|null,
* ...
* },
* }>,
* 1: string[],
* }
*/
function wp_edit_attachments_query( $q = false ) {
wp( wp_edit_attachments_query_vars( $q ) );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/category-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand Down
26 changes: 25 additions & 1 deletion src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<string, array{
* 0: string,
* 1: string,
* 2: array{
* singular: literal-string,
* plural: literal-string,
* context: literal-string|null,
* domain: literal-string|null,
* ...
* },
* }>
*/
function get_post_mime_types() {
$post_mime_types = array( // array( adj, noun )
Expand Down Expand Up @@ -3748,6 +3760,18 @@ function get_post_mime_types() {
*
* @param array<string, array{0: string, 1: string, 2: array}> $post_mime_types Default list of post mime types.
* See {@see get_post_mime_types()}.
*
* @phpstan-param array<string, array{
* 0: string,
* 1: string,
* 2: array{
* singular: literal-string,
* plural: literal-string,
* context: literal-string|null,
* domain: literal-string|null,
* ...
* },
* }> $post_mime_types
*/
return apply_filters( 'post_mime_types', $post_mime_types );
}
Expand Down
Loading