#13266 closed defect (bug) (duplicate)
Admin page hooks change when plugin is translated (tied to $menu_title)
Reported by: | uglyrobot | Owned by: | westi |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Plugins | Keywords: | |
Focuses: | administration | Cc: |
Description
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.
Attachments (1)
Change History (9)
#1
@
14 years ago
- Milestone changed from 3.0 to 3.1
This has been a problem forever. We can look at this for 3.1. Too late for 3.0.
#3
@
14 years ago
- Milestone changed from Awaiting Triage to Future Release
- Priority changed from high to normal
Need to be back compat here.
#6
@
9 years ago
- Keywords needs-patch added; has-patch removed
- Severity changed from major to normal
This should pull from the slug rather than translated title