filtrod 6.5.0
hooked_block
Opis — z kodu źródłowego
Filters the parsed block array for a given hooked block.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$parsed_hooked_block | array | null | The parsed block array for the given hooked block type, or null to suppress the block. |
$hooked_block_type | string | The hooked block type name. |
$relative_position | string | The relative position of the hooked block. |
$parsed_anchor_block | array | The anchor block, in parsed block array format. |
$context | \WP_Block_Template | \WP_Post | array | The block template, template part, post object, or pattern that the anchor block belongs to. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'hooked_block', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'hooked_block', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii