Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -1320,14 +1320,14 @@ function get_post_status( $post = null ) {
* @return string[] Array of post status labels keyed by their status.
*/
function get_post_statuses() {
$status = array(
'draft' => __( 'Draft' ),
'pending' => __( 'Pending Review' ),
'private' => __( 'Private' ),
'publish' => __( 'Published' ),
);
$statuses = get_post_stati( array( 'internal' => true ), 'objects', 'NOT' );

$stati = array();
foreach ( $statuses as $name => $status ) {
$stati[ $name ] = $status->label;
}

return $status;
return $stati;
}

/**
Expand All @@ -1341,13 +1341,14 @@ function get_post_statuses() {
* @return string[] Array of page status labels keyed by their status.
*/
function get_page_statuses() {
$status = array(
'draft' => __( 'Draft' ),
'private' => __( 'Private' ),
'publish' => __( 'Published' ),
);
$statuses = get_post_stati( array( 'internal' => true ), 'objects', 'NOT' );

$stati = array();
foreach ( $statuses as $name => $status ) {
$stati[ $name ] = $status->label;
}

return $status;
return $stati;
}

/**
Expand Down
Loading