From 3a00f2eb3da995a288827c835448a42c51d7db60 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 9 Aug 2016 18:11:12 +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()`. Props flixos90, ocean90 for review. See #37615. git-svn-id: https://develop.svn.wordpress.org/trunk@38232 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-blogs.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/ms-blogs.php b/src/wp-includes/ms-blogs.php index ddd21e4097..ccafd04768 100644 --- a/src/wp-includes/ms-blogs.php +++ b/src/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;