Make WordPress Core

Ticket #24722: 24722.diff

File 24722.diff, 717 bytes (added by wonderboymusic, 10 years ago)
  • src/wp-includes/post-functions.php

     
    587587 * @return array List of post statuses.
    588588 */
    589589function get_post_statuses() {
    590         $status = array(
    591                 'draft'   => __( 'Draft' ),
    592                 'pending' => __( 'Pending Review' ),
    593                 'private' => __( 'Private' ),
    594                 'publish' => __( 'Published' )
    595         );
     590        $statuses = get_post_stati( array( 'internal' => true ), 'objects', 'NOT' );
    596591
    597         return $status;
     592        $stati = array();
     593        foreach ( $statuses as $name => $status ) {
     594                $stati[ $name ] = $status->label;
     595        }
     596
     597        return $stati;
    598598}
    599599
    600600/**