Plugin Directory

Changeset 406178


Ignore:
Timestamp:
07/07/2011 01:57:55 PM (15 years ago)
Author:
dilbert4life
Message:

Tagging 3.2 - it's fun

Location:
wordpress-admin-bar-improved
Files:
1 added
2 edited
5 copied

Legend:

Unmodified
Added
Removed
  • wordpress-admin-bar-improved/tags/3.2/readme.txt

    r400475 r406178  
    33Tags: admin bar, top, login form, 3.1+, ajax, search
    44Requires at least: 3.1
    5 Tested up to: 3.2 RC1
    6 Stable tag: 3.1.7
     5Tested up to: 3.2
     6Stable tag: 3.2
    77
    88A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1.
     
    1010== Description ==
    1111
    12 This plugin has been completely re-written to interface with the WP3.1 admin bar, instead of what it used to be, which was an enhancement of the now defunct [WordPress Admin Bar](http://wordpress.org/extend/plugins/wordpress-admin-bar/).
     12This plugin has been completely re-written to interface with the WP3.1 admin bar, and adds some much requested / great features to the WP Admin Bar.
    1313
    1414Check the post on this plugin over at our site, [Electric Easel](http://www.electriceasel.com/plugins/wordpress-admin-bar-improved), for instructions, updates, and other news.
    1515
    16 **Features**
     16Features:
     17
     18* Easy Interface using WP3.0 Menus to add custom menu items to your Admin Bar.
    1719* Displays a Login form on the front end of your site in the WP Admin Bar.
    1820* Ajax Search Popup in from Admin Bar Search Form
     
    2022* More to come...
    2123
     24ToDo:
    2225
     26* Manage default menu items.
     27* Make everything work with MultiSite
    2328
    2429== Installation ==
     
    3641        - wordpress-admin-bar-improved
    3742            | readme.txt
     43            | screenshot-1.png
    3844            | wpabi.css
    3945            | wpabi.js
     
    4349
    4450== Frequently Asked Questions ==
     51
     52= How to add menu items =
     53
     54In the admin area of your site, click "Menus" under the "Appearance" menu. Create a new menu named `WPABI` or something like that. Add whatever menu items you want to it, and save the menu. In the box titled "Theme Locations", select the menu you created in the `Admin Bar Improved` dropdown select list, and hit save. After that, your menu items will appear in your admin bar!
    4555
    4656= It's not working! =
     
    5363
    5464== ChangeLog ==
     65
     66= 3.2 =
     67* Added easy integration for custom menu items using WP3.0 menu system.
    5568
    5669= 3.1.7 =
  • wordpress-admin-bar-improved/tags/3.2/wpabi.php

    r401858 r406178  
    66Plugin URI:   http://www.electriceasel.com/wpabi
    77Description:  A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1
    8 Version:      3.1.7
     8Version:      3.2
    99Author:       dilbert4life, electriceasel
    1010Author URI:   http://www.electriceasel.com/team-member/don-gilbert
     
    3030
    3131class WPAdminBarImproved {
    32     private $version = '3.1.7';
     32    private $version = '3.2';
    3333    private $css_file;
    3434    private $js_file;
     
    4040    private $reg_link;
    4141    private $toggleme;
     42    private $custom_menu;
    4243    private $options;
    4344   
     
    5859        $this->reg_link = ($this->options['reg_link'] === 'no') ? false : true;
    5960        $this->toggleme = ($this->options['hide_admin_bar'] === 'no') ? false : true;
     61        $this->custom_menu = ($this->options['custom_menu'] === 'no') ? false : true;
    6062
    6163        /* todo - somehow make this work to see if javascript needs loaded
     
    8284        wp_enqueue_style('wpabi_css', plugins_url('wpabi.css', __FILE__), '', '2.0', 'all');
    8385       
     86        if($this->custom_menu)
     87        {
     88            $this->add_custom_menu();
     89        }
     90       
    8491        $this->admin_page();
    8592    }
     
    8895    {
    8996        register_setting( 'wpabi_options', 'wpabi_options', array( &$this, 'wpabi_options_validate') );
     97    }
     98   
     99    public function add_custom_menu()
     100    {
     101        if(!current_theme_supports('menus'))
     102        {
     103            add_theme_support('menus');
     104        }
     105        register_nav_menu('wpabi_menu', 'Admin Bar Improved');
     106        add_action('admin_bar_menu',  array( &$this, 'build_menu'), 9999);
     107    }
     108   
     109    public function build_menu($wp_admin_bar)
     110    {
     111        $locations = get_nav_menu_locations();
     112        $menu = wp_get_nav_menu_object($locations['wpabi_menu']);
     113        $menu_items = wp_get_nav_menu_items($menu->term_id);
     114       
     115        foreach($menu_items as $menu_item) {
     116            $args = array(
     117                          'id' => 'wpabi_'.$menu_item->ID,
     118                          'title' => $menu_item->title,
     119                          'href' => $menu_item->url
     120                        );
     121           
     122            if(!empty($menu_item->menu_item_parent))
     123            {
     124                $args['parent'] = 'wpabi_'.$menu_item->menu_item_parent;
     125            }
     126           
     127            $wp_admin_bar->add_menu($args);
     128        }
    90129    }
    91130   
     
    264303                    <input type="radio" name="wpabi_options[reg_link]" value="yes" <?php checked($this->options['reg_link'], 'yes') ?>/><span>Enabled</span>
    265304                    <input type="radio" name="wpabi_options[reg_link]" value="no" <?php checked($this->options['reg_link'], 'no') ?>/><span>Disabled</span>
     305                </li>
     306                <li>
     307                    <label>Enabled Custom Admin Bar Menu?</label>
     308                    <input type="radio" name="wpabi_options[custom_menu]" value="yes" <?php checked($this->options['custom_menu'], 'yes') ?>/><span>Enabled</span>
     309                    <input type="radio" name="wpabi_options[custom_menu]" value="no" <?php checked($this->options['custom_menu'], 'no') ?>/><span>Disabled</span>
    266310                </li>
    267311                <li>
  • wordpress-admin-bar-improved/trunk/readme.txt

    r400475 r406178  
    33Tags: admin bar, top, login form, 3.1+, ajax, search
    44Requires at least: 3.1
    5 Tested up to: 3.2 RC1
    6 Stable tag: 3.1.7
     5Tested up to: 3.2
     6Stable tag: 3.2
    77
    88A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1.
     
    1010== Description ==
    1111
    12 This plugin has been completely re-written to interface with the WP3.1 admin bar, instead of what it used to be, which was an enhancement of the now defunct [WordPress Admin Bar](http://wordpress.org/extend/plugins/wordpress-admin-bar/).
     12This plugin has been completely re-written to interface with the WP3.1 admin bar, and adds some much requested / great features to the WP Admin Bar.
    1313
    1414Check the post on this plugin over at our site, [Electric Easel](http://www.electriceasel.com/plugins/wordpress-admin-bar-improved), for instructions, updates, and other news.
    1515
    16 **Features**
     16Features:
     17
     18* Easy Interface using WP3.0 Menus to add custom menu items to your Admin Bar.
    1719* Displays a Login form on the front end of your site in the WP Admin Bar.
    1820* Ajax Search Popup in from Admin Bar Search Form
     
    2022* More to come...
    2123
     24ToDo:
    2225
     26* Manage default menu items.
     27* Make everything work with MultiSite
    2328
    2429== Installation ==
     
    3641        - wordpress-admin-bar-improved
    3742            | readme.txt
     43            | screenshot-1.png
    3844            | wpabi.css
    3945            | wpabi.js
     
    4349
    4450== Frequently Asked Questions ==
     51
     52= How to add menu items =
     53
     54In the admin area of your site, click "Menus" under the "Appearance" menu. Create a new menu named `WPABI` or something like that. Add whatever menu items you want to it, and save the menu. In the box titled "Theme Locations", select the menu you created in the `Admin Bar Improved` dropdown select list, and hit save. After that, your menu items will appear in your admin bar!
    4555
    4656= It's not working! =
     
    5363
    5464== ChangeLog ==
     65
     66= 3.2 =
     67* Added easy integration for custom menu items using WP3.0 menu system.
    5568
    5669= 3.1.7 =
  • wordpress-admin-bar-improved/trunk/wpabi.php

    r401858 r406178  
    66Plugin URI:   http://www.electriceasel.com/wpabi
    77Description:  A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1
    8 Version:      3.1.7
     8Version:      3.2
    99Author:       dilbert4life, electriceasel
    1010Author URI:   http://www.electriceasel.com/team-member/don-gilbert
     
    3030
    3131class WPAdminBarImproved {
    32     private $version = '3.1.7';
     32    private $version = '3.2';
    3333    private $css_file;
    3434    private $js_file;
     
    4040    private $reg_link;
    4141    private $toggleme;
     42    private $custom_menu;
    4243    private $options;
    4344   
     
    5859        $this->reg_link = ($this->options['reg_link'] === 'no') ? false : true;
    5960        $this->toggleme = ($this->options['hide_admin_bar'] === 'no') ? false : true;
     61        $this->custom_menu = ($this->options['custom_menu'] === 'no') ? false : true;
    6062
    6163        /* todo - somehow make this work to see if javascript needs loaded
     
    8284        wp_enqueue_style('wpabi_css', plugins_url('wpabi.css', __FILE__), '', '2.0', 'all');
    8385       
     86        if($this->custom_menu)
     87        {
     88            $this->add_custom_menu();
     89        }
     90       
    8491        $this->admin_page();
    8592    }
     
    8895    {
    8996        register_setting( 'wpabi_options', 'wpabi_options', array( &$this, 'wpabi_options_validate') );
     97    }
     98   
     99    public function add_custom_menu()
     100    {
     101        if(!current_theme_supports('menus'))
     102        {
     103            add_theme_support('menus');
     104        }
     105        register_nav_menu('wpabi_menu', 'Admin Bar Improved');
     106        add_action('admin_bar_menu',  array( &$this, 'build_menu'), 9999);
     107    }
     108   
     109    public function build_menu($wp_admin_bar)
     110    {
     111        $locations = get_nav_menu_locations();
     112        $menu = wp_get_nav_menu_object($locations['wpabi_menu']);
     113        $menu_items = wp_get_nav_menu_items($menu->term_id);
     114       
     115        foreach($menu_items as $menu_item) {
     116            $args = array(
     117                          'id' => 'wpabi_'.$menu_item->ID,
     118                          'title' => $menu_item->title,
     119                          'href' => $menu_item->url
     120                        );
     121           
     122            if(!empty($menu_item->menu_item_parent))
     123            {
     124                $args['parent'] = 'wpabi_'.$menu_item->menu_item_parent;
     125            }
     126           
     127            $wp_admin_bar->add_menu($args);
     128        }
    90129    }
    91130   
     
    264303                    <input type="radio" name="wpabi_options[reg_link]" value="yes" <?php checked($this->options['reg_link'], 'yes') ?>/><span>Enabled</span>
    265304                    <input type="radio" name="wpabi_options[reg_link]" value="no" <?php checked($this->options['reg_link'], 'no') ?>/><span>Disabled</span>
     305                </li>
     306                <li>
     307                    <label>Enabled Custom Admin Bar Menu?</label>
     308                    <input type="radio" name="wpabi_options[custom_menu]" value="yes" <?php checked($this->options['custom_menu'], 'yes') ?>/><span>Enabled</span>
     309                    <input type="radio" name="wpabi_options[custom_menu]" value="no" <?php checked($this->options['custom_menu'], 'no') ?>/><span>Disabled</span>
    266310                </li>
    267311                <li>
Note: See TracChangeset for help on using the changeset viewer.