Make WordPress Core

Ticket #10886: lighter-load.3.patch

File lighter-load.3.patch, 643 bytes (added by junsuijin, 15 years ago)

filter used, wp() circumvented, 'wp' hook left intact, commented

  • wp-blog-header.php

     
    1111
    1212        require_once( dirname(__FILE__) . '/wp-load.php' );
    1313
    14         wp();
     14/**
     15 * Return false with 'wp_main' to save queries when loading pages that do not
     16 * have posts and pages that query their own posts.
     17 *
     18 * @since 2.9.0
     19 *
     20 * @param bool.
     21 */
     22        if ( (bool) apply_filters( 'wp_main', true ) === true )
     23                wp();
     24        else
     25                do_action_ref_array( 'wp', array( (object) array() ) );
    1526
    1627        require_once( ABSPATH . WPINC . '/template-loader.php' );
    1728