diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php
index 2f5072c3c9..328757b53f 100644
--- a/wp-admin/includes/plugin.php
+++ b/wp-admin/includes/plugin.php
@@ -818,22 +818,20 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func
$hookname = get_plugin_page_hookname( $menu_slug, '' );
- if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $capability ) )
+ if ( !empty( $function ) && !empty( $hookname ) && current_user_can( $capability ) )
add_action( $hookname, $function );
- if ( empty($icon_url) ) {
+ if ( empty($icon_url) )
$icon_url = esc_url( admin_url( 'images/generic.png' ) );
- } elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) {
+ elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') )
$icon_url = 'https://' . substr($icon_url, 7);
- }
- $new_menu = array ( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
+ $new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
- if ( NULL === $position ) {
+ if ( null === $position )
$menu[] = $new_menu;
- } else {
+ else
$menu[$position] = $new_menu;
- }
$_registered_pages[$hookname] = true;
diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php
index b79b2ebeaa..2a9ee7294c 100644
--- a/wp-admin/menu-header.php
+++ b/wp-admin/menu-header.php
@@ -69,6 +69,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
}
$toggle = '
';
+ $title = wptexturize($item[0]);
+
echo "\n\t";
if ( false !== strpos($class, 'wp-menu-separator') ) {
@@ -81,9 +83,9 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
$menu_file = substr($menu_file, 0, $pos);
if ( ( ('index.php' != $submenu[$item[2]][0][2]) && file_exists(WP_PLUGIN_DIR . "/$menu_file") ) || !empty($menu_hook)) {
$admin_is_parent = true;
- echo "$toggle{$item[0]}";
+ echo "$toggle$title";
} else {
- echo "\n\t$toggle{$item[0]}";
+ echo "\n\t$toggle$title";
}
} else if ( current_user_can($item[1]) ) {
$menu_hook = get_plugin_page_hook($item[2], 'admin.php');
@@ -138,6 +140,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
if ( false !== $pos = strpos($sub_file, '?') )
$sub_file = substr($sub_file, 0, $pos);
+ $title = wptexturize($sub_item[0]);
+
if ( ( ('index.php' != $sub_item[2]) && file_exists(WP_PLUGIN_DIR . "/$sub_file") ) || ! empty($menu_hook) ) {
// If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
if ( (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/$menu_file") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}")) || file_exists($menu_file) )
@@ -145,9 +149,9 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
else
$sub_item_url = add_query_arg( array('page' => $sub_item[2]), 'admin.php' );
$sub_item_url = esc_url($sub_item_url);
- echo "{$sub_item[0]}";
+ echo "$title";
} else {
- echo "{$sub_item[0]}";
+ echo "$title";
}
}
echo "";
diff --git a/wp-admin/menu.php b/wp-admin/menu.php
index 8c31f0b00f..ab26ffacb8 100644
--- a/wp-admin/menu.php
+++ b/wp-admin/menu.php
@@ -179,7 +179,7 @@ else
if ( current_user_can('edit_users') ) {
$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
- $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
+ $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
$submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');