filtrod 3.5.0
wp_save_image_editor_file
Opis — z kodu źródłowego
Filters whether to skip saving the image file.
Returning a non-null value will short-circuit the save method, returning that value instead.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$override | bool | null | Value to return instead of saving. Default null. |
$filename | string | Name of the file to be saved. |
$image | \WP_Image_Editor | The image editor instance. |
$mime_type | string | The mime type of the image. |
$post_id | int | Attachment post ID. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_save_image_editor_file', '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_save_image_editor_file', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii