filtrod 2.1.0
get_attached_file
Opis — z kodu źródłowego
Filters the attached file based on the given ID.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$file | string | false | The file path to where the attached file should be, false otherwise. |
$attachment_id | int | Attachment 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
}
// 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