/**
* Returns all the possible statuses for a post type.
*
* @since 2.5.0
*
* @param string $type The post_type you want the statuses for. Default 'post'.
* @return string[] An array of all the statuses for the supplied post type.
*/
function get_available_post_statuses( $type = 'post'
) { $stati =
wp_count_posts( $type );
return array_keys( get_object_vars( $stati ) );
}/**
* Runs the query to fetch the posts for listing on the edit posts page.
*
* @since 2.5.0
*
* @param array|false $q Optional. Array of query variables to use to build the query.
* Defaults to the `$_GET` superglobal.
* @return array
*/