WP_Image_Editor::save() WordPress Method
The WP_Image_Editor::save() method is used to save an image after it has been edited. This is the only method in the WP_Image_Editor class that is required to be implemented.
WP_Image_Editor::save( string $destfilename = null, string $mime_type = null ) #
Saves current image to file.
Contents
Parameters
- $destfilename
(string)(Optional) Destination filename.
Default value: null
- $mime_type
(string)(Optional) The mime-type.
Default value: null
Return
(array|WP_Error) 'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string
Source
File: wp-includes/class-wp-image-editor.php
abstract public function save( $destfilename = null, $mime_type = null );
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |