mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Use get_current_site() instead of the $current_site global when possible.
props jeremyfelt. fixes #25158. git-svn-id: https://develop.svn.wordpress.org/trunk@26120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2187,11 +2187,11 @@ function plugins_url($path = '', $plugin = '') {
|
||||
* @return string Site url link with optional path appended.
|
||||
*/
|
||||
function network_site_url( $path = '', $scheme = null ) {
|
||||
global $current_site;
|
||||
|
||||
if ( ! is_multisite() )
|
||||
return site_url($path, $scheme);
|
||||
|
||||
$current_site = get_current_site();
|
||||
|
||||
if ( 'relative' == $scheme )
|
||||
$url = $current_site->path;
|
||||
else
|
||||
@@ -2218,11 +2218,10 @@ function network_site_url( $path = '', $scheme = null ) {
|
||||
* @return string Home url link with optional path appended.
|
||||
*/
|
||||
function network_home_url( $path = '', $scheme = null ) {
|
||||
global $current_site;
|
||||
|
||||
if ( ! is_multisite() )
|
||||
return home_url($path, $scheme);
|
||||
|
||||
$current_site = get_current_site();
|
||||
$orig_scheme = $scheme;
|
||||
|
||||
if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) )
|
||||
|
||||
Reference in New Issue
Block a user