WP_Image_Editor::save()publicWP 3.5.0

Saves current image to file.

Метод класса: WP_Image_Editor{}

Хуков нет.

Возвращает

Массив|WP_Error. Array on success or WP_Error if the file failed to save.

Использование

$WP_Image_Editor = new WP_Image_Editor();
$WP_Image_Editor->save( $destfilename, $mime_type );
$destfilename(строка)
Destination filename.
По умолчанию: null
$mime_type(строка)
The mime-type.
По умолчанию: null

Список изменений

С версии 3.5.0 Введена.
С версии 6.0.0 The $filesize value was added to the returned array.

Код WP_Image_Editor::save() WP 6.1.1

abstract public function save( $destfilename = null, $mime_type = null );