new does not require by reference.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-18 20:20:59 +00:00
parent c17df0bb43
commit 89c0895887
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
*/
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
*/
function apply($subject, $matches) {
$oSelf =& new WP_MatchesMapRegex($subject, $matches);
$oSelf = new WP_MatchesMapRegex($subject, $matches);
return $oSelf->output;
}

View File

@ -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];
}

View File

@ -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();
}

View File

@ -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;
}
}

View File

@ -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' ) );
}

View File

@ -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) {