filtrod 5.6.0
image_sideload_extensions
Opis — z kodu źródłowego
Filters the list of allowed file extensions when sideloading an image from a URL.
The default allowed extensions are:
jpg-jpeg-jpe-png-gif-webp
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$allowed_extensions | string[] | Array of allowed file extensions. |
$file | string | The URL of the image to download. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_sideload_extensions', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_sideload_extensions', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii