Changeset 406178
- Timestamp:
- 07/07/2011 01:57:55 PM (15 years ago)
- Location:
- wordpress-admin-bar-improved
- Files:
-
- 1 added
- 2 edited
- 5 copied
-
tags/3.2 (added)
-
tags/3.2/readme.txt (copied) (copied from wordpress-admin-bar-improved/trunk/readme.txt) (6 diffs)
-
tags/3.2/screenshot-1.png (copied) (copied from wordpress-admin-bar-improved/trunk/screenshot-1.png)
-
tags/3.2/wpabi.css (copied) (copied from wordpress-admin-bar-improved/trunk/wpabi.css)
-
tags/3.2/wpabi.js (copied) (copied from wordpress-admin-bar-improved/trunk/wpabi.js)
-
tags/3.2/wpabi.php (copied) (copied from wordpress-admin-bar-improved/trunk/wpabi.php) (7 diffs)
-
trunk/readme.txt (modified) (6 diffs)
-
trunk/wpabi.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-admin-bar-improved/tags/3.2/readme.txt
r400475 r406178 3 3 Tags: admin bar, top, login form, 3.1+, ajax, search 4 4 Requires at least: 3.1 5 Tested up to: 3.2 RC16 Stable tag: 3. 1.75 Tested up to: 3.2 6 Stable tag: 3.2 7 7 8 8 A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1. … … 10 10 == Description == 11 11 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/).12 This 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. 13 13 14 14 Check 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. 15 15 16 **Features** 16 Features: 17 18 * Easy Interface using WP3.0 Menus to add custom menu items to your Admin Bar. 17 19 * Displays a Login form on the front end of your site in the WP Admin Bar. 18 20 * Ajax Search Popup in from Admin Bar Search Form … … 20 22 * More to come... 21 23 24 ToDo: 22 25 26 * Manage default menu items. 27 * Make everything work with MultiSite 23 28 24 29 == Installation == … … 36 41 - wordpress-admin-bar-improved 37 42 | readme.txt 43 | screenshot-1.png 38 44 | wpabi.css 39 45 | wpabi.js … … 43 49 44 50 == Frequently Asked Questions == 51 52 = How to add menu items = 53 54 In 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! 45 55 46 56 = It's not working! = … … 53 63 54 64 == ChangeLog == 65 66 = 3.2 = 67 * Added easy integration for custom menu items using WP3.0 menu system. 55 68 56 69 = 3.1.7 = -
wordpress-admin-bar-improved/tags/3.2/wpabi.php
r401858 r406178 6 6 Plugin URI: http://www.electriceasel.com/wpabi 7 7 Description: A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1 8 Version: 3. 1.78 Version: 3.2 9 9 Author: dilbert4life, electriceasel 10 10 Author URI: http://www.electriceasel.com/team-member/don-gilbert … … 30 30 31 31 class WPAdminBarImproved { 32 private $version = '3. 1.7';32 private $version = '3.2'; 33 33 private $css_file; 34 34 private $js_file; … … 40 40 private $reg_link; 41 41 private $toggleme; 42 private $custom_menu; 42 43 private $options; 43 44 … … 58 59 $this->reg_link = ($this->options['reg_link'] === 'no') ? false : true; 59 60 $this->toggleme = ($this->options['hide_admin_bar'] === 'no') ? false : true; 61 $this->custom_menu = ($this->options['custom_menu'] === 'no') ? false : true; 60 62 61 63 /* todo - somehow make this work to see if javascript needs loaded … … 82 84 wp_enqueue_style('wpabi_css', plugins_url('wpabi.css', __FILE__), '', '2.0', 'all'); 83 85 86 if($this->custom_menu) 87 { 88 $this->add_custom_menu(); 89 } 90 84 91 $this->admin_page(); 85 92 } … … 88 95 { 89 96 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 } 90 129 } 91 130 … … 264 303 <input type="radio" name="wpabi_options[reg_link]" value="yes" <?php checked($this->options['reg_link'], 'yes') ?>/><span>Enabled</span> 265 304 <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> 266 310 </li> 267 311 <li> -
wordpress-admin-bar-improved/trunk/readme.txt
r400475 r406178 3 3 Tags: admin bar, top, login form, 3.1+, ajax, search 4 4 Requires at least: 3.1 5 Tested up to: 3.2 RC16 Stable tag: 3. 1.75 Tested up to: 3.2 6 Stable tag: 3.2 7 7 8 8 A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1. … … 10 10 == Description == 11 11 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/).12 This 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. 13 13 14 14 Check 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. 15 15 16 **Features** 16 Features: 17 18 * Easy Interface using WP3.0 Menus to add custom menu items to your Admin Bar. 17 19 * Displays a Login form on the front end of your site in the WP Admin Bar. 18 20 * Ajax Search Popup in from Admin Bar Search Form … … 20 22 * More to come... 21 23 24 ToDo: 22 25 26 * Manage default menu items. 27 * Make everything work with MultiSite 23 28 24 29 == Installation == … … 36 41 - wordpress-admin-bar-improved 37 42 | readme.txt 43 | screenshot-1.png 38 44 | wpabi.css 39 45 | wpabi.js … … 43 49 44 50 == Frequently Asked Questions == 51 52 = How to add menu items = 53 54 In 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! 45 55 46 56 = It's not working! = … … 53 63 54 64 == ChangeLog == 65 66 = 3.2 = 67 * Added easy integration for custom menu items using WP3.0 menu system. 55 68 56 69 = 3.1.7 = -
wordpress-admin-bar-improved/trunk/wpabi.php
r401858 r406178 6 6 Plugin URI: http://www.electriceasel.com/wpabi 7 7 Description: A set of custom tweaks to the WordPress Admin Bar that was introduced in WP3.1 8 Version: 3. 1.78 Version: 3.2 9 9 Author: dilbert4life, electriceasel 10 10 Author URI: http://www.electriceasel.com/team-member/don-gilbert … … 30 30 31 31 class WPAdminBarImproved { 32 private $version = '3. 1.7';32 private $version = '3.2'; 33 33 private $css_file; 34 34 private $js_file; … … 40 40 private $reg_link; 41 41 private $toggleme; 42 private $custom_menu; 42 43 private $options; 43 44 … … 58 59 $this->reg_link = ($this->options['reg_link'] === 'no') ? false : true; 59 60 $this->toggleme = ($this->options['hide_admin_bar'] === 'no') ? false : true; 61 $this->custom_menu = ($this->options['custom_menu'] === 'no') ? false : true; 60 62 61 63 /* todo - somehow make this work to see if javascript needs loaded … … 82 84 wp_enqueue_style('wpabi_css', plugins_url('wpabi.css', __FILE__), '', '2.0', 'all'); 83 85 86 if($this->custom_menu) 87 { 88 $this->add_custom_menu(); 89 } 90 84 91 $this->admin_page(); 85 92 } … … 88 95 { 89 96 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 } 90 129 } 91 130 … … 264 303 <input type="radio" name="wpabi_options[reg_link]" value="yes" <?php checked($this->options['reg_link'], 'yes') ?>/><span>Enabled</span> 265 304 <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> 266 310 </li> 267 311 <li>
Note: See TracChangeset
for help on using the changeset viewer.