From bb574e4d8042ba62e3963e96fb14026f31a650b5 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 16 Dec 2011 20:56:14 +0000 Subject: [PATCH] term_exists() @return correction. props johnbillion, fixes #19565. git-svn-id: https://develop.svn.wordpress.org/trunk@19600 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/taxonomy.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 5f2e25a5e5..e6ec49ea52 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1431,8 +1431,6 @@ function &get_terms($taxonomies, $args = '') { /** * Check if Term exists. * - * Returns the index of a defined term, or 0 (false) if the term doesn't exist. - * * Formerly is_term(), introduced in 2.3.0. * * @package WordPress @@ -1444,7 +1442,8 @@ function &get_terms($taxonomies, $args = '') { * @param int|string $term The term to check * @param string $taxonomy The taxonomy name to use * @param int $parent ID of parent term under which to confine the exists search. - * @return mixed Get the term id or Term Object, if exists. + * @return mixed Returns 0 if the term does not exist. Returns the term ID if no taxonomy is specified + * and the term ID exists. Returns an array of the term ID and the taxonomy if the pairing exists. */ function term_exists($term, $taxonomy = '', $parent = 0) { global $wpdb;