Remove lingering instances of call time pass-by-reference, limited to instances of callable - use $this instead of &$this.
Props jdgrimes. See #25160. Built from https://develop.svn.wordpress.org/trunk@25254 git-svn-id: http://core.svn.wordpress.org/trunk@25222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -67,11 +67,11 @@ class Custom_Background {
|
|||||||
if ( ! current_user_can('edit_theme_options') )
|
if ( ! current_user_can('edit_theme_options') )
|
||||||
return;
|
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, 'admin_load'));
|
||||||
add_action("load-$page", array(&$this, 'take_action'), 49);
|
add_action("load-$page", array($this, 'take_action'), 49);
|
||||||
add_action("load-$page", array(&$this, 'handle_upload'), 49);
|
add_action("load-$page", array($this, 'handle_upload'), 49);
|
||||||
|
|
||||||
if ( $this->admin_header_callback )
|
if ( $this->admin_header_callback )
|
||||||
add_action("admin_head-$page", $this->admin_header_callback, 51);
|
add_action("admin_head-$page", $this->admin_header_callback, 51);
|
||||||
|
|||||||
@@ -84,13 +84,13 @@ class Custom_Image_Header {
|
|||||||
if ( ! current_user_can('edit_theme_options') )
|
if ( ! current_user_can('edit_theme_options') )
|
||||||
return;
|
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_scripts-$page", array($this, 'js_includes'));
|
||||||
add_action("admin_print_styles-$page", array(&$this, 'css_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, 'help') );
|
||||||
add_action("admin_head-$page", array(&$this, 'take_action'), 50);
|
add_action("admin_head-$page", array($this, 'take_action'), 50);
|
||||||
add_action("admin_head-$page", array(&$this, 'js'), 50);
|
add_action("admin_head-$page", array($this, 'js'), 50);
|
||||||
if ( $this->admin_header_callback )
|
if ( $this->admin_header_callback )
|
||||||
add_action("admin_head-$page", $this->admin_header_callback, 51);
|
add_action("admin_head-$page", $this->admin_header_callback, 51);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ class WP_Importer {
|
|||||||
*/
|
*/
|
||||||
function get_page( $url, $username = '', $password = '', $head = false ) {
|
function get_page( $url, $username = '', $password = '', $head = false ) {
|
||||||
// Increase the timeout
|
// 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();
|
$headers = array();
|
||||||
$args = array();
|
$args = array();
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class WP_List_Table {
|
|||||||
|
|
||||||
$this->screen = convert_to_screen( $args['screen'] );
|
$this->screen = convert_to_screen( $args['screen'] );
|
||||||
|
|
||||||
add_filter( "manage_{$this->screen->id}_columns", array( &$this, 'get_columns' ), 0 );
|
add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
|
||||||
|
|
||||||
if ( !$args['plural'] )
|
if ( !$args['plural'] )
|
||||||
$args['plural'] = $this->screen->base;
|
$args['plural'] = $this->screen->base;
|
||||||
@@ -99,7 +99,7 @@ class WP_List_Table {
|
|||||||
|
|
||||||
if ( $args['ajax'] ) {
|
if ( $args['ajax'] ) {
|
||||||
// wp_enqueue_script( 'list-table' );
|
// wp_enqueue_script( 'list-table' );
|
||||||
add_action( 'admin_footer', array( &$this, '_js_vars' ) );
|
add_action( 'admin_footer', array( $this, '_js_vars' ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -857,7 +857,7 @@ class WP_List_Table {
|
|||||||
}
|
}
|
||||||
elseif ( method_exists( $this, 'column_' . $column_name ) ) {
|
elseif ( method_exists( $this, 'column_' . $column_name ) ) {
|
||||||
echo "<td $attributes>";
|
echo "<td $attributes>";
|
||||||
echo call_user_func( array( &$this, 'column_' . $column_name ), $item );
|
echo call_user_func( array( $this, 'column_' . $column_name ), $item );
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
if ( $s ) {
|
if ( $s ) {
|
||||||
$status = 'search';
|
$status = 'search';
|
||||||
$themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( &$this, '_search_callback' ) );
|
$themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( $this, '_search_callback' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$totals = array();
|
$totals = array();
|
||||||
@@ -108,7 +108,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||||||
if ( 'ASC' == $order )
|
if ( 'ASC' == $order )
|
||||||
$this->items = array_reverse( $this->items );
|
$this->items = array_reverse( $this->items );
|
||||||
} else {
|
} else {
|
||||||
uasort( $this->items, array( &$this, '_order_callback' ) );
|
uasort( $this->items, array( $this, '_order_callback' ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
if ( $s ) {
|
if ( $s ) {
|
||||||
$status = 'search';
|
$status = 'search';
|
||||||
$plugins['search'] = array_filter( $plugins['all'], array( &$this, '_search_callback' ) );
|
$plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$totals = array();
|
$totals = array();
|
||||||
@@ -121,7 +121,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||||||
$orderby = ucfirst( $orderby );
|
$orderby = ucfirst( $orderby );
|
||||||
$order = strtoupper( $order );
|
$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' ), 999 );
|
$plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 );
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
$this->init();
|
$this->init();
|
||||||
$this->install_strings();
|
$this->install_strings();
|
||||||
|
|
||||||
add_filter('upgrader_source_selection', array(&$this, 'check_package') );
|
add_filter('upgrader_source_selection', array($this, 'check_package') );
|
||||||
|
|
||||||
$this->run(array(
|
$this->run(array(
|
||||||
'package' => $package,
|
'package' => $package,
|
||||||
@@ -413,7 +413,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
'hook_extra' => array()
|
'hook_extra' => array()
|
||||||
));
|
));
|
||||||
|
|
||||||
remove_filter('upgrader_source_selection', array(&$this, 'check_package') );
|
remove_filter('upgrader_source_selection', array($this, 'check_package') );
|
||||||
|
|
||||||
if ( ! $this->result || is_wp_error($this->result) )
|
if ( ! $this->result || is_wp_error($this->result) )
|
||||||
return $this->result;
|
return $this->result;
|
||||||
@@ -443,9 +443,9 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
// Get the URL to the zip file
|
// Get the URL to the zip file
|
||||||
$r = $current->response[ $plugin ];
|
$r = $current->response[ $plugin ];
|
||||||
|
|
||||||
add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2);
|
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);
|
add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
|
||||||
//'source_selection' => array(&$this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
|
//'source_selection' => array($this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
|
||||||
|
|
||||||
$this->run(array(
|
$this->run(array(
|
||||||
'package' => $r->package,
|
'package' => $r->package,
|
||||||
@@ -458,8 +458,8 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
));
|
));
|
||||||
|
|
||||||
// Cleanup our hooks, in case something else does a upgrade on this connection.
|
// Cleanup our hooks, in case something else does a upgrade on this connection.
|
||||||
remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'));
|
remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'));
|
||||||
remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'));
|
remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
|
||||||
|
|
||||||
if ( ! $this->result || is_wp_error($this->result) )
|
if ( ! $this->result || is_wp_error($this->result) )
|
||||||
return $this->result;
|
return $this->result;
|
||||||
@@ -480,7 +480,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
$current = get_site_transient( 'update_plugins' );
|
$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();
|
$this->skin->header();
|
||||||
|
|
||||||
@@ -550,7 +550,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
$this->skin->footer();
|
$this->skin->footer();
|
||||||
|
|
||||||
// Cleanup our hooks, in case something else does a upgrade on this connection.
|
// Cleanup our hooks, in case 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
|
// Force refresh of plugin update information
|
||||||
delete_site_transient('update_plugins');
|
delete_site_transient('update_plugins');
|
||||||
@@ -712,7 +712,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
if ( ! $api || is_wp_error($api) ) {
|
if ( ! $api || is_wp_error($api) ) {
|
||||||
$this->skin->feedback( 'parent_theme_not_found', $theme_info->get('Template') );
|
$this->skin->feedback( 'parent_theme_not_found', $theme_info->get('Template') );
|
||||||
// Don't show activate or preview actions after install
|
// Don't show activate or preview actions after install
|
||||||
add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') );
|
add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
|
||||||
return $install_result;
|
return $install_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -737,7 +737,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
) );
|
) );
|
||||||
|
|
||||||
if ( is_wp_error($parent_result) )
|
if ( is_wp_error($parent_result) )
|
||||||
add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') );
|
add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
|
||||||
|
|
||||||
// Start cleaning up after the parents installation
|
// Start cleaning up after the parents installation
|
||||||
remove_filter('install_theme_complete_actions', '__return_false', 999);
|
remove_filter('install_theme_complete_actions', '__return_false', 999);
|
||||||
@@ -760,8 +760,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
$this->init();
|
$this->init();
|
||||||
$this->install_strings();
|
$this->install_strings();
|
||||||
|
|
||||||
add_filter('upgrader_source_selection', array(&$this, 'check_package') );
|
add_filter('upgrader_source_selection', array($this, 'check_package') );
|
||||||
add_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3);
|
add_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'), 10, 3);
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
'package' => $package,
|
'package' => $package,
|
||||||
@@ -772,8 +772,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
$this->run($options);
|
$this->run($options);
|
||||||
|
|
||||||
remove_filter('upgrader_source_selection', array(&$this, 'check_package') );
|
remove_filter('upgrader_source_selection', array($this, 'check_package') );
|
||||||
remove_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'));
|
remove_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'));
|
||||||
|
|
||||||
if ( ! $this->result || is_wp_error($this->result) )
|
if ( ! $this->result || is_wp_error($this->result) )
|
||||||
return $this->result;
|
return $this->result;
|
||||||
@@ -802,9 +802,9 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
$r = $current->response[ $theme ];
|
$r = $current->response[ $theme ];
|
||||||
|
|
||||||
add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
|
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_post_install', array($this, 'current_after'), 10, 2);
|
||||||
add_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
|
add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
'package' => $r['package'],
|
'package' => $r['package'],
|
||||||
@@ -818,9 +818,9 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
$this->run($options);
|
$this->run($options);
|
||||||
|
|
||||||
remove_filter('upgrader_pre_install', array(&$this, 'current_before'));
|
remove_filter('upgrader_pre_install', array($this, 'current_before'));
|
||||||
remove_filter('upgrader_post_install', array(&$this, 'current_after'));
|
remove_filter('upgrader_post_install', array($this, 'current_after'));
|
||||||
remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'));
|
remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
|
||||||
|
|
||||||
if ( ! $this->result || is_wp_error($this->result) )
|
if ( ! $this->result || is_wp_error($this->result) )
|
||||||
return $this->result;
|
return $this->result;
|
||||||
@@ -840,9 +840,9 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
$current = get_site_transient( 'update_themes' );
|
$current = get_site_transient( 'update_themes' );
|
||||||
|
|
||||||
add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
|
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_post_install', array($this, 'current_after'), 10, 2);
|
||||||
add_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
|
add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
|
||||||
|
|
||||||
$this->skin->header();
|
$this->skin->header();
|
||||||
|
|
||||||
@@ -912,9 +912,9 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
$this->skin->footer();
|
$this->skin->footer();
|
||||||
|
|
||||||
// Cleanup our hooks, in case something else does a upgrade on this connection.
|
// Cleanup our hooks, in case something else does a upgrade on this connection.
|
||||||
remove_filter('upgrader_pre_install', array(&$this, 'current_before'));
|
remove_filter('upgrader_pre_install', array($this, 'current_before'));
|
||||||
remove_filter('upgrader_post_install', array(&$this, 'current_after'));
|
remove_filter('upgrader_post_install', array($this, 'current_after'));
|
||||||
remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'));
|
remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
|
||||||
|
|
||||||
// Force refresh of theme update information
|
// Force refresh of theme update information
|
||||||
wp_clean_themes_cache();
|
wp_clean_themes_cache();
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class _WP_List_Table_Compat extends WP_List_Table {
|
|||||||
|
|
||||||
if ( !empty( $columns ) ) {
|
if ( !empty( $columns ) ) {
|
||||||
$this->_columns = $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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user