Make WordPress Core

Ticket #39412: 39412.diff

File 39412.diff, 1.1 KB (added by dd32, 9 years ago)
  • src/wp-includes/post.php

    function register_post_status( $post_sta 
    803803                $args->publicly_queryable = $args->public;
    804804
    805805        if ( null === $args->exclude_from_search )
    806806                $args->exclude_from_search = $args->internal;
    807807
    808808        if ( null === $args->show_in_admin_all_list )
    809809                $args->show_in_admin_all_list = !$args->internal;
    810810
    811811        if ( null === $args->show_in_admin_status_list )
    812812                $args->show_in_admin_status_list = !$args->internal;
    813813
    814814        if ( false === $args->label )
    815815                $args->label = $post_status;
    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;
    821821
    822822        return $args;
    823823}
    824824
    825825/**
    826826 * Retrieve a post status object by name.
    827827 *
    828828 * @since 3.0.0
    829829 *
    830830 * @global array $wp_post_statuses List of post statuses.
    831831 *
    832832 * @see register_post_status()
    833833 *