116 | | * Sets current site name. |
117 | | * |
118 | | * @todo deprecate |
119 | | * |
120 | | * @access private |
121 | | * @since 3.0.0 |
122 | | * @return object $current_site object with site_name |
123 | | */ |
124 | | function get_current_site_name( $current_site ) { |
125 | | global $wpdb; |
126 | | |
127 | | $current_site->site_name = wp_cache_get( $current_site->id . ':site_name', 'site-options' ); |
128 | | if ( ! $current_site->site_name ) { |
129 | | $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 ) ); |
130 | | if ( ! $current_site->site_name ) |
131 | | $current_site->site_name = ucfirst( $current_site->domain ); |
132 | | wp_cache_set( $current_site->id . ':site_name', $current_site->site_name, 'site-options' ); |
133 | | } |
134 | | |
135 | | return $current_site; |
136 | | } |
137 | | |
138 | | /** |