[wp-trac] [WordPress Trac] #16603: Add hooks to wp_count_posts()

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 25 15:04:11 UTC 2012


#16603: Add hooks to wp_count_posts()
------------------------------------+------------------------------
 Reporter:  mikeschinkel            |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Query                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by hardy101):

 +1 for this filter.  I do a lot of post filtering based on permissions,
 and these status counts are always out of sync.  My attached patch
 ([http://core.trac.wordpress.org/attachment/ticket/16603/16603
 -wp_count_posts-filter.diff 16603-wp_count_posts-filter.diff]) is a one-
 liner: If we filter the array of counts before it populates the cache, we
 should get that filtered value back (as long as our plugin fires before
 anyone else caches the count).

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


More information about the wp-trac mailing list