Make WordPress Core


Ignore:
Timestamp:
11/02/2006 06:07:59 AM (19 years ago)
Author:
markjaquith
Message:

Make menu items linked with relative URLs. Props bmontgom. fixes #3246

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu-header.php

    r4349 r4443  
    1414    if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) {
    1515        if ( file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") )
    16             echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
     16            echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
    1717        else
    18             echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
     18            echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
    1919    }
    2020}
     
    4343if (file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") || ! empty($menu_hook)) {
    4444    if ( 'admin.php' == $pagenow )
    45         echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
     45        echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
    4646    else
    47         echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
     47        echo "\n\t<li><a href='{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
    4848 } else {
    49     echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
     49    echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
    5050 }
    5151endforeach;
Note: See TracChangeset for help on using the changeset viewer.