wp_count_terms [ WordPress Function ]
wp_count_terms ( $taxonomy, $args = array() )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: count_users, wp_count_attachments, wp_set_post_terms, wp_update_term, wp_create_term
Count how many terms are in Taxonomy.
Default $args is 'hide_empty' which can be 'hide_empty=true' or array('hide_empty' => true).
Source
<?php
function wp_count_terms( $taxonomy, $args = array() ) {
$defaults = array('hide_empty' => false);
$args = wp_parse_args($args, $defaults);
// backwards compatibility
if ( isset($args['ignore_empty']) ) {
$args['hide_empty'] = $args['ignore_empty'];
unset($args['ignore_empty']);
}
$args['fields'] = 'count';
return get_terms($taxonomy, $args);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/wp count terms « WordPress Codex
Description. Count how many terms are in Taxonomy. Default $args is ' hide_empty' which can be 'hide_empty=true' or array('hide_empty' => true).
codex.wordpress.org - wp_count_terms (WordPress Function) - WPSeek.com
WordPress lookup for wp_count_terms, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - Wp_count_terms | WP Code Snippets
May 28, 2011 ... Recently, I was working on a plugin that needed to extract the first and last names of the site admin on which the plugin was activated.
wpcodesnippets.info - widgets - wp_count_posts, wp_count_terms and ...
May 12, 2012 ... Is there a way for the functions wp_count_posts , wp_count_terms and wp_count_comments to return their results only for a specific user, ...
wordpress.stackexchange.com