Make WordPress Core

Opened 16 years ago

Closed 9 years ago

Last modified 8 years ago

#13266 closed defect (bug) (duplicate)

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

Reported by: uglyrobot Owned by: westi
Priority: normal Milestone:
Component: Plugins Version: 3.0
Severity: normal Keywords:
Cc: Focuses: administration

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 16 years ago.
This should pull from the slug rather than translated title

Download all attachments as: .zip

Change History (9)

@uglyrobot
16 years ago

This should pull from the slug rather than translated title

#1 @ryan
16 years ago

  • Milestone 3.03.1

This has been a problem forever. We can look at this for 3.1. Too late for 3.0.

#2 @hakre
16 years ago

3.1 on shedule now. Too late again?

#3 @nacin
16 years ago

  • Milestone Awaiting TriageFuture Release
  • Priority highnormal

Need to be back compat here.

#4 @nacin
13 years ago

  • Component PluginsAdmin APIs
  • Focuses administration added

#5 @nacin
13 years ago

  • Component Admin APIsPlugins

Sorry for the noise.

#6 @chriscct7
11 years ago

  • Keywords needs-patch added; has-patch removed
  • Severity majornormal

#7 @davilera
9 years ago

  • Resolutionduplicate
  • Status newclosed

Duplicate of #18857.

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

#8 @ocean90
8 years ago

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