[wp-trac] [WordPress Trac] #2585: Add is() function that checks for single object queries.

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 20 19:53:51 GMT 2006


#2585: Add is() function that checks for single object queries.
----------------------------+-----------------------------------------------
       Id:  2585            |      Status:  new                     
Component:  Administration  |    Modified:  Mon Mar 20 19:53:51 2006
 Severity:  normal          |   Milestone:  2.1                     
 Priority:  normal          |     Version:  1.2                     
    Owner:  ryan            |    Reporter:  ryan                    
----------------------------+-----------------------------------------------
 Perhaps call it is_singular().

 is_singular() returns true if is_single(), is_page(), or is_attachment().
 We check for ( is_single() || is_page() || is_attachemnt() ) quite often.
 This would clean those checks up and make it easier to add new single
 object queries.

 I wish we had called is_single() is_post() instead.  Oh well.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2585>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list