mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Turn hard-coded paths to defines. Pull gettext includes int wp-settings. Props mdawaffe. fixes #3157
git-svn-id: https://develop.svn.wordpress.org/trunk@4202 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -12,7 +12,7 @@ foreach ($menu as $item) {
|
||||
if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
|
||||
|
||||
if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) {
|
||||
if ( file_exists(ABSPATH . "wp-content/plugins/{$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>";
|
||||
else
|
||||
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
|
||||
@@ -40,7 +40,7 @@ else $class = '';
|
||||
|
||||
$menu_hook = get_plugin_page_hook($item[2], $parent_file);
|
||||
|
||||
if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") || ! empty($menu_hook)) {
|
||||
if (file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") || ! empty($menu_hook)) {
|
||||
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>";
|
||||
else
|
||||
@@ -58,4 +58,4 @@ endif;
|
||||
|
||||
do_action('admin_notices');
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user