Changeset 51263
- Timestamp:
- 06/29/2021 06:44:45 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r51256 r51263 2327 2327 2328 2328 /** 2329 * Checks whether separate assets should be loaded for core blocks on-render.2329 * Checks whether separate styles should be loaded for core blocks on-render. 2330 2330 * 2331 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, individual2333 * stylesheet. Third-party blocks only load their styles when rendered.2334 * 2335 * When this function returns false, all core block styles are loaded regardless2332 * only load their assets on-render, and each block loads its own, individual 2333 * assets. Third-party blocks only load their assets when rendered. 2334 * 2335 * When this function returns false, all core block assets are loaded regardless 2336 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 enqueued2338 * regardless of whether they are rendered or not.2337 * the `block-library/style.css` file. Assets for third-party blocks are always 2338 * enqueued regardless of whether they are rendered or not. 2339 2339 * 2340 2340 * This only affects front end and not the block editor screens. … … 2353 2353 2354 2354 /** 2355 * Filters the flag that decides whether separate scripts and styles 2356 * will be loaded for core blocks on-render. 2355 * Filters whether block styles should be loaded separately. 2356 * 2357 * Returning false loads all core block assets, regardless of whether they are rendered 2358 * in a page or not. Returning true loads core block assets only when they are rendered. 2357 2359 * 2358 2360 * @since 5.8.0 2359 2361 * 2360 2362 * @param bool $load_separate_assets Whether separate assets will be loaded. 2361 * Default false .2363 * Default false (all block assets are loaded, even when not used). 2362 2364 */ 2363 2365 return apply_filters( 'should_load_separate_core_block_assets', false );
Note: See TracChangeset
for help on using the changeset viewer.