WordPress.org

Make WordPress Core

Ticket #37584: WP_SHORTINIT_WITH_SESSION.patch

File WP_SHORTINIT_WITH_SESSION.patch, 1.5 KB (added by steveglick, 4 years ago)

Patch to add SHORTINIT_WITH_SESSION constant

  • wp-settings.php

     
    125125register_shutdown_function( 'shutdown_action_hook' );
    126126
    127127// Stop most of WordPress from being loaded if we just want the basics.
    128 if ( SHORTINIT )
    129         return false;
     128if ( SHORTINIT ) {
     129    // Load session data if specified
     130    if ( SHORTINIT_WITH_SESSION ) {
     131        require( ABSPATH . WPINC . '/class-wp-walker.php' );
     132        require( ABSPATH . WPINC . '/l10n.php' );
     133        require( ABSPATH . 'wp-admin/includes/admin.php' );
     134        require( ABSPATH . WPINC . '/formatting.php' );
     135        require( ABSPATH . WPINC . '/capabilities.php' );
     136        require( ABSPATH . WPINC . '/user.php' );
     137        require( ABSPATH . WPINC . '/meta.php' );
     138        require( ABSPATH . WPINC . '/class-wp-user.php' );
     139        require( ABSPATH . WPINC . '/class-wp-roles.php' );
     140        require( ABSPATH . WPINC . '/class-wp-role.php' );
     141        require( ABSPATH . WPINC . '/session.php' );
     142        require( ABSPATH . WPINC . '/pluggable.php' );
     143        require( ABSPATH . WPINC . '/script-loader.php' );
     144        require( ABSPATH . WPINC . '/general-template.php' );
     145        require( ABSPATH . WPINC . '/link-template.php' );
     146       
     147        wp_cookie_constants();
     148        wp_functionality_constants();
     149    }
     150   
     151    return false;
     152}
    130153
    131154// Load the L10n library.
    132155require_once( ABSPATH . WPINC . '/l10n.php' );