wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



get_available_post_statuses › WordPress Function

Da2.5.0
Deprecaton/a
get_available_post_statuses ( $type = 'post' )
Parametri:
  • (string) $type The post_type you want the statuses for. Default 'post'.
    Richiesto: No
    Default: 'post'
Ritorna:
  • (string[]) An array of all the statuses for the supplied post type.
Definito a:
Codex:

Returns all the possible statuses for a post type.



Sorgenti

function get_available_post_statuses( $type = 'post' ) {
	$stati = wp_count_posts( $type );

	return array_keys( get_object_vars( $stati ) );
}