[wp-trac] [WordPress Trac] #28817: WP4.0-beta1 - string concatenation for $page_title in add_submenu_page() is broken
WordPress Trac
noreply at wordpress.org
Thu Jul 10 18:07:04 UTC 2014
#28817: WP4.0-beta1 - string concatenation for $page_title in add_submenu_page() is
broken
--------------------------+-----------------------------
Reporter: harmr | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
within my plugin "Maps Marker Pro" I add a object page to show the
plugin´s admin pages within the WordPress admin navigation by the
following code:
{{{
$page = add_object_page('Maps Marker', 'Maps Marker', $capabilities,
'leafletmapsmarker_markers', array(&$this, 'lmm_list_markers'),
LEAFLET_PLUGIN_URL . 'inc/img/icon-menu-page' . $mp6_icon . '.png' );
}}}
subpages are then added via add_submenu_page:
{{{
if ($lmm_options['misc_whitelabel_backend'] == 'enabled') {
$menu_name = esc_attr__('Maps','lmm');
} else {
$menu_name = '<span style="font-size:92%;">Maps Marker
Pro</span>';
}
...
$page2 = add_submenu_page('leafletmapsmarker_markers', $menu_name . ' - '
. __('List all markers', 'lmm'), '<img src="' . LEAFLET_PLUGIN_URL .
'inc/img/icon-menu-list' . $mp6_icon . '.png"> ' . __('List all markers',
'lmm'), $lmm_options[ 'capabilities_edit' ], 'leafletmapsmarker_markers',
array(&$this, 'lmm_list_markers') );
$page3 = add_submenu_page('leafletmapsmarker_markers', $menu_name . ' - '
. __('add/edit marker', 'lmm'), '<img src="' . LEAFLET_PLUGIN_URL .
'inc/img/icon-menu-add' . $mp6_icon . '.png"> ' . __('Add new marker',
'lmm'), $lmm_options[ 'capabilities_edit' ], 'leafletmapsmarker_marker',
array(&$this, 'lmm_marker') );
...
}}}
Since WP4.0-beta1 string concentation for
{{{
$menu_name . ' - ' . __('List all markers', 'lmm')
}}}
does not work anymore - within the nav menu, the title is echoed, see
attached screenshots for a comparison.
I checked the function add_submenu_page() within /wp-
admin/includes/plugin.php but it didnt seem to have changed with
WP4.0-beta1, so I am probably missing something here.
working nav submenu in WP 3.9.1:
[[Image(http://s30.postimg.org/uie85m4u9/working_wordpress391.png)]]
broken nav submenu in WP 4.0-beta1:
[[Image(http://s18.postimg.org/4du5u83ex/broken_wordpress40beta1.png)]]
Is this a bug with WordPress or is string concatenation as I am doing it
here not supported anymore?
thanx for any hint!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28817>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list