WordPress.org

Make WordPress Core

Changeset 27407


Ignore:
Timestamp:
03/05/2014 06:38:23 AM (6 years ago)
Author:
nacin
Message:

Deprecate get_current_site_name(). see #27003.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-load.php

    r27381 r27407  
    111111
    112112    return true;
    113 }
    114 
    115 /**
    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;
    136113}
    137114
     
    423400    wp_die( $msg, $title );
    424401}
     402
     403/**
     404 * This deprecated function formerly set the site_name property of the $current_site object.
     405 *
     406 * This function simply returns the object, as before.
     407 * The bootstrap takes care of setting site_name.
     408 *
     409 * @access private
     410 * @since 3.0.0
     411 * @deprecated 3.9.0
     412 *
     413 * @param object $current_site
     414 * @return object
     415 */
     416function get_current_site_name( $current_site ) {
     417    _deprecated_function( __FUNCTION__, '3.9' );
     418    return $current_site;
     419}
Note: See TracChangeset for help on using the changeset viewer.