new does not require by reference.

git-svn-id: https://develop.svn.wordpress.org/trunk@18995 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-10-18 20:20:59 +00:00
parent e8946bf56a
commit 90f95e0204
7 changed files with 8 additions and 8 deletions

View File

@ -137,7 +137,7 @@ function wp_cache_incr( $key, $offset = 1, $group = '' ) {
* @global WP_Object_Cache $wp_object_cache WordPress Object Cache * @global WP_Object_Cache $wp_object_cache WordPress Object Cache
*/ */
function wp_cache_init() { function wp_cache_init() {
$GLOBALS['wp_object_cache'] =& new WP_Object_Cache(); $GLOBALS['wp_object_cache'] = new WP_Object_Cache();
} }
/** /**

View File

@ -573,7 +573,7 @@ class WP_MatchesMapRegex {
* @return string * @return string
*/ */
function apply($subject, $matches) { function apply($subject, $matches) {
$oSelf =& new WP_MatchesMapRegex($subject, $matches); $oSelf = new WP_MatchesMapRegex($subject, $matches);
return $oSelf->output; return $oSelf->output;
} }

View File

@ -483,7 +483,7 @@ function load_child_theme_textdomain( $domain, $path = false ) {
function &get_translations_for_domain( $domain ) { function &get_translations_for_domain( $domain ) {
global $l10n; global $l10n;
if ( !isset( $l10n[$domain] ) ) { if ( !isset( $l10n[$domain] ) ) {
$l10n[$domain] = &new NOOP_Translations; $l10n[$domain] = new NOOP_Translations;
} }
return $l10n[$domain]; return $l10n[$domain];
} }

View File

@ -89,7 +89,7 @@ function set_query_var($var, $value) {
*/ */
function &query_posts($query) { function &query_posts($query) {
unset($GLOBALS['wp_query']); unset($GLOBALS['wp_query']);
$GLOBALS['wp_query'] =& new WP_Query(); $GLOBALS['wp_query'] = new WP_Query();
return $GLOBALS['wp_query']->query($query); return $GLOBALS['wp_query']->query($query);
} }
@ -105,7 +105,7 @@ function &query_posts($query) {
*/ */
function wp_reset_query() { function wp_reset_query() {
unset($GLOBALS['wp_query']); unset($GLOBALS['wp_query']);
$GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
wp_reset_postdata(); wp_reset_postdata();
} }

View File

@ -1161,7 +1161,7 @@ function &get_terms($taxonomies, $args = '') {
foreach ( $taxonomies as $taxonomy ) { foreach ( $taxonomies as $taxonomy ) {
if ( ! taxonomy_exists($taxonomy) ) { if ( ! taxonomy_exists($taxonomy) ) {
$error = & new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));
return $error; return $error;
} }
} }

View File

@ -1728,7 +1728,7 @@ function add_custom_background( $header_callback = '', $admin_header_callback =
if ( ! is_admin() ) if ( ! is_admin() )
return; return;
require_once( ABSPATH . 'wp-admin/custom-background.php' ); 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' ) ); add_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) );
} }

View File

@ -321,7 +321,7 @@ class WP_Widget_Factory {
} }
function register($widget_class) { function register($widget_class) {
$this->widgets[$widget_class] = & new $widget_class(); $this->widgets[$widget_class] = new $widget_class();
} }
function unregister($widget_class) { function unregister($widget_class) {