[wp-trac] [WordPress Trac] #17220: get_posts_by_author_sql() should use the post type object

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 23 07:54:40 UTC 2011


#17220: get_posts_by_author_sql() should use the post type object
------------------------------+------------------
 Reporter:  nacin             |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.2
Component:  Post Types        |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+------------------

Comment (by nacin):

 Alternative for keeping the filter should be this:

 {{{
 if ( ! $cap = apply_filters( 'pub_priv_sql_capability', '' ) )
      $cap = $post_type_obj->cap->read_private_posts;
 }}}

 Rather than applying the filter over read_private_posts, given its
 historical usage.

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


More information about the wp-trac mailing list