[wp-trac] [WordPress Trac] #13266: Admin page hooks change when plugin is translated (tied to $menu_title)

WordPress Trac wp-trac at lists.automattic.com
Wed May 5 21:07:11 UTC 2010


#13266: Admin page hooks change when plugin is translated (tied to $menu_title)
--------------------------+-------------------------------------------------
 Reporter:  uglyrobot     |       Owner:  westi                  
     Type:  defect (bug)  |      Status:  new                    
 Priority:  high          |   Milestone:  3.0                    
Component:  Plugins       |     Version:  3.0                    
 Severity:  major         |    Keywords:  has-patch needs-testing
--------------------------+-------------------------------------------------
 WP3 is using the title of the parent menu item in a menu block to fire the
 load-hooks for the lesser menu items? Lost me? Ok an example -

 Plugin Membership has this menu structure (simplified)

 Membership – main heading
 Membership – Top inner
 Edit Member – inner
 Edit Levels – inner
 Edit Subs – inner
 etc…

 The page load hooks for the non-translated plugin are as follows:
 Membership – load-toplevel_page_membership
 Membership – load-toplevel_page_membership
 Edit Member – load-membership_page_members
 Edit Levels – load-membership_page_membershiplevels
 Edit Subs – load-membership_page_membershipsubs
 etc…

 Now, if I use a language translation on the plugin, which for the sake of
 clarity here, translates the word Membership to Aaargh the page load hooks
 become.
 Membership – load-toplevel_page_membership
 Membership – load-toplevel_page_membership
 Edit Member – load-aaargh_page_members
 Edit Levels – load-aaargh_page_membershiplevels
 Edit Subs – load-aaargh_page_membershipsubs
 etc…

 Thus any actions you are running on the inner pages aren’t called.

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


More information about the wp-trac mailing list