Make WordPress Core


Ignore:
Timestamp:
05/10/2024 06:07:17 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Use a consistent plural form of “status” in variable names.

Follow-up to [5575], [6796], [6993], [7638], [12162], [12719], [15578], [16652], [31046], [34515], [49472].

Props Presskopp, sabernhardt, manfcarlo, SergeyBiryukov.
Fixes #58134.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r57136 r58129  
    16801680    }
    16811681
    1682     $stati = get_post_stati( array( 'public' => true ) );
    1683     if ( empty( $stati ) ) {
    1684         $stati = array( 'publish' );
    1685     }
    1686     $stati[] = 'private';
    1687 
    1688     if ( in_array( get_post_status( $post ), $stati, true ) ) {
     1682    $statuses = get_post_stati( array( 'public' => true ) );
     1683
     1684    if ( empty( $statuses ) ) {
     1685        $statuses = array( 'publish' );
     1686    }
     1687
     1688    $statuses[] = 'private';
     1689
     1690    if ( in_array( get_post_status( $post ), $statuses, true ) ) {
    16891691        /*
    16901692         * If the post type support comments, or the post has comments,
Note: See TracChangeset for help on using the changeset viewer.