- Timestamp:
- 10/27/2021 06:20:58 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r51941 r51942 40 40 * @since 5.0.0 41 41 * 42 * @global string $tinymce_version 43 * @global bool $concatenate_scripts 44 * @global bool $compress_scripts 45 * 42 46 * @param WP_Scripts $scripts WP_Scripts object. 43 47 * @param bool $force_uncompressed Whether to forcibly prevent gzip compression. Default false. … … 45 49 function wp_register_tinymce_scripts( $scripts, $force_uncompressed = false ) { 46 50 global $tinymce_version, $concatenate_scripts, $compress_scripts; 51 47 52 $suffix = wp_scripts_get_suffix(); 48 53 $dev_suffix = wp_scripts_get_suffix( 'dev' ); … … 72 77 * 73 78 * @since 5.0.0 79 * 80 * @global WP_Locale $wp_locale WordPress date and time locale object. 74 81 * 75 82 * @param WP_Scripts $scripts WP_Scripts object. … … 277 284 * 278 285 * @since 5.0.0 286 * 287 * @global WP_Locale $wp_locale WordPress date and time locale object. 279 288 * 280 289 * @param WP_Scripts $scripts WP_Scripts object. … … 1380 1389 * @since 2.6.0 1381 1390 * 1391 * @global array $editor_styles 1392 * 1382 1393 * @param WP_Styles $styles 1383 1394 */ 1384 1395 function wp_default_styles( $styles ) { 1396 global $editor_styles; 1397 1385 1398 // Include an unmodified $wp_version. 1386 1399 require ABSPATH . WPINC . '/version.php'; … … 1535 1548 } 1536 1549 1537 global $editor_styles;1538 1550 if ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) { 1539 1551 // Include opinionated block styles if no $editor_styles are declared, so the editor never appears broken. … … 2033 2045 */ 2034 2046 function wp_print_head_scripts() { 2047 global $wp_scripts; 2048 2035 2049 if ( ! did_action( 'wp_print_scripts' ) ) { 2036 2050 /** This action is documented in wp-includes/functions.wp-scripts.php */ … … 2038 2052 } 2039 2053 2040 global $wp_scripts;2041 2042 2054 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 2043 2055 return array(); // No need to run if nothing is queued. 2044 2056 } 2057 2045 2058 return print_head_scripts(); 2046 2059 } … … 2244 2257 * 2245 2258 * @since 5.0.0 2246 *2247 * @global WP_Screen $current_screen WordPress current screen object.2248 2259 */ 2249 2260 function wp_common_block_scripts_and_styles() { … … 2333 2344 * 2334 2345 * @since 5.6.0 2346 * 2347 * @global WP_Screen $current_screen WordPress current screen object. 2335 2348 * 2336 2349 * @return bool Whether scripts and styles should be enqueued. … … 2437 2450 * 2438 2451 * @since 5.3.0 2452 * 2453 * @global WP_Styles $wp_styles 2439 2454 */ 2440 2455 function enqueue_block_styles_assets() { 2456 global $wp_styles; 2457 2441 2458 $block_styles = WP_Block_Styles_Registry::get_instance()->get_all_registered(); 2442 2459 … … 2466 2483 if ( wp_should_load_separate_core_block_assets() ) { 2467 2484 $block_stylesheet_handle = generate_block_asset_handle( $block_name, 'style' ); 2468 global $wp_styles; 2485 2469 2486 if ( isset( $wp_styles->registered[ $block_stylesheet_handle ] ) ) { 2470 2487 $handle = $block_stylesheet_handle;
Note: See TracChangeset
for help on using the changeset viewer.