Index: wp-admin/includes/class-wp-importer.php
===================================================================
--- wp-admin/includes/class-wp-importer.php (revision 17501)
+++ wp-admin/includes/class-wp-importer.php (working copy)
@@ -186,7 +186,7 @@
*/
function get_page( $url, $username = '', $password = '', $head = false ) {
// Increase the timeout
- add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) );
+ add_filter( 'http_request_timeout', array( $this, 'bump_request_timeout' ) );
$headers = array();
$args = array();
Index: wp-admin/includes/class-wp-list-table.php
===================================================================
--- wp-admin/includes/class-wp-list-table.php (revision 17501)
+++ wp-admin/includes/class-wp-list-table.php (working copy)
@@ -86,7 +86,7 @@
$screen = get_current_screen();
- add_filter( "manage_{$screen->id}_columns", array( &$this, 'get_columns' ), 0 );
+ add_filter( "manage_{$screen->id}_columns", array( $this, 'get_columns' ), 0 );
if ( !$args['plural'] )
$args['plural'] = $screen->base;
@@ -95,7 +95,7 @@
if ( $args['ajax'] ) {
// wp_enqueue_script( 'list-table' );
- add_action( 'admin_footer', array( &$this, '_js_vars' ) );
+ add_action( 'admin_footer', array( $this, '_js_vars' ) );
}
}
@@ -833,7 +833,7 @@
}
elseif ( method_exists( $this, 'column_' . $column_name ) ) {
echo "
";
- echo call_user_func( array( &$this, 'column_' . $column_name ), $item );
+ echo call_user_func( array( $this, 'column_' . $column_name ), $item );
echo " | ";
}
else {
Index: wp-admin/includes/class-wp-ms-themes-list-table.php
===================================================================
--- wp-admin/includes/class-wp-ms-themes-list-table.php (revision 17501)
+++ wp-admin/includes/class-wp-ms-themes-list-table.php (working copy)
@@ -104,7 +104,7 @@
if ( $s ) {
$status = 'search';
- $themes['search'] = array_filter( $themes['all'], array( &$this, '_search_callback' ) );
+ $themes['search'] = array_filter( $themes['all'], array( $this, '_search_callback' ) );
}
$totals = array();
@@ -121,7 +121,7 @@
$orderby = ucfirst( $orderby );
$order = strtoupper( $order );
- uasort( $this->items, array( &$this, '_order_callback' ) );
+ uasort( $this->items, array( $this, '_order_callback' ) );
}
$start = ( $page - 1 ) * $themes_per_page;
Index: wp-admin/includes/class-wp-plugins-list-table.php
===================================================================
--- wp-admin/includes/class-wp-plugins-list-table.php (revision 17501)
+++ wp-admin/includes/class-wp-plugins-list-table.php (working copy)
@@ -107,7 +107,7 @@
if ( $s ) {
$status = 'search';
- $plugins['search'] = array_filter( $plugins['all'], array( &$this, '_search_callback' ) );
+ $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) );
}
$totals = array();
@@ -129,7 +129,7 @@
$orderby = ucfirst( $orderby );
$order = strtoupper( $order );
- uasort( $this->items, array( &$this, '_order_callback' ) );
+ uasort( $this->items, array( $this, '_order_callback' ) );
}
$plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ) );
Index: wp-admin/includes/class-wp-upgrader.php
===================================================================
--- wp-admin/includes/class-wp-upgrader.php (revision 17501)
+++ wp-admin/includes/class-wp-upgrader.php (working copy)
@@ -422,9 +422,9 @@
// Get the URL to the zip file
$r = $current->response[ $plugin ];
- add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2);
- add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);
- //'source_selection' => array(&$this, 'source_selection'), //theres a track ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
+ add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2);
+ add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
+ //'source_selection' => array($this, 'source_selection'), //theres a track ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
$this->run(array(
'package' => $r->package,
@@ -437,8 +437,8 @@
));
// Cleanup our hooks, incase something else does a upgrade on this connection.
- remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'));
- remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'));
+ remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'));
+ remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
if ( ! $this->result || is_wp_error($this->result) )
return $this->result;
@@ -455,7 +455,7 @@
$current = get_site_transient( 'update_plugins' );
- add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);
+ add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
$this->skin->header();
@@ -522,7 +522,7 @@
$this->skin->footer();
// Cleanup our hooks, incase something else does a upgrade on this connection.
- remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'));
+ remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
// Force refresh of plugin update information
delete_site_transient('update_plugins');
@@ -669,9 +669,9 @@
$r = $current->response[ $theme ];
- add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
- add_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2);
- add_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
+ add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
+ add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
+ add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
$options = array(
'package' => $r['package'],
@@ -702,9 +702,9 @@
$current = get_site_transient( 'update_themes' );
- add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
- add_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2);
- add_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
+ add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
+ add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
+ add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
$this->skin->header();
@@ -771,9 +771,9 @@
$this->skin->footer();
// Cleanup our hooks, incase something else does a upgrade on this connection.
- remove_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
- remove_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2);
- remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
+ remove_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
+ remove_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
+ remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
// Force refresh of theme update information
delete_site_transient('update_themes');
Index: wp-admin/includes/deprecated.php
===================================================================
--- wp-admin/includes/deprecated.php (revision 17501)
+++ wp-admin/includes/deprecated.php (working copy)
@@ -502,7 +502,7 @@
$this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
}
- do_action_ref_array( 'pre_user_search', array( &$this ) );
+ do_action_ref_array( 'pre_user_search', array( $this ) );
}
/**
Index: wp-admin/includes/list-table.php
===================================================================
--- wp-admin/includes/list-table.php (revision 17501)
+++ wp-admin/includes/list-table.php (working copy)
@@ -85,7 +85,7 @@
if ( !empty( $columns ) ) {
$this->_columns = $columns;
- add_filter( 'manage_' . $screen->id . '_columns', array( &$this, 'get_columns' ), 0 );
+ add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 );
}
}
Index: wp-admin/custom-background.php
===================================================================
--- wp-admin/custom-background.php (revision 17501)
+++ wp-admin/custom-background.php (working copy)
@@ -64,11 +64,11 @@
if ( ! current_user_can('edit_theme_options') )
return;
- $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array(&$this, 'admin_page'));
+ $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array($this, 'admin_page'));
- add_action("load-$page", array(&$this, 'admin_load'));
- add_action("load-$page", array(&$this, 'take_action'), 49);
- add_action("load-$page", array(&$this, 'handle_upload'), 49);
+ add_action("load-$page", array($this, 'admin_load'));
+ add_action("load-$page", array($this, 'take_action'), 49);
+ add_action("load-$page", array($this, 'handle_upload'), 49);
if ( $this->admin_header_callback )
add_action("admin_head-$page", $this->admin_header_callback, 51);
Index: wp-admin/custom-header.php
===================================================================
--- wp-admin/custom-header.php (revision 17501)
+++ wp-admin/custom-header.php (working copy)
@@ -73,13 +73,13 @@
if ( ! current_user_can('edit_theme_options') )
return;
- $this->page = $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array(&$this, 'admin_page'));
+ $this->page = $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array($this, 'admin_page'));
- add_action("admin_print_scripts-$page", array(&$this, 'js_includes'));
- add_action("admin_print_styles-$page", array(&$this, 'css_includes'));
- add_action("admin_head-$page", array(&$this, 'help') );
- add_action("admin_head-$page", array(&$this, 'take_action'), 50);
- add_action("admin_head-$page", array(&$this, 'js'), 50);
+ add_action("admin_print_scripts-$page", array($this, 'js_includes'));
+ add_action("admin_print_styles-$page", array($this, 'css_includes'));
+ add_action("admin_head-$page", array($this, 'help') );
+ add_action("admin_head-$page", array($this, 'take_action'), 50);
+ add_action("admin_head-$page", array($this, 'js'), 50);
add_action("admin_head-$page", $this->admin_header_callback, 51);
}
Index: wp-includes/cache.php
===================================================================
--- wp-includes/cache.php (revision 17501)
+++ wp-includes/cache.php (working copy)
@@ -100,7 +100,7 @@
* @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();
}
/**
@@ -478,7 +478,7 @@
* @todo This should be moved to the PHP4 style constructor, PHP5
* already calls __destruct()
*/
- register_shutdown_function(array(&$this, "__destruct"));
+ register_shutdown_function(array($this, "__destruct"));
}
/**
Index: wp-includes/capabilities.php
===================================================================
--- wp-includes/capabilities.php (revision 17501)
+++ wp-includes/capabilities.php (working copy)
@@ -661,7 +661,7 @@
*/
function update_user_level_from_caps() {
global $wpdb;
- $this->user_level = array_reduce( array_keys( $this->allcaps ), array( &$this, 'level_reduction' ), 0 );
+ $this->user_level = array_reduce( array_keys( $this->allcaps ), array( $this, 'level_reduction' ), 0 );
update_user_meta( $this->ID, $wpdb->prefix . 'user_level', $this->user_level );
}
Index: wp-includes/class-oembed.php
===================================================================
--- wp-includes/class-oembed.php (revision 17501)
+++ wp-includes/class-oembed.php (working copy)
@@ -57,7 +57,7 @@
) );
// Fix any embeds that contain new lines in the middle of the HTML which breaks wpautop().
- add_filter( 'oembed_dataparse', array(&$this, '_strip_newlines'), 10, 3 );
+ add_filter( 'oembed_dataparse', array($this, '_strip_newlines'), 10, 3 );
}
/**
Index: wp-includes/class-wp-walker.php
===================================================================
--- wp-includes/class-wp-walker.php (revision 17501)
+++ wp-includes/class-wp-walker.php (working copy)
@@ -126,7 +126,7 @@
if ( is_array( $args[0] ) )
$args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] );
$cb_args = array_merge( array(&$output, $element, $depth), $args);
- call_user_func_array(array(&$this, 'start_el'), $cb_args);
+ call_user_func_array(array($this, 'start_el'), $cb_args);
$id = $element->$id_field;
@@ -139,7 +139,7 @@
$newlevel = true;
//start the child delimiter
$cb_args = array_merge( array(&$output, $depth), $args);
- call_user_func_array(array(&$this, 'start_lvl'), $cb_args);
+ call_user_func_array(array($this, 'start_lvl'), $cb_args);
}
$this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );
}
@@ -149,12 +149,12 @@
if ( isset($newlevel) && $newlevel ){
//end the child delimiter
$cb_args = array_merge( array(&$output, $depth), $args);
- call_user_func_array(array(&$this, 'end_lvl'), $cb_args);
+ call_user_func_array(array($this, 'end_lvl'), $cb_args);
}
//end this element
$cb_args = array_merge( array(&$output, $element, $depth), $args);
- call_user_func_array(array(&$this, 'end_el'), $cb_args);
+ call_user_func_array(array($this, 'end_el'), $cb_args);
}
/**
Index: wp-includes/class-wp.php
===================================================================
--- wp-includes/class-wp.php (revision 17501)
+++ wp-includes/class-wp.php (working copy)
@@ -298,7 +298,7 @@
$this->query_vars = apply_filters('request', $this->query_vars);
- do_action_ref_array('parse_request', array(&$this));
+ do_action_ref_array('parse_request', array($this));
}
/**
@@ -373,7 +373,7 @@
if ( $exit_required )
exit();
- do_action_ref_array('send_headers', array(&$this));
+ do_action_ref_array('send_headers', array($this));
}
/**
@@ -501,7 +501,7 @@
$this->query_posts();
$this->handle_404();
$this->register_globals();
- do_action_ref_array('wp', array(&$this));
+ do_action_ref_array('wp', array($this));
}
/**
@@ -579,7 +579,7 @@
* @return string
*/
function apply($subject, $matches) {
- $oSelf =& new WP_MatchesMapRegex($subject, $matches);
+ $oSelf = new WP_MatchesMapRegex($subject, $matches);
return $oSelf->output;
}
@@ -590,7 +590,7 @@
* @return string
*/
function _map() {
- $callback = array(&$this, 'callback');
+ $callback = array($this, 'callback');
return preg_replace_callback($this->_pattern, $callback, $this->_subject);
}
Index: wp-includes/class.wp-dependencies.php
===================================================================
--- wp-includes/class.wp-dependencies.php (revision 17501)
+++ wp-includes/class.wp-dependencies.php (working copy)
@@ -27,7 +27,7 @@
function WP_Dependencies() {
$args = func_get_args();
- call_user_func_array( array(&$this, '__construct'), $args );
+ call_user_func_array( array($this, '__construct'), $args );
}
function __construct() {}
Index: wp-includes/class.wp-scripts.php
===================================================================
--- wp-includes/class.wp-scripts.php (revision 17501)
+++ wp-includes/class.wp-scripts.php (working copy)
@@ -31,7 +31,7 @@
var $default_dirs;
function __construct() {
- do_action_ref_array( 'wp_default_scripts', array(&$this) );
+ do_action_ref_array( 'wp_default_scripts', array($this) );
}
/**
Index: wp-includes/class.wp-styles.php
===================================================================
--- wp-includes/class.wp-styles.php (revision 17501)
+++ wp-includes/class.wp-styles.php (working copy)
@@ -28,7 +28,7 @@
var $default_dirs;
function __construct() {
- do_action_ref_array( 'wp_default_styles', array(&$this) );
+ do_action_ref_array( 'wp_default_styles', array($this) );
}
function do_item( $handle ) {
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php (revision 17501)
+++ wp-includes/comment.php (working copy)
@@ -221,7 +221,7 @@
);
$this->query_vars = wp_parse_args( $query_vars, $defaults );
- do_action_ref_array( 'pre_get_comments', array( &$this ) );
+ do_action_ref_array( 'pre_get_comments', array( $this ) );
extract( $this->query_vars, EXTR_SKIP );
// $args can be whatever, only use the args defined in defaults to compute the key
@@ -320,7 +320,7 @@
$where .= $this->get_search_sql( $search, array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' ) );
$pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits' );
- $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) );
+ $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), $this ) );
foreach ( $pieces as $piece )
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
@@ -330,7 +330,7 @@
return $wpdb->get_var( $query );
$comments = $wpdb->get_results( $query );
- $comments = apply_filters_ref_array( 'the_comments', array( $comments, &$this ) );
+ $comments = apply_filters_ref_array( 'the_comments', array( $comments, $this ) );
wp_cache_add( $cache_key, $comments, 'comment' );
Index: wp-includes/default-widgets.php
===================================================================
--- wp-includes/default-widgets.php (revision 17501)
+++ wp-includes/default-widgets.php (working copy)
@@ -514,9 +514,9 @@
$this->WP_Widget('recent-posts', __('Recent Posts'), $widget_ops);
$this->alt_option_name = 'widget_recent_entries';
- add_action( 'save_post', array(&$this, 'flush_widget_cache') );
- add_action( 'deleted_post', array(&$this, 'flush_widget_cache') );
- add_action( 'switch_theme', array(&$this, 'flush_widget_cache') );
+ add_action( 'save_post', array($this, 'flush_widget_cache') );
+ add_action( 'deleted_post', array($this, 'flush_widget_cache') );
+ add_action( 'switch_theme', array($this, 'flush_widget_cache') );
}
function widget($args, $instance) {
@@ -601,10 +601,10 @@
$this->alt_option_name = 'widget_recent_comments';
if ( is_active_widget(false, false, $this->id_base) )
- add_action( 'wp_head', array(&$this, 'recent_comments_style') );
+ add_action( 'wp_head', array($this, 'recent_comments_style') );
- add_action( 'comment_post', array(&$this, 'flush_widget_cache') );
- add_action( 'transition_comment_status', array(&$this, 'flush_widget_cache') );
+ add_action( 'comment_post', array($this, 'flush_widget_cache') );
+ add_action( 'transition_comment_status', array($this, 'flush_widget_cache') );
}
function recent_comments_style() {
Index: wp-includes/l10n.php
===================================================================
--- wp-includes/l10n.php (revision 17501)
+++ wp-includes/l10n.php (working copy)
@@ -483,7 +483,7 @@
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];
}
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php (revision 17501)
+++ wp-includes/media.php (working copy)
@@ -1036,20 +1036,20 @@
*/
function __construct() {
// Hack to get the [embed] shortcode to run before wpautop()
- add_filter( 'the_content', array(&$this, 'run_shortcode'), 8 );
+ add_filter( 'the_content', array($this, 'run_shortcode'), 8 );
// Shortcode placeholder for strip_shortcodes()
add_shortcode( 'embed', '__return_false' );
// Attempts to embed all URLs in a post
if ( get_option('embed_autourls') )
- add_filter( 'the_content', array(&$this, 'autoembed'), 8 );
+ add_filter( 'the_content', array($this, 'autoembed'), 8 );
// After a post is saved, invalidate the oEmbed cache
- add_action( 'save_post', array(&$this, 'delete_oembed_caches') );
+ add_action( 'save_post', array($this, 'delete_oembed_caches') );
// After a post is saved, cache oEmbed items via AJAX
- add_action( 'edit_form_advanced', array(&$this, 'maybe_run_ajax_cache') );
+ add_action( 'edit_form_advanced', array($this, 'maybe_run_ajax_cache') );
}
/**
@@ -1074,7 +1074,7 @@
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
- add_shortcode( 'embed', array(&$this, 'shortcode') );
+ add_shortcode( 'embed', array($this, 'shortcode') );
// Do the shortcode (only the [embed] one is registered)
$content = do_shortcode( $content );
@@ -1264,7 +1264,7 @@
* @return string Potentially modified $content.
*/
function autoembed( $content ) {
- return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array(&$this, 'autoembed_callback'), $content );
+ return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array($this, 'autoembed_callback'), $content );
}
/**
Index: wp-includes/plugin.php
===================================================================
--- wp-includes/plugin.php (revision 17501)
+++ wp-includes/plugin.php (working copy)
@@ -374,7 +374,7 @@
}
$args = array();
- if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this)
+ if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array($this)
$args[] =& $arg[0];
else
$args[] = $arg;
Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php (revision 17501)
+++ wp-includes/query.php (working copy)
@@ -89,7 +89,7 @@
*/
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);
}
@@ -1627,7 +1627,7 @@
if ( '404' == $qv['error'] )
$this->set_404();
- do_action_ref_array('parse_query', array(&$this));
+ do_action_ref_array('parse_query', array($this));
}
/*
@@ -1877,7 +1877,7 @@
$this->parse_query();
- do_action_ref_array('pre_get_posts', array(&$this));
+ do_action_ref_array('pre_get_posts', array($this));
// Shorthand.
$q = &$this->query_vars;
@@ -2147,7 +2147,7 @@
}
// Allow plugins to contextually add/remove/modify the search section of the database query
- $search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
+ $search = apply_filters_ref_array('posts_search', array( $search, $this ) );
// Taxonomies
$this->parse_tax_query( $q );
@@ -2443,7 +2443,7 @@
}
if ( !empty( $q['meta_query'] ) ) {
- $clauses = call_user_func_array( '_get_meta_sql', array( $q['meta_query'], 'post', $wpdb->posts, 'ID', &$this) );
+ $clauses = call_user_func_array( '_get_meta_sql', array( $q['meta_query'], 'post', $wpdb->posts, 'ID', $this) );
$join .= $clauses['join'];
$where .= $clauses['where'];
}
@@ -2451,8 +2451,8 @@
// Apply filters on where and join prior to paging so that any
// manipulations to them are reflected in the paging by day queries.
if ( !$q['suppress_filters'] ) {
- $where = apply_filters_ref_array('posts_where', array( $where, &$this ) );
- $join = apply_filters_ref_array('posts_join', array( $join, &$this ) );
+ $where = apply_filters_ref_array('posts_where', array( $where, $this ) );
+ $join = apply_filters_ref_array('posts_join', array( $join, $this ) );
}
// Paging
@@ -2485,11 +2485,11 @@
}
if ( !$q['suppress_filters'] ) {
- $cjoin = apply_filters_ref_array('comment_feed_join', array( $cjoin, &$this ) );
- $cwhere = apply_filters_ref_array('comment_feed_where', array( $cwhere, &$this ) );
- $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( $cgroupby, &$this ) );
- $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
- $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
+ $cjoin = apply_filters_ref_array('comment_feed_join', array( $cjoin, $this ) );
+ $cwhere = apply_filters_ref_array('comment_feed_where', array( $cwhere, $this ) );
+ $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( $cgroupby, $this ) );
+ $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', $this ) );
+ $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), $this ) );
}
$cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
$corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
@@ -2517,16 +2517,16 @@
// Apply post-paging filters on where and join. Only plugins that
// manipulate paging queries should use these hooks.
if ( !$q['suppress_filters'] ) {
- $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) );
- $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) );
- $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) );
- $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) );
- $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) );
- $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) );
- $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );
+ $where = apply_filters_ref_array( 'posts_where_paged', array( $where, $this ) );
+ $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, $this ) );
+ $join = apply_filters_ref_array( 'posts_join_paged', array( $join, $this ) );
+ $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, $this ) );
+ $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, $this ) );
+ $limits = apply_filters_ref_array( 'post_limits', array( $limits, $this ) );
+ $fields = apply_filters_ref_array( 'posts_fields', array( $fields, $this ) );
// Filter all clauses at once, for convenience
- $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
+ $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), $this ) );
foreach ( $pieces as $piece )
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
}
@@ -2536,16 +2536,16 @@
// Filter again for the benefit of caching plugins. Regular plugins should use the hooks above.
if ( !$q['suppress_filters'] ) {
- $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) );
- $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) );
- $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) );
- $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) );
- $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) );
- $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) );
- $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) );
+ $where = apply_filters_ref_array( 'posts_where_request', array( $where, $this ) );
+ $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, $this ) );
+ $join = apply_filters_ref_array( 'posts_join_request', array( $join, $this ) );
+ $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, $this ) );
+ $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, $this ) );
+ $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, $this ) );
+ $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, $this ) );
// Filter all clauses at once, for convenience
- $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
+ $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), $this ) );
foreach ( $pieces as $piece )
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
}
@@ -2561,7 +2561,7 @@
$this->request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
if ( !$q['suppress_filters'] )
- $this->request = apply_filters_ref_array('posts_request', array( $this->request, &$this ) );
+ $this->request = apply_filters_ref_array('posts_request', array( $this->request, $this ) );
if ( 'ids' == $q['fields'] ) {
$this->posts = $wpdb->get_col($this->request);
@@ -2583,25 +2583,25 @@
// Raw results filter. Prior to status checks.
if ( !$q['suppress_filters'] )
- $this->posts = apply_filters_ref_array('posts_results', array( $this->posts, &$this ) );
+ $this->posts = apply_filters_ref_array('posts_results', array( $this->posts, $this ) );
if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {
- $cjoin = apply_filters_ref_array('comment_feed_join', array( '', &$this ) );
- $cwhere = apply_filters_ref_array('comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );
- $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( '', &$this ) );
+ $cjoin = apply_filters_ref_array('comment_feed_join', array( '', $this ) );
+ $cwhere = apply_filters_ref_array('comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", $this ) );
+ $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( '', $this ) );
$cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
- $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
+ $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', $this ) );
$corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
- $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
+ $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), $this ) );
$comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits";
$this->comments = $wpdb->get_results($comments_request);
$this->comment_count = count($this->comments);
}
if ( !$q['no_found_rows'] && !empty($limits) ) {
- $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) );
+ $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', $this ) );
$this->found_posts = $wpdb->get_var( $found_posts_query );
- $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );
+ $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, $this ) );
$this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
}
@@ -2634,7 +2634,7 @@
}
if ( $this->is_preview && current_user_can( $edit_cap, $this->posts[0]->ID ) )
- $this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], &$this ));
+ $this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], $this ));
}
// Put sticky posts at the top of the posts array
@@ -2688,7 +2688,7 @@
}
if ( !$q['suppress_filters'] )
- $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, &$this ) );
+ $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, $this ) );
$this->post_count = count($this->posts);
@@ -2739,7 +2739,7 @@
$this->in_the_loop = true;
if ( $this->current_post == -1 ) // loop has just started
- do_action_ref_array('loop_start', array(&$this));
+ do_action_ref_array('loop_start', array($this));
$post = $this->next_post();
setup_postdata($post);
@@ -2760,7 +2760,7 @@
if ( $this->current_post + 1 < $this->post_count ) {
return true;
} elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
- do_action_ref_array('loop_end', array(&$this));
+ do_action_ref_array('loop_end', array($this));
// Do some cleaning up after the loop
$this->rewind_posts();
}
Index: wp-includes/rewrite.php
===================================================================
--- wp-includes/rewrite.php (revision 17501)
+++ wp-includes/rewrite.php (working copy)
@@ -1562,7 +1562,7 @@
else
$this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
- do_action_ref_array('generate_rewrite_rules', array(&$this));
+ do_action_ref_array('generate_rewrite_rules', array($this));
$this->rules = apply_filters('rewrite_rules_array', $this->rules);
return $this->rules;
Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php (revision 17501)
+++ wp-includes/taxonomy.php (working copy)
@@ -1118,7 +1118,7 @@
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;
}
}
Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php (revision 17501)
+++ wp-includes/theme.php (working copy)
@@ -1615,7 +1615,7 @@
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' ) );
}
Index: wp-includes/user.php
===================================================================
--- wp-includes/user.php (revision 17501)
+++ wp-includes/user.php (working copy)
@@ -518,7 +518,7 @@
}
if ( !empty( $qv['meta_query'] ) ) {
- $clauses = call_user_func_array( '_get_meta_sql', array( $qv['meta_query'], 'user', $wpdb->users, 'ID', &$this ) );
+ $clauses = call_user_func_array( '_get_meta_sql', array( $qv['meta_query'], 'user', $wpdb->users, 'ID', $this ) );
$this->query_from .= $clauses['join'];
$this->query_where .= $clauses['where'];
}
@@ -531,7 +531,7 @@
$this->query_where .= " AND $wpdb->users.ID NOT IN ($ids)";
}
- do_action_ref_array( 'pre_user_query', array( &$this ) );
+ do_action_ref_array( 'pre_user_query', array( $this ) );
}
/**
Index: wp-includes/widgets.php
===================================================================
--- wp-includes/widgets.php (revision 17501)
+++ wp-includes/widgets.php (working copy)
@@ -152,15 +152,15 @@
}
function _get_display_callback() {
- return array(&$this, 'display_callback');
+ return array($this, 'display_callback');
}
function _get_update_callback() {
- return array(&$this, 'update_callback');
+ return array($this, 'update_callback');
}
function _get_form_callback() {
- return array(&$this, 'form_callback');
+ return array($this, 'form_callback');
}
/** Generate the actual widget content.
@@ -270,7 +270,7 @@
$return = $this->form($instance);
// add extra fields in the widget form - be sure to set $return to null if you add any
// if the widget has no form the text echoed from the default form method can be hidden using css
- do_action_ref_array( 'in_widget_form', array(&$this, &$return, $instance) );
+ do_action_ref_array( 'in_widget_form', array($this, &$return, $instance) );
}
return $return;
}
@@ -317,11 +317,11 @@
var $widgets = array();
function WP_Widget_Factory() {
- add_action( 'widgets_init', array( &$this, '_register_widgets' ), 100 );
+ add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 );
}
function register($widget_class) {
- $this->widgets[$widget_class] = & new $widget_class();
+ $this->widgets[$widget_class] = new $widget_class();
}
function unregister($widget_class) {
Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php (revision 17501)
+++ wp-includes/wp-db.php (working copy)
@@ -494,7 +494,7 @@
* @param string $dbhost MySQL database host
*/
function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
- register_shutdown_function( array( &$this, '__destruct' ) );
+ register_shutdown_function( array( $this, '__destruct' ) );
if ( WP_DEBUG )
$this->show_errors();
@@ -903,7 +903,7 @@
$query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it
$query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
$query = preg_replace( '|(?