Multisite: Remove unnecessary reference parameters.

There is no advantage to passing parameters by reference to `get_site()`, `get_network()`, and `update_site_cache()`.

Merge of [38232] to the 4.6 branch.

Props flixos90, ocean90 for review.
Fixes #37615.

Built from https://develop.svn.wordpress.org/branches/4.6@38233


git-svn-id: http://core.svn.wordpress.org/branches/4.6@38174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2016-08-09 18:13:31 +00:00
parent 902420b294
commit 88c32598af
2 changed files with 6 additions and 6 deletions

View File

@ -481,7 +481,7 @@ function clean_blog_cache( $blog ) {
* @param WP_Site|int|null $site Optional. Site to retrieve. Default is the current site.
* @return WP_Site|null The site object or null if not found.
*/
function get_site( &$site = null ) {
function get_site( $site = null ) {
if ( empty( $site ) ) {
$site = get_current_blog_id();
}
@ -537,9 +537,9 @@ function _prime_site_caches( $ids ) {
*
* @since 4.6.0
*
* @param array $sites Array of site objects, passed by reference.
* @param array $sites Array of site objects.
*/
function update_site_cache( &$sites ) {
function update_site_cache( $sites ) {
if ( ! $sites ) {
return;
}
@ -1085,10 +1085,10 @@ function get_networks( $args = array() ) {
*
* @global WP_Network $current_site
*
* @param WP_Network|int|null $network Network to retrieve, passed by reference.
* @param WP_Network|int|null $network Optional. Network to retrieve. Default is the current network.
* @return WP_Network|null The network object or null if not found.
*/
function get_network( &$network = null ) {
function get_network( $network = null ) {
global $current_site;
if ( empty( $network ) && isset( $current_site ) ) {
$network = $current_site;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-RC1-38231';
$wp_version = '4.6-RC1-38233';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.