Plugin Directory

Changeset 528558


Ignore:
Timestamp:
04/07/2012 01:54:42 PM (14 years ago)
Author:
CoenJacobs
Message:

Version bump to 1.2

Location:
stick-admin-bar-to-bottom
Files:
10 added
2 edited

Legend:

Unmodified
Added
Removed
  • stick-admin-bar-to-bottom/trunk/readme.txt

    r489596 r528558  
    55Requires at least: 3.1
    66Tested up to: 3.3
    7 Stable tag: 1.1
     7Stable tag: 1.2
    88
    99Annoyed by the new Admin Bar that is covering the top 28 pixels of your website, but you don't want it completely gone? This plugin sticks the Admin Bar to the bottom of your screen!
     
    2727== Changelog ==
    2828
     29= 1.2 =
     30* Moved CSS to external file. Added file for < WP 3.3 backwards compat.
     31
    2932= 1.1 =
    3033* Updated CSS for WordPress 3.3 compatibility
  • stick-admin-bar-to-bottom/trunk/stick-admin-bar-to-bottom.php

    r489596 r528558  
    44Description: Annoyed by the new Admin Bar that is covering the top 28 pixels of your website, but you don't want it completely gone? This plugin sticks the Admin Bar to the bottom of your screen!
    55Author: Coen Jacobs
    6 Version: 1.1
     6Version: 1.2
    77Author URI: http://coenjacobs.me
    88*/
    99
    1010function stick_admin_bar_to_bottom_css() {
    11     echo "
    12     <style type='text/css'>
    13     * html body {
    14         margin-top: 0 !important;
    15     }
    16    
    17     body.admin-bar {
    18         margin-top: -28px;
    19         padding-bottom: 28px;
     11    $version = get_bloginfo( 'version' );
     12
     13    if ( version_compare( $version, '3.3', '<' ) ) {
     14        $css_file = 'wordpress-3-1.css';
     15    } else {
     16        $css_file = 'wordpress-3-3.css';
    2017    }
    21    
    22     body.wp-admin #footer {
    23         padding-bottom: 28px;
    24     }
    25    
    26     #wpadminbar {
    27         top: auto !important;
    28         bottom: 0;
    29     }
    30 
    31     #wpadminbar .quicklinks .ab-sub-wrapper {
    32         bottom: 28px;
    33     }
    34 
    35     #wpadminbar .quicklinks .ab-sub-wrapper ul .ab-sub-wrapper {
    36         bottom: -7px;
    37     }
    38     </style>
    39     ";
     18    wp_enqueue_style( 'stick-admin-bar-to-bottom', plugins_url( 'css/' . $css_file, __FILE__ ) );
    4019}
    4120
    42 add_action('admin_head', 'stick_admin_bar_to_bottom_css');
    43 add_action('wp_footer', 'stick_admin_bar_to_bottom_css');
     21add_action( 'admin_init', 'stick_admin_bar_to_bottom_css' );
     22add_action( 'wp_enqueue_scripts', 'stick_admin_bar_to_bottom_css' );
    4423
    4524?>
Note: See TracChangeset for help on using the changeset viewer.