Make WordPress Core

Changeset 40516


Ignore:
Timestamp:
04/22/2017 02:16:56 PM (8 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r40483 r40516  
    816816
    817817    if ( false === $args->label_count )
    818         $args->label_count = array( $args->label, $args->label );
     818        $args->label_count = _n_noop( $args->label, $args->label );
    819819
    820820    $wp_post_statuses[$post_status] = $args;
Note: See TracChangeset for help on using the changeset viewer.