Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_available_post_statuses [ WordPress Function ]

get_available_post_statuses ( $type = 'post' )
Parameters:
  • (string) $type The post_type you want the statuses for
Returns:
  • (array) As array of all the statuses for the supplied post type
Defined at:



Get all the possible statuses for a post_type

Source


<?php
function get_available_post_statuses($type 'post') {
    
$stati wp_count_posts($type);

    return 
array_keys(get_object_vars($stati));
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics