Changeset 2401

Show
Ignore:
Timestamp:
03/02/05 16:30:00 (4 years ago)
Author:
ryan
Message:

Fix edit page menu highlighting. http://mosquito.wordpress.org/view.php?id=799 Hat tip: mdawaffe

Files:

Legend:

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

    r2381 r2401  
    3636     } 
    3737 
    38 if ( (isset($plugin_page) && $plugin_page == $item[2]) || (!isset($plugin_page) && substr($self, -10) == substr($item[2], -10)) ) $class = ' class="current"'; 
    39 else if (isset($submenu_file) && $submenu_file == substr($item[2], -10)) $class = ' class="current"';     
     38if ( isset($submenu_file) ) { 
     39    if ( substr($submenu_file, -10) == substr($item[2], -10) ) $class = ' class="current"'; 
     40    else $class = ''; 
     41} else if ( (isset($plugin_page) && $plugin_page == $item[2]) || (!isset($plugin_page) && substr($self, -10) == substr($item[2], -10)) ) $class = ' class="current"'; 
    4042else $class = ''; 
    4143 
  • trunk/wp-admin/post.php

    r2377 r2401  
    2222$action = "delete"; 
    2323} 
     24 
     25    // Fix submenu highlighting for pages. 
     26if (false !== strpos($_SERVER['HTTP_REFERER'], 'edit-pages.php')) $submenu_file = 'page-new.php'; 
    2427 
    2528switch($action) {