Ticket #52879: 52879.patch
File 52879.patch, 2.8 KB (added by , 4 years ago) |
---|
-
src/wp-admin/load-scripts.php
33 33 exit; 34 34 } 35 35 36 if ( isset( $_GET['script_debug'] ) && ! defined( 'SCRIPT_DEBUG' ) ) { 37 $script_debug = 'true' === $_GET['script_debug']; 38 define( 'SCRIPT_DEBUG', $script_debug ); 39 } 40 36 41 require ABSPATH . 'wp-admin/includes/noop.php'; 37 42 require ABSPATH . WPINC . '/script-loader.php'; 38 43 require ABSPATH . WPINC . '/version.php'; -
src/wp-admin/load-styles.php
14 14 15 15 define( 'WPINC', 'wp-includes' ); 16 16 17 if ( isset( $_GET['script_debug'] ) && ! defined( 'SCRIPT_DEBUG' ) ) { 18 $script_debug = 'true' === $_GET['script_debug']; 19 define( 'SCRIPT_DEBUG', $script_debug ); 20 } 21 17 22 require ABSPATH . 'wp-admin/includes/noop.php'; 18 23 require ABSPATH . WPINC . '/script-loader.php'; 19 24 require ABSPATH . WPINC . '/version.php'; -
src/wp-includes/script-loader.php
1951 1951 $concatenated .= "&load%5Bchunk_{$key}%5D={$chunk}"; 1952 1952 } 1953 1953 1954 $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}" . $concatenated . '&ver=' . $wp_scripts->default_version; 1954 // Pass the SCRIPT_DEBUG constant in the query args as it is usually defined 1955 // in wp-config.php which is not used in load-scripts.php. 1956 $script_debug = ''; 1957 1958 if ( defined( 'SCRIPT_DEBUG' ) ) { 1959 $debug = SCRIPT_DEBUG ? 'true' : 'false'; 1960 $script_debug = "&script_debug={$debug}"; 1961 } 1962 1963 $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}" . $script_debug . $concatenated . '&ver=' . $wp_scripts->default_version; 1955 1964 echo "<script{$type_attr} src='" . esc_attr( $src ) . "'></script>\n"; 1956 1965 } 1957 1966 … … 2128 2137 $concatenated .= "&load%5Bchunk_{$key}%5D={$chunk}"; 2129 2138 } 2130 2139 2131 $href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&dir={$dir}" . $concatenated . '&ver=' . $ver; 2140 // Pass the SCRIPT_DEBUG constant in the query args as it is usually defined 2141 // in wp-config.php which is not used in load-styles.php. 2142 $script_debug = ''; 2143 2144 if ( defined( 'SCRIPT_DEBUG' ) ) { 2145 $debug = SCRIPT_DEBUG ? 'true' : 'false'; 2146 $script_debug = "&script_debug={$debug}"; 2147 } 2148 2149 $href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&dir={$dir}" . $script_debug . $concatenated . '&ver=' . $ver; 2132 2150 echo "<link rel='stylesheet' href='" . esc_attr( $href ) . "'{$type_attr} media='all' />\n"; 2133 2151 2134 2152 if ( ! empty( $wp_styles->print_code ) ) {