Update docs to reflect that wp_count_terms() can return WP_Error when the taxonomy does not exist. props SergeyBiryukov, fixes #21888.
git-svn-id: http://core.svn.wordpress.org/trunk@21843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
558a36c79f
commit
e728ad3a1e
|
@ -1681,7 +1681,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
|
|||
*
|
||||
* @param string $taxonomy Taxonomy name
|
||||
* @param array|string $args Overwrite defaults. See get_terms()
|
||||
* @return int How many terms are in $taxonomy
|
||||
* @return int|WP_Error How many terms are in $taxonomy. WP_Error if $taxonomy does not exist.
|
||||
*/
|
||||
function wp_count_terms( $taxonomy, $args = array() ) {
|
||||
$defaults = array('hide_empty' => false);
|
||||
|
|
Loading…
Reference in New Issue