filtrod 5.9.0
get_block_template
Opis — z kodu źródłowego
Filters the queried block template object after it's been fetched.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$block_template | \WP_Block_Template | null | The found block template, or null if there isn't one. |
$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_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_template', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii