WP HOOKS
filtrod 2.1.0

get_attached_file

Args 2Plik wp-includes/post.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the attached file based on the given ID.

Parametry

ParametrTypOpis
$filestring | falseThe file path to where the attached file should be, false otherwise.
$attachment_idintAttachment ID.

Wywołanie

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

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

Popularne w tej kategorii