diff --git a/wp-includes/cache.php b/wp-includes/cache.php index c79aa1e526..f285be3a90 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -137,7 +137,7 @@ function wp_cache_incr( $key, $offset = 1, $group = '' ) { * @global WP_Object_Cache $wp_object_cache WordPress Object Cache */ function wp_cache_init() { - $GLOBALS['wp_object_cache'] =& new WP_Object_Cache(); + $GLOBALS['wp_object_cache'] = new WP_Object_Cache(); } /** diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index ace304c937..479c3d41e8 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -573,7 +573,7 @@ class WP_MatchesMapRegex { * @return string */ function apply($subject, $matches) { - $oSelf =& new WP_MatchesMapRegex($subject, $matches); + $oSelf = new WP_MatchesMapRegex($subject, $matches); return $oSelf->output; } diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 94534c4e57..d468ae33de 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -483,7 +483,7 @@ function load_child_theme_textdomain( $domain, $path = false ) { function &get_translations_for_domain( $domain ) { global $l10n; if ( !isset( $l10n[$domain] ) ) { - $l10n[$domain] = &new NOOP_Translations; + $l10n[$domain] = new NOOP_Translations; } return $l10n[$domain]; } diff --git a/wp-includes/query.php b/wp-includes/query.php index 1887a6f0a3..c94af44e16 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -89,7 +89,7 @@ function set_query_var($var, $value) { */ function &query_posts($query) { unset($GLOBALS['wp_query']); - $GLOBALS['wp_query'] =& new WP_Query(); + $GLOBALS['wp_query'] = new WP_Query(); return $GLOBALS['wp_query']->query($query); } @@ -105,7 +105,7 @@ function &query_posts($query) { */ function wp_reset_query() { unset($GLOBALS['wp_query']); - $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; + $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; wp_reset_postdata(); } diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index ced5002a07..9b8319c1d5 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1161,7 +1161,7 @@ function &get_terms($taxonomies, $args = '') { foreach ( $taxonomies as $taxonomy ) { if ( ! taxonomy_exists($taxonomy) ) { - $error = & new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); + $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); return $error; } } diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 073c8dfd4f..bca713427d 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1728,7 +1728,7 @@ function add_custom_background( $header_callback = '', $admin_header_callback = if ( ! is_admin() ) return; require_once( ABSPATH . 'wp-admin/custom-background.php' ); - $GLOBALS['custom_background'] =& new Custom_Background( $admin_header_callback, $admin_image_div_callback ); + $GLOBALS['custom_background'] = new Custom_Background( $admin_header_callback, $admin_image_div_callback ); add_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) ); } diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 1291110bc5..ff53c11973 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -321,7 +321,7 @@ class WP_Widget_Factory { } function register($widget_class) { - $this->widgets[$widget_class] = & new $widget_class(); + $this->widgets[$widget_class] = new $widget_class(); } function unregister($widget_class) {