wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



get_available_post_statuses › WordPress Function

Seit2.5.0
Veraltetn/v
get_available_post_statuses ( $type = 'post' )
Parameter:
  • (string) $type The post_type you want the statuses for. Default 'post'.
    Erforderlich: Nein
    Standard: 'post'
Gibt zurück:
  • (string[]) An array of all the statuses for the supplied post type.
Definiert in:
Codex:

Returns all the possible statuses for a post type.



Quellcode

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

	return array_keys( get_object_vars( $stati ) );
}