[wp-trac] [WordPress Trac] #14034: is_single() or its documentation needs update
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 22 13:45:47 UTC 2010
#14034: is_single() or its documentation needs update
--------------------------+-------------------------------------------------
Reporter: sirzooro | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 3.0
Severity: normal | Keywords: needs-patch dev-feedback 2nd-opinion
--------------------------+-------------------------------------------------
Changes (by sirzooro):
* keywords: needs-patch => needs-patch dev-feedback 2nd-opinion
Comment:
OK, but current function behavior is correct or not? Codex doc for this
function is in "A Single Post Page" section, so I would expect that this
function should be used to detect if we are on Post page or not. I have
searched Internet for it, and found that others write something similar
about it.
What's more, in WP2.9 and earlier we need to use more complex condition to
detect if current page is Post or not - something like this:[[BR]]
`if ( is_single() && !is_attachment() )`[[BR]]
In 3.0 we can use `is_singular( 'page' )` to do this, but this is not
backward-compatible.
Therefore I am not sure if this is correct. I would like to get extra
feedback from other people about this.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14034#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list