WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#24274 closed defect (bug) (duplicate)

$pagenow & WP_Screen::$id not useful on submenu pages with i18n

Reported by: jrfoell Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords:
Focuses: Cc:

Description

When adding a custom wp-admin menu & submenu page, the submenu page's pagenow and current screen ID are not consistent when any other language is used.

Steps:
1) install & activate included pagenow-i18n.php plugin
2) install & activate "pig latin" to simulate i18n: http://wordpress.org/extend/plugins/piglatin/
3) navigate to wp-admin/admin.php?page=my_submenu_page
4) view source and/or print results from get_current_screen or current_screen hook

Expected result:
pagenow/WP_Screen::$id should at least be consistent whether or not any certain language is enabled.

The problem seems to originate from the fact that sanitize_title( $menu_title ); is used for $admin_page_hooks which is in turn used by get_plugin_page_hookname().

If I'm "doing it wrong" please notify. Sorry I don't have a solution patch.

Attachments (1)

pagenow-i18n.php (487 bytes) - added by jrfoell 11 months ago.
pagenow-i18n.php example plugin

Download all attachments as: .zip

Change History (3)

jrfoell11 months ago

pagenow-i18n.php example plugin

comment:1 ocean9011 months ago

  • Component changed from General to Plugins
  • Milestone Awaiting Review deleted
  • Status changed from new to closed
  • Version 3.5.1 deleted

Duplicate of #18857.

comment:2 ocean9011 months ago

  • Resolution set to duplicate
Note: See TracTickets for help on using tickets.