Make WordPress Core

Ticket #53824: 53824.diff

File 53824.diff, 546 bytes (added by kapilpaul, 4 years ago)

Created patch.

  • 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 09c6a22b0d..e6c879de44 100644
    a b class WP_Query { 
    17811781                 *
    17821782                 * @param WP_Query $query The WP_Query instance (passed by reference).
    17831783                 */
    1784                 do_action_ref_array( 'pre_get_posts', array( &$this ) );
     1784                if ( ! did_action( 'pre_get_posts' ) ) {
     1785                        do_action_ref_array( 'pre_get_posts', array( &$this ) );
     1786                }
    17851787
    17861788                // Shorthand.
    17871789                $q = &$this->query_vars;