WordPress.org

Make WordPress Core

Ticket #17522: ms-blogs.diff

File ms-blogs.diff, 1.5 KB (added by niallkennedy, 3 years ago)

static strings

  • wp-includes/ms-blogs.php

     
    9696 */ 
    9797function get_id_from_blogname( $name ) { 
    9898        global $wpdb, $current_site; 
    99         $blog_id = wp_cache_get( "get_id_from_blogname_" . $name, 'blog-details' ); 
     99        $blog_id = wp_cache_get( 'get_id_from_blogname_' . $name, 'blog-details' ); 
    100100        if ( $blog_id ) 
    101101                return $blog_id; 
    102102 
     
    331331function get_blog_option( $blog_id, $setting, $default = false ) { 
    332332        global $wpdb; 
    333333 
    334         $key = $blog_id."-".$setting."-blog_option"; 
    335         $value = wp_cache_get( $key, "site-options" ); 
     334        $key = $blog_id.'-'.$setting.'-blog_option'; 
     335        $value = wp_cache_get( $key, 'site-options' ); 
    336336        if ( $value == null ) { 
    337337                if ( $blog_id == $wpdb->blogid ) { 
    338338                        $value = get_option( $setting, $default ); 
     
    390390        switch_to_blog($id); 
    391391        add_option( $key, $value ); 
    392392        restore_current_blog(); 
    393         wp_cache_set( $id."-".$key."-blog_option", $value, 'site-options' ); 
     393        wp_cache_set( $id.'-'.$key.'-blog_option', $value, 'site-options' ); 
    394394} 
    395395 
    396396/** 
     
    407407        switch_to_blog($id); 
    408408        delete_option( $key ); 
    409409        restore_current_blog(); 
    410         wp_cache_set( $id."-".$key."-blog_option", '', 'site-options' ); 
     410        wp_cache_set( $id.'-'.$key.'-blog_option', '', 'site-options' ); 
    411411} 
    412412 
    413413/** 
     
    431431 
    432432        refresh_blog_details( $id ); 
    433433 
    434         wp_cache_set( $id."-".$key."-blog_option", $value, 'site-options'); 
     434        wp_cache_set( $id.'-'.$key.'-blog_option', $value, 'site-options'); 
    435435} 
    436436 
    437437/**