WP HOOKS
filtrod 6.7.0

block_bindings_source_value

Args 5Plik wp-includes/class-wp-block-bindings-source.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the output of a block bindings source.

Parametry

ParametrTypOpis
$valuemixedThe computed value for the source.
$namestringThe name of the source.
$source_argsarrayArray containing source arguments used to look up the override value, i.e. { "key": "foo" }.
$block_instance\WP_BlockThe block instance.
$attribute_namestringThe name of an attribute.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'block_bindings_source_value', 'twoja_funkcja', 10, 5 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
	// Twój kod
}

Popularne w tej kategorii