#13747 closed defect (bug) (fixed)
Deprecate is_term, is_taxonomy, is_post_type for *_exists()
Reported by: | nacin | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Simply too much confusion, even with proper Codex documentation. post_type_exists() explains a lot more than is_post_type() anyway.
We should reserve is_ for conditional tags as much as possible (aside from functions clearly unrelated such as is_user_logged_in).
I wouldn't mind seeing this in 3.0 final, all we're doing is throwing in a few deprecated functions that would wrap better-named functions.
Attachments (2)
Change History (13)
#2
@
14 years ago
+1
I am inclined to agree with demetris though, is_term i'm not too fussed about, but both is_tax and is_post_type are not appropriately named.
I've just answered a thread relating to this very issue, where users were using is_post_type as a conditional statement, not user error really, it's misleading.
#4
@
14 years ago
There seems to be a mistake in the patch:
deprecated.php redefines term_exists()
instead of defining is_term()
and making it call term_exists()
.
#5
@
14 years ago
- Keywords commit added
Patch refreshed. Thanks demetris.
Not sure if we were all in agreement on doing this now, I know westi liked this. Marking for commit and we can decide tomorrow.
#8
@
14 years ago
- Summary changed from Deprecate is_term, is_taxonomy, is_post_type for *_exists() to Deprecate is_term and is_taxonomy for *_exists()
That third function does not exists, I could only find a is_post_type_hierarchical()
function so far that starts with is_post.
#9
follow-up:
↓ 10
@
14 years ago
@hakre
The third function was:
@deprecated 3.0.0
@since 3.0.0
For this reason, westi removed it in r15230.
+1
I just logged in to open this ticket, and saw you had already done it. :-)
I only have a small reservation about
is_term()
because, unlike the other two, this does a bit more than a simpleterm_exists()
.