[wp-trac] [WordPress Trac] #18636: is_tax() returns false when is_category() or is_tag() returns true
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 11 18:00:53 UTC 2011
#18636: is_tax() returns false when is_category() or is_tag() returns true
--------------------------+----------------------
Reporter: Viper007Bond | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Taxonomy | Version: 3.3
Severity: normal | Resolution: wontfix
Keywords: has-patch |
--------------------------+----------------------
Changes (by nacin):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
This has been its behavior since introduction. Often you may do:
{{{
if ( is_tax() ) {
// do something
} elseif ( is_category() ) {
// categories
} elseif ( is_tag() ) {
// tags
}
}}}
This kind of construct absolutely appears in core in some manner in some
places. Indeed, this would break the template loader, as is_tax() gets
called before either of the others.
It's well-documented as current conditional tag behavior. Better to leave
it alone.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18636#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list