[wp-trac] [WordPress Trac] #12748: Rethink some of the pluggable architecture of twentyten functions.php

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 28 22:18:12 UTC 2010


#12748: Rethink some of the pluggable architecture of twentyten functions.php
--------------------------+-------------------------------------------------
 Reporter:  nacin         |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.0
Component:  Themes        |     Version:     
 Severity:  normal        |    Keywords:     
--------------------------+-------------------------------------------------
 This came out of #12745.

 In functions.php, we allow twentyten_init() to be plugged by a child
 theme, yet it also is only a callback for a hook.

 We should instead offer documentation and education for the child theme to
 remove that hook if they don't want twentyten_init() to be run. I'm not
 sure it needs to be pluggable when it is only an action hook callback.

 ----

 Thinking further, I've seen various forward-thinking recommendations to
 use action hooks instead of custom template tags in plugins. So perhaps
 instead of twentyten_term_list(), we use do_action('twentyten_term_list')
 in themes instead.

 Or, even better, we add filters we need in the taxonomy API, and use
 the_tags() and the_category(). When a theme needs to call
 $wp_query->get_queried_object() in this fashion, we should come up with
 ways to make it better.

 See also:

 wp_title() -- #12370 (smarter version) and #11951 (include paging), and
 twentyten_get_page_number() and twentyten_the_page_number() (the former is
 only used by the latter, also, and the latter is only used in header.php
 to construct a page title).

 {{{$wp_query->max_num_pages > 1}}} in loop.php.

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


More information about the wp-trac mailing list