Ticket #20163: 20163.patch
File 20163.patch, 49.1 KB (added by , 13 years ago) |
---|
-
wp-admin/custom-background.php
64 64 if ( ! current_user_can('edit_theme_options') ) 65 65 return; 66 66 67 $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array( &$this, 'admin_page'));67 $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array($this, 'admin_page')); 68 68 69 add_action("load-$page", array( &$this, 'admin_load'));70 add_action("load-$page", array( &$this, 'take_action'), 49);71 add_action("load-$page", array( &$this, 'handle_upload'), 49);69 add_action("load-$page", array($this, 'admin_load')); 70 add_action("load-$page", array($this, 'take_action'), 49); 71 add_action("load-$page", array($this, 'handle_upload'), 49); 72 72 73 73 if ( $this->admin_header_callback ) 74 74 add_action("admin_head-$page", $this->admin_header_callback, 51); -
wp-admin/custom-header.php
82 82 if ( ! current_user_can('edit_theme_options') ) 83 83 return; 84 84 85 $this->page = $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array( &$this, 'admin_page'));85 $this->page = $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array($this, 'admin_page')); 86 86 87 add_action("admin_print_scripts-$page", array( &$this, 'js_includes'));88 add_action("admin_print_styles-$page", array( &$this, 'css_includes'));89 add_action("admin_head-$page", array( &$this, 'help') );90 add_action("admin_head-$page", array( &$this, 'take_action'), 50);91 add_action("admin_head-$page", array( &$this, 'js'), 50);87 add_action("admin_print_scripts-$page", array($this, 'js_includes')); 88 add_action("admin_print_styles-$page", array($this, 'css_includes')); 89 add_action("admin_head-$page", array($this, 'help') ); 90 add_action("admin_head-$page", array($this, 'take_action'), 50); 91 add_action("admin_head-$page", array($this, 'js'), 50); 92 92 add_action("admin_head-$page", $this->admin_header_callback, 51); 93 93 } 94 94 -
wp-admin/includes/class-wp-importer.php
182 182 */ 183 183 function get_page( $url, $username = '', $password = '', $head = false ) { 184 184 // Increase the timeout 185 add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) );185 add_filter( 'http_request_timeout', array( $this, 'bump_request_timeout' ) ); 186 186 187 187 $headers = array(); 188 188 $args = array(); -
wp-admin/includes/class-wp-list-table.php
86 86 87 87 $screen = get_current_screen(); 88 88 89 add_filter( "manage_{$screen->id}_columns", array( &$this, 'get_columns' ), 0 );89 add_filter( "manage_{$screen->id}_columns", array( $this, 'get_columns' ), 0 ); 90 90 91 91 if ( !$args['plural'] ) 92 92 $args['plural'] = $screen->base; … … 98 98 99 99 if ( $args['ajax'] ) { 100 100 // wp_enqueue_script( 'list-table' ); 101 add_action( 'admin_footer', array( &$this, '_js_vars' ) );101 add_action( 'admin_footer', array( $this, '_js_vars' ) ); 102 102 } 103 103 } 104 104 … … 854 854 } 855 855 elseif ( method_exists( $this, 'column_' . $column_name ) ) { 856 856 echo "<td $attributes>"; 857 echo call_user_func( array( &$this, 'column_' . $column_name ), $item );857 echo call_user_func( array( $this, 'column_' . $column_name ), $item ); 858 858 echo "</td>"; 859 859 } 860 860 else { -
wp-admin/includes/class-wp-ms-themes-list-table.php
87 87 88 88 if ( $s ) { 89 89 $status = 'search'; 90 $themes['search'] = array_filter( $themes['all'], array( &$this, '_search_callback' ) );90 $themes['search'] = array_filter( $themes['all'], array( $this, '_search_callback' ) ); 91 91 } 92 92 93 93 $totals = array(); … … 111 111 if ( 'ASC' == $order ) 112 112 $this->items = array_reverse( $this->items ); 113 113 } else { 114 uasort( $this->items, array( &$this, '_order_callback' ) );114 uasort( $this->items, array( $this, '_order_callback' ) ); 115 115 } 116 116 } 117 117 -
wp-admin/includes/class-wp-plugins-list-table.php
105 105 106 106 if ( $s ) { 107 107 $status = 'search'; 108 $plugins['search'] = array_filter( $plugins['all'], array( &$this, '_search_callback' ) );108 $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) ); 109 109 } 110 110 111 111 $totals = array(); … … 127 127 $orderby = ucfirst( $orderby ); 128 128 $order = strtoupper( $order ); 129 129 130 uasort( $this->items, array( &$this, '_order_callback' ) );130 uasort( $this->items, array( $this, '_order_callback' ) ); 131 131 } 132 132 133 133 $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 ); -
wp-admin/includes/class-wp-upgrader.php
395 395 $this->init(); 396 396 $this->install_strings(); 397 397 398 add_filter('upgrader_source_selection', array( &$this, 'check_package') );398 add_filter('upgrader_source_selection', array($this, 'check_package') ); 399 399 400 400 $this->run(array( 401 401 'package' => $package, … … 405 405 'hook_extra' => array() 406 406 )); 407 407 408 remove_filter('upgrader_source_selection', array( &$this, 'check_package') );408 remove_filter('upgrader_source_selection', array($this, 'check_package') ); 409 409 410 410 if ( ! $this->result || is_wp_error($this->result) ) 411 411 return $this->result; … … 433 433 // Get the URL to the zip file 434 434 $r = $current->response[ $plugin ]; 435 435 436 add_filter('upgrader_pre_install', array( &$this, 'deactivate_plugin_before_upgrade'), 10, 2);437 add_filter('upgrader_clear_destination', array( &$this, 'delete_old_plugin'), 10, 4);436 add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2); 437 add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); 438 438 //'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. 439 439 440 440 $this->run(array( … … 448 448 )); 449 449 450 450 // Cleanup our hooks, in case something else does a upgrade on this connection. 451 remove_filter('upgrader_pre_install', array( &$this, 'deactivate_plugin_before_upgrade'));452 remove_filter('upgrader_clear_destination', array( &$this, 'delete_old_plugin'));451 remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade')); 452 remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); 453 453 454 454 if ( ! $this->result || is_wp_error($this->result) ) 455 455 return $this->result; … … 466 466 467 467 $current = get_site_transient( 'update_plugins' ); 468 468 469 add_filter('upgrader_clear_destination', array( &$this, 'delete_old_plugin'), 10, 4);469 add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); 470 470 471 471 $this->skin->header(); 472 472 … … 533 533 $this->skin->footer(); 534 534 535 535 // Cleanup our hooks, in case something else does a upgrade on this connection. 536 remove_filter('upgrader_clear_destination', array( &$this, 'delete_old_plugin'));536 remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); 537 537 538 538 // Force refresh of plugin update information 539 539 delete_site_transient('update_plugins'); … … 669 669 $this->init(); 670 670 $this->install_strings(); 671 671 672 add_filter('upgrader_source_selection', array( &$this, 'check_package') );672 add_filter('upgrader_source_selection', array($this, 'check_package') ); 673 673 674 674 $options = array( 675 675 'package' => $package, … … 680 680 681 681 $this->run($options); 682 682 683 remove_filter('upgrader_source_selection', array( &$this, 'check_package') );683 remove_filter('upgrader_source_selection', array($this, 'check_package') ); 684 684 685 685 if ( ! $this->result || is_wp_error($this->result) ) 686 686 return $this->result; … … 708 708 709 709 $r = $current->response[ $theme ]; 710 710 711 add_filter('upgrader_pre_install', array( &$this, 'current_before'), 10, 2);712 add_filter('upgrader_post_install', array( &$this, 'current_after'), 10, 2);713 add_filter('upgrader_clear_destination', array( &$this, 'delete_old_theme'), 10, 4);711 add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); 712 add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 713 add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 714 714 715 715 $options = array( 716 716 'package' => $r['package'], … … 724 724 725 725 $this->run($options); 726 726 727 remove_filter('upgrader_pre_install', array( &$this, 'current_before'), 10, 2);728 remove_filter('upgrader_post_install', array( &$this, 'current_after'), 10, 2);729 remove_filter('upgrader_clear_destination', array( &$this, 'delete_old_theme'), 10, 4);727 remove_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); 728 remove_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 729 remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 730 730 731 731 if ( ! $this->result || is_wp_error($this->result) ) 732 732 return $this->result; … … 745 745 746 746 $current = get_site_transient( 'update_themes' ); 747 747 748 add_filter('upgrader_pre_install', array( &$this, 'current_before'), 10, 2);749 add_filter('upgrader_post_install', array( &$this, 'current_after'), 10, 2);750 add_filter('upgrader_clear_destination', array( &$this, 'delete_old_theme'), 10, 4);748 add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); 749 add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 750 add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 751 751 752 752 $this->skin->header(); 753 753 … … 814 814 $this->skin->footer(); 815 815 816 816 // Cleanup our hooks, in case something else does a upgrade on this connection. 817 remove_filter('upgrader_pre_install', array( &$this, 'current_before'), 10, 2);818 remove_filter('upgrader_post_install', array( &$this, 'current_after'), 10, 2);819 remove_filter('upgrader_clear_destination', array( &$this, 'delete_old_theme'), 10, 4);817 remove_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); 818 remove_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 819 remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 820 820 821 821 // Force refresh of theme update information 822 822 delete_site_transient('update_themes'); -
wp-admin/includes/deprecated.php
501 501 $this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'"; 502 502 } 503 503 504 do_action_ref_array( 'pre_user_search', array( &$this ) );504 do_action_ref_array( 'pre_user_search', array( $this ) ); 505 505 } 506 506 507 507 /** -
wp-admin/includes/list-table.php
86 86 87 87 if ( !empty( $columns ) ) { 88 88 $this->_columns = $columns; 89 add_filter( 'manage_' . $screen->id . '_columns', array( &$this, 'get_columns' ), 0 );89 add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 ); 90 90 } 91 91 } 92 92 -
wp-admin/includes/template.php
134 134 } 135 135 136 136 // Put checked cats on top 137 echo call_user_func_array(array( &$walker, 'walk'), array($checked_categories, 0, $args));137 echo call_user_func_array(array($walker, 'walk'), array($checked_categories, 0, $args)); 138 138 } 139 139 // Then the rest of them 140 echo call_user_func_array(array( &$walker, 'walk'), array($categories, 0, $args));140 echo call_user_func_array(array($walker, 'walk'), array($categories, 0, $args)); 141 141 } 142 142 143 143 /** -
wp-admin/includes/user.php
149 149 } 150 150 151 151 // Allow plugins to return their own errors. 152 do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) );152 do_action_ref_array('user_profile_update_errors', array ( $errors, $update, $user ) ); 153 153 154 154 if ( $errors->get_error_codes() ) 155 155 return $errors; -
wp-content/themes/twentyeleven/inc/widgets.php
20 20 $this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops ); 21 21 $this->alt_option_name = 'widget_twentyeleven_ephemera'; 22 22 23 add_action( 'save_post', array( &$this, 'flush_widget_cache' ) );24 add_action( 'deleted_post', array( &$this, 'flush_widget_cache' ) );25 add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) );23 add_action( 'save_post', array($this, 'flush_widget_cache' ) ); 24 add_action( 'deleted_post', array($this, 'flush_widget_cache' ) ); 25 add_action( 'switch_theme', array($this, 'flush_widget_cache' ) ); 26 26 } 27 27 28 28 /** -
wp-includes/admin-bar.php
55 55 if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) ) 56 56 return false; 57 57 58 do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) );58 do_action_ref_array( 'admin_bar_menu', array( $wp_admin_bar ) ); 59 59 60 60 do_action( 'wp_before_admin_bar_render' ); 61 61 -
wp-includes/atomlib.php
107 107 108 108 function parse() { 109 109 110 set_error_handler(array( &$this, 'error_handler'));110 set_error_handler(array($this, 'error_handler')); 111 111 112 112 array_unshift($this->ns_contexts, array()); 113 113 -
wp-includes/cache.php
548 548 * @todo This should be moved to the PHP4 style constructor, PHP5 549 549 * already calls __destruct() 550 550 */ 551 register_shutdown_function(array( &$this, "__destruct"));551 register_shutdown_function(array($this, "__destruct")); 552 552 } 553 553 554 554 /** -
wp-includes/capabilities.php
673 673 674 674 //Filter out caps that are not role names and assign to $this->roles 675 675 if ( is_array( $this->caps ) ) 676 $this->roles = array_filter( array_keys( $this->caps ), array( &$wp_roles, 'is_role' ) );676 $this->roles = array_filter( array_keys( $this->caps ), array( $wp_roles, 'is_role' ) ); 677 677 678 678 //Build $allcaps from role caps, overlay user's $caps 679 679 $this->allcaps = array(); … … 1219 1219 $args = array_slice( func_get_args(), 2 ); 1220 1220 $args = array_merge( array( $capability ), $args ); 1221 1221 1222 return call_user_func_array( array( &$user, 'has_cap' ), $args );1222 return call_user_func_array( array( $user, 'has_cap' ), $args ); 1223 1223 } 1224 1224 1225 1225 /** … … 1243 1243 $args = array_slice( func_get_args(), 2 ); 1244 1244 $args = array_merge( array( $capability ), $args ); 1245 1245 1246 return call_user_func_array( array( &$author, 'has_cap' ), $args );1246 return call_user_func_array( array( $author, 'has_cap' ), $args ); 1247 1247 } 1248 1248 1249 1249 /** … … 1265 1265 $args = array_slice( func_get_args(), 2 ); 1266 1266 $args = array_merge( array( $capability ), $args ); 1267 1267 1268 return call_user_func_array( array( &$user, 'has_cap' ), $args );1268 return call_user_func_array( array( $user, 'has_cap' ), $args ); 1269 1269 } 1270 1270 1271 1271 /** -
wp-includes/category-template.php
735 735 else 736 736 $walker = $args[2]['walker']; 737 737 738 return call_user_func_array(array( &$walker, 'walk' ), $args );738 return call_user_func_array(array( $walker, 'walk' ), $args ); 739 739 } 740 740 741 741 /** … … 753 753 else 754 754 $walker = $args[2]['walker']; 755 755 756 return call_user_func_array(array( &$walker, 'walk' ), $args );756 return call_user_func_array(array( $walker, 'walk' ), $args ); 757 757 } 758 758 759 759 /** -
wp-includes/class-http.php
1058 1058 } 1059 1059 1060 1060 if ( true === $r['blocking'] ) 1061 curl_setopt( $handle, CURLOPT_HEADERFUNCTION, array( &$this, 'stream_headers' ) );1061 curl_setopt( $handle, CURLOPT_HEADERFUNCTION, array( $this, 'stream_headers' ) ); 1062 1062 1063 1063 curl_setopt( $handle, CURLOPT_HEADER, false ); 1064 1064 … … 1093 1093 1094 1094 // Cookies are not handled by the HTTP API currently. Allow for plugin authors to handle it 1095 1095 // themselves... Although, it is somewhat pointless without some reference. 1096 do_action_ref_array( 'http_api_curl', array( &$handle) );1096 do_action_ref_array( 'http_api_curl', array($handle) ); 1097 1097 1098 1098 // We don't need to return the body, so don't. Just execute request and return. 1099 1099 if ( ! $r['blocking'] ) { -
wp-includes/class-oembed.php
51 51 ) ); 52 52 53 53 // Fix any embeds that contain new lines in the middle of the HTML which breaks wpautop(). 54 add_filter( 'oembed_dataparse', array( &$this, '_strip_newlines'), 10, 3 );54 add_filter( 'oembed_dataparse', array($this, '_strip_newlines'), 10, 3 ); 55 55 } 56 56 57 57 /** -
wp-includes/class-simplepie.php
3023 3023 $this->data['ordered_items'] = $this->data['items']; 3024 3024 if ($do_sort) 3025 3025 { 3026 usort($this->data['ordered_items'], array( &$this, 'sort_items'));3026 usort($this->data['ordered_items'], array($this, 'sort_items')); 3027 3027 } 3028 3028 } 3029 3029 $items = $this->data['ordered_items']; … … 11929 11929 function replace_invalid_with_pct_encoding($string, $valid_chars, $case = SIMPLEPIE_SAME_CASE, $iprivate = false) 11930 11930 { 11931 11931 // Normalize as many pct-encoded sections as possible 11932 $string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array( &$this, 'remove_iunreserved_percent_encoded'), $string);11932 $string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array($this, 'remove_iunreserved_percent_encoded'), $string); 11933 11933 11934 11934 // Replace invalid percent characters 11935 11935 $string = preg_replace('/%(?![A-Fa-f0-9]{2})/', '%25', $string); … … 13372 13372 13373 13373 foreach ($this->built_in as $method) 13374 13374 { 13375 if (($returned = call_user_func(array( &$this, $method), $date)) !== false)13375 if (($returned = call_user_func(array($this, $method), $date)) !== false) 13376 13376 { 13377 13377 return $returned; 13378 13378 } … … 15161 15161 $pcre = "/<($tag)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$tag" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>|(\/)?>)/siU'; 15162 15162 while (preg_match($pcre, $data)) 15163 15163 { 15164 $data = preg_replace_callback($pcre, array( &$this, 'do_strip_htmltags'), $data);15164 $data = preg_replace_callback($pcre, array($this, 'do_strip_htmltags'), $data); 15165 15165 } 15166 15166 } 15167 15167 } -
wp-includes/class-wp-customize-setting.php
448 448 elseif ( empty( $keys ) ) // If there are no keys, we're replacing the root. 449 449 return $value; 450 450 451 $result = $this->multidimensional( &$root, $keys, true );451 $result = $this->multidimensional( $root, $keys, true ); 452 452 453 453 if ( isset( $result ) ) 454 454 $result['node'][ $result['key'] ] = $value; -
wp-includes/class-wp-walker.php
126 126 if ( is_array( $args[0] ) ) 127 127 $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] ); 128 128 $cb_args = array_merge( array(&$output, $element, $depth), $args); 129 call_user_func_array(array( &$this, 'start_el'), $cb_args);129 call_user_func_array(array($this, 'start_el'), $cb_args); 130 130 131 131 $id = $element->$id_field; 132 132 … … 139 139 $newlevel = true; 140 140 //start the child delimiter 141 141 $cb_args = array_merge( array(&$output, $depth), $args); 142 call_user_func_array(array( &$this, 'start_lvl'), $cb_args);142 call_user_func_array(array($this, 'start_lvl'), $cb_args); 143 143 } 144 144 $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); 145 145 } … … 149 149 if ( isset($newlevel) && $newlevel ){ 150 150 //end the child delimiter 151 151 $cb_args = array_merge( array(&$output, $depth), $args); 152 call_user_func_array(array( &$this, 'end_lvl'), $cb_args);152 call_user_func_array(array($this, 'end_lvl'), $cb_args); 153 153 } 154 154 155 155 //end this element 156 156 $cb_args = array_merge( array(&$output, $element, $depth), $args); 157 call_user_func_array(array( &$this, 'end_el'), $cb_args);157 call_user_func_array(array($this, 'end_el'), $cb_args); 158 158 } 159 159 160 160 /** -
wp-includes/class-wp.php
304 304 305 305 $this->query_vars = apply_filters('request', $this->query_vars); 306 306 307 do_action_ref_array('parse_request', array( &$this));307 do_action_ref_array('parse_request', array($this)); 308 308 } 309 309 310 310 /** … … 379 379 if ( $exit_required ) 380 380 exit(); 381 381 382 do_action_ref_array('send_headers', array( &$this));382 do_action_ref_array('send_headers', array($this)); 383 383 } 384 384 385 385 /** … … 524 524 $this->query_posts(); 525 525 $this->handle_404(); 526 526 $this->register_globals(); 527 do_action_ref_array('wp', array( &$this));527 do_action_ref_array('wp', array($this)); 528 528 } 529 529 530 530 } … … 601 601 * @return string 602 602 */ 603 603 function _map() { 604 $callback = array( &$this, 'callback');604 $callback = array($this, 'callback'); 605 605 return preg_replace_callback($this->_pattern, $callback, $this->_subject); 606 606 } 607 607 -
wp-includes/comment.php
226 226 ); 227 227 228 228 $this->query_vars = wp_parse_args( $query_vars, $defaults ); 229 do_action_ref_array( 'pre_get_comments', array( &$this ) );229 do_action_ref_array( 'pre_get_comments', array( $this ) ); 230 230 extract( $this->query_vars, EXTR_SKIP ); 231 231 232 232 // $args can be whatever, only use the args defined in defaults to compute the key … … 332 332 } 333 333 334 334 $pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits' ); 335 $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) );335 $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), $this ) ); 336 336 foreach ( $pieces as $piece ) 337 337 $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : ''; 338 338 … … 342 342 return $wpdb->get_var( $query ); 343 343 344 344 $comments = $wpdb->get_results( $query ); 345 $comments = apply_filters_ref_array( 'the_comments', array( $comments, &$this ) );345 $comments = apply_filters_ref_array( 'the_comments', array( $comments, $this ) ); 346 346 347 347 wp_cache_add( $cache_key, $comments, 'comment' ); 348 348 … … 1816 1816 endif; 1817 1817 endforeach; 1818 1818 1819 do_action_ref_array('pre_ping', array( &$post_links, &$pung));1819 do_action_ref_array('pre_ping', array($post_links, $pung)); 1820 1820 1821 1821 foreach ( (array) $post_links as $pagelinkedto ) { 1822 1822 $pingback_server_url = discover_pingback_server_uri( $pagelinkedto ); -
wp-includes/default-widgets.php
542 542 parent::__construct('recent-posts', __('Recent Posts'), $widget_ops); 543 543 $this->alt_option_name = 'widget_recent_entries'; 544 544 545 add_action( 'save_post', array( &$this, 'flush_widget_cache') );546 add_action( 'deleted_post', array( &$this, 'flush_widget_cache') );547 add_action( 'switch_theme', array( &$this, 'flush_widget_cache') );545 add_action( 'save_post', array($this, 'flush_widget_cache') ); 546 add_action( 'deleted_post', array($this, 'flush_widget_cache') ); 547 add_action( 'switch_theme', array($this, 'flush_widget_cache') ); 548 548 } 549 549 550 550 function widget($args, $instance) { … … 632 632 $this->alt_option_name = 'widget_recent_comments'; 633 633 634 634 if ( is_active_widget(false, false, $this->id_base) ) 635 add_action( 'wp_head', array( &$this, 'recent_comments_style') );635 add_action( 'wp_head', array($this, 'recent_comments_style') ); 636 636 637 add_action( 'comment_post', array( &$this, 'flush_widget_cache') );638 add_action( 'transition_comment_status', array( &$this, 'flush_widget_cache') );637 add_action( 'comment_post', array($this, 'flush_widget_cache') ); 638 add_action( 'transition_comment_status', array($this, 'flush_widget_cache') ); 639 639 } 640 640 641 641 function recent_comments_style() { -
wp-includes/feed.php
535 535 $feed->set_cache_class('WP_Feed_Cache'); 536 536 $feed->set_file_class('WP_SimplePie_File'); 537 537 $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url)); 538 do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );538 do_action_ref_array( 'wp_feed_options', array( $feed, $url ) ); 539 539 $feed->init(); 540 540 $feed->handle_content_type(); 541 541 -
wp-includes/media.php
1033 1033 */ 1034 1034 function __construct() { 1035 1035 // Hack to get the [embed] shortcode to run before wpautop() 1036 add_filter( 'the_content', array( &$this, 'run_shortcode'), 8 );1036 add_filter( 'the_content', array($this, 'run_shortcode'), 8 ); 1037 1037 1038 1038 // Shortcode placeholder for strip_shortcodes() 1039 1039 add_shortcode( 'embed', '__return_false' ); 1040 1040 1041 1041 // Attempts to embed all URLs in a post 1042 1042 if ( get_option('embed_autourls') ) 1043 add_filter( 'the_content', array( &$this, 'autoembed'), 8 );1043 add_filter( 'the_content', array($this, 'autoembed'), 8 ); 1044 1044 1045 1045 // After a post is saved, invalidate the oEmbed cache 1046 add_action( 'save_post', array( &$this, 'delete_oembed_caches') );1046 add_action( 'save_post', array($this, 'delete_oembed_caches') ); 1047 1047 1048 1048 // After a post is saved, cache oEmbed items via AJAX 1049 add_action( 'edit_form_advanced', array( &$this, 'maybe_run_ajax_cache') );1049 add_action( 'edit_form_advanced', array($this, 'maybe_run_ajax_cache') ); 1050 1050 } 1051 1051 1052 1052 /** … … 1071 1071 $orig_shortcode_tags = $shortcode_tags; 1072 1072 remove_all_shortcodes(); 1073 1073 1074 add_shortcode( 'embed', array( &$this, 'shortcode') );1074 add_shortcode( 'embed', array($this, 'shortcode') ); 1075 1075 1076 1076 // Do the shortcode (only the [embed] one is registered) 1077 1077 $content = do_shortcode( $content ); … … 1261 1261 * @return string Potentially modified $content. 1262 1262 */ 1263 1263 function autoembed( $content ) { 1264 return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array( &$this, 'autoembed_callback'), $content );1264 return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array($this, 'autoembed_callback'), $content ); 1265 1265 } 1266 1266 1267 1267 /** -
wp-includes/nav-menu-template.php
472 472 $walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker; 473 473 $args = array( $items, $depth, $r ); 474 474 475 return call_user_func_array( array( &$walker, 'walk'), $args );475 return call_user_func_array( array($walker, 'walk'), $args ); 476 476 } 477 477 478 478 /** -
wp-includes/pluggable.php
427 427 } 428 428 } 429 429 430 do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );430 do_action_ref_array( 'phpmailer_init', array( $phpmailer ) ); 431 431 432 432 // Send! 433 433 try { -
wp-includes/pomo/mo.php
198 198 $headers = $this->make_headers($translation); 199 199 $this->set_headers($headers); 200 200 } else { 201 $entry = &$this->make_entry($original, $translation);201 $entry = $this->make_entry($original, $translation); 202 202 $this->entries[$entry->key()] = &$entry; 203 203 } 204 204 } -
wp-includes/post-template.php
948 948 $walker = $r['walker']; 949 949 950 950 $args = array($pages, $depth, $r, $current_page); 951 return call_user_func_array(array( &$walker, 'walk'), $args);951 return call_user_func_array(array($walker, 'walk'), $args); 952 952 } 953 953 954 954 /** … … 965 965 else 966 966 $walker = $args[2]['walker']; 967 967 968 return call_user_func_array(array( &$walker, 'walk'), $args);968 return call_user_func_array(array($walker, 'walk'), $args); 969 969 } 970 970 971 971 /** -
wp-includes/post.php
4265 4265 $add_seconds_server = date('Z'); 4266 4266 4267 4267 $post_types = get_post_types( array( 'public' => true ) ); 4268 array_walk( $post_types, array( &$wpdb, 'escape_by_ref' ) );4268 array_walk( $post_types, array( $wpdb, 'escape_by_ref' ) ); 4269 4269 $post_types = "'" . implode( "', '", $post_types ) . "'"; 4270 4270 4271 4271 switch ( $timezone ) { -
wp-includes/query.php
1671 1671 $this->query_vars_hash = md5( serialize( $this->query_vars ) ); 1672 1672 $this->query_vars_changed = false; 1673 1673 1674 do_action_ref_array('parse_query', array( &$this));1674 do_action_ref_array('parse_query', array($this)); 1675 1675 } 1676 1676 1677 1677 /* … … 1919 1919 1920 1920 $this->parse_query(); 1921 1921 1922 do_action_ref_array('pre_get_posts', array( &$this));1922 do_action_ref_array('pre_get_posts', array($this)); 1923 1923 1924 1924 // Shorthand. 1925 1925 $q = &$this->query_vars; … … 2199 2199 } 2200 2200 2201 2201 // Allow plugins to contextually add/remove/modify the search section of the database query 2202 $search = apply_filters_ref_array('posts_search', array( $search, &$this ) );2202 $search = apply_filters_ref_array('posts_search', array( $search, $this ) ); 2203 2203 2204 2204 // Taxonomies 2205 2205 if ( !$this->is_singular ) { … … 2502 2502 // Apply filters on where and join prior to paging so that any 2503 2503 // manipulations to them are reflected in the paging by day queries. 2504 2504 if ( !$q['suppress_filters'] ) { 2505 $where = apply_filters_ref_array('posts_where', array( $where, &$this ) );2506 $join = apply_filters_ref_array('posts_join', array( $join, &$this ) );2505 $where = apply_filters_ref_array('posts_where', array( $where, $this ) ); 2506 $join = apply_filters_ref_array('posts_join', array( $join, $this ) ); 2507 2507 } 2508 2508 2509 2509 // Paging … … 2534 2534 } 2535 2535 2536 2536 if ( !$q['suppress_filters'] ) { 2537 $cjoin = apply_filters_ref_array('comment_feed_join', array( $cjoin, &$this ) );2538 $cwhere = apply_filters_ref_array('comment_feed_where', array( $cwhere, &$this ) );2539 $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( $cgroupby, &$this ) );2540 $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );2541 $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );2537 $cjoin = apply_filters_ref_array('comment_feed_join', array( $cjoin, $this ) ); 2538 $cwhere = apply_filters_ref_array('comment_feed_where', array( $cwhere, $this ) ); 2539 $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( $cgroupby, $this ) ); 2540 $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', $this ) ); 2541 $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), $this ) ); 2542 2542 } 2543 2543 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 2544 2544 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; … … 2564 2564 // Apply post-paging filters on where and join. Only plugins that 2565 2565 // manipulate paging queries should use these hooks. 2566 2566 if ( !$q['suppress_filters'] ) { 2567 $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) );2568 $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) );2569 $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) );2570 $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) );2571 $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) );2572 $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) );2573 $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );2567 $where = apply_filters_ref_array( 'posts_where_paged', array( $where, $this ) ); 2568 $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, $this ) ); 2569 $join = apply_filters_ref_array( 'posts_join_paged', array( $join, $this ) ); 2570 $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, $this ) ); 2571 $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, $this ) ); 2572 $limits = apply_filters_ref_array( 'post_limits', array( $limits, $this ) ); 2573 $fields = apply_filters_ref_array( 'posts_fields', array( $fields, $this ) ); 2574 2574 2575 2575 // Filter all clauses at once, for convenience 2576 $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );2576 $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), $this ) ); 2577 2577 foreach ( $pieces as $piece ) 2578 2578 $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : ''; 2579 2579 } … … 2583 2583 2584 2584 // Filter again for the benefit of caching plugins. Regular plugins should use the hooks above. 2585 2585 if ( !$q['suppress_filters'] ) { 2586 $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) );2587 $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) );2588 $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) );2589 $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) );2590 $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) );2591 $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) );2592 $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) );2586 $where = apply_filters_ref_array( 'posts_where_request', array( $where, $this ) ); 2587 $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, $this ) ); 2588 $join = apply_filters_ref_array( 'posts_join_request', array( $join, $this ) ); 2589 $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, $this ) ); 2590 $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, $this ) ); 2591 $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, $this ) ); 2592 $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, $this ) ); 2593 2593 2594 2594 // Filter all clauses at once, for convenience 2595 $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );2595 $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), $this ) ); 2596 2596 foreach ( $pieces as $piece ) 2597 2597 $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : ''; 2598 2598 } … … 2609 2609 $this->request = $old_request = "SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; 2610 2610 2611 2611 if ( !$q['suppress_filters'] ) { 2612 $this->request = apply_filters_ref_array( 'posts_request', array( $this->request, &$this ) );2612 $this->request = apply_filters_ref_array( 'posts_request', array( $this->request, $this ) ); 2613 2613 } 2614 2614 2615 2615 if ( 'ids' == $q['fields'] ) { … … 2654 2654 2655 2655 // Raw results filter. Prior to status checks. 2656 2656 if ( !$q['suppress_filters'] ) 2657 $this->posts = apply_filters_ref_array('posts_results', array( $this->posts, &$this ) );2657 $this->posts = apply_filters_ref_array('posts_results', array( $this->posts, $this ) ); 2658 2658 2659 2659 if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) { 2660 $cjoin = apply_filters_ref_array('comment_feed_join', array( '', &$this ) );2661 $cwhere = apply_filters_ref_array('comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );2662 $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( '', &$this ) );2660 $cjoin = apply_filters_ref_array('comment_feed_join', array( '', $this ) ); 2661 $cwhere = apply_filters_ref_array('comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", $this ) ); 2662 $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( '', $this ) ); 2663 2663 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 2664 $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );2664 $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', $this ) ); 2665 2665 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 2666 $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );2666 $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), $this ) ); 2667 2667 $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"; 2668 2668 $this->comments = $wpdb->get_results($comments_request); 2669 2669 $this->comment_count = count($this->comments); … … 2698 2698 } 2699 2699 2700 2700 if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) ) 2701 $this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], &$this ));2701 $this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], $this )); 2702 2702 } 2703 2703 2704 2704 // Put sticky posts at the top of the posts array … … 2752 2752 } 2753 2753 2754 2754 if ( !$q['suppress_filters'] ) 2755 $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, &$this ) );2755 $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, $this ) ); 2756 2756 2757 2757 $this->post_count = count($this->posts); 2758 2758 … … 2777 2777 if ( $q['no_found_rows'] || empty( $limits ) ) 2778 2778 return; 2779 2779 2780 $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );2781 $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );2780 $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', $this ) ) ); 2781 $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, $this ) ); 2782 2782 2783 2783 $this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] ); 2784 2784 } … … 2815 2815 $this->in_the_loop = true; 2816 2816 2817 2817 if ( $this->current_post == -1 ) // loop has just started 2818 do_action_ref_array('loop_start', array( &$this));2818 do_action_ref_array('loop_start', array($this)); 2819 2819 2820 2820 $post = $this->next_post(); 2821 2821 setup_postdata($post); … … 2836 2836 if ( $this->current_post + 1 < $this->post_count ) { 2837 2837 return true; 2838 2838 } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) { 2839 do_action_ref_array('loop_end', array( &$this));2839 do_action_ref_array('loop_end', array($this)); 2840 2840 // Do some cleaning up after the loop 2841 2841 $this->rewind_posts(); 2842 2842 } … … 3614 3614 $multipage = 0; 3615 3615 } 3616 3616 3617 do_action_ref_array('the_post', array( &$post));3617 do_action_ref_array('the_post', array($post)); 3618 3618 3619 3619 return true; 3620 3620 } -
wp-includes/rewrite.php
1588 1588 else 1589 1589 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules); 1590 1590 1591 do_action_ref_array('generate_rewrite_rules', array( &$this));1591 do_action_ref_array('generate_rewrite_rules', array($this)); 1592 1592 $this->rules = apply_filters('rewrite_rules_array', $this->rules); 1593 1593 1594 1594 return $this->rules; -
wp-includes/Text/Diff/Renderer/inline.php
103 103 function _lines($lines, $prefix = ' ', $encode = true) 104 104 { 105 105 if ($encode) { 106 array_walk($lines, array( &$this, '_encode'));106 array_walk($lines, array($this, '_encode')); 107 107 } 108 108 109 109 if ($this->_split_level == 'lines') { … … 115 115 116 116 function _added($lines) 117 117 { 118 array_walk($lines, array( &$this, '_encode'));118 array_walk($lines, array($this, '_encode')); 119 119 $lines[0] = $this->_ins_prefix . $lines[0]; 120 120 $lines[count($lines) - 1] .= $this->_ins_suffix; 121 121 return $this->_lines($lines, ' ', false); … … 123 123 124 124 function _deleted($lines, $words = false) 125 125 { 126 array_walk($lines, array( &$this, '_encode'));126 array_walk($lines, array($this, '_encode')); 127 127 $lines[0] = $this->_del_prefix . $lines[0]; 128 128 $lines[count($lines) - 1] .= $this->_del_suffix; 129 129 return $this->_lines($lines, ' ', false); -
wp-includes/theme.php
1118 1118 1119 1119 require_once( ABSPATH . 'wp-admin/custom-header.php' ); 1120 1120 $custom_image_header = new Custom_Image_Header( $admin_header_callback, $admin_image_div_callback ); 1121 add_action( 'admin_menu', array( &$custom_image_header, 'init' ) );1121 add_action( 'admin_menu', array( $custom_image_header, 'init' ) ); 1122 1122 } 1123 1123 1124 1124 /** … … 1139 1139 remove_theme_support( 'custom-header-uploads' ); 1140 1140 1141 1141 if ( is_admin() ) { 1142 remove_action( 'admin_menu', array( &$GLOBALS['custom_image_header'], 'init' ) );1142 remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) ); 1143 1143 unset( $GLOBALS['custom_image_header'] ); 1144 1144 } 1145 1145 … … 1258 1258 return; 1259 1259 require_once( ABSPATH . 'wp-admin/custom-background.php' ); 1260 1260 $GLOBALS['custom_background'] = new Custom_Background( $admin_header_callback, $admin_image_div_callback ); 1261 add_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) );1261 add_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); 1262 1262 } 1263 1263 1264 1264 /** … … 1278 1278 _remove_theme_support( 'custom-background' ); 1279 1279 1280 1280 if ( is_admin() ) { 1281 remove_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) );1281 remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); 1282 1282 unset( $GLOBALS['custom_background'] ); 1283 1283 } 1284 1284 -
wp-includes/user.php
38 38 $credentials['remember'] = false; 39 39 40 40 // TODO do we deprecate the wp_authentication action? 41 do_action_ref_array('wp_authenticate', array( &$credentials['user_login'], &$credentials['user_password']));41 do_action_ref_array('wp_authenticate', array($credentials['user_login'], $credentials['user_password'])); 42 42 43 43 if ( '' === $secure_cookie ) 44 44 $secure_cookie = is_ssl(); … … 402 402 function prepare_query() { 403 403 global $wpdb; 404 404 405 $qv = &$this->query_vars;405 $qv = $this->query_vars; 406 406 407 407 if ( is_array( $qv['fields'] ) ) { 408 408 $qv['fields'] = array_unique( $qv['fields'] ); … … 537 537 $this->query_where .= " AND $wpdb->users.ID NOT IN ($ids)"; 538 538 } 539 539 540 do_action_ref_array( 'pre_user_query', array( &$this ) );540 do_action_ref_array( 'pre_user_query', array( $this ) ); 541 541 } 542 542 543 543 /** -
wp-includes/widgets.php
152 152 } 153 153 154 154 function _get_display_callback() { 155 return array( &$this, 'display_callback');155 return array($this, 'display_callback'); 156 156 } 157 157 158 158 function _get_update_callback() { 159 return array( &$this, 'update_callback');159 return array($this, 'update_callback'); 160 160 } 161 161 162 162 function _get_form_callback() { 163 return array( &$this, 'form_callback');163 return array($this, 'form_callback'); 164 164 } 165 165 166 166 /** Generate the actual widget content. … … 270 270 $return = $this->form($instance); 271 271 // add extra fields in the widget form - be sure to set $return to null if you add any 272 272 // if the widget has no form the text echoed from the default form method can be hidden using css 273 do_action_ref_array( 'in_widget_form', array( &$this, &$return, $instance) );273 do_action_ref_array( 'in_widget_form', array($this, $return, $instance) ); 274 274 } 275 275 return $return; 276 276 } … … 317 317 var $widgets = array(); 318 318 319 319 function WP_Widget_Factory() { 320 add_action( 'widgets_init', array( &$this, '_register_widgets' ), 100 );320 add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 ); 321 321 } 322 322 323 323 function register($widget_class) { -
wp-includes/wp-db.php
488 488 * @param string $dbhost MySQL database host 489 489 */ 490 490 function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) { 491 register_shutdown_function( array( &$this, '__destruct' ) );491 register_shutdown_function( array( $this, '__destruct' ) ); 492 492 493 493 if ( WP_DEBUG ) 494 494 $this->show_errors(); … … 901 901 $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it 902 902 $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting 903 903 $query = preg_replace( '|(?<!%)%s|', "'%s'", $query ); // quote the strings, avoiding escaped strings like %%s 904 array_walk( $args, array( &$this, 'escape_by_ref' ) );904 array_walk( $args, array( $this, 'escape_by_ref' ) ); 905 905 return @vsprintf( $query, $args ); 906 906 } 907 907 -
wp-includes/wp-diff.php
422 422 $chars2 = count_chars($string2); 423 423 424 424 // L1-norm of difference vector. 425 $difference = array_sum( array_map( array( &$this, 'difference'), $chars1, $chars2 ) );425 $difference = array_sum( array_map( array($this, 'difference'), $chars1, $chars2 ) ); 426 426 427 427 // $string1 has zero length? Odd. Give huge penalty by not dividing. 428 428 if ( !$string1 )