[wp-trac] [WordPress Trac] #18449: List Table Factory Needs to be Pluggable

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 16 19:51:34 UTC 2011


#18449: List Table Factory Needs to be Pluggable
--------------------------+-----------------------------
 Reporter:  miqrogroove   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  3.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Better design planning should have been considered for
 http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/list-
 table.php

 function _get_list_table() is identical to an object factory pattern,
 which would make more sense as a static member of WP_List_Table.  In other
 words...

 {{{
 $wp_list_table = _get_list_table('WP_Terms_List_Table');
 }}}

 ... which looks simple, is actually confusing because it would be more
 intuitive if written as ...

 {{{
 $wp_list_table = WP_List_Table::factory('Terms');
 }}}

 Further, the factory hasn't offered any extensibility.  Locking edit-
 tags.php against WP_Terms_List_Table makes it unusable for custom
 taxonomies that need a custom UI.  Despite all of the great API
 improvements for taxonomies, this case still necessitates duplicating the
 entire category editing UI within a plugin just to tweak a table column or
 a link path.

 Please adjust the ticket Type and Component as necessary.  It could be a
 taxonomy design flaw or an administration enhancement, depending how you
 look at it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18449>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list