[wp-trac] [WordPress Trac] #21506: Standard Theme Hooks

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 9 08:37:16 UTC 2012


#21506: Standard Theme Hooks
---------------------------+------------------------------
 Reporter:  mfields        |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+------------------------------

Comment (by westi):

 Replying to [comment:5 mfields]:
 > Replying to [comment:4 westi]:
 >
 > I think that wrapping the hooks in functions like {{{wp_head()}}} would
 be a great idea. One reason that they were not implemented into the patch
 for Twenty Twelve was because this theme will need to be backwards
 compatible one major version. Introducing new functions into the template
 would break compatibility.
 >
 > One idea is to introduce these functions into core, but use only the
 hooks in the bundled theme. When the next version of WordPress is released
 the hooks can be replaced with the appropriate functions. There may be
 other, better ways to deal with this too. Just a thought.

 Backwards compatibility is pretty simple :)

 You add a '''compat.php''' file into the themes which contains the
 function definitions wrapped in '''function_exists''' checks.

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


More information about the wp-trac mailing list