WordPress.org

Plugin Directory

Changeset 402902


Ignore:
Timestamp:
06/30/11 18:10:16 (3 years ago)
Author:
ozh
Message:

3.6
Fixed: Compatibility with WP 3.2
Fixed: useless double slash in image URLs in .css.php

Location:
ozh-admin-drop-down-menu/trunk
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • ozh-admin-drop-down-menu/trunk/inc/adminmenu.css.php

    r353954 r402902  
    1818} 
    1919 
     20function wp_ozh_adminmenu_true_if_set( $param ) { 
     21    return ( ( isset( $_GET[ $param ] ) && $_GET[ $param ] == 1 ) ? true : false ); 
     22} 
     23 
    2024// Get vars & needed links, make them relative to be sure no one will be leeching icons or anything from somewhere else 
    21 $plugin      = make_link_relative( $_GET['p'] ); 
    22 $admin       = make_link_relative( $_GET['a'] ); 
    23 $icons       = ($_GET['i'] == 1) ? true : false ; 
    24 $wpicons     = ($_GET['w'] == 1) ? true : false ; 
    25 $compact     = ($_GET['c'] == 1) ? true : false ; 
    26 $minimode    = ($_GET['m'] == 1) ? true : false ; 
    27 $hidebubble  = ($_GET['h'] == 1) ? true : false ; 
    28 $display_fav = ($_GET['f'] == 1) ? true : false ; 
    29 $nograd      = ($_GET['n'] == 1) ? true : false ; 
    30 $dir         = ($_GET['d'] == 'right') ? 'right' : 'left' ; // text direction 
    31 $opdir       = ($_GET['d'] == 'right') ? 'left' : 'right' ; // OPposite DIRection 
    32 $grad        = ($_GET['g']) ? wp_ozh_adminmenu_color($_GET['g']) : '#676768' ; 
     25$plugin      = isset( $_GET['p'] ) ? make_link_relative( $_GET['p'] ) : ''; 
     26$admin       = isset( $_GET['a'] ) ? make_link_relative( $_GET['a'] ) : ''; 
     27$icons       = wp_ozh_adminmenu_true_if_set( 'i' ); 
     28$wpicons     = wp_ozh_adminmenu_true_if_set( 'w' ); 
     29$compact     = wp_ozh_adminmenu_true_if_set( 'c' ); 
     30$minimode    = wp_ozh_adminmenu_true_if_set( 'm' ); 
     31$hidebubble  = wp_ozh_adminmenu_true_if_set( 'h' ); 
     32$display_fav = wp_ozh_adminmenu_true_if_set( 'f' ); 
     33$nograd      = wp_ozh_adminmenu_true_if_set( 'n' ); 
     34$dir         = ( isset( $_GET['d'] ) && $_GET['d'] == 'right' ) ? 'right' : 'left' ; // text direction 
     35$opdir       = ( isset( $_GET['r'] ) && $_GET['r'] == 'right' ) ? 'left' : 'right' ; // OPposite DIRection 
     36$grad        = ( isset( $_GET['g'] ) ) ? wp_ozh_adminmenu_color($_GET['g']) : '#676768' ; 
    3337 
    3438header('Content-type:text/css'); 
    3539 
    3640?> 
    37  
    38 /* 
    39 <?php var_dump( $admin ); ?> 
    40 */ 
    4141 
    4242/* Style for Ozh's Admin Drop Down Menu */ 
     
    5252#screen-meta { 
    5353    display:none; /* hidden in case we have no JS to move it */ 
     54} 
     55/* added for WP 3.2 */ 
     56#adminmenuback, #adminmenuwrap, #adminmenu, 
     57.folded #adminmenu .wp-submenu.sub-open, .folded #adminmenu .wp-submenu-wrap, 
     58.folded #adminmenuback, .folded #adminmenuwrap, .folded #adminmenu, .folded #adminmenu li.menu-top, 
     59.js.folded #adminmenuback, .js.folded #adminmenuwrap, .js.folded #adminmenu, .js.folded #adminmenu li.menu-top { 
     60    width: 0; 
     61} 
     62#wpcontent, #footer, .folded #wpcontent, .folded #footer, .js.folded #wpcontent, .js.folded #footer { 
     63    margin-left: 0px; 
     64    margin-right:0px; 
     65} 
     66#wphead { 
     67    background:#D1E5EE; 
     68    margin-right:0px; 
     69    margin-left:0px; 
     70    padding-right:15px; 
     71    padding-left:18px; 
     72} 
     73#footer-left, #footer-ozh-oam { 
     74    padding-left:15px; 
     75} 
     76#footer-upgrade { 
     77    padding-right:15px; 
    5478} 
    5579/* Styles for our new menu */ 
     
    7397    overflow:hidden; 
    7498    z-index:1000; 
    75     background:<?php echo $grad; ?> <?php if (!$nograd) { ?>url(<?php echo $plugin; ?>/images/grad-trans.png) repeat-x <?php echo $dir; ?> top<?php } ?>; 
     99    background:<?php echo $grad; ?> <?php if (!$nograd) { ?>url(<?php echo $plugin; ?>images/grad-trans.png) repeat-x <?php echo $dir; ?> top<?php } ?>; 
    76100} 
    77101#ozhmenu li { /* all list items */ 
     
    101125    -webkit-border-radius: 11px; 
    102126    color: #ffe; 
    103     background: <?php echo $grad; ?> <?php if (!$nograd) { ?>url(<?php echo $plugin; ?>/images/grad-trans.png) repeat-x <?php echo $dir; ?> -5px<?php } ?>; 
     127    background: <?php echo $grad; ?> <?php if (!$nograd) { ?>url(<?php echo $plugin; ?>images/grad-trans.png) repeat-x <?php echo $dir; ?> -5px<?php } ?>; 
    104128} 
    105129 
     
    163187    margin-<?php echo $dir; ?>: 0.1em; 
    164188    font-size: 0.8em; 
    165     background-image: url(<?php echo $plugin; ?>/images/comment-stalk-<?php echo ($dir == 'left' ? 'fresh' : 'rtl'); ?>.gif); 
     189    background-image: url(<?php echo $plugin; ?>images/comment-stalk-<?php echo ($dir == 'left' ? 'fresh' : 'rtl'); ?>.gif); 
    166190    background-repeat: no-repeat; 
    167191    background-position: <?php echo ($dir == 'left' ? '-243' : '-67'); ?>px bottom; 
     
    226250#ozhmenu li.ozhmenu_toplevel ul li.toplevel_label span.pending-count {display:none;} 
    227251 
    228 #oam_menu-site div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -363px -35px no-repeat;} 
    229 #oam_menu-site:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -363px -3px no-repeat;} 
    230 #oam_menu-dashboard div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -61px -35px no-repeat;} 
    231 #oam_menu-dashboard:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -61px -3px no-repeat;} 
    232 #oam_menu-posts div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -272px -35px no-repeat;} 
    233 #oam_menu-posts:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -272px -3px no-repeat;} 
    234 #oam_menu-media div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -121px -35px no-repeat;} 
    235 #oam_menu-media:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -121px -3px no-repeat;} 
    236 #oam_menu-links div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -91px -35px no-repeat;} 
    237 #oam_menu-links:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -91px -3px no-repeat;} 
    238 #oam_menu-pages div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -151px -35px no-repeat;} 
    239 #oam_menu-pages:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -151px -3px no-repeat;} 
    240 #oam_menu-comments div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -31px -35px no-repeat;} 
    241 #oam_menu-comments:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -31px -3px no-repeat;} 
    242 #oam_menu-appearance div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -1px -35px no-repeat;} 
    243 #oam_menu-appearance:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -1px -3px no-repeat;} 
    244 #oam_menu-plugins div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -181px -35px no-repeat;} 
    245 #oam_menu-plugins:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -181px -3px no-repeat;} 
    246 #oam_menu-users div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -301px -35px no-repeat;} 
    247 #oam_menu-users:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -301px -3px no-repeat;} 
    248 #oam_menu-tools div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -35px no-repeat;} 
    249 #oam_menu-tools:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -3px no-repeat;} 
    250 #oam_menu-update div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -35px no-repeat;} 
    251 #oam_menu-update:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -3px no-repeat;} 
    252 #oam_menu-settings div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -241px -35px no-repeat;} 
    253 #oam_menu-settings:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -241px -3px no-repeat;} 
     252#oam_menu-site div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -363px -35px no-repeat;} 
     253#oam_menu-site:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -363px -3px no-repeat;} 
     254#oam_menu-dashboard div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -61px -35px no-repeat;} 
     255#oam_menu-dashboard:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -61px -3px no-repeat;} 
     256#oam_menu-posts div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -272px -35px no-repeat;} 
     257#oam_menu-posts:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -272px -3px no-repeat;} 
     258#oam_menu-media div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -121px -35px no-repeat;} 
     259#oam_menu-media:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -121px -3px no-repeat;} 
     260#oam_menu-links div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -91px -35px no-repeat;} 
     261#oam_menu-links:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -91px -3px no-repeat;} 
     262#oam_menu-pages div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -151px -35px no-repeat;} 
     263#oam_menu-pages:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -151px -3px no-repeat;} 
     264#oam_menu-comments div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -31px -35px no-repeat;} 
     265#oam_menu-comments:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -31px -3px no-repeat;} 
     266#oam_menu-appearance div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -1px -35px no-repeat;} 
     267#oam_menu-appearance:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -1px -3px no-repeat;} 
     268#oam_menu-plugins div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -181px -35px no-repeat;} 
     269#oam_menu-plugins:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -181px -3px no-repeat;} 
     270#oam_menu-users div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -301px -35px no-repeat;} 
     271#oam_menu-users:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -301px -3px no-repeat;} 
     272#oam_menu-tools div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -211px -35px no-repeat;} 
     273#oam_menu-tools:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -211px -3px no-repeat;} 
     274#oam_menu-update div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -211px -35px no-repeat;} 
     275#oam_menu-update:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -211px -3px no-repeat;} 
     276#oam_menu-settings div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -241px -35px no-repeat;} 
     277#oam_menu-settings:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>images/menu.png) -241px -3px no-repeat;} 
    254278#ozhmenu img.wp-menu-image {float:<?php echo $dir; ?>;opacity:0.6;padding:5px 1px 0;filter:alpha(opacity=60);} 
    255279#ozhmenu .ozhmenu_toplevel:hover img.wp-menu-image {opacity:1;filter:alpha(opacity=100);} 
     
    302326} 
    303327.oam_plugin a { 
    304     background-image:url(<?php echo $plugin; ?>/images/cog.png); 
    305 } 
    306 #ozhmumenu .ozhmenu_sublevel a {background-image:url(<?php echo $plugin; ?>/images/world_link.png);} 
     328    background-image:url(<?php echo $plugin; ?>images/cog.png); 
     329} 
     330#ozhmumenu .ozhmenu_sublevel a {background-image:url(<?php echo $plugin; ?>images/world_link.png);} 
    307331<?php 
    308332    foreach($wp_ozh_adminmenu['icon_names'] as $link=>$icon) { 
  • ozh-admin-drop-down-menu/trunk/inc/core.php

    r388696 r402902  
    255255    $query = array( 
    256256        'v' => OZH_MENU_VER, 
    257         'p' => wp_make_link_relative($plugin), 
    258         'a' => wp_make_link_relative( get_admin_url() ), 
     257        'p' => wp_make_link_relative( $plugin ), 
     258        'a' => wp_make_link_relative( trailingslashit( get_admin_url() ) ), 
    259259        'i' => $wp_ozh_adminmenu['icons'], 
    260260        'w' => $wp_ozh_adminmenu['wpicons'], 
     
    283283        'grad' => '#676768', 
    284284        'nograd' => 0, 
    285         'displayfav' => 1, 
    286285        'compact' => 0, 
    287286        'minimode' => 0, 
     
    386385function wp_ozh_adminmenu_footer() { 
    387386    echo <<<HTML 
    388 Thank you for using <a href="http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/">Admin Drop Down Menu</a>, a wonderful plugin by <a href="http://planetozh.com/blog/">Ozh</a><br/> 
     387<p id="footer-ozh-oam">Thank you for using <a href="http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/">Admin Drop Down Menu</a>, a wonderful plugin by <a href="http://planetozh.com/blog/">Ozh</a></p> 
    389388HTML; 
    390389} 
  • ozh-admin-drop-down-menu/trunk/inc/options.php

    r388696 r402902  
    117117    </td></tr> 
    118118 
    119     <tr id="oam_fav_row"><th scope="row"><?php echo wp_ozh_adminmenu__('Favorite Actions'); ?></th> 
    120     <td><label><?php wp_ozh_adminmenu_checkbox('displayfav'); ?>  <?php echo wp_ozh_adminmenu__('Display Favorite Actions'); ?></label><br/> 
    121     <?php echo wp_ozh_adminmenu__("Just in case you realize you don't need this anymore with such a fast and usable menu."); ?> 
    122     </td></tr> 
    123      
    124119    <tr><th scope="row"><?php echo wp_ozh_adminmenu__('Break Long Lists'); ?></th> 
    125120    <td><label><?php printf(wp_ozh_adminmenu__('Break if more than %s menu entries'), "<input type=\"text\" value=\"$too_many_plugins\" size=\"2\" name=\"oam_too_many_plugins\">"); ?></label><br/> 
  • ozh-admin-drop-down-menu/trunk/readme.txt

    r350234 r402902  
    22Donate link: http://planetozh.com/exit/donate 
    33Tags: ozh, menu, menus, dashboard, admin, dropdown, drop down, productivity, css 
    4 Requires at least: 3.1 
     4Requires at least: 3.2 
    55Tested up to: 9.9 
    66Stable tag: trunk 
  • ozh-admin-drop-down-menu/trunk/wp_ozh_adminmenu.php

    r388696 r402902  
    44Plugin URI: http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/ 
    55Description: All admin links available in a neat horizontal drop down menu. Saves lots of screen real estate! <strong>For WordPress 3.0+</strong> 
    6 Version: 3.5.4 
     6Version: 3.6 
    77Author: Ozh 
    88Author URI: http://ozh.org/ 
     
    109109 * 3.5.3:     Removed: a console.debug might be problematic 
    110110 * 3.5.4:     Fixed: deprecated function calls removed 
     111 * 3.6:       Fixed: Compatibility with WP 3.2 
     112              Fixed: useless double slash in image URLs in .css.php 
    111113 */ 
    112114 
    113115 
    114 define( 'OZH_MENU_VER', '3.5.4' ); 
     116define( 'OZH_MENU_VER', '3.6' ); 
    115117  
    116118/***** Hook things in when visiting an admin page. When viewing a blog page, nothing even loads in memory. ****/ 
     
    127129} 
    128130 
    129 // Make sure it's WP 3.1+ only 
     131// Make sure it's WP 3.2+ only 
    130132function wp_ozh_adminmenu_check(){ 
    131133    global $wp_version; 
    132     if ( version_compare($wp_version, '3.1', '<') ) { 
     134    if ( version_compare($wp_version, '3.2-beta1', '<') ) { 
    133135        deactivate_plugins( basename(__FILE__) ); 
    134         wp_die("Sorry, this plugin requires WordPress 3.1 at least"); 
     136        wp_die("Sorry, this plugin requires WordPress 3.2 at least"); 
    135137    } 
    136138} 
Note: See TracChangeset for help on using the changeset viewer.