Skip to content

Commit

Permalink
Taxonomy: Clarify the docs for the return values of the `term_exists(…
Browse files Browse the repository at this point in the history
…)` function.

Props dotancohen, sathyapulse

Fixes #43345

git-svn-id: https://develop.svn.wordpress.org/trunk@47205 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed Feb 7, 2020
1 parent 1feff0d commit c7caac7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/wp-includes/taxonomy.php
Expand Up @@ -1348,7 +1348,7 @@ function unregister_term_meta( $taxonomy, $meta_key ) {
}

/**
* Determines whether a term exists.
* Determines whether a taxonomy term exists.
*
* Formerly is_term(), introduced in 2.3.0.
*
Expand All @@ -1363,10 +1363,10 @@ function unregister_term_meta( $taxonomy, $meta_key ) {
* @param int|string $term The term to check. Accepts term ID, slug, or name.
* @param string $taxonomy Optional. The taxonomy name to use.
* @param int $parent Optional. ID of parent term under which to confine the exists search.
* @return mixed Returns null 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 term taxonomy ID if the taxonomy
* is specified and the pairing exists.
* @return mixed Returns null 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 term taxonomy ID if the taxonomy is specified and the pairing exists.
* Returns 0 if term ID 0 is passed to the function.
*/
function term_exists( $term, $taxonomy = '', $parent = null ) {
global $wpdb;
Expand Down

0 comments on commit c7caac7

Please sign in to comment.