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

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 21 06:13:54 UTC 2011


#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 mikeschinkel):

 Replying to [comment:1 scribu]:
 > ''How about just making that portion of the admin screen hookable
 instead?''

 Isn't that more extreme?  Why not just the simple hooks proposed?  The
 hooks add no perceptible overhead. Why force someone to recreate the
 entire `wp_count_posts()` function?

 Replying to [comment:2 scribu]:
 > ''Actually, it's already possible to overwrite that method by extending
 the WP_Posts_List_Table class, but alas those classes aren't public as of
 WP 3.1.''

 Extending a class is not [http://en.wikipedia.org/wiki/Composability
 composable] with other plugins; only one plugin can extend
 `WP_Posts_List_Table` so extending classes really should be left to use
 within core and not by plugins.

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


More information about the wp-trac mailing list