Changeset 1040931
- Timestamp:
- 12/09/2014 02:27:55 AM (11 years ago)
- Location:
- quick-admin-color-scheme-picker/trunk
- Files:
-
- 2 edited
-
quick-admin-color-scheme-picker.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quick-admin-color-scheme-picker/trunk/quick-admin-color-scheme-picker.php
r606737 r1040931 7 7 Donate link: http://tinyurl.com/donatetomitcho 8 8 License: GPLv2 or later 9 Version: 0. 69 Version: 0.7 10 10 */ 11 11 12 global $wp_version; 13 if ( version_compare( $wp_version, '3.3-beta2' ) > 0 ) 14 add_action('admin_bar_menu', 'qacsp_menu', 11); 15 else 16 add_action('admin_user_info_links', 'qacsp_link', 10, 2); 12 add_action('admin_bar_menu', 'qacsp_menu', 11); 17 13 18 14 function qacsp_menu( $wp_admin_bar ) { … … 28 24 29 25 foreach ( _qacsp_get_links( $user->ID ) as $linkdata ) { 30 $wp_admin_bar->add_ menu(array(26 $wp_admin_bar->add_node(array( 31 27 'id' => 'admin-color-' . $linkdata['color'], 32 28 'title' => $linkdata['title'], … … 37 33 )); 38 34 } 39 }40 41 function qacsp_link( $links, $user ) {42 43 if ( !is_admin() )44 return;45 46 $colorlinks = array();47 foreach ( _qacsp_get_links( $user->ID ) as $linkdata ) {48 $colorlinks[] = '<a href="' . esc_url( $linkdata['href'] ) . '">' . $linkdata['title'] . '</a>';49 }50 51 // add colors after the "your profile" link, which has key 5.52 $links = array_merge(array_splice($links, 0, array_search(5,$links) + 1), $colorlinks, array_splice($links, array_search(5,$links)));53 54 return $links;55 35 } 56 36 -
quick-admin-color-scheme-picker/trunk/readme.txt
r606737 r1040931 1 1 === Quick admin color scheme picker === 2 Contributors: mitchoyoshitaka 2 Contributors: mitchoyoshitaka, nacin, darylkoop 3 3 Author: mitcho (Michael 芳貴 Erlewine) 4 4 Author URI: http://mitcho.com/ 5 5 Donate link: https://tinyurl.com/donatetomitcho 6 Tags: admin color, UI, color, Sara Cannon7 Requires at least: 3. 28 Tested up to: 3.59 Stable tag: 0. 66 Tags: admin, admin color, UI, color, color scheme, customization, Sara Cannon 7 Requires at least: 3.3 8 Tested up to: 4.0.1 9 Stable tag: 0.7 10 10 11 11 Lets you quickly switch between admin color schemes from the "howdy menu." Happy Birthday Sara Cannon! 12 13 [Contribute to development on GitHub.](https://github.com/mitcho/quick-admin-color-scheme-picker) 12 14 13 15 == Description == … … 21 23 22 24 == Changelog == 25 26 = 0.7 = 27 * Code cleanup; rm support for WP < 3.3 23 28 24 29 = 0.6 =
Note: See TracChangeset
for help on using the changeset viewer.