[wp-trac] Re: [WordPress Trac] #9438: Some Hook names are localized by accident

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 7 00:15:35 GMT 2009


#9438: Some Hook names are localized by accident
----------------------------+-----------------------------------------------
 Reporter:  hakre           |       Owner:  anonymous
     Type:  defect (bug)    |      Status:  new      
 Priority:  high            |   Milestone:  2.7.2    
Component:  Administration  |     Version:  2.7.1    
 Severity:  critical        |    Keywords:           
----------------------------+-----------------------------------------------

Comment(by hakre):

 I could dig in a bit more. This falls on my feet again. This makes the
 development of a Plugin Page complicated since you can not gain knowlege
 about the name of the hook in development.

 this is where the localized name is coming from (global array):
 {{{$admin_page_hooks[$parent]}}}

 this is in get_plugin_page_hookname() in wp-admin/includes/plugin.php

 this array is filed off from the menu array which is defined in wp-
 admin/menu.php

 the solution is quite easy. there only needs a little fix in assigning the
 name there. instead of taking a localized string, I suggest to take the
 name of the actual php file, the extension removed.

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


More information about the wp-trac mailing list