WP HOOKS
filtrdynamicznyod 2.8.0

get_the_author_{$field}

Args 3Plik 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
$valuestringThe value of the metadata.
$user_idintThe user ID for the value.
$original_user_idint | falseThe original user ID, as passed to the function.

Wywołanie

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

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

Popularne w tej kategorii