#24274 closed defect (bug) (duplicate)
$pagenow & WP_Screen::$id not useful on submenu pages with i18n
| Reported by: |
|
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.
pagenow-i18n.php example plugin