[wp-trac] [WordPress Trac] #10408: Standard Naming of Hooks in Themes

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 14 19:07:17 UTC 2009


#10408: Standard Naming of Hooks in Themes
--------------------------+-------------------------------------------------
 Reporter:  dcole07       |       Owner:  dcole07    
     Type:  defect (bug)  |      Status:  new        
 Priority:  normal        |   Milestone:  2.9        
Component:  Themes        |     Version:  2.9        
 Severity:  normal        |    Keywords:  needs-patch
--------------------------+-------------------------------------------------
 Hooks in themes are a great idea. Plugins can add their code in without
 making users do any copying and pasting. People it also safe guards
 changes to the theme, because your not editing core theme files. I can go
 into this more if need be.

 What I want to do is create (an optional) standard for having hooks in
 themes. To popularize this, the default themes that come with WordPress
 should include these hooks. As more themes start using hooks in their
 themes and use the same hook names as everyone else, plugins and what not
 can start doing to WordPress themes as they did with WordPress.

 I've asked some theme enthusiasts, as well as some popular theme
 developers, and they generally agree that these hooks should start out
 with '''theme_''', use '''before''' / '''after''' instead of above / below
 or pre / post, use underscores in place of spaces, and be descriptive.

 I'm going to take ownership of this ticket and create the patch. Feel free
 to voice your thoughts.

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


More information about the wp-trac mailing list