Make WordPress Core

Ticket #51507: 51507-1.patch

File 51507-1.patch, 982 bytes (added by ttodua, 4 years ago)
  • src/wp-includes/default-constants.php

     
    115115                define( 'MEDIA_TRASH', false );
    116116        }
    117117
     118        if ( ! defined( 'SHORTINIT_WITHOUT_DB' ) ) {
     119                define( 'SHORTINIT_WITHOUT_DB', false );
     120        }
     121
    118122        if ( ! defined( 'SHORTINIT' ) ) {
    119123                define( 'SHORTINIT', false );
    120124        }
  • src/wp-settings.php

     
    115115require ABSPATH . WPINC . '/class-wp-error.php';
    116116require ABSPATH . WPINC . '/pomo/mo.php';
    117117
     118// Stop most of WordPress from being loaded if we just want the basics (without DB)
     119if ( SHORTINIT_WITHOUT_DB ) {
     120        return false;
     121}
     122
    118123/**
    119124 * @global wpdb $wpdb WordPress database abstraction object.
    120125 * @since 0.71