mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Deprecate get_current_site_name(). see #27003.
Built from https://develop.svn.wordpress.org/trunk@27407 git-svn-id: http://core.svn.wordpress.org/trunk@27254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5dc0a56f26
commit
0e9ef2491c
@ -112,29 +112,6 @@ function ms_site_check() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current site name.
|
||||
*
|
||||
* @todo deprecate
|
||||
*
|
||||
* @access private
|
||||
* @since 3.0.0
|
||||
* @return object $current_site object with site_name
|
||||
*/
|
||||
function get_current_site_name( $current_site ) {
|
||||
global $wpdb;
|
||||
|
||||
$current_site->site_name = wp_cache_get( $current_site->id . ':site_name', 'site-options' );
|
||||
if ( ! $current_site->site_name ) {
|
||||
$current_site->site_name = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = %d AND meta_key = 'site_name'", $current_site->id ) );
|
||||
if ( ! $current_site->site_name )
|
||||
$current_site->site_name = ucfirst( $current_site->domain );
|
||||
wp_cache_set( $current_site->id . ':site_name', $current_site->site_name, 'site-options' );
|
||||
}
|
||||
|
||||
return $current_site;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a network object by its domain and path.
|
||||
*
|
||||
@ -422,3 +399,21 @@ function ms_not_installed() {
|
||||
|
||||
wp_die( $msg, $title );
|
||||
}
|
||||
|
||||
/**
|
||||
* This deprecated function formerly set the site_name property of the $current_site object.
|
||||
*
|
||||
* This function simply returns the object, as before.
|
||||
* The bootstrap takes care of setting site_name.
|
||||
*
|
||||
* @access private
|
||||
* @since 3.0.0
|
||||
* @deprecated 3.9.0
|
||||
*
|
||||
* @param object $current_site
|
||||
* @return object
|
||||
*/
|
||||
function get_current_site_name( $current_site ) {
|
||||
_deprecated_function( __FUNCTION__, '3.9' );
|
||||
return $current_site;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user