WordPress.org

Make WordPress Core

Changeset 49637


Ignore:
Timestamp:
11/17/2020 08:07:57 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Users: Use do_action_ref_array() for pre_get_users and pre_get_terms actions.

This brings some consistency with the other similar actions:

  • pre_get_comments
  • pre_get_networks
  • pre_get_posts
  • pre_get_sites
  • pre_user_query

Follow-up to [29363] and [37572].

Props andy, adamsilverstein, hellofromTonya, desrosj, SergeyBiryukov.
Fixes #50961.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-term-query.php

    r49189 r49637  
    322322         * @since 4.6.0
    323323         *
    324          * @param WP_Term_Query $this Current instance of WP_Term_Query.
     324         * @param WP_Term_Query $this Current instance of WP_Term_Query (passed by reference).
    325325         */
    326         do_action( 'pre_get_terms', $this );
     326        do_action_ref_array( 'pre_get_terms', array( &$this ) );
    327327
    328328        $taxonomies = (array) $args['taxonomy'];
  • trunk/src/wp-includes/class-wp-user-query.php

    r49193 r49637  
    220220         * Fires before the WP_User_Query has been parsed.
    221221         *
    222          * The passed WP_User_Query object contains the query variables, not
    223          * yet passed into SQL.
     222         * The passed WP_User_Query object contains the query variables,
     223         * not yet passed into SQL.
    224224         *
    225225         * @since 4.0.0
    226226         *
    227          * @param WP_User_Query $this The current WP_User_Query instance,
    228          *                            passed by reference.
     227         * @param WP_User_Query $this Current instance of WP_User_Query (passed by reference).
    229228         */
    230         do_action( 'pre_get_users', $this );
     229        do_action_ref_array( 'pre_get_users', array( &$this ) );
    231230
    232231        // Ensure that query vars are filled after 'pre_get_users'.
     
    577576         * @since 3.1.0
    578577         *
    579          * @param WP_User_Query $this The current WP_User_Query instance,
    580          *                            passed by reference.
     578         * @param WP_User_Query $this Current instance of WP_User_Query (passed by reference).
    581579         */
    582580        do_action_ref_array( 'pre_user_query', array( &$this ) );
Note: See TracChangeset for help on using the changeset viewer.