mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Docs: Improve documentation for WP_Image_Editor::save() and related functions.
Includes: * Documenting the returned array using hash notation. * Adding a `@since` note for the `$filesize` value being included in the returned array. This affects: * `wp_generate_attachment_metadata()` * `wp_get_attachment_metadata()` * `WP_Image_Editor::save()` * `WP_Image_Editor_GD::save()` and `::_save()` * `WP_Image_Editor_Imagick::save()` and `::_save()` Follow-up to [22094], [22619], [52837], [53546]. See #55646. git-svn-id: https://develop.svn.wordpress.org/trunk@53547 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -75,11 +75,21 @@ abstract class WP_Image_Editor {
|
||||
* Saves current image to file.
|
||||
*
|
||||
* @since 3.5.0
|
||||
* @since 6.0.0 The `$filesize` value was added to the returned array.
|
||||
* @abstract
|
||||
*
|
||||
* @param string $destfilename Optional. Destination filename. Default null.
|
||||
* @param string $mime_type Optional. The mime-type. Default null.
|
||||
* @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string}
|
||||
* @return array|WP_Error {
|
||||
* Array on success or WP_Error if the file failed to save.
|
||||
*
|
||||
* @type string $path Path to the image file.
|
||||
* @type string $file Name of the image file.
|
||||
* @type int $width Image width.
|
||||
* @type int $height Image height.
|
||||
* @type string $mime-type The mime type of the image.
|
||||
* @type int $filesize File size of the image.
|
||||
* }
|
||||
*/
|
||||
abstract public function save( $destfilename = null, $mime_type = null );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user