[wp-trac] [WordPress Trac] #24257: is_attachment() should accept $attachment parameter

WordPress Trac noreply at wordpress.org
Sat Aug 10 07:15:14 UTC 2013


#24257: is_attachment() should accept $attachment parameter
-------------------------+------------------------------
 Reporter:  alex-ye      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Query        |     Version:  3.5.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by toscho):

 Replying to [comment:3 wonderboymusic]:
 > You aren't checking the `post_type` - nothing about that function is
 attachment-specific, it could evaluate true against an arbitrarily-passed
 post

 The check for `$this->is_attachment` does exactly this. How could that
 return `TRUE` for another post type?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24257#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list