[wp-trac] [WordPress Trac] #21658: Meaningless adjacent post links for pages

WordPress Trac noreply at wordpress.org
Sun Jun 8 17:26:16 UTC 2014


#21658: Meaningless adjacent post links for pages
-------------------------------+-----------------------------
 Reporter:  mdgl               |       Owner:  SergeyBiryukov
     Type:  defect (bug)       |      Status:  reopened
 Priority:  normal             |   Milestone:  4.0
Component:  Posts, Post Types  |     Version:  3.4.1
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:  template
-------------------------------+-----------------------------
Changes (by nacin):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Replying to [comment:5 SergeyBiryukov]:
 > `! is_singular() || is_attachment() || is_page()` is equivalent to `!
 is_single()`.

 Actually, it's not. is_single() applies to all custom post types,
 including posts, but not including pages, and including attachments in
 some situations.

 is_singular is equivalent to `is_single || is_page`. It's technically
 defined as `is_attachment` but `is_attachment` is always paired with
 `is_single` XOR `is_page`.

 Essentially, this commit has now added these for attachments while removed
 them from pages.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21658#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list