[wp-trac] [WordPress Trac] #3835: plugin page hooks and actions confusion

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 21 21:56:30 GMT 2007


#3835: plugin page hooks  and actions confusion
----------------------------+-----------------------------------------------
 Reporter:  m0n5t3r         |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  low             |   Milestone:  2.1.2    
Component:  Administration  |     Version:  2.1      
 Severity:  normal          |    Keywords:  has-patch
----------------------------+-----------------------------------------------
 {{{admin_head.php}}} relies on the existence of the variable
 {{{$page_hook}}} to determine the name of the action to execute; however,
 {{{$page_hook}}} is always set in {{{admin.php}}}, causing
 {{{admin_head.php}}} to ignore actions like {{{admin_head-
 my_plugin/page.php}}}.

 the attached patch contains one of the solutions; the other one is to
 {{{unset($page_hook)}}} in {{{admin.php}}} if empty

 it would also be interesting to know why we have 2 action naming schemes,
 one {{{like admin_head-some/file.php}}} and another one like
 {{{admin_head-management_page_file}}} (i'm not sure it isn't a feature ;)

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


More information about the wp-trac mailing list