| @@ 779-785 (lines=7) @@ | ||
| 776 | * Default 'and'. |
|
| 777 | * @return array A list of post status names or objects. |
|
| 778 | */ |
|
| 779 | function get_post_stati( $args = array(), $output = 'names', $operator = 'and' ) { |
|
| 780 | global $wp_post_statuses; |
|
| 781 | ||
| 782 | $field = ('names' == $output) ? 'name' : false; |
|
| 783 | ||
| 784 | return wp_filter_object_list($wp_post_statuses, $args, $operator, $field); |
|
| 785 | } |
|
| 786 | ||
| 787 | /** |
|
| 788 | * Whether the post type is hierarchical. |
|
| @@ 877-883 (lines=7) @@ | ||
| 874 | * must match; 'not' means no elements may match. Default 'and'. |
|
| 875 | * @return array A list of post type names or objects. |
|
| 876 | */ |
|
| 877 | function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) { |
|
| 878 | global $wp_post_types; |
|
| 879 | ||
| 880 | $field = ('names' == $output) ? 'name' : false; |
|
| 881 | ||
| 882 | return wp_filter_object_list($wp_post_types, $args, $operator, $field); |
|
| 883 | } |
|
| 884 | ||
| 885 | /** |
|
| 886 | * Registers a post type. |
|
| @@ 150-156 (lines=7) @@ | ||
| 147 | * Default 'and'. |
|
| 148 | * @return array A list of taxonomy names or objects. |
|
| 149 | */ |
|
| 150 | function get_taxonomies( $args = array(), $output = 'names', $operator = 'and' ) { |
|
| 151 | global $wp_taxonomies; |
|
| 152 | ||
| 153 | $field = ('names' == $output) ? 'name' : false; |
|
| 154 | ||
| 155 | return wp_filter_object_list($wp_taxonomies, $args, $operator, $field); |
|
| 156 | } |
|
| 157 | ||
| 158 | /** |
|
| 159 | * Return the names or objects of the taxonomies which are registered for the requested object or object type, such as |
|