[wp-trac] [WordPress Trac] #16956: Comments Being Pulled from Non-Existent Post Types

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 14 14:45:20 UTC 2012


#16956: Comments Being Pulled from Non-Existent Post Types
------------------------------+------------------------------
 Reporter:  sterlo            |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Warnings/Notices  |     Version:  3.1
 Severity:  normal            |  Resolution:
 Keywords:                    |
------------------------------+------------------------------
Changes (by boonebgorges):

 * cc: boonebgorges@… (added)


Comment:

 Since the problem is related to map_meta_cap(), maybe it's best not to
 mess with the query but instead to solve the problem at the level of caps.
 Maybe when get_post_type_object( $post->post_type ) returns null, add
 'do_not_allow' to $caps and bail?

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


More information about the wp-trac mailing list