filtrod 6.8.0
wp_prevent_unsupported_mime_type_uploads
Opis — z kodu źródłowego
Filter whether the server should prevent uploads for image types it doesn't support. Default true.
Developers can use this filter to enable uploads of certain image types. By default image types that are not supported by the server are prevented from being uploaded.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$check_mime | bool | Whether to prevent uploads of unsupported image types. |
$mime_type | string | null | The mime type of the file being uploaded (if available). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_prevent_unsupported_mime_type_uploads', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_prevent_unsupported_mime_type_uploads', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii