Make WordPress Core

Ticket #53824: 53824.2.diff

File 53824.2.diff, 487 bytes (added by kapilpaul, 4 years ago)

using did_action to check.

  • src/wp-includes/class-wp-query.php

    diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php
    index e6c879de44..933e995fd2 100644
    a b class WP_Query { 
    17811781                 *
    17821782                 * @param WP_Query $query The WP_Query instance (passed by reference).
    17831783                 */
    1784                 if ( ! did_action( 'pre_get_posts' ) ) {
     1784                if ( ! doing_action( 'pre_get_posts' ) ) {
    17851785                        do_action_ref_array( 'pre_get_posts', array( &$this ) );
    17861786                }
    17871787