[wp-trac] [WordPress Trac] #38814: hook_suffix value varies based on user locale
WordPress Trac
noreply at wordpress.org
Wed Nov 16 11:26:07 UTC 2016
#38814: hook_suffix value varies based on user locale
----------------------------+-----------------------------
Reporter: takayukister | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: trunk
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
https://core.trac.wordpress.org/browser/trunk/src/wp-
admin/includes/plugin.php?rev=38687#L1079
In `add_menu_page()`, `$admin_page_hooks[$menu_slug]` is assigned with
sanitized `$menu_title`. This `$menu_title` is in most cases a translated
string with `__()`.
`$admin_page_hooks` value is in turn used in `get_plugin_page_hookname()`,
which determines the value of `$page_hook` and `$hook_suffix` in wp-
admin/admin.php.
As a result, the `$hook_suffix` value on the same page can vary based on
the current user's locale setting.
For example, on a submenu page of my Contact Form 7 plugin (wp-
admin/admin.php?page=wpcf7-integration), the `$hook_suffix` value is
`contact_page_wpcf7-integration` when the user locale is ''en_US'', but it
changes to
`%e3%81%8a%e5%95%8f%e3%81%84%e5%90%88%e3%82%8f%e3%81%9b_page_wpcf7-integration`
when the user locale is ''ja'' (Japanese).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38814>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list