filtrod 3.5.0
mime_types
Opis — z kodu źródłowego
Filters the list of mime types and file extensions.
This filter should be used to add, not remove, mime types. To remove mime types, use the {@see 'upload_mimes'} filter.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$wp_get_mime_types | string[] | Mime types keyed by the file extension regex corresponding to those types. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'mime_types', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'mime_types', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii