1 <?php |
1 <?php |
2 |
2 |
3 /** |
3 /* |
4 * Disable error reporting |
4 * Disable error reporting. |
5 * |
5 * |
6 * Set this to error_reporting( -1 ) for debugging |
6 * Set this to error_reporting( -1 ) for debugging. |
7 */ |
7 */ |
8 error_reporting( 0 ); |
8 error_reporting( 0 ); |
9 |
9 |
10 /** Set ABSPATH for execution */ |
10 // Set ABSPATH for execution. |
11 if ( ! defined( 'ABSPATH' ) ) { |
11 if ( ! defined( 'ABSPATH' ) ) { |
12 define( 'ABSPATH', dirname( __DIR__ ) . '/' ); |
12 define( 'ABSPATH', dirname( __DIR__ ) . '/' ); |
13 } |
13 } |
14 |
14 |
15 define( 'WPINC', 'wp-includes' ); |
15 define( 'WPINC', 'wp-includes' ); |
16 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); |
16 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); |
17 |
17 |
18 require ABSPATH . 'wp-admin/includes/noop.php'; |
18 require ABSPATH . 'wp-admin/includes/noop.php'; |
19 require ABSPATH . WPINC . '/theme.php'; |
19 require ABSPATH . WPINC . '/theme.php'; |
20 require ABSPATH . WPINC . '/class-wp-theme-json-resolver.php'; |
20 require ABSPATH . WPINC . '/class-wp-theme-json-resolver.php'; |
|
21 require ABSPATH . WPINC . '/global-styles-and-settings.php'; |
21 require ABSPATH . WPINC . '/script-loader.php'; |
22 require ABSPATH . WPINC . '/script-loader.php'; |
22 require ABSPATH . WPINC . '/version.php'; |
23 require ABSPATH . WPINC . '/version.php'; |
23 |
24 |
24 $protocol = $_SERVER['SERVER_PROTOCOL']; |
25 $protocol = $_SERVER['SERVER_PROTOCOL']; |
25 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ), true ) ) { |
26 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) { |
26 $protocol = 'HTTP/1.0'; |
27 $protocol = 'HTTP/1.0'; |
27 } |
28 } |
28 |
29 |
29 $load = $_GET['load']; |
30 $load = $_GET['load']; |
30 if ( is_array( $load ) ) { |
31 if ( is_array( $load ) ) { |