[wp-trac] [WordPress Trac] #14034: is_single() or its documentation needs update
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 29 06:01:12 UTC 2010
#14034: is_single() or its documentation needs update
--------------------------+-------------------------------------------------
Reporter: sirzooro | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Inline Docs | Version: 3.0
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
Changes (by nacin):
* keywords: needs-patch dev-feedback 2nd-opinion => needs-patch
Comment:
Technically, `is_singular = is_single || is_page || is_attachment`, but
when is_attachment is true, is_single xor is_page is also true.
is_single() cannot be counted on for attachments due to a specific case
where is_attachment = is_page = true, but for the most part, is_single()
checks any post type other than pages.
Let's have the docs reflect this. is_singular() checks any post type.
is_page() checks pages. is_attachment() checks attachments. is_single()
checks posts, any other post type, and usually returns true for
attachments.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14034#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list