Changeset 469974
- Timestamp:
- 12/01/2011 07:58:51 PM (14 years ago)
- Location:
- multisite-dashboard-switcher
- Files:
-
- 2 edited
- 4 copied
-
tags/1.4 (copied) (copied from multisite-dashboard-switcher/trunk)
-
tags/1.4/multisite-dashboard-switcher.php (copied) (copied from multisite-dashboard-switcher/trunk/multisite-dashboard-switcher.php) (5 diffs)
-
tags/1.4/readme.txt (copied) (copied from multisite-dashboard-switcher/trunk/readme.txt) (2 diffs)
-
tags/1.4/screenshot-1.png (copied) (copied from multisite-dashboard-switcher/trunk/screenshot-1.png)
-
trunk/multisite-dashboard-switcher.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multisite-dashboard-switcher/tags/1.4/multisite-dashboard-switcher.php
r466078 r469974 4 4 Plugin URI: http://samjlevy.com/msds 5 5 Description: Adds a menu to the admin bar for easy switching between multisite dashboards. 6 Version: 1. 36 Version: 1.4 7 7 Author: Sam J Levy 8 8 Author URI: http://samjlevy.com/ … … 63 63 else return false; 64 64 foreach($pages as $key=>$value) { 65 if($key=="visit") $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_visit','title'=> ucfirst($key),'href'=>str_replace('wp-admin','',$url)));66 else $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_'.$key,'title'=> ucfirst($key),'href'=>$url.'/'.$value));65 if($key=="visit") $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_visit','title'=>__('Visit Site'),'href'=>str_replace('wp-admin/','',$url))); 66 else $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_'.$key,'title'=>__(ucfirst($key)),'href'=>$url.$value)); 67 67 } 68 68 } … … 84 84 foreach($blogs as $b) { 85 85 $b_title = $b['bname'] . ((get_site_option('msds_blog_ids')=="1") ? " (".$b['blog_id'].")" : ""); 86 $url = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$b['domain'].$b['path'].'wp-admin';86 $url = get_admin_url($b['blog_id']); 87 87 $wp_admin_bar->add_menu(array('parent'=>$site_parent,'id'=>'msds_'.$letter.$i,'title'=>$b_title,'href'=>$url)); 88 88 msds_pages('site',$letter.$i,$url); … … 94 94 if(!is_multisite() || !is_super_admin() || !is_admin_bar_showing()) return; 95 95 global $wp_admin_bar,$wpdb,$current_blog; 96 $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$current_blog->domain;97 96 98 97 // current site path 99 98 if(is_network_admin()) { 100 $temp = "Network";99 $temp = __('Network'); 101 100 } else { 102 if($current_blog->blog_id == 1) $temp = "Root Site";101 if($current_blog->blog_id == 1) $temp = __('Root Site'); 103 102 else { 104 103 if($current_blog->path == "/") $temp = $current_blog->domain; … … 111 110 // add top menu 112 111 $wp_admin_bar->add_menu(array('parent'=>false,'id'=>'msds','title'=>__('Multisite Switcher').$current)); 113 112 114 113 // add network menu 115 $n_url = $domain."/wp-admin/network";114 $n_url = network_admin_url(); 116 115 $wp_admin_bar->add_menu(array('parent'=>'msds','id'=>'msds_network','title'=>__('Network'),'href'=>$n_url)); 117 116 msds_pages('network','network',$n_url); 118 117 119 118 // add root site menu 120 $r_url = $domain."/wp-admin";121 $r_title = "Root Site";119 $r_url = get_admin_url(1); 120 $r_title = __('Root Site'); 122 121 if(get_site_option('msds_blog_ids')=="1") $r_title .= " (1)"; 123 122 $wp_admin_bar->add_menu(array('parent'=>'msds','id'=>'msds_root','title'=>$r_title,'href'=>$r_url)); -
multisite-dashboard-switcher/tags/1.4/readme.txt
r466078 r469974 4 4 Requires at least: 3.2.1 5 5 Tested up to: 3.2.1 6 Stable tag: 1. 36 Stable tag: 1.4 7 7 8 8 == Description == … … 30 30 == Changelog == 31 31 32 = 1.4 = 33 34 December 1, 2011 35 36 * Fixed: Issue with detection of Network Admin URL 37 * Added: Improved localization support 38 32 39 = 1.3 = 33 40 -
multisite-dashboard-switcher/trunk/multisite-dashboard-switcher.php
r466078 r469974 4 4 Plugin URI: http://samjlevy.com/msds 5 5 Description: Adds a menu to the admin bar for easy switching between multisite dashboards. 6 Version: 1. 36 Version: 1.4 7 7 Author: Sam J Levy 8 8 Author URI: http://samjlevy.com/ … … 63 63 else return false; 64 64 foreach($pages as $key=>$value) { 65 if($key=="visit") $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_visit','title'=> ucfirst($key),'href'=>str_replace('wp-admin','',$url)));66 else $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_'.$key,'title'=> ucfirst($key),'href'=>$url.'/'.$value));65 if($key=="visit") $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_visit','title'=>__('Visit Site'),'href'=>str_replace('wp-admin/','',$url))); 66 else $wp_admin_bar->add_menu(array('parent'=>'msds_'.$id,'id' =>'msds_'.$id.'_'.$key,'title'=>__(ucfirst($key)),'href'=>$url.$value)); 67 67 } 68 68 } … … 84 84 foreach($blogs as $b) { 85 85 $b_title = $b['bname'] . ((get_site_option('msds_blog_ids')=="1") ? " (".$b['blog_id'].")" : ""); 86 $url = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$b['domain'].$b['path'].'wp-admin';86 $url = get_admin_url($b['blog_id']); 87 87 $wp_admin_bar->add_menu(array('parent'=>$site_parent,'id'=>'msds_'.$letter.$i,'title'=>$b_title,'href'=>$url)); 88 88 msds_pages('site',$letter.$i,$url); … … 94 94 if(!is_multisite() || !is_super_admin() || !is_admin_bar_showing()) return; 95 95 global $wp_admin_bar,$wpdb,$current_blog; 96 $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$current_blog->domain;97 96 98 97 // current site path 99 98 if(is_network_admin()) { 100 $temp = "Network";99 $temp = __('Network'); 101 100 } else { 102 if($current_blog->blog_id == 1) $temp = "Root Site";101 if($current_blog->blog_id == 1) $temp = __('Root Site'); 103 102 else { 104 103 if($current_blog->path == "/") $temp = $current_blog->domain; … … 111 110 // add top menu 112 111 $wp_admin_bar->add_menu(array('parent'=>false,'id'=>'msds','title'=>__('Multisite Switcher').$current)); 113 112 114 113 // add network menu 115 $n_url = $domain."/wp-admin/network";114 $n_url = network_admin_url(); 116 115 $wp_admin_bar->add_menu(array('parent'=>'msds','id'=>'msds_network','title'=>__('Network'),'href'=>$n_url)); 117 116 msds_pages('network','network',$n_url); 118 117 119 118 // add root site menu 120 $r_url = $domain."/wp-admin";121 $r_title = "Root Site";119 $r_url = get_admin_url(1); 120 $r_title = __('Root Site'); 122 121 if(get_site_option('msds_blog_ids')=="1") $r_title .= " (1)"; 123 122 $wp_admin_bar->add_menu(array('parent'=>'msds','id'=>'msds_root','title'=>$r_title,'href'=>$r_url)); -
multisite-dashboard-switcher/trunk/readme.txt
r466078 r469974 4 4 Requires at least: 3.2.1 5 5 Tested up to: 3.2.1 6 Stable tag: 1. 36 Stable tag: 1.4 7 7 8 8 == Description == … … 30 30 == Changelog == 31 31 32 = 1.4 = 33 34 December 1, 2011 35 36 * Fixed: Issue with detection of Network Admin URL 37 * Added: Improved localization support 38 32 39 = 1.3 = 33 40
Note: See TracChangeset
for help on using the changeset viewer.