#56460 closed defect (bug) (duplicate)
Admin page screen id in other language
| Reported by: | zareidev | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Menus | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | administration |
Description
Hi,
When I use add_menu_page in a plugin, the screen id would be a menu_title (second parameter of add_menu_page). but we always pass menu_title with a __ function for translation.
for example:
<?php add_menu_page( __( 'Videos', 'vod' ), __( 'Videos', 'vod'), // The problem is with this 'manage_options', 'vod' . '-videos', [$this, 'video_library_page'], VOD_PLUGIN_ROOT_URL . 'assets/images/logo.svg', 10 ); add_submenu_page( 'vod' . '-videos', __( 'Upload New Video', 'vod' ), __( 'Add', 'vod' ), 'manage_options', 'vod' . '-videos-add', [$this, 'add_video_page'], );
In this situation when the admin dashboard is English everything is fine as below:
URL: /wp-admin/admin.php?page=vod-videos-add
Screen id: videos_page-vod-videos-add
but on the Persian Dashboard:
URL: /wp-admin/admin.php?page=vod-videos-add
Screen id: %d9%88%db%8c%d8%af%d8%a6%d9%88%d9%87%d8%a7_page-vod-videos-add
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #18857.