Changeset 462847
- Timestamp:
- 11/14/2011 08:10:01 PM (14 years ago)
- Location:
- multisite-dashboard-switcher
- Files:
-
- 2 edited
- 4 copied
-
tags/1.2 (copied) (copied from multisite-dashboard-switcher/trunk)
-
tags/1.2/multisite-dashboard-switcher.php (copied) (copied from multisite-dashboard-switcher/trunk/multisite-dashboard-switcher.php) (4 diffs)
-
tags/1.2/readme.txt (copied) (copied from multisite-dashboard-switcher/trunk/readme.txt) (2 diffs)
-
tags/1.2/screenshot-1.png (copied) (copied from multisite-dashboard-switcher/trunk/screenshot-1.png)
-
trunk/multisite-dashboard-switcher.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multisite-dashboard-switcher/tags/1.2/multisite-dashboard-switcher.php
r459721 r462847 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. 16 Version: 1.2 7 7 Author: Sam J Levy 8 8 Author URI: http://samjlevy.com/ … … 76 76 77 77 // query sites 78 $blogs = $wpdb->get_results("SELECT domain, path, ".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')")." AS bname FROM $wpdb->blogs WHERE blog_id != 1".(($letter) ? " AND UPPER(LEFT(".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1) = '$letter')" : "")."ORDER BY path",ARRAY_A);78 $blogs = $wpdb->get_results("SELECT domain, path,IF(path = '/',domain,REPLACE(path,'/','')) AS bname FROM $wpdb->blogs WHERE UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) = '$letter' ORDER BY path",ARRAY_A); 79 79 80 80 // add menu item for each site … … 91 91 if(!is_multisite() || !is_super_admin() || !is_admin_bar_showing()) return; 92 92 global $wp_admin_bar,$wpdb,$current_blog; 93 $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://"). DOMAIN_CURRENT_SITE;93 $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$current_blog->domain; 94 94 95 95 // current site path 96 if(isset($current_blog->path) && $current_blog->path != "") { 97 if(is_network_admin()) { 98 $temp = "Network"; 99 } else { 100 if($current_blog->blog_id == 1) $temp = "Root Site"; 101 else { 102 if(SUBDOMAIN_INSTALL) $temp = $current_blog->domain; 103 else $temp = str_replace('/','',$current_blog->path); 104 } 96 if(is_network_admin()) { 97 $temp = "Network"; 98 } else { 99 if($current_blog->blog_id == 1) $temp = "Root Site"; 100 else { 101 if($current_blog->path == "/") $temp = $current_blog->domain; 102 else $temp = $current_blog->path; 105 103 } 106 $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>";107 104 } 105 $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>"; 108 106 109 107 // add top menu … … 122 120 if(get_site_option('msds_group')=="alpha") { 123 121 // get alphabet 124 $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT( ".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1)) AS first_letter FROM $wpdb->blogs WHERE blog_id != 1ORDER BY first_letter",ARRAY_A);122 $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) AS first_letter FROM $wpdb->blogs ORDER BY first_letter",ARRAY_A); 125 123 126 124 // call main loop for each letter -
multisite-dashboard-switcher/tags/1.2/readme.txt
r459721 r462847 4 4 Requires at least: 3.2.1 5 5 Tested up to: 3.2.1 6 Stable tag: 1. 16 Stable tag: 1.2 7 7 8 8 == Description == … … 30 30 == Changelog == 31 31 32 = 1.2 = 33 November 14, 2011 34 * Added: Support for MU installations that have a hybrid of both Subdomain and Folder-based URLs 35 32 36 = 1.1 = 33 37 November 5, 2011 -
multisite-dashboard-switcher/trunk/multisite-dashboard-switcher.php
r459721 r462847 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. 16 Version: 1.2 7 7 Author: Sam J Levy 8 8 Author URI: http://samjlevy.com/ … … 76 76 77 77 // query sites 78 $blogs = $wpdb->get_results("SELECT domain, path, ".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')")." AS bname FROM $wpdb->blogs WHERE blog_id != 1".(($letter) ? " AND UPPER(LEFT(".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1) = '$letter')" : "")."ORDER BY path",ARRAY_A);78 $blogs = $wpdb->get_results("SELECT domain, path,IF(path = '/',domain,REPLACE(path,'/','')) AS bname FROM $wpdb->blogs WHERE UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) = '$letter' ORDER BY path",ARRAY_A); 79 79 80 80 // add menu item for each site … … 91 91 if(!is_multisite() || !is_super_admin() || !is_admin_bar_showing()) return; 92 92 global $wp_admin_bar,$wpdb,$current_blog; 93 $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://"). DOMAIN_CURRENT_SITE;93 $domain = (($_SERVER['HTTPS']=="on") ? "https://" : "http://").$current_blog->domain; 94 94 95 95 // current site path 96 if(isset($current_blog->path) && $current_blog->path != "") { 97 if(is_network_admin()) { 98 $temp = "Network"; 99 } else { 100 if($current_blog->blog_id == 1) $temp = "Root Site"; 101 else { 102 if(SUBDOMAIN_INSTALL) $temp = $current_blog->domain; 103 else $temp = str_replace('/','',$current_blog->path); 104 } 96 if(is_network_admin()) { 97 $temp = "Network"; 98 } else { 99 if($current_blog->blog_id == 1) $temp = "Root Site"; 100 else { 101 if($current_blog->path == "/") $temp = $current_blog->domain; 102 else $temp = $current_blog->path; 105 103 } 106 $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>";107 104 } 105 $current = "<span style='margin-left:8px;padding:4px;background-color:yellow;color:#000;font-weight:bold;text-shadow:none;'>".$temp."</span>"; 108 106 109 107 // add top menu … … 122 120 if(get_site_option('msds_group')=="alpha") { 123 121 // get alphabet 124 $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT( ".((SUBDOMAIN_INSTALL) ? "domain" : "REPLACE(path,'/','')").", 1)) AS first_letter FROM $wpdb->blogs WHERE blog_id != 1ORDER BY first_letter",ARRAY_A);122 $alpha = $wpdb->get_results("SELECT DISTINCT UPPER(LEFT(IF(path = '/',domain,REPLACE(path,'/','')), 1)) AS first_letter FROM $wpdb->blogs ORDER BY first_letter",ARRAY_A); 125 123 126 124 // call main loop for each letter -
multisite-dashboard-switcher/trunk/readme.txt
r459721 r462847 4 4 Requires at least: 3.2.1 5 5 Tested up to: 3.2.1 6 Stable tag: 1. 16 Stable tag: 1.2 7 7 8 8 == Description == … … 30 30 == Changelog == 31 31 32 = 1.2 = 33 November 14, 2011 34 * Added: Support for MU installations that have a hybrid of both Subdomain and Folder-based URLs 35 32 36 = 1.1 = 33 37 November 5, 2011
Note: See TracChangeset
for help on using the changeset viewer.