mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 16:43:06 +01:00
Make menu items linked with relative URLs. Props bmontgom. fixes #3246
git-svn-id: https://develop.svn.wordpress.org/trunk@4443 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0255aa20dc
commit
aea14818d8
@ -13,9 +13,9 @@ foreach ($menu as $item) {
|
|||||||
|
|
||||||
if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) {
|
if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) {
|
||||||
if ( file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") )
|
if ( file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") )
|
||||||
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
else
|
else
|
||||||
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,11 +42,11 @@ $menu_hook = get_plugin_page_hook($item[2], $parent_file);
|
|||||||
|
|
||||||
if (file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") || ! empty($menu_hook)) {
|
if (file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") || ! empty($menu_hook)) {
|
||||||
if ( 'admin.php' == $pagenow )
|
if ( 'admin.php' == $pagenow )
|
||||||
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
else
|
else
|
||||||
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
} else {
|
} else {
|
||||||
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
}
|
}
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user