filtrod 5.8.0
should_load_separate_core_block_assets
Opis — z kodu źródłowego
Filters whether block styles should be loaded separately.
Returning false loads all core block assets, regardless of whether they are rendered in a page or not. Returning true loads core block assets only when they are rendered.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$load_separate_assets | bool | Whether separate assets will be loaded. Default false (all block assets are loaded, even when not used). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'should_load_separate_core_block_assets', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'should_load_separate_core_block_assets', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii