WP HOOKS
filtrdynamicznyod 2.8.0

the_author_{$field}

Args 2Plik wp-includes/author-template.php

Opis — z kodu źródłowego

Filters the value of the requested user metadata.

The filter name is dynamic and depends on the $field parameter of the function.

Parametry

ParametrTypOpis
$author_metastringThe value of the metadata.
$user_idint | falseThe user ID.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'the_author_{$field}', 'twoja_funkcja', 10, 2 );

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

Popularne w tej kategorii