get_post_statuses

The timeline below displays how wordpress function get_post_statuses has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Retrieves all of the WordPress supported post statuses.
 *
 * Posts have a limited set of valid status values, this provides the
 * post_status values and descriptions.
 *
 * @since 2.5.0
 *
 * @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'));
    return $status;
}

WordPress Version: 5.4

/**
 * Retrieve all of the WordPress supported post statuses.
 *
 * Posts have a limited set of valid status values, this provides the
 * post_status values and descriptions.
 *
 * @since 2.5.0
 *
 * @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'));
    return $status;
}

WordPress Version: 3.7

/**
 * Retrieve all of the WordPress supported post statuses.
 *
 * Posts have a limited set of valid status values, this provides the
 * post_status values and descriptions.
 *
 * @since 2.5.0
 *
 * @return array List of post statuses.
 */
function get_post_statuses()
{
    $status = array('draft' => __('Draft'), 'pending' => __('Pending Review'), 'private' => __('Private'), 'publish' => __('Published'));
    return $status;
}