Opened 3 years ago
Closed 3 years ago
#14495 closed enhancement (invalid)
Why was is_term() deprecated?
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Taxonomy | Version: | 3.0.1 |
| Severity: | normal | Keywords: | is_term() |
| Cc: |
Description
Why was is_term() deprecated? I think it could be a very useful conditional statement. In the WP codex it says to replace it with term_exists() but that only checks if it is in existence. Any thoughts on this?
Change History (1)
Note: See
TracTickets for help on using
tickets.

is_term() was not a conditional statement. It was a check to see whether a term existed. Thus, it was renamed to term_exists().
The same goes for is_post_type() and is_taxonomy(). They were not conditionals, and were renamed post_type_exists() and taxonomy_exists().
For conditional statements, you'll want is_singular( $post_type ) and is_tax( $taxonomy, $term = optional ).