filtrod 5.9.0
get_block_file_template
Opis — z kodu źródłowego
Filters the block template object after it has been (potentially) fetched from the theme file.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$block_template | \WP_Block_Template | null | The found block template, or null if there is none. |
$id | string | Template unique identifier (example: 'theme_slug//template_slug'). |
$template_type | string | Template type. Either 'wp_template' or 'wp_template_part'. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_block_file_template', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_block_file_template', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii