WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about image_editor_save_pre

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-admin/includes/image-edit.php apply_filters 306 /**
* Filters the WP_Image_Editor instance for the image to be streamed to the browser.
*
* @since 3.5.0
*
* @param WP_Image_Editor $image The image editor instance.
* @param int $attachment_id The attachment post ID.
*/
wp-admin/includes/image-edit.php apply_filters 379 /**
* Saves image to file.
*
* @since 2.9.0
* @since 3.5.0 The `$image` parameter expects a `WP_Image_Editor` instance.
* @since 6.0.0 The `$filesize` value was added to the returned array.
*
* @param string $filename Name of the file to be saved.
* @param WP_Image_Editor $image The image editor instance.
* @param string $mime_type The mime type of the image.
* @param int $post_id Attachment post ID.
* @return array|WP_Error|bool {
* Array on success or WP_Error if the file failed to save.
* When called with a deprecated value for the `$image` parameter,
* i.e. a non-`WP_Image_Editor` image resource or `GdImage` instance,
* the function will return true on success, false on failure.
*
* @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.
* }
*/

Hook Parameters

Parameter Type Name Description
WP_Image_Editor $image The image editor instance.
int $attachment_id The attachment post ID.
WP_Image_Editor $image The image editor instance.
int $attachment_id The attachment post ID.