Make WordPress Core

Opened 14 years ago

Closed 6 years ago

Last modified 6 years ago

#13266 closed defect (bug) (duplicate)

Admin page hooks change when plugin is translated (tied to $menu_title)

Reported by: uglyrobot's profile uglyrobot Owned by: westi's profile 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)

admin-page-hooks.diff (396 bytes) - added by uglyrobot 14 years ago.
This should pull from the slug rather than translated title

Download all attachments as: .zip

Change History (9)

@uglyrobot
14 years ago

This should pull from the slug rather than translated title

#1 @ryan
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.

#2 @hakre
13 years ago

3.1 on shedule now. Too late again?

#3 @nacin
13 years ago

  • Milestone changed from Awaiting Triage to Future Release
  • Priority changed from high to normal

Need to be back compat here.

#4 @nacin
10 years ago

  • Component changed from Plugins to Admin APIs
  • Focuses administration added

#5 @nacin
10 years ago

  • Component changed from Admin APIs to Plugins

Sorry for the noise.

#6 @chriscct7
8 years ago

  • Keywords needs-patch added; has-patch removed
  • Severity changed from major to normal

#7 @davilera
6 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #18857.

There's a more recent, more active ticket that also addresses this topic.

#8 @ocean90
6 years ago

  • Keywords needs-testing needs-patch removed
  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.