de

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




get_post_stati [ WordPress Function ]

get_post_stati ( $args = array(), $output = 'names', $operator = 'and' )
Parameter:
  • (array|string) $args An array of key => value arguments to match against the post status objects.
  • (string) $output The type of output to return, either post status 'names' or 'objects'. 'names' is the default.
  • (string) $operator The logical operation to perform. 'or' means only one element from the array needs to match; 'and' means all elements must match. The default is 'and'.
Nutzt:
  • $wp_post_statuses
Siehe:
Gibt zurück:
  • (array) A list of post status names or objects
Definiert in:



Get a list of all registered post status objects.

Source


<?php
function get_post_stati$args = array(), $output 'names'$operator 'and' ) {
    global 
$wp_post_statuses;

    
$field = ('names' == $output) ? 'name' false;

    return 
wp_filter_object_list($wp_post_statuses$args$operator$field);
}
?>

Beispiele [ wp-snippets.com ]

Top Google Suchergebnisse

Mehr ...

Nutzerduskussionen [ wordpress.org ]

0 Nutzerkommentare

Noch keine. Sei der Erste!

Neu hinzufügen ...



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