diff --git a/src/wp-admin/menu-header.php b/src/wp-admin/menu-header.php
index 1f481f8634..2205f0d387 100644
a
|
b
|
function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { |
165 | 165 | && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) |
166 | 166 | ) { |
167 | 167 | $admin_is_parent = true; |
168 | | echo "<a href='admin.php?page={$submenu_items[0][2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>"; |
| 168 | $tmp_url = admin_url( "admin.php?page=".$submenu_items[0][2] ); |
| 169 | echo "<a href='$tmp_url'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>"; |
169 | 170 | } else { |
170 | | echo "\n\t<a href='{$submenu_items[0][2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>"; |
| 171 | $tmp_url = admin_url( $submenu_items[0][2] ); |
| 172 | echo "\n\t<a href='$tmp_url'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>"; |
171 | 173 | } |
172 | 174 | } elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) { |
173 | 175 | $menu_hook = get_plugin_page_hook( $item[2], 'admin.php' ); |
… |
… |
function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { |
184 | 186 | && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) |
185 | 187 | ) { |
186 | 188 | $admin_is_parent = true; |
187 | | echo "\n\t<a href='admin.php?page={$item[2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>"; |
| 189 | $tmp_url = admin_url( "admin.php?page=".$item[2] ); |
| 190 | echo "\n\t<a href='$tmp_url'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>"; |
188 | 191 | } else { |
189 | | echo "\n\t<a href='{$item[2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>"; |
| 192 | $tmp_url = admin_url( $item[2] ); |
| 193 | echo "\n\t<a href='$tmp_url'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>"; |
190 | 194 | } |
191 | 195 | } |
192 | 196 | |
… |
… |
function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { |
263 | 267 | $sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), 'admin.php' ); |
264 | 268 | } |
265 | 269 | |
266 | | $sub_item_url = esc_url( $sub_item_url ); |
| 270 | $sub_item_url = esc_url( admin_url( $sub_item_url ) ); |
267 | 271 | echo "<li$class><a href='$sub_item_url'$class$aria_attributes>$title</a></li>"; |
268 | 272 | } else { |
269 | | echo "<li$class><a href='{$sub_item[2]}'$class$aria_attributes>$title</a></li>"; |
| 273 | $sub_item_url_alt = admin_url( $sub_item[2] ); |
| 274 | echo "<li$class><a href='$sub_item_url_alt'$class$aria_attributes>$title</a></li>"; |
270 | 275 | } |
271 | 276 | } |
272 | 277 | echo '</ul>'; |