filtrod 2.1.0
wp_handle_upload
Opis — z kodu źródłowego
Filters the data array for the uploaded file.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$upload | array | { Array of upload data. @type string $file Filename of the newly-uploaded file. @type string $url URL of the newly-uploaded file. @type string $type Mime type of the newly-uploaded file. } |
$context | string | The type of upload action. Values include 'upload' or 'sideload'. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_handle_upload', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_handle_upload', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii