[wp-trac] [WordPress Trac] #18857: get_plugin_page_hookname uses menu_title to construct subpage load-hooks

WordPress Trac noreply at wordpress.org
Thu Apr 28 19:58:47 UTC 2016


#18857: get_plugin_page_hookname uses menu_title to construct subpage load-hooks
-----------------------------+-----------------------------
 Reporter:  apocalip         |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  4.6
Component:  Plugins          |     Version:  3.1.4
 Severity:  normal           |  Resolution:
 Keywords:  has-patch early  |     Focuses:  administration
-----------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => has-patch early
 * milestone:  Future Release => 4.6


Comment:

 Just stumbled upon this issue with [https://wordpress.org/plugins/better-
 wp-security/ iThemes Security] (thanks to @fierevere for the report).

 The plugin adds a submenu page:
 {{{
 $this->available_pages[] = add_menu_page(
         __( 'Dashboard', 'better-wp-security' ),
         __( 'Security', 'better-wp-security' ),
         $itsec_globals['plugin_access_lvl'],
         'itsec',
         array( $this, 'render_page' )
 );
 }}}
 and then uses screen IDs like `security_page_toplevel_page_itsec_settings`
 to display settings, meta boxes, etc.

 However, if `__( 'Security', 'better-wp-security' )` is translated, screen
 ID changes too, e.g. if the string is translated into "Безопасность", the
 screen ID becomes `bezopasnost_page_toplevel_page_itsec_settings`, and the
 corresponding settings page becomes blank: [attachment:18857.jpg]. See
 #30073 for a detailed explanation.

 Let's see what is needed to get [attachment:18857.diff] in.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18857#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list