WordPress.org

Make WordPress Core

Ticket #10886: 10886.diff

File 10886.diff, 601 bytes (added by westi, 9 years ago)

I don't think we should be calling the wp hook from two different places like that. I think I prefer this patch. Does this work for you?

  • wp-includes/functions.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    14531453 */
    14541454function wp( $query_vars = '' ) {
    14551455        global $wp, $wp_query, $wp_the_query;
    1456         $wp->main( $query_vars );
    14571456
     1457        // Return false to this filter to stop WordPress run it's own queries for this page
     1458        if ( apply_filters('run_wp_main', true) )
     1459                $wp->main( $query_vars );
     1460
    14581461        if( !isset($wp_the_query) )
    14591462                $wp_the_query = $wp_query;
    14601463}