From 58b60158c7c49cb0507de333ba131b7c9cbd6cb9 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 22 Apr 2017 14:16:56 +0000 Subject: [PATCH] Posts, Post Types: Correct the fallback value for the `label_count` argument of `register_post_status()`. While using `_n_noop()` here is technically incorrect, it does correct the fallback value as its usage in `translate_nooped_plural()` expects a correctly formatted associative array. Props xrmx Fixes #38686 git-svn-id: https://develop.svn.wordpress.org/trunk@40516 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 1c94c208d6..0d624006d7 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -815,7 +815,7 @@ function register_post_status( $post_status, $args = array() ) { $args->label = $post_status; if ( false === $args->label_count ) - $args->label_count = array( $args->label, $args->label ); + $args->label_count = _n_noop( $args->label, $args->label ); $wp_post_statuses[$post_status] = $args;