Make WordPress Core

Changeset 8115


Ignore:
Timestamp:
06/18/2008 01:55:39 AM (18 years ago)
Author:
mdawaffe
Message:

crazyhorse: first pass at menu positioning - will break some things. Menu reorganization to come

Location:
branches/crazyhorse/wp-admin
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-admin/admin-footer.php

    r7114 r8115  
    1 </div><!-- wpbody -->
    2 </div><!-- wpcontent -->
     1<br class="clear" /></div></div><!-- wpbody-content wpbody -->
     2<br class="clear" /></div><!-- wpcontent -->
    33</div><!-- wpwrap -->
    44<div id="footer">
  • branches/crazyhorse/wp-admin/admin-header.php

    r8069 r8115  
    112112<?php } ?>
    113113
    114 <div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>') ?> | <?php if ( $gears_compat ) { ?><span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Speed up!') ?></a></span><?php } ?></p></div>
     114<div id="user_info"><p>
     115    <?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> |
     116    <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a>
     117    <?php if ( $gears_compat ) { ?>| <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Speed up!') ?></a></span><?php } ?>
     118</p></div>
    115119
    116120<?php
     
    121125}
    122126?>
    123 <div id="wpbody">
     127<div id="wpbody"><div id="wpbody-content">
  • branches/crazyhorse/wp-admin/css/colors-classic.css

    r8066 r8115  
     1#wpcontent {
     2    background-color: #14568A;
     3}
     4#wpbody-content {
     5    background-color: #fff;
     6}
    17a.page-numbers:hover {
    28    border-color: #999;
     
    133139}
    134140
    135 .howto, .nonessential, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
     141.howto, .nonessential, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
    136142    color: #999;
    137143}
     
    205211}
    206212
    207 .submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.del-link:hover {
     213.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.del-link:hover {
    208214    color: #d54e21;
    209215}
    210216
    211 #adminmenu a:hover, #sidemenu a:hover, .ui-tabs-nav a:hover {
     217#adminmenu a:hover, .ui-tabs-nav a:hover {
    212218    color: #97c4d8;
    213219}
     
    301307}
    302308
    303 #submenu a {
    304     color: #2782af
    305 }
    306309/* Because we don't want visited on these links */
    307 #adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
     310#adminmenu li.current a, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
    308311    background-color: #fff;
    309312    border-color: #07273e;
     
    313316}
    314317
     318#adminmenu li.current {
     319    background-color: #fff;
     320    border-right-color: #fff;
     321}
     322
    315323#adminmenu li a #awaiting-mod {
    316324    background-image: url(../images/comment-stalk-classic.gif);
     
    332340}
    333341
    334 #adminmenu, div#media-upload-header {
     342div#media-upload-header {
    335343    background-color: #14568a;
    336344    border-bottom-color: #07273e;
     
    351359input.readonly {
    352360    background-color: #ddd;
    353 }
    354 
    355 #dashmenu a.current {
    356     background-color: #14568a;
    357     color: #cfebf6;
    358361}
    359362
     
    463466#rightnow a {
    464467    color: #448abd;
    465 }
    466 
    467 #sidemenu a {
    468     background-color: #14568a;
    469     border-bottom-color: #07273e;
    470     border-top-color: #14568a;
    471     color: #cfebf6;
    472468}
    473469
     
    544540}
    545541
    546 #wphead h1, #dashmenu a.current:hover {
     542#wphead h1 {
    547543    color: #cfebf6;
    548544}
  • branches/crazyhorse/wp-admin/css/colors-fresh.css

    r8066 r8115  
     1#wpcontent {
     2    background-color: #e4f2fd;
     3}
     4#wpbody-content {
     5    background-color: #fff;
     6}
    17a.page-numbers:hover {
    28    border-color: #999;
     
    133139}
    134140
    135 #user_info, .howto, .nonessential, #dashmenu a, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
     141#user_info, .howto, .nonessential, #dashmenu a, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
    136142    color: #999;
    137143}
     
    197203}
    198204
    199 .submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #adminmenu a:hover, #sidemenu a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.delete:hover, #media-upload a.del-link:hover, .ui-tabs-nav a:hover {
     205.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #adminmenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.delete:hover, #media-upload a.del-link:hover, .ui-tabs-nav a:hover {
    200206    color: #d54e21;
    201207}
     
    280286}
    281287
    282 #adminmenu a, #submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, a {
     288#adminmenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, a {
    283289    color: #2583ad;
    284290}
    285291
    286292/* Because we don't want visited on these links */
    287 #adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
     293#adminmenu li.current a, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
    288294    background-color: #fff;
    289295    border-color: #c6d9e9;
     
    292298}
    293299
     300#adminmenu li.current {
     301    background-color: #fff;
     302    border-right-color: #fff;
     303}
     304
    294305#adminmenu li a #awaiting-mod {
    295306    background-image: url(../images/comment-stalk-fresh.gif);
     
    305316}
    306317
    307 #adminmenu, div#media-upload-header {
     318div#media-upload-header {
    308319    background-color: #e4f2fd;
    309320    border-bottom-color: #c6d9e9;
     
    324335input.readonly {
    325336    background-color: #ddd;
    326 }
    327 
    328 #dashmenu a.current {
    329     background-color: #e4f2fd;
    330     color: #555;
    331337}
    332338
     
    432438#rightnow a {
    433439    color: #448abd;
    434 }
    435 
    436 #sidemenu a {
    437     background-color: #e4f2fd;
    438     border-bottom-color: #c6d9e9;
    439     border-top-color: #e4f2fd;
    440440}
    441441
     
    512512}
    513513
    514 #wphead h1, #dashmenu a.current:hover, #login form input {
     514#wphead h1, #login form input {
    515515    color: #555;
    516516}
  • branches/crazyhorse/wp-admin/css/global.css

    r7907 r8115  
     1/* 2 column liquid layout */
     2div#wpbody {
     3    float: right;
     4    clear: right;
     5    width: 100%;
     6    margin-left: -210px;
     7}
     8
     9div#wpbody-content {
     10    margin-left: 200px;
     11    border-width: 1px 0 0 1px;
     12    border-style: solid;
     13}
     14
     15ul#adminmenu {
     16    float: left;
     17    clear: left;
     18    width: 190px; /* + 10 padding */
     19    position: relative;
     20}
     21
    122/* styles for use by people extending the WordPress interface */
    2 
    323
    424body    {
  • branches/crazyhorse/wp-admin/menu-header.php

    r8049 r8115  
    77get_admin_page_parent();
    88
    9 // We're going to do this loop three times
    10 ?>
     9function _wp_menu_output( &$menu, &$submenu, $submenu_as_parent = true ) {
     10    global $self, $parent_file, $submenu_file;
    1111
    12 <ul id="dashmenu">
    13 <?php
    14 foreach ( $menu as $key => $item ) {
    15     if ( 3 < $key ) // get each menu item before 3
    16         continue;
    17     $class = '';
    18     // 0 = name, 1 = capability, 2 = file
    19     if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
     12    foreach ( $menu as $key => $item ) {
     13        $class = array();
     14        // 0 = name, 1 = capability, 2 = file
     15        if ( !empty($submenu[$item[2]]) )
     16            $class[] = 'wp-has-submenu';
     17        if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file) ) || ( $parent_file && $item[2] == $parent_file ) ) {
     18            if ( !empty($submenu[$item[2]]) )
     19                $class[] = 'wp-has-current-submenu';
     20            else
     21                $class[] = 'current';
     22        }
     23        $class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
    2024
    21     if ( !empty($submenu[$item[2]]) ) {
    22         $submenu[$item[2]] = array_values($submenu[$item[2]]);  // Re-index.
    23         $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
    24         if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
    25             echo "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
    26         else
    27             echo "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
    28     } else if ( current_user_can($item[1]) ) {
    29         $menu_hook = get_plugin_page_hook($item[2], 'admin.php');
    30         if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
    31             echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
    32         else
    33             echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
    34     }
    35 }
    36 do_action( 'dashmenu' );
    37 ?>
    38 </ul>
     25        echo "\n\t<li$class>";
    3926
    40 <ul id="adminmenu">
    41 <?php
    42 foreach ( $menu as $key => $item ) {
    43     if ( 5 > $key || $key > 25 ) // get each menu item before 3
    44         continue;
     27        if ( $submenu_as_parent && !empty($submenu[$item[2]]) ) {
     28            $submenu[$item[2]] = array_values($submenu[$item[2]]);  // Re-index.
     29            $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
     30            if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
     31                echo "<a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
     32            else
     33                echo "\n\t<a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
     34        } else if ( current_user_can($item[1]) ) {
     35            $menu_hook = get_plugin_page_hook($item[2], 'admin.php');
     36            if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
     37                echo "\n\t<a href='admin.php?page={$item[2]}'$class>{$item[0]}</a>";
     38            else
     39                echo "\n\t<a href='{$item[2]}'$class>{$item[0]}</a>";
     40        }
    4541
    46     $class = '';
     42        if ( !empty($submenu[$item[2]]) ) {
     43            echo "\n\t<ul class='wp-submenu'>";
     44            foreach ( $submenu[$item[2]] as $sub_key => $sub_item ) {
     45                if ( !current_user_can($sub_item[1]) )
     46                    continue;
    4747
    48     // 0 = name, 1 = capability, 2 = file
    49     if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
     48                if ( isset($submenu_file) ) {
     49                    if ( $submenu_file == $sub_item[2] )
     50                        $class = ' class="current"';
     51                    else
     52                        $class = '';
     53                } else if ( (isset($plugin_page) && $plugin_page == $sub_item[2]) || (!isset($plugin_page) && $self == $sub_item[2]) ) {
     54                    $class = ' class="current"';
     55                } else {
     56                    $class = '';
     57                }
    5058
    51     if ( !empty($submenu[$item[2]]) ) {
    52         $submenu[$item[2]] = array_values($submenu[$item[2]]);  // Re-index.
    53         $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
    54         if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
    55             echo "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
    56         else
    57             echo "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
    58     } else if ( current_user_can($item[1]) ) {
    59         $menu_hook = get_plugin_page_hook($item[2], 'admin.php');
    60         if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
    61             echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
    62         else
    63             echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
     59                $menu_hook = get_plugin_page_hook($sub_item[2], $parent_file);
     60
     61                if ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") || ! empty($menu_hook) ) {
     62                    if ( 'admin.php' == $pagenow )
     63                        echo "\n\t\t<li$class><a href='admin.php?page={$sub_item[2]}'$class>{$sub_item[0]}</a></li>";
     64                    else
     65                        echo "\n\t\t<li$class><a href='{$parent_file}?page={$sub_item[2]}'$class>{$sub_item[0]}</a></li>";
     66                } else {
     67                    echo "\n\t\t<li$class><a href='{$sub_item[2]}'$class>{$sub_item[0]}</a></li>";
     68                }
     69            }
     70            echo "\n\t</ul>";
     71        }
     72        echo "</li>";
    6473    }
    6574}
    6675
    67 foreach ( $menu as $key => $item ) {
    68     if ( $key < 41 ) // there is a more efficient way to do this!
    69         continue;
     76?>
    7077
    71     $class = '';
     78<ul id="dashmenu" class="wp-menu">
    7279
    73     // 0 = name, 1 = capability, 2 = file
    74     if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
     80<?php
    7581
    76     if ( !empty($submenu[$item[2]]) ) {
    77         $submenu[$item[2]] = array_values($submenu[$item[2]]);  // Re-index.
    78         $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
    79         if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
    80             echo "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
    81         else
    82             echo "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
    83     } else if ( current_user_can($item[1]) ) {
    84         $menu_hook = get_plugin_page_hook($item[2], 'admin.php');
    85         if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
    86             echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
    87         else
    88             echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
    89     }
    90 }
     82_wp_menu_output( $top_menu, $top_submenu, false );
     83do_action( 'dashmenu' );
    9184
    92 do_action( 'adminmenu' );
    9385?>
     86
     87
    9488</ul>
    9589
    96 <ul id="sidemenu">
     90<ul id="adminmenu" class="wp-menu">
     91
    9792<?php
    98 $side_items = array();
    99 foreach ( $menu as $key => $item ) {
    100     if ( 26 > $key || $key > 40 )
    101         continue;
    10293
    103     $class = '';
     94_wp_menu_output( $menu, $submenu );
     95do_action( 'adminmenu' );
    10496
    105     // 0 = name, 1 = capability, 2 = file
    106     if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
     97?>
    10798
    108     if ( !empty($submenu[$item[2]]) ) {
    109         $submenu[$item[2]] = array_values($submenu[$item[2]]);  // Re-index.
    110         $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
    111         if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
    112             $side_items[] = "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
    113         else
    114             $side_items[] = "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
    115     } else if ( current_user_can($item[1]) ) {
    116         $menu_hook = get_plugin_page_hook($item[2], 'admin.php');
    117         if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
    118             $side_items[] = "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a>";
    119         else
    120             $side_items[] = "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a>";
    121     }
    122 }
    123 echo implode(' </li>', $side_items) . '</li>';
    124 unset($side_items);
    125 do_action( 'sidemenu' );
    126 ?>
     99
    127100</ul>
    128101
    129 
    130102<?php
    131 // Sub-menu
    132 if ( isset($submenu["$parent_file"]) ) :
    133 ?>
    134 <ul id="submenu">
    135 <?php
    136 foreach ($submenu["$parent_file"] as $item) :
    137      if ( !current_user_can($item[1]) )
    138          continue;
    139 
    140 if ( isset($submenu_file) ) {
    141     if ( $submenu_file == $item[2] ) $class = ' class="current"';
    142     else $class = '';
    143 } else if ( (isset($plugin_page) && $plugin_page == $item[2]) || (!isset($plugin_page) && $self == $item[2]) ) $class = ' class="current"';
    144 else $class = '';
    145 
    146 $menu_hook = get_plugin_page_hook($item[2], $parent_file);
    147 
    148 if (file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || ! empty($menu_hook)) {
    149     if ( 'admin.php' == $pagenow )
    150         echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
    151     else
    152         echo "\n\t<li><a href='{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
    153  } else {
    154     echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
    155  }
    156 endforeach;
    157 ?>
    158 
    159 </ul>
    160 <?php
    161 else :
    162 ?>
    163 <div id="minisub"></div>
    164 <?php
    165 
    166 endif;
    167103
    168104do_action('admin_notices');
  • branches/crazyhorse/wp-admin/menu.php

    r7857 r8115  
    55// The minimum level the user needs to access the item: between 0 and 10
    66// The URL of the item's file
     7
     8$awaiting_mod = wp_count_comments();
     9$awaiting_mod = $awaiting_mod->moderated;
     10
     11$top_menu = array();
     12$top_menu[5] = array( __('My Account'), 'read', 'profile.php' );
     13$top_menu[10] = array( __('My Dashboard'), 'read', 'index.php' );
     14$top_menu[15] = array( __('New Post'), 'edit_posts', 'post-new.php' );
     15$top_menu[20] = array( sprintf( __('Comments (%s)'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php' );
     16$top_menu[25] = array( __('Help'), 'read', 'index.php?help' ); // place holder
     17
     18$top_submenu = array();
     19$top_submenu['profile.php'][5] = array( __('Something'), 'read', 'profile.php?something' ); // place holder
     20
    721$menu[0] = array(__('Dashboard'), 'read', 'index.php');
    822
     
    2135    $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
    2236
    23 $awaiting_mod = wp_count_comments();
    24 $awaiting_mod = $awaiting_mod->moderated;
    2537$menu[15] = array(__('Design'), 'switch_themes', 'themes.php');
    2638$menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php');
     
    8294$_wp_menu_nopriv = array();
    8395// Loop over submenus and remove pages for which the user does not have privs.
    84 foreach ($submenu as $parent => $sub) {
    85     foreach ($sub as $index => $data) {
    86         if ( ! current_user_can($data[1]) ) {
    87             unset($submenu[$parent][$index]);
    88             $_wp_submenu_nopriv[$parent][$data[2]] = true;
     96foreach ( array( 'top_submenu', 'submenu' ) as $sub_loop ) {
     97    foreach ($$sub_loop as $parent => $sub) {
     98        foreach ($sub as $index => $data) {
     99            if ( ! current_user_can($data[1]) ) {
     100                unset(${$sub_loop}[$parent][$index]);
     101                $_wp_submenu_nopriv[$parent][$data[2]] = true;
     102            }
    89103        }
     104
     105        if ( empty(${$sub_loop}[$parent]) )
     106            unset(${$sub_loop}[$parent]);
    90107    }
    91 
    92     if ( empty($submenu[$parent]) )
    93         unset($submenu[$parent]);
    94108}
    95109
  • branches/crazyhorse/wp-admin/wp-admin.css

    r8103 r8115  
    587587    position: absolute;
    588588    right: 15px;
    589     top: 11px;
     589    top: 0;
    590590    font-size: 11px;
     591    line-height: 31px;
     592    height: 31px;
    591593}
    592594
     
    594596    margin: 0;
    595597    padding: 0;
     598    line-height: 31px;
    596599}
    597600
    598601#wphead {
    599     border-top-width: 30px;
    600     border-top-style: solid;
    601 }
    602 
    603 #wphead a, #dashmenu a, #adminmenu a, #submenu a, #sidemenu a, #taglist a, #catlist a {
     602    border-width: 31px 0 0;
     603    border-style: solid;
     604}
     605
     606#wphead a, #dashmenu a, #adminmenu a, #taglist a, #catlist a {
    604607    text-decoration: none;
    605608}
     
    632635/* menu stuff */
    633636
     637#dashmenu .wp-submenu, #adminmenu .wp-submenu {
     638    display: none;
     639    list-style: none;
     640    margin: 0;
     641    padding: 0;
     642}
     643
    634644#dashmenu {
    635     margin: 0;
     645    margin: 0 0 0 10px;
     646    background: url(images/logo-ghost.png) no-repeat top left;
    636647    list-style: none;
    637648    position: absolute;
    638     top: 7px;
     649    top: 0;
    639650    left: 0;
     651    height: 31px;
    640652    font-size: 11px;
    641     padding-left: 9px;
     653    padding: 0 0 0 30px;
     654}
     655
     656#dashmenu li {
     657    display: inline;
     658    list-style: none;
     659    text-align: center;
     660    white-space: nowrap;
     661    margin: 0;
     662    padding: 0;
    642663}
    643664
    644665#dashmenu a {
    645666    padding: 5px 6px;
    646     line-height: 220%;
     667    line-height: 31px;
    647668    margin-right: 8px;
    648669}
    649670
    650 #dashmenu a.current {
    651     border: none;
    652     -moz-border-radius-topleft: 3px;
    653     -khtml-border-top-left-radius: 3px;
    654     -webkit-border-top-left-radius: 3px;
    655     border-top-left-radius: 3px;
    656     -moz-border-radius-topright: 3px;
    657     -khtml-border-top-right-radius: 3px;
    658     -webkit-border-top-right-radius: 3px;
    659     border-top-right-radius: 3px;
    660 }
    661 
    662671#adminmenu {
    663672    margin: 0;
     673    padding: 10px 0 10px 10px;
    664674    list-style: none;
    665     padding-left: 11px;
    666     border-bottom-width: 1px;
    667     border-bottom-style: solid;
     675}
     676
     677#adminmenu li.current {
     678    border-width: 1px;
     679    border-style: solid;
     680    margin-right: -1px;
     681}
     682
     683#adminmenu li .wp-submenu li {
     684    padding: 0 0 0 30px;
     685}
     686
     687#adminmenu li.wp-has-current-submenu .wp-submenu {
     688    display: block;
    668689}
    669690
     
    674695}
    675696
    676 #adminmenu a.current, #sidemenu a.current {
    677     font-weight: normal;
    678     padding-left: 6px;
    679     padding-right: 6px;
    680     -moz-border-radius-topleft: 4px;
    681     -khtml-border-top-left-radius: 4px;
    682     -webkit-border-top-left-radius: 4px;
    683     border-top-left-radius: 4px;
    684     -moz-border-radius-topright: 4px;
    685     -khtml-border-top-right-radius: 4px;
    686     -webkit-border-top-right-radius: 4px;
    687     border-top-right-radius: 4px;
    688     border-width: 1px;
    689     border-style: solid;
    690 }
    691 
    692 #adminmenu a.current {
    693     border-bottom-width: 2px;
    694 }
    695 
    696 #sidemenu {
    697     margin: -30px 15px 0 315px;
    698     list-style: none;
    699     position: relative;
    700     float: right;
    701     padding-left: 10px;
    702     font-size:12px;
    703 }
    704 
    705 #sidemenu a {
    706     padding: 0 7px;
    707     display: block;
    708     float: left;
    709     line-height: 28px;
    710     border-top-width: 1px;
    711     border-top-style: solid;
    712     border-bottom-width: 1px;
    713     border-bottom-style: solid;
    714 }
    715 
    716 #dashmenu li, #adminmenu li, #submenu li, #sidemenu li {
    717     display: inline;
    718     line-height: 200%;
    719     list-style: none;
    720     text-align: center;
    721     white-space: nowrap;
    722     margin: 0;
    723     padding: 0;
    724 }
    725 
    726 #submenu li {
    727     padding: 0 0 8px 17px;
    728 }
    729 
    730697#adminmenu li a #awaiting-mod {
    731698    position: absolute;
    732     margin-left: -0.4em;
    733699    margin-top: 0.2em;
    734700    font-size: 0.7em;
     
    797763}
    798764
    799 #submenu {
    800     margin: 0;
    801     list-style: none;
    802     padding: 6px 0 3px 0;
    803 }
    804 
    805 #submenu li {
    806     font-size: 14px;
    807 }
    808 
    809 #minisub { /* for empty submenus */
    810     height: 15px;
    811 }
    812 
    813765/* end menu stuff */
    814766
     
    821773    position: relative;
    822774    min-height: 100%;
    823 }
    824 #wpcontent{
    825     padding-bottom: 95px;
    826775}
    827776#footer {
Note: See TracChangeset for help on using the changeset viewer.