filtrod 3.0.0
wp_check_filetype_and_ext
Opis — z kodu źródłowego
Filters the "real" file type of the given file.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$wp_check_filetype_and_ext | array | { Values for the extension, mime type, and corrected filename. @type string|false $ext File extension, or false if the file doesn't match a mime type. @type string|false $type File mime type, or false if the file doesn't match a mime type. @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined. } |
$file | string | Full path to the file. |
$filename | string | The name of the file (may differ from $file due to $file being in a tmp directory). |
$mimes | string[] | null | Array of mime types keyed by their file extension regex, or null if none were provided. |
$real_mime | string | false | The actual mime type or false if the type cannot be determined. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_check_filetype_and_ext', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_check_filetype_and_ext', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii