Index: wp-admin/includes/class-wp-importer.php
===================================================================
--- wp-admin/includes/class-wp-importer.php (revision 17517)
+++ 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 17517)
+++ 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 17517)
+++ 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 17517)
+++ 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 17517)
+++ 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');
@@ -931,9 +931,9 @@
$this->options = wp_parse_args($args, $defaults);
}
- function set_upgrader(&$upgrader) {
+ function set_upgrader($upgrader) {
if ( is_object($upgrader) )
- $this->upgrader =& $upgrader;
+ $this->upgrader = $upgrader;
$this->add_strings();
}
Index: wp-admin/includes/dashboard.php
===================================================================
--- wp-admin/includes/dashboard.php (revision 17517)
+++ wp-admin/includes/dashboard.php (working copy)
@@ -649,8 +649,8 @@
endif; // $comments;
}
-function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
- $GLOBALS['comment'] =& $comment;
+function _wp_dashboard_recent_comments_row( $comment, $show_date = true ) {
+ $GLOBALS['comment'] = $comment;
$comment_post_url = get_edit_post_link( $comment->comment_post_ID );
$comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID ));
Index: wp-admin/includes/deprecated.php
===================================================================
--- wp-admin/includes/deprecated.php (revision 17517)
+++ 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( 'pre_user_search', $this );
}
/**
Index: wp-admin/includes/list-table.php
===================================================================
--- wp-admin/includes/list-table.php (revision 17517)
+++ 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/includes/template.php
===================================================================
--- wp-admin/includes/template.php (revision 17517)
+++ wp-admin/includes/template.php (working copy)
@@ -135,10 +135,10 @@
}
// Put checked cats on top
- echo call_user_func_array(array(&$walker, 'walk'), array($checked_categories, 0, $args));
+ echo call_user_func_array(array($walker, 'walk'), array($checked_categories, 0, $args));
}
// Then the rest of them
- echo call_user_func_array(array(&$walker, 'walk'), array($categories, 0, $args));
+ echo call_user_func_array(array($walker, 'walk'), array($categories, 0, $args));
}
/**
Index: wp-admin/includes/user.php
===================================================================
--- wp-admin/includes/user.php (revision 17517)
+++ wp-admin/includes/user.php (working copy)
@@ -176,7 +176,7 @@
}
// Allow plugins to return their own errors.
- do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) );
+ do_action('user_profile_update_errors', $errors, $update, $user );
if ( $errors->get_error_codes() )
return $errors;
Index: wp-admin/custom-background.php
===================================================================
--- wp-admin/custom-background.php (revision 17517)
+++ 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 17517)
+++ 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/pomo/po.php
===================================================================
--- wp-includes/pomo/po.php (revision 17517)
+++ wp-includes/pomo/po.php (working copy)
@@ -175,11 +175,11 @@
* Builds a string from the entry for inclusion in PO file
*
* @static
- * @param object &$entry the entry to convert to po string
+ * @param object $entry the entry to convert to po string
* @return string|bool PO-style formatted string for the entry or
* false if the entry is empty
*/
- function export_entry(&$entry) {
+ function export_entry($entry) {
if (is_null($entry->singular)) return false;
$po = array();
if (!empty($entry->translator_comments)) $po[] = PO::comment_block($entry->translator_comments);
@@ -340,7 +340,7 @@
return $line;
}
- function add_comment_to_entry(&$entry, $po_comment_line) {
+ function add_comment_to_entry($entry, $po_comment_line) {
$first_two = substr($po_comment_line, 0, 2);
$comment = trim(substr($po_comment_line, 2));
if ('#:' == $first_two) {
Index: wp-includes/pomo/translations.php
===================================================================
--- wp-includes/pomo/translations.php (revision 17517)
+++ wp-includes/pomo/translations.php (working copy)
@@ -44,7 +44,7 @@
$this->headers[$header] = $value;
}
- function set_headers(&$headers) {
+ function set_headers($headers) {
foreach($headers as $header => $value) {
$this->set_header($header, $value);
}
@@ -54,7 +54,7 @@
return isset($this->headers[$header])? $this->headers[$header] : false;
}
- function translate_entry(&$entry) {
+ function translate_entry($entry) {
$key = $entry->key();
return isset($this->entries[$key])? $this->entries[$key] : false;
}
@@ -103,7 +103,7 @@
* @param Object &$other Another Translation object, whose translations will be merged in this one
* @return void
**/
- function merge_with(&$other) {
+ function merge_with($other) {
foreach( $other->entries as $entry ) {
$this->entries[$entry->key()] = $entry;
}
@@ -220,14 +220,14 @@
function set_header($header, $value) {
}
- function set_headers(&$headers) {
+ function set_headers($headers) {
}
function get_header($header) {
return false;
}
- function translate_entry(&$entry) {
+ function translate_entry($entry) {
return false;
}
@@ -247,7 +247,7 @@
return 1 == $count? $singular : $plural;
}
- function merge_with(&$other) {
+ function merge_with($other) {
}
}
endif;
Index: wp-includes/admin-bar.php
===================================================================
--- wp-includes/admin-bar.php (revision 17517)
+++ wp-includes/admin-bar.php (working copy)
@@ -57,7 +57,7 @@
$wp_admin_bar->load_user_locale_translations();
- do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) );
+ do_action( 'admin_bar_menu', $wp_admin_bar );
do_action( 'wp_before_admin_bar_render' );
Index: wp-includes/cache.php
===================================================================
--- wp-includes/cache.php (revision 17517)
+++ 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 17517)
+++ wp-includes/capabilities.php (working copy)
@@ -208,7 +208,7 @@
* @param string $role Role name.
* @return object|null Null, if role does not exist. WP_Role object, if found.
*/
- function &get_role( $role ) {
+ function get_role( $role ) {
if ( isset( $this->role_objects[$role] ) )
return $this->role_objects[$role];
else
@@ -545,12 +545,12 @@
//Filter out caps that are not role names and assign to $this->roles
if ( is_array( $this->caps ) )
- $this->roles = array_filter( array_keys( $this->caps ), array( &$wp_roles, 'is_role' ) );
+ $this->roles = array_filter( array_keys( $this->caps ), array( $wp_roles, 'is_role' ) );
//Build $allcaps from role caps, overlay user's $caps
$this->allcaps = array();
foreach ( (array) $this->roles as $role ) {
- $the_role =& $wp_roles->get_role( $role );
+ $the_role = $wp_roles->get_role( $role );
$this->allcaps = array_merge( (array) $this->allcaps, (array) $the_role->capabilities );
}
$this->allcaps = array_merge( (array) $this->allcaps, (array) $this->caps );
@@ -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 );
}
@@ -1033,7 +1033,7 @@
$args = array_slice( func_get_args(), 1 );
$args = array_merge( array( $capability ), $args );
- return call_user_func_array( array( &$current_user, 'has_cap' ), $args );
+ return call_user_func_array( array( $current_user, 'has_cap' ), $args );
}
/**
@@ -1060,7 +1060,7 @@
$args = array_slice( func_get_args(), 2 );
$args = array_merge( array( $capability ), $args );
- return call_user_func_array( array( &$user, 'has_cap' ), $args );
+ return call_user_func_array( array( $user, 'has_cap' ), $args );
}
/**
@@ -1084,7 +1084,7 @@
$args = array_slice( func_get_args(), 2 );
$args = array_merge( array( $capability ), $args );
- return call_user_func_array( array( &$author, 'has_cap' ), $args );
+ return call_user_func_array( array( $author, 'has_cap' ), $args );
}
/**
@@ -1106,7 +1106,7 @@
$args = array_slice( func_get_args(), 2 );
$args = array_merge( array( $capability ), $args );
- return call_user_func_array( array( &$user, 'has_cap' ), $args );
+ return call_user_func_array( array( $user, 'has_cap' ), $args );
}
/**
Index: wp-includes/category-template.php
===================================================================
--- wp-includes/category-template.php (revision 17517)
+++ wp-includes/category-template.php (working copy)
@@ -742,7 +742,7 @@
else
$walker = $args[2]['walker'];
- return call_user_func_array(array( &$walker, 'walk' ), $args );
+ return call_user_func_array(array( $walker, 'walk' ), $args );
}
/**
@@ -760,7 +760,7 @@
else
$walker = $args[2]['walker'];
- return call_user_func_array(array( &$walker, 'walk' ), $args );
+ return call_user_func_array(array( $walker, 'walk' ), $args );
}
/**
Index: wp-includes/class-oembed.php
===================================================================
--- wp-includes/class-oembed.php (revision 17517)
+++ 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 17517)
+++ 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 17517)
+++ 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( 'parse_request', $this );
}
/**
@@ -373,7 +373,7 @@
if ( $exit_required )
exit();
- do_action_ref_array('send_headers', array(&$this));
+ do_action( 'send_headers', $this );
}
/**
@@ -501,7 +501,7 @@
$this->query_posts();
$this->handle_404();
$this->register_globals();
- do_action_ref_array('wp', array(&$this));
+ do_action( 'wp', $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 17517)
+++ 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 17517)
+++ 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( 'wp_default_scripts', $this );
}
/**
Index: wp-includes/class.wp-styles.php
===================================================================
--- wp-includes/class.wp-styles.php (revision 17517)
+++ 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( 'wp_default_styles', $this );
}
function do_item( $handle ) {
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php (revision 17517)
+++ wp-includes/comment.php (working copy)
@@ -127,41 +127,38 @@
* @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
* @return object|array|null Depends on $output value.
*/
-function &get_comment(&$comment, $output = OBJECT) {
+function get_comment($comment, $output = OBJECT) {
global $wpdb;
$null = null;
if ( empty($comment) ) {
if ( isset($GLOBALS['comment']) )
- $_comment = & $GLOBALS['comment'];
+ $comment = $GLOBALS['comment'];
else
- $_comment = null;
+ $comment = null;
} elseif ( is_object($comment) ) {
wp_cache_add($comment->comment_ID, $comment, 'comment');
- $_comment = $comment;
} else {
if ( isset($GLOBALS['comment']) && ($GLOBALS['comment']->comment_ID == $comment) ) {
- $_comment = & $GLOBALS['comment'];
- } elseif ( ! $_comment = wp_cache_get($comment, 'comment') ) {
- $_comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment));
- if ( ! $_comment )
+ $comment = $GLOBALS['comment'];
+ } elseif ( ! $comment = wp_cache_get($comment, 'comment') ) {
+ $comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment));
+ if ( ! $comment )
return $null;
- wp_cache_add($_comment->comment_ID, $_comment, 'comment');
+ wp_cache_add($comment->comment_ID, $comment, 'comment');
}
}
- $_comment = apply_filters('get_comment', $_comment);
+ $comment = apply_filters('get_comment', $comment);
if ( $output == OBJECT ) {
- return $_comment;
+ return $comment;
} elseif ( $output == ARRAY_A ) {
- $__comment = get_object_vars($_comment);
- return $__comment;
+ return get_object_vars($comment);
} elseif ( $output == ARRAY_N ) {
- $__comment = array_values(get_object_vars($_comment));
- return $__comment;
+ return array_values(get_object_vars($comment));
} else {
- return $_comment;
+ return $comment;
}
}
@@ -221,7 +218,7 @@
);
$this->query_vars = wp_parse_args( $query_vars, $defaults );
- do_action_ref_array( 'pre_get_comments', array( &$this ) );
+ do_action( 'pre_get_comments', $this );
extract( $this->query_vars, EXTR_SKIP );
// $args can be whatever, only use the args defined in defaults to compute the key
@@ -320,7 +317,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( 'comments_clauses', compact( $pieces ), $this );
foreach ( $pieces as $piece )
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
@@ -330,7 +327,7 @@
return $wpdb->get_var( $query );
$comments = $wpdb->get_results( $query );
- $comments = apply_filters_ref_array( 'the_comments', array( $comments, &$this ) );
+ $comments = apply_filters( 'the_comments', $comments, $this );
wp_cache_add( $cache_key, $comments, 'comment' );
@@ -688,7 +685,7 @@
* @param array $comments Array of comments
* @return array Array of comments keyed by comment_type.
*/
-function &separate_comments(&$comments) {
+function separate_comments($comments) {
$comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array());
$count = count($comments);
for ( $i = 0; $i < $count; $i++ ) {
Index: wp-includes/default-widgets.php
===================================================================
--- wp-includes/default-widgets.php (revision 17517)
+++ 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/feed.php
===================================================================
--- wp-includes/feed.php (revision 17517)
+++ wp-includes/feed.php (working copy)
@@ -535,7 +535,7 @@
$feed->set_cache_class('WP_Feed_Cache');
$feed->set_file_class('WP_SimplePie_File');
$feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url));
- do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
+ do_action( 'wp_feed_options', $feed, $url );
$feed->init();
$feed->handle_content_type();
Index: wp-includes/http.php
===================================================================
--- wp-includes/http.php (revision 17517)
+++ wp-includes/http.php (working copy)
@@ -116,7 +116,7 @@
* @param array $response HTTP response.
* @return array The headers of the response. Empty array if incorrect parameter given.
*/
-function wp_remote_retrieve_headers(&$response) {
+function wp_remote_retrieve_headers($response) {
if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers']))
return array();
@@ -132,7 +132,7 @@
* @param string $header Header name to retrieve value from.
* @return string The header value. Empty string on if incorrect parameter given, or if the header doesnt exist.
*/
-function wp_remote_retrieve_header(&$response, $header) {
+function wp_remote_retrieve_header($response, $header) {
if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers']))
return '';
@@ -152,7 +152,7 @@
* @param array $response HTTP response.
* @return string the response code. Empty string on incorrect parameter given.
*/
-function wp_remote_retrieve_response_code(&$response) {
+function wp_remote_retrieve_response_code($response) {
if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response']))
return '';
@@ -169,7 +169,7 @@
* @param array $response HTTP response.
* @return string The response message. Empty string on incorrect parameter given.
*/
-function wp_remote_retrieve_response_message(&$response) {
+function wp_remote_retrieve_response_message($response) {
if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response']))
return '';
@@ -184,7 +184,7 @@
* @param array $response HTTP response.
* @return string The body of the response. Empty string if no body or incorrect parameter given.
*/
-function wp_remote_retrieve_body(&$response) {
+function wp_remote_retrieve_body($response) {
if ( is_wp_error($response) || ! isset($response['body']) )
return '';
Index: wp-includes/l10n.php
===================================================================
--- wp-includes/l10n.php (revision 17517)
+++ 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 17517)
+++ 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/meta.php
===================================================================
--- wp-includes/meta.php (revision 17517)
+++ wp-includes/meta.php (working copy)
@@ -442,7 +442,7 @@
$where .= $wpdb->prepare( " AND CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$meta_compare_string}", $meta_value );
}
- return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &$context ) );
+ return apply_filters( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, $context ) );
}
/**
Index: wp-includes/nav-menu-template.php
===================================================================
--- wp-includes/nav-menu-template.php (revision 17517)
+++ wp-includes/nav-menu-template.php (working copy)
@@ -470,7 +470,7 @@
$walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker;
$args = array( $items, $depth, $r );
- return call_user_func_array( array(&$walker, 'walk'), $args );
+ return call_user_func_array( array($walker, 'walk'), $args );
}
/**
Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php (revision 17517)
+++ wp-includes/pluggable.php (working copy)
@@ -256,7 +256,7 @@
* @uses apply_filters() Calls 'wp_mail_from_name' hook to get the from address name.
* @uses apply_filters() Calls 'wp_mail_content_type' hook to get the email content type.
* @uses apply_filters() Calls 'wp_mail_charset' hook to get the email charset
- * @uses do_action_ref_array() Calls 'phpmailer_init' hook on the reference to
+ * @uses do_action() Calls 'phpmailer_init' hook on the reference to
* phpmailer object.
* @uses PHPMailer
* @
@@ -459,7 +459,7 @@
}
}
- do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
+ do_action( 'phpmailer_init', $phpmailer );
// Send!
$result = @$phpmailer->Send();
@@ -1188,7 +1188,7 @@
*
* @param object $user User Object
*/
-function wp_password_change_notification(&$user) {
+function wp_password_change_notification($user) {
// send a copy of password change notification to the admin
// but check to see if it's the admin whose password we're changing, and skip this
if ( $user->user_email != get_option('admin_email') ) {
Index: wp-includes/plugin.php
===================================================================
--- wp-includes/plugin.php (revision 17517)
+++ 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/post-template.php
===================================================================
--- wp-includes/post-template.php (revision 17517)
+++ wp-includes/post-template.php (working copy)
@@ -935,7 +935,7 @@
$walker = $r['walker'];
$args = array($pages, $depth, $r, $current_page);
- return call_user_func_array(array(&$walker, 'walk'), $args);
+ return call_user_func_array(array($walker, 'walk'), $args);
}
/**
@@ -952,7 +952,7 @@
else
$walker = $args[2]['walker'];
- return call_user_func_array(array(&$walker, 'walk'), $args);
+ return call_user_func_array(array($walker, 'walk'), $args);
}
/**
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php (revision 17517)
+++ wp-includes/post.php (working copy)
@@ -359,19 +359,19 @@
* @param string $filter Optional, default is raw.
* @return mixed Post data
*/
-function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
+function get_post($post, $output = OBJECT, $filter = 'raw') {
global $wpdb;
$null = null;
if ( empty($post) ) {
if ( isset($GLOBALS['post']) )
- $_post = & $GLOBALS['post'];
+ $post = $GLOBALS['post'];
else
return $null;
} elseif ( is_object($post) && empty($post->filter) ) {
_get_post_ancestors($post);
- $_post = sanitize_post($post, 'raw');
- wp_cache_add($post->ID, $_post, 'posts');
+ $post = sanitize_post($post, 'raw');
+ wp_cache_add($post->ID, $post, 'posts');
} else {
if ( is_object($post) )
$post_id = $post->ID;
@@ -379,29 +379,27 @@
$post_id = $post;
$post_id = (int) $post_id;
- if ( ! $_post = wp_cache_get($post_id, 'posts') ) {
- $_post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $post_id));
- if ( ! $_post )
+ if ( ! $post = wp_cache_get($post_id, 'posts') ) {
+ $post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $post_id));
+ if ( ! $post )
return $null;
- _get_post_ancestors($_post);
- $_post = sanitize_post($_post, 'raw');
- wp_cache_add($_post->ID, $_post, 'posts');
+ _get_post_ancestors($post);
+ $post = sanitize_post($post, 'raw');
+ wp_cache_add($post->ID, $post, 'posts');
}
}
if ($filter != 'raw')
- $_post = sanitize_post($_post, $filter);
+ $post = sanitize_post($post, $filter);
if ( $output == OBJECT ) {
- return $_post;
+ return $post;
} elseif ( $output == ARRAY_A ) {
- $__post = get_object_vars($_post);
- return $__post;
+ return get_object_vars($post);
} elseif ( $output == ARRAY_N ) {
- $__post = array_values(get_object_vars($_post));
- return $__post;
+ return array_values(get_object_vars($_post));
} else {
- return $_post;
+ return $post;
}
}
@@ -3110,9 +3108,8 @@
* @param string $filter How the return value should be filtered.
* @return mixed Page data.
*/
-function &get_page(&$page, $output = OBJECT, $filter = 'raw') {
- $p = get_post($page, $output, $filter);
- return $p;
+function get_page($page, $output = OBJECT, $filter = 'raw') {
+ return get_post($page, $output, $filter);
}
/**
@@ -4194,7 +4191,7 @@
$add_seconds_server = date('Z');
$post_types = get_post_types( array( 'publicly_queryable' => true ) );
- array_walk( $post_types, array( &$wpdb, 'escape_by_ref' ) );
+ array_walk( $post_types, array( $wpdb, 'escape_by_ref' ) );
$post_types = "'" . implode( "', '", $post_types ) . "'";
switch ( $timezone ) {
@@ -4227,7 +4224,7 @@
*
* @param array $posts Array of post objects
*/
-function update_post_cache(&$posts) {
+function update_post_cache($posts) {
if ( !$posts )
return;
@@ -4298,7 +4295,7 @@
*
* @param array $pages list of page objects
*/
-function update_page_cache(&$pages) {
+function update_page_cache($pages) {
update_post_cache($pages);
}
@@ -4342,7 +4339,7 @@
* @param bool $update_term_cache Whether to update the term cache. Default is true.
* @param bool $update_meta_cache Whether to update the meta cache. Default is true.
*/
-function update_post_caches(&$posts, $post_type = 'post', $update_term_cache = true, $update_meta_cache = true) {
+function update_post_caches($posts, $post_type = 'post', $update_term_cache = true, $update_meta_cache = true) {
// No point in doing all this work if we didn't match any posts.
if ( !$posts )
return;
@@ -4573,7 +4570,7 @@
* @param object $_post Post data.
* @return null When nothing needs to be done.
*/
-function _get_post_ancestors(&$_post) {
+function _get_post_ancestors($_post) {
global $wpdb;
if ( isset($_post->ancestors) )
@@ -4836,7 +4833,7 @@
* @param string $filter Optional sanitation filter. @see sanitize_post()
* @return mixed Null if error or post object if success
*/
-function &wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
+function wp_get_post_revision($post, $output = OBJECT, $filter = 'raw') {
$null = null;
if ( !$revision = get_post( $post, OBJECT, $filter ) )
return $revision;
@@ -4846,11 +4843,9 @@
if ( $output == OBJECT ) {
return $revision;
} elseif ( $output == ARRAY_A ) {
- $_revision = get_object_vars($revision);
- return $_revision;
+ return get_object_vars($revision);
} elseif ( $output == ARRAY_N ) {
- $_revision = array_values(get_object_vars($revision));
- return $_revision;
+ return array_values(get_object_vars($revision));
}
return $revision;
Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php (revision 17517)
+++ 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( 'parse_query', $this );
}
/*
@@ -1868,7 +1868,7 @@
*
* @since 1.5.0
* @access public
- * @uses do_action_ref_array() Calls 'pre_get_posts' hook before retrieving posts.
+ * @uses do_action() Calls 'pre_get_posts' hook before retrieving posts.
*
* @return array List of posts.
*/
@@ -1877,7 +1877,7 @@
$this->parse_query();
- do_action_ref_array('pre_get_posts', array(&$this));
+ do_action( 'pre_get_posts', $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( 'posts_search', $search, $this );
// Taxonomies
if ( !$this->is_singular ) {
@@ -2445,7 +2445,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'];
}
@@ -2453,8 +2453,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( 'posts_where', $where, $this );
+ $join = apply_filters( 'posts_join', $join, $this );
}
// Paging
@@ -2487,11 +2487,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('comment_feed_join', $cjoin, $this );
+ $cwhere = apply_filters('comment_feed_where', $cwhere, $this );
+ $cgroupby = apply_filters('comment_feed_groupby', $cgroupby, $this );
+ $corderby = apply_filters('comment_feed_orderby', 'comment_date_gmt DESC', $this );
+ $climits = apply_filters('comment_feed_limits', 'LIMIT ' . get_option('posts_per_rss'), $this );
}
$cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
$corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
@@ -2519,16 +2519,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( 'posts_where_paged', $where, $this );
+ $groupby = apply_filters( 'posts_groupby', $groupby, $this );
+ $join = apply_filters( 'posts_join_paged', $join, $this );
+ $orderby = apply_filters( 'posts_orderby', $orderby, $this );
+ $distinct = apply_filters( 'posts_distinct', $distinct, $this );
+ $limits = apply_filters( 'post_limits', $limits, $this );
+ $fields = apply_filters( 'posts_fields', $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( 'posts_clauses', compact( $pieces ), $this );
foreach ( $pieces as $piece )
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
}
@@ -2538,16 +2538,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( 'posts_where_request', $where, $this );
+ $groupby = apply_filters( 'posts_groupby_request', $groupby, $this );
+ $join = apply_filters( 'posts_join_request', $join, $this );
+ $orderby = apply_filters( 'posts_orderby_request', $orderby, $this );
+ $distinct = apply_filters( 'posts_distinct_request', $distinct, $this );
+ $fields = apply_filters( 'posts_fields_request', $fields, $this );
+ $limits = apply_filters( 'post_limits_request', $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( 'posts_clauses_request', compact( $pieces ), $this );
foreach ( $pieces as $piece )
$$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
}
@@ -2563,7 +2563,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('posts_request', $this->request, $this );
if ( 'ids' == $q['fields'] ) {
$this->posts = $wpdb->get_col($this->request);
@@ -2585,25 +2585,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('posts_results', $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('comment_feed_join', '', $this );
+ $cwhere = apply_filters('comment_feed_where', "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", $this );
+ $cgroupby = apply_filters('comment_feed_groupby', '', $this );
$cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
- $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
+ $corderby = apply_filters('comment_feed_orderby', '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('comment_feed_limits', '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( 'found_posts_query', '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( 'found_posts', $this->found_posts, $this );
$this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
}
@@ -2636,7 +2636,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('the_preview', $this->posts[0], $this );
}
// Put sticky posts at the top of the posts array
@@ -2690,7 +2690,7 @@
}
if ( !$q['suppress_filters'] )
- $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, &$this ) );
+ $this->posts = apply_filters('the_posts', $this->posts, $this );
$this->post_count = count($this->posts);
@@ -2734,14 +2734,14 @@
* @since 1.5.0
* @access public
* @uses $post
- * @uses do_action_ref_array() Calls 'loop_start' if loop has just started
+ * @uses do_action() Calls 'loop_start' if loop has just started
*/
function the_post() {
global $post;
$this->in_the_loop = true;
if ( $this->current_post == -1 ) // loop has just started
- do_action_ref_array('loop_start', array(&$this));
+ do_action( 'loop_start', $this );
$post = $this->next_post();
setup_postdata($post);
@@ -2754,7 +2754,7 @@
*
* @since 1.5.0
* @access public
- * @uses do_action_ref_array() Calls 'loop_end' if loop is ended
+ * @uses do_action() Calls 'loop_end' if loop is ended
*
* @return bool True if posts are available, false if end of loop.
*/
@@ -2762,7 +2762,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( 'loop_end', $this );
// Do some cleaning up after the loop
$this->rewind_posts();
}
@@ -3487,7 +3487,7 @@
* @since 1.5.0
*
* @param object $post Post data.
- * @uses do_action_ref_array() Calls 'the_post'
+ * @uses do_action() Calls 'the_post'
* @return bool True when finished.
*/
function setup_postdata($post) {
@@ -3520,7 +3520,7 @@
$multipage = 0;
}
- do_action_ref_array('the_post', array(&$post));
+ do_action( 'the_post', $post );
return true;
}
Index: wp-includes/rewrite.php
===================================================================
--- wp-includes/rewrite.php (revision 17517)
+++ 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( 'generate_rewrite_rules', $this );
$this->rules = apply_filters('rewrite_rules_array', $this->rules);
return $this->rules;
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php (revision 17517)
+++ wp-includes/script-loader.php (working copy)
@@ -46,7 +46,7 @@
*
* @param object $scripts WP_Scripts object.
*/
-function wp_default_scripts( &$scripts ) {
+function wp_default_scripts( $scripts ) {
if ( !$guessurl = site_url() )
$guessurl = wp_guess_url();
@@ -453,7 +453,7 @@
*
* @param object $styles
*/
-function wp_default_styles( &$styles ) {
+function wp_default_styles( $styles ) {
// This checks to see if site_url() returns something and if it does not
// then it assigns $guess_url to wp_guess_url(). Strange format, but it works.
if ( ! $guessurl = site_url() )
Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php (revision 17517)
+++ wp-includes/taxonomy.php (working copy)
@@ -1120,7 +1120,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 17517)
+++ wp-includes/theme.php (working copy)
@@ -1476,7 +1476,7 @@
require_once( ABSPATH . 'wp-admin/custom-header.php' );
$custom_image_header = new Custom_Image_Header( $admin_header_callback, $admin_image_div_callback );
- add_action( 'admin_menu', array( &$custom_image_header, 'init' ) );
+ add_action( 'admin_menu', array( $custom_image_header, 'init' ) );
}
/**
@@ -1497,7 +1497,7 @@
remove_theme_support( 'custom-header-uploads' );
if ( is_admin() ) {
- remove_action( 'admin_menu', array( &$GLOBALS['custom_image_header'], 'init' ) );
+ remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
unset( $GLOBALS['custom_image_header'] );
}
@@ -1615,8 +1615,8 @@
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 );
- add_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) );
+ $GLOBALS['custom_background'] = new Custom_Background( $admin_header_callback, $admin_image_div_callback );
+ add_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
}
/**
@@ -1636,7 +1636,7 @@
_remove_theme_support( 'custom-background' );
if ( is_admin() ) {
- remove_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) );
+ remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
unset( $GLOBALS['custom_background'] );
}
Index: wp-includes/user.php
===================================================================
--- wp-includes/user.php (revision 17517)
+++ 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( 'pre_user_query', $this );
}
/**
@@ -1052,7 +1052,7 @@
*
* @param object $user The user data object.
*/
-function _fill_user( &$user ) {
+function _fill_user( $user ) {
$metavalues = get_user_metavalues(array($user->ID));
_fill_single_user($user, $metavalues[$user->ID]);
}
@@ -1091,7 +1091,7 @@
* @param object $user The User object.
* @param array $metavalues An array of objects provided by get_user_metavalues()
*/
-function _fill_single_user( &$user, &$metavalues ) {
+function _fill_single_user( $user, $metavalues ) {
global $wpdb;
foreach ( $metavalues as $meta ) {
@@ -1122,7 +1122,7 @@
* @since 3.0.0
* @param array $users User objects
*/
-function _fill_many_users( &$users ) {
+function _fill_many_users( $users ) {
$ids = array();
foreach( $users as $user_object ) {
$ids[] = $user_object->ID;
@@ -1260,7 +1260,7 @@
*
* @param object $user User object to be cached
*/
-function update_user_caches(&$user) {
+function update_user_caches($user) {
wp_cache_add($user->ID, $user, 'users');
wp_cache_add($user->user_login, $user->ID, 'userlogins');
wp_cache_add($user->user_email, $user->ID, 'useremail');
Index: wp-includes/widgets.php
===================================================================
--- wp-includes/widgets.php (revision 17517)
+++ 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 17517)
+++ 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( '|(?