From 88c32598afb778f669242253c271df48698bef01 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 9 Aug 2016 18:13:31 +0000 Subject: [PATCH] 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 --- wp-includes/ms-blogs.php | 10 +++++----- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index ddd21e4097..ccafd04768 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 2372ee8fbb..1d136b15b5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.