Uses
Uses | Description |
---|---|
wp-includes/class-wp-image-editor-gd.php: WP_Image_Editor_GD::_save() | |
wp-includes/load.php: is_wp_error() | Check whether variable is a WordPress Error. |
Saves current in-memory image to file.
(string|null) (Optional)
Default value: null
(string|null) (Optional)
Default value: null
(array|WP_Error) 'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string
File: wp-includes/class-wp-image-editor-gd.php
public function save( $filename = null, $mime_type = null ) { $saved = $this->_save( $this->image, $filename, $mime_type ); if ( ! is_wp_error( $saved ) ) { $this->file = $saved['path']; $this->mime_type = $saved['mime-type']; } return $saved; }
Version | Description |
---|---|
3.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_image_editor_gd/save