Make WordPress Core

Ticket #16661: 16661.4.diff

File 16661.4.diff, 28.2 KB (added by kawauso, 14 years ago)

Keep reference for 'http_api_curl'

  • wp-admin/includes/deprecated.php

     
    502502                        $this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
    503503                }
    504504
    505                 do_action_ref_array( 'pre_user_search', array( &$this ) );
     505                do_action( 'pre_user_search', $this );
    506506        }
    507507
    508508        /**
  • wp-admin/includes/user.php

     
    135135                $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ));
    136136
    137137        /* checking the password has been typed twice */
    138         do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 ));
     138        do_action( 'check_passwords', $user->user_login, & $pass1, & $pass2 );
    139139
    140140        if ( $update ) {
    141141                if ( empty($pass1) && !empty($pass2) )
     
    176176        }
    177177
    178178        // Allow plugins to return their own errors.
    179         do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) );
     179        do_action_ref( 'user_profile_update_errors', $errors, $update, $user );
    180180
    181181        if ( $errors->get_error_codes() )
    182182                return $errors;
  • wp-admin/load-scripts.php

     
    5555/**
    5656 * @ignore
    5757 */
    58 function do_action_ref_array() {}
     58function do_action() {}
    5959
    6060/**
    6161 * @ignore
  • wp-admin/load-styles.php

     
    5555/**
    5656 * @ignore
    5757 */
    58 function do_action_ref_array() {}
     58function do_action() {}
    5959
    6060/**
    6161 * @ignore
  • wp-cron.php

     
    5252
    5353                        wp_unschedule_event($timestamp, $hook, $v['args']);
    5454
    55                         do_action_ref_array($hook, $v['args']);
     55                        array_unshift( $v['args'], $hook );
     56
     57                        call_user_func_array( 'do_action', $v['args'] );
    5658                }
    5759        }
    5860}
  • wp-includes/admin-bar.php

     
    5757
    5858        $wp_admin_bar->load_user_locale_translations();
    5959
    60         do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) );
     60        do_action( 'admin_bar_menu', $wp_admin_bar );
    6161
    6262        do_action( 'wp_before_admin_bar_render' );
    6363
  • wp-includes/class-http.php

     
    14081408
    14091409                // Cookies are not handled by the HTTP API currently. Allow for plugin authors to handle it
    14101410                // themselves... Although, it is somewhat pointless without some reference.
    1411                 do_action_ref_array( 'http_api_curl', array(&$handle) );
     1411                do_action( 'http_api_curl', array(&$handle) );
    14121412
    14131413                // We don't need to return the body, so don't. Just execute request and return.
    14141414                if ( ! $r['blocking'] ) {
  • wp-includes/class-wp.php

     
    298298
    299299                $this->query_vars = apply_filters('request', $this->query_vars);
    300300
    301                 do_action_ref_array('parse_request', array(&$this));
     301                do_action('parse_request', $this);
    302302        }
    303303
    304304        /**
     
    373373                if ( $exit_required )
    374374                        exit();
    375375
    376                 do_action_ref_array('send_headers', array(&$this));
     376                do_action('send_headers', $this);
    377377        }
    378378
    379379        /**
     
    501501                $this->query_posts();
    502502                $this->handle_404();
    503503                $this->register_globals();
    504                 do_action_ref_array('wp', array(&$this));
     504                do_action('wp', &$this);
    505505        }
    506506
    507507        /**
  • wp-includes/class.wp-scripts.php

     
    3131        var $default_dirs;
    3232
    3333        function __construct() {
    34                 do_action_ref_array( 'wp_default_scripts', array(&$this) );
     34                do_action( 'wp_default_scripts', $this );
    3535        }
    3636
    3737        /**
  • wp-includes/class.wp-styles.php

     
    2828        var $default_dirs;
    2929
    3030        function __construct() {
    31                 do_action_ref_array( 'wp_default_styles', array(&$this) );
     31                do_action( 'wp_default_styles', $this );
    3232        }
    3333
    3434        function do_item( $handle ) {
  • wp-includes/comment.php

     
    221221                );
    222222
    223223                $this->query_vars = wp_parse_args( $query_vars, $defaults );
    224                 do_action_ref_array( 'pre_get_comments', array( &$this ) );
     224                do_action( 'pre_get_comments', $this );
    225225                extract( $this->query_vars, EXTR_SKIP );
    226226
    227227                // $args can be whatever, only use the args defined in defaults to compute the key
     
    320320                        $where .= $this->get_search_sql( $search, array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' ) );
    321321
    322322                $pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits' );
    323                 $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) );
     323                $clauses = apply_filters( 'comments_clauses', compact( $pieces ), $this );
    324324                foreach ( $pieces as $piece )
    325325                        $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
    326326
     
    330330                        return $wpdb->get_var( $query );
    331331
    332332                $comments = $wpdb->get_results( $query );
    333                 $comments = apply_filters_ref_array( 'the_comments', array( $comments, &$this ) );
     333                $comments = apply_filters( 'the_comments', $comments, $this );
    334334
    335335                wp_cache_add( $cache_key, $comments, 'comment' );
    336336
     
    17961796                endif;
    17971797        endforeach;
    17981798
    1799         do_action_ref_array('pre_ping', array(&$post_links, &$pung));
     1799        do_action('pre_ping', &$post_links, &$pung);
    18001800
    18011801        foreach ( (array) $post_links as $pagelinkedto ) {
    18021802                $pingback_server_url = discover_pingback_server_uri( $pagelinkedto );
  • wp-includes/deprecated.php

     
    26022602        return true;
    26032603}
    26042604
     2605
     2606/**
     2607 * Execute functions hooked on a specific action hook, specifying arguments in an array.
     2608 *
     2609 * @see do_action() This function is identical, but the arguments passed to the
     2610 * functions hooked to <tt>$tag</tt> are supplied using an array.
     2611 *
     2612 * @since 2.1
     2613 * @deprecated 3.2
     2614 *
     2615 * @param string $tag The name of the action to be executed.
     2616 * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
     2617 * @return null Will return null if $tag does not exist in $wp_filter array
     2618 */
     2619function do_action_ref_array( $tag, $args ) {
     2620        _deprecated_function( __FUNCTION__, '3.2', 'do_action()' );
     2621
     2622        array_unshift( $args, $tag );
     2623
     2624        return call_user_func_array( 'do_action', $args );
     2625}
     2626
     2627/**
     2628 * Execute functions hooked on a specific filter hook, specifying arguments in an array.
     2629 *
     2630 * @see apply_filters() This function is identical, but the arguments passed to the
     2631 * functions hooked to <tt>$tag</tt> are supplied using an array.
     2632 *
     2633 * @since 3.0
     2634 * @deprecated 3.2
     2635 *
     2636 * @param string $tag The name of the filter hook.
     2637 * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
     2638 * @return mixed The filtered value after all hooked functions are applied to it.
     2639 */
     2640function apply_filters_ref_array( $tag, $args ) {
     2641        _deprecated_function( __FUNCTION__, '3.2', 'apply_filters()' );
     2642
     2643        array_unshift( $args, $tag );
     2644
     2645        return call_user_func_array( 'apply_filters', $args );
     2646}
     2647
  • wp-includes/feed.php

     
    535535        $feed->set_cache_class('WP_Feed_Cache');
    536536        $feed->set_file_class('WP_SimplePie_File');
    537537        $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( 'wp_feed_options', $feed, $url );
    539539        $feed->init();
    540540        $feed->handle_content_type();
    541541
  • wp-includes/meta.php

     
    442442                $where .= $wpdb->prepare( " AND CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$meta_compare_string}", $meta_value );
    443443        }
    444444
    445         return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &$context ) );
     445        return apply_filter( 'get_meta_sql', compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &$context );
    446446}
    447447
    448448/**
  • wp-includes/pluggable.php

     
    256256 * @uses apply_filters() Calls 'wp_mail_from_name' hook to get the from address name.
    257257 * @uses apply_filters() Calls 'wp_mail_content_type' hook to get the email content type.
    258258 * @uses apply_filters() Calls 'wp_mail_charset' hook to get the email charset
    259  * @uses do_action_ref_array() Calls 'phpmailer_init' hook on the reference to
    260  *              phpmailer object.
     259 * @uses do_action() Calls 'phpmailer_init' hook on the phpmailer object.
    261260 * @uses PHPMailer
    262261 * @
    263262 *
     
    459458                }
    460459        }
    461460
    462         do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
     461        do_action( 'phpmailer_init', $phpmailer );
    463462
    464463        // Send!
    465464        $result = @$phpmailer->Send();
  • wp-includes/plugin.php

     
    174174}
    175175
    176176/**
    177  * Execute functions hooked on a specific filter hook, specifying arguments in an array.
    178  *
    179  * @see apply_filters() This function is identical, but the arguments passed to the
    180  * functions hooked to <tt>$tag</tt> are supplied using an array.
    181  *
    182  * @package WordPress
    183  * @subpackage Plugin
    184  * @since 3.0.0
    185  * @global array $wp_filter Stores all of the filters
    186  * @global array $merged_filters Merges the filter hooks using this function.
    187  * @global array $wp_current_filter stores the list of current filters with the current one last
    188  *
    189  * @param string $tag The name of the filter hook.
    190  * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
    191  * @return mixed The filtered value after all hooked functions are applied to it.
    192  */
    193 function apply_filters_ref_array($tag, $args) {
    194         global $wp_filter, $merged_filters, $wp_current_filter;
    195 
    196         $wp_current_filter[] = $tag;
    197 
    198         // Do 'all' actions first
    199         if ( isset($wp_filter['all']) ) {
    200                 $all_args = func_get_args();
    201                 _wp_call_all_hook($all_args);
    202         }
    203 
    204         if ( !isset($wp_filter[$tag]) ) {
    205                 array_pop($wp_current_filter);
    206                 return $args[0];
    207         }
    208 
    209         // Sort
    210         if ( !isset( $merged_filters[ $tag ] ) ) {
    211                 ksort($wp_filter[$tag]);
    212                 $merged_filters[ $tag ] = true;
    213         }
    214 
    215         reset( $wp_filter[ $tag ] );
    216 
    217         do {
    218                 foreach( (array) current($wp_filter[$tag]) as $the_ )
    219                         if ( !is_null($the_['function']) )
    220                                 $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
    221 
    222         } while ( next($wp_filter[$tag]) !== false );
    223 
    224         array_pop( $wp_current_filter );
    225 
    226         return $args[0];
    227 }
    228 
    229 /**
    230177 * Removes a function from a specified filter hook.
    231178 *
    232179 * This function removes a function attached to a specified filter hook. This
     
    420367}
    421368
    422369/**
    423  * Execute functions hooked on a specific action hook, specifying arguments in an array.
    424  *
    425  * @see do_action() This function is identical, but the arguments passed to the
    426  * functions hooked to <tt>$tag</tt> are supplied using an array.
    427  *
    428  * @package WordPress
    429  * @subpackage Plugin
    430  * @since 2.1
    431  * @global array $wp_filter Stores all of the filters
    432  * @global array $wp_actions Increments the amount of times action was triggered.
    433  *
    434  * @param string $tag The name of the action to be executed.
    435  * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
    436  * @return null Will return null if $tag does not exist in $wp_filter array
    437  */
    438 function do_action_ref_array($tag, $args) {
    439         global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
    440 
    441         if ( ! isset($wp_actions) )
    442                 $wp_actions = array();
    443 
    444         if ( ! isset($wp_actions[$tag]) )
    445                 $wp_actions[$tag] = 1;
    446         else
    447                 ++$wp_actions[$tag];
    448 
    449         $wp_current_filter[] = $tag;
    450 
    451         // Do 'all' actions first
    452         if ( isset($wp_filter['all']) ) {
    453                 $all_args = func_get_args();
    454                 _wp_call_all_hook($all_args);
    455         }
    456 
    457         if ( !isset($wp_filter[$tag]) ) {
    458                 array_pop($wp_current_filter);
    459                 return;
    460         }
    461 
    462         // Sort
    463         if ( !isset( $merged_filters[ $tag ] ) ) {
    464                 ksort($wp_filter[$tag]);
    465                 $merged_filters[ $tag ] = true;
    466         }
    467 
    468         reset( $wp_filter[ $tag ] );
    469 
    470         do {
    471                 foreach( (array) current($wp_filter[$tag]) as $the_ )
    472                         if ( !is_null($the_['function']) )
    473                                 call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
    474 
    475         } while ( next($wp_filter[$tag]) !== false );
    476 
    477         array_pop($wp_current_filter);
    478 }
    479 
    480 /**
    481370 * Check if any action has been registered for a hook.
    482371 *
    483372 * @package WordPress
     
    678567 * The 'all' hook passes all of the arguments or parameters that were used for
    679568 * the hook, which this function was called for.
    680569 *
    681  * This function is used internally for apply_filters(), do_action(), and
    682  * do_action_ref_array() and is not meant to be used from outside those
    683  * functions. This function does not check for the existence of the all hook, so
    684  * it will fail unless the all hook exists prior to this function call.
     570 * This function is used internally for apply_filters() and do_action()
     571 * and is not meant to be used from outside those functions. This function
     572 * does not check for the existence of the all hook, so it will fail unless
     573 * the all hook exists prior to this function call.
    685574 *
    686575 * @package WordPress
    687576 * @subpackage Plugin
  • wp-includes/query.php

     
    16271627                if ( '404' == $qv['error'] )
    16281628                        $this->set_404();
    16291629
    1630                 do_action_ref_array('parse_query', array(&$this));
     1630                do_action('parse_query', $this);
    16311631        }
    16321632
    16331633        /*
     
    18651865         *
    18661866         * @since 1.5.0
    18671867         * @access public
    1868          * @uses do_action_ref_array() Calls 'pre_get_posts' hook before retrieving posts.
     1868         * @uses do_action() Calls 'pre_get_posts' hook before retrieving posts.
    18691869         *
    18701870         * @return array List of posts.
    18711871         */
     
    18741874
    18751875                $this->parse_query();
    18761876
    1877                 do_action_ref_array('pre_get_posts', array(&$this));
     1877                do_action('pre_get_posts', $this);
    18781878
    18791879                // Shorthand.
    18801880                $q = &$this->query_vars;
     
    21442144                }
    21452145
    21462146                // Allow plugins to contextually add/remove/modify the search section of the database query
    2147                 $search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
     2147                $search = apply_filters( 'posts_search', $search, $this );
    21482148
    21492149                // Taxonomies
    21502150                $this->parse_tax_query( $q );
     
    24482448                // Apply filters on where and join prior to paging so that any
    24492449                // manipulations to them are reflected in the paging by day queries.
    24502450                if ( !$q['suppress_filters'] ) {
    2451                         $where = apply_filters_ref_array('posts_where', array( $where, &$this ) );
    2452                         $join = apply_filters_ref_array('posts_join', array( $join, &$this ) );
     2451                        $where = apply_filters( 'posts_where', $where, $this );
     2452                        $join = apply_filters( 'posts_join', $join, $this );
    24532453                }
    24542454
    24552455                // Paging
     
    24822482                        }
    24832483
    24842484                        if ( !$q['suppress_filters'] ) {
    2485                                 $cjoin = apply_filters_ref_array('comment_feed_join', array( $cjoin, &$this ) );
    2486                                 $cwhere = apply_filters_ref_array('comment_feed_where', array( $cwhere, &$this ) );
    2487                                 $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( $cgroupby, &$this ) );
    2488                                 $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
    2489                                 $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
     2485                                $cjoin = apply_filters( 'comment_feed_join', $cjoin, $this );
     2486                                $cwhere = apply_filters( 'comment_feed_where', $cwhere, $this );
     2487                                $cgroupby = apply_filters( 'comment_feed_groupby', $cgroupby, $this );
     2488                                $corderby = apply_filters( 'comment_feed_orderby', 'comment_date_gmt DESC', $this );
     2489                                $climits = apply_filters( 'comment_feed_limits', 'LIMIT ' . get_option('posts_per_rss'), $this );
    24902490                        }
    24912491                        $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
    24922492                        $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
     
    25142514                // Apply post-paging filters on where and join.  Only plugins that
    25152515                // manipulate paging queries should use these hooks.
    25162516                if ( !$q['suppress_filters'] ) {
    2517                         $where          = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) );
    2518                         $groupby        = apply_filters_ref_array( 'posts_groupby',             array( $groupby, &$this ) );
    2519                         $join           = apply_filters_ref_array( 'posts_join_paged',  array( $join, &$this ) );
    2520                         $orderby        = apply_filters_ref_array( 'posts_orderby',             array( $orderby, &$this ) );
    2521                         $distinct       = apply_filters_ref_array( 'posts_distinct',    array( $distinct, &$this ) );
    2522                         $limits         = apply_filters_ref_array( 'post_limits',               array( $limits, &$this ) );
    2523                         $fields         = apply_filters_ref_array( 'posts_fields',              array( $fields, &$this ) );
     2517                        $where          = apply_filters( 'posts_where_paged', $where, $this );
     2518                        $groupby        = apply_filters( 'posts_groupby',         $groupby, $this );
     2519                        $join           = apply_filters( 'posts_join_paged',  $join, $this );
     2520                        $orderby        = apply_filters( 'posts_orderby',         $orderby, $this );
     2521                        $distinct       = apply_filters( 'posts_distinct',        $distinct, $this );
     2522                        $limits         = apply_filters( 'post_limits',           $limits, $this );
     2523                        $fields         = apply_filters( 'posts_fields',          $fields, $this );
    25242524
    25252525                        // Filter all clauses at once, for convenience
    2526                         $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
     2526                        $clauses = (array) apply_filters( 'posts_clauses', compact( $pieces ), $this );
    25272527                        foreach ( $pieces as $piece )
    25282528                                $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
    25292529                }
     
    25332533
    25342534                // Filter again for the benefit of caching plugins.  Regular plugins should use the hooks above.
    25352535                if ( !$q['suppress_filters'] ) {
    2536                         $where          = apply_filters_ref_array( 'posts_where_request',               array( $where, &$this ) );
    2537                         $groupby        = apply_filters_ref_array( 'posts_groupby_request',             array( $groupby, &$this ) );
    2538                         $join           = apply_filters_ref_array( 'posts_join_request',                array( $join, &$this ) );
    2539                         $orderby        = apply_filters_ref_array( 'posts_orderby_request',             array( $orderby, &$this ) );
    2540                         $distinct       = apply_filters_ref_array( 'posts_distinct_request',    array( $distinct, &$this ) );
    2541                         $fields         = apply_filters_ref_array( 'posts_fields_request',              array( $fields, &$this ) );
    2542                         $limits         = apply_filters_ref_array( 'post_limits_request',               array( $limits, &$this ) );
     2536                        $where          = apply_filters( 'posts_where_request',         $where, $this );
     2537                        $groupby        = apply_filters( 'posts_groupby_request',       $groupby, $this );
     2538                        $join           = apply_filters( 'posts_join_request',          $join, $this );
     2539                        $orderby        = apply_filters( 'posts_orderby_request',       $orderby, $this );
     2540                        $distinct       = apply_filters( 'posts_distinct_request',      $distinct, $this );
     2541                        $fields         = apply_filters( 'posts_fields_request',        $fields, $this );
     2542                        $limits         = apply_filters( 'post_limits_request',         $limits, $this );
    25432543
    25442544                        // Filter all clauses at once, for convenience
    2545                         $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
     2545                        $clauses = (array) apply_filters( 'posts_clauses_request', compact( $pieces ), $this );
    25462546                        foreach ( $pieces as $piece )
    25472547                                $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : '';
    25482548                }
     
    25582558
    25592559                $this->request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
    25602560                if ( !$q['suppress_filters'] )
    2561                         $this->request = apply_filters_ref_array('posts_request', array( $this->request, &$this ) );
     2561                        $this->request = apply_filters( 'posts_request', $this->request, $this );
    25622562
    25632563                if ( 'ids' == $q['fields'] ) {
    25642564                        $this->posts = $wpdb->get_col($this->request);
     
    25802580
    25812581                // Raw results filter.  Prior to status checks.
    25822582                if ( !$q['suppress_filters'] )
    2583                         $this->posts = apply_filters_ref_array('posts_results', array( $this->posts, &$this ) );
     2583                        $this->posts = apply_filters( 'posts_results', $this->posts, $this );
    25842584
    25852585                if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {
    2586                         $cjoin = apply_filters_ref_array('comment_feed_join', array( '', &$this ) );
    2587                         $cwhere = apply_filters_ref_array('comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );
    2588                         $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( '', &$this ) );
     2586                        $cjoin = apply_filters( 'comment_feed_join', '', $this );
     2587                        $cwhere = apply_filters( 'comment_feed_where', "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", $this );
     2588                        $cgroupby = apply_filters( 'comment_feed_groupby', '', $this );
    25892589                        $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
    2590                         $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
     2590                        $corderby = apply_filters( 'comment_feed_orderby', 'comment_date_gmt DESC', $this );
    25912591                        $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
    2592                         $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
     2592                        $climits = apply_filters( 'comment_feed_limits', 'LIMIT ' . get_option('posts_per_rss'), $this );
    25932593                        $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits";
    25942594                        $this->comments = $wpdb->get_results($comments_request);
    25952595                        $this->comment_count = count($this->comments);
    25962596                }
    25972597
    25982598                if ( !$q['no_found_rows'] && !empty($limits) ) {
    2599                         $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) );
     2599                        $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()', $this );
    26002600                        $this->found_posts = $wpdb->get_var( $found_posts_query );
    2601                         $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );
     2601                        $this->found_posts = apply_filters( 'found_posts', $this->found_posts, $this );
    26022602                        $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
    26032603                }
    26042604
     
    26312631                        }
    26322632
    26332633                        if ( $this->is_preview && current_user_can( $edit_cap, $this->posts[0]->ID ) )
    2634                                 $this->posts[0] = apply_filters_ref_array('the_preview', array( $this->posts[0], &$this ));
     2634                                $this->posts[0] = apply_filters( 'the_preview', $this->posts[0], $this );
    26352635                }
    26362636
    26372637                // Put sticky posts at the top of the posts array
     
    26852685                }
    26862686
    26872687                if ( !$q['suppress_filters'] )
    2688                         $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, &$this ) );
     2688                        $this->posts = apply_filters( 'the_posts', $this->posts, $this );
    26892689
    26902690                $this->post_count = count($this->posts);
    26912691
     
    27292729         * @since 1.5.0
    27302730         * @access public
    27312731         * @uses $post
    2732          * @uses do_action_ref_array() Calls 'loop_start' if loop has just started
     2732         * @uses do_action() Calls 'loop_start' if loop has just started
    27332733         */
    27342734        function the_post() {
    27352735                global $post;
    27362736                $this->in_the_loop = true;
    27372737
    27382738                if ( $this->current_post == -1 ) // loop has just started
    2739                         do_action_ref_array('loop_start', array(&$this));
     2739                        do_action('loop_start', $this);
    27402740
    27412741                $post = $this->next_post();
    27422742                setup_postdata($post);
     
    27492749         *
    27502750         * @since 1.5.0
    27512751         * @access public
    2752          * @uses do_action_ref_array() Calls 'loop_end' if loop is ended
     2752         * @uses do_action() Calls 'loop_end' if loop is ended
    27532753         *
    27542754         * @return bool True if posts are available, false if end of loop.
    27552755         */
     
    27572757                if ( $this->current_post + 1 < $this->post_count ) {
    27582758                        return true;
    27592759                } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
    2760                         do_action_ref_array('loop_end', array(&$this));
     2760                        do_action('loop_end', $this);
    27612761                        // Do some cleaning up after the loop
    27622762                        $this->rewind_posts();
    27632763                }
     
    34823482 * @since 1.5.0
    34833483 *
    34843484 * @param object $post Post data.
    3485  * @uses do_action_ref_array() Calls 'the_post'
     3485 * @uses do_action() Calls 'the_post'
    34863486 * @return bool True when finished.
    34873487 */
    34883488function setup_postdata($post) {
     
    35153515                $multipage = 0;
    35163516        }
    35173517
    3518         do_action_ref_array('the_post', array(&$post));
     3518        do_action('the_post', $post);
    35193519
    35203520        return true;
    35213521}
  • wp-includes/rewrite.php

     
    15621562                else
    15631563                        $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);
    15641564
    1565                 do_action_ref_array('generate_rewrite_rules', array(&$this));
     1565                do_action('generate_rewrite_rules', $this);
    15661566                $this->rules = apply_filters('rewrite_rules_array', $this->rules);
    15671567
    15681568                return $this->rules;
  • wp-includes/script-loader.php

     
    4646 *
    4747 * @param object $scripts WP_Scripts object.
    4848 */
    49 function wp_default_scripts( &$scripts ) {
     49function wp_default_scripts( $scripts ) {
    5050
    5151        if ( !$guessurl = site_url() )
    5252                $guessurl = wp_guess_url();
     
    453453 *
    454454 * @param object $styles
    455455 */
    456 function wp_default_styles( &$styles ) {
     456function wp_default_styles( $styles ) {
    457457        // This checks to see if site_url() returns something and if it does not
    458458        // then it assigns $guess_url to wp_guess_url(). Strange format, but it works.
    459459        if ( ! $guessurl = site_url() )
  • wp-includes/user.php

     
    3838                $credentials['remember'] = false;
    3939
    4040        // 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('wp_authenticate', &$credentials['user_login'], &$credentials['user_password']);
    4242
    4343        if ( '' === $secure_cookie )
    4444                $secure_cookie = is_ssl();
     
    531531                        $this->query_where .= " AND $wpdb->users.ID NOT IN ($ids)";
    532532                }
    533533
    534                 do_action_ref_array( 'pre_user_query', array( &$this ) );
     534                do_action( 'pre_user_query', $this );
    535535        }
    536536
    537537        /**
  • wp-includes/widgets.php

     
    270270                        $return = $this->form($instance);
    271271                        // add extra fields in the widget form - be sure to set $return to null if you add any
    272272                        // 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( 'in_widget_form', $this, &$return, $instance );
    274274                }
    275275                return $return;
    276276        }