Make WordPress Core

Ticket #53505: 53505.diff

File 53505.diff, 1.1 KB (added by SergeyBiryukov, 4 years ago)
  • src/wp-includes/script-loader.php

     
    23282328/**
    23292329 * Checks whether separate assets should be loaded for core blocks on-render.
    23302330 *
     2331 * When this function returns true, other functions ensure that core blocks
     2332 * only load their styles on-render, and each block loads its own, individual
     2333 * stylesheet. Third-party blocks only load their styles when rendered.
     2334 *
     2335 * When this function returns false, all core block styles are loaded regardless
     2336 * of whether they are rendered in a page or not, because they are all part of
     2337 * the `block-library/style.css` file. Third-party blocks always get enqueued
     2338 * regardless of whether they are rendered or not.
     2339 *
     2340 * This only affects front end and not the block editor screens.
     2341 *
     2342 * @see wp_enqueue_registered_block_scripts_and_styles()
     2343 * @see register_block_style_handle()
     2344 *
    23312345 * @since 5.8.0
    23322346 *
    23332347 * @return bool Whether separate assets will be loaded.