Warning: This hook has been deprecated. Use ‘wp_save_image_editor_file’ instead.

wp_save_image_file WordPress Hook

The wp_save_image_file hook is used to save an image file to the WordPress media library. This hook is fired when the image is uploaded or updated.

apply_filters_deprecated( 'wp_save_image_file', bool|null $override, string $filename, resource|GdImage $image, string $mime_type, int $post_id ) #

Filters whether to skip saving the image file.


Description

Returning a non-null value will short-circuit the save method, returning that value instead.


Top ↑

Parameters

$override

(bool|null)Value to return instead of saving. Default null.

$filename

(string)Name of the file to be saved.

$image

(resource|GdImage)Image resource or GdImage instance.

$mime_type

(string)The mime type of the image.

$post_id

(int)Attachment post ID.


Top ↑

Source

File: wp-admin/includes/image-edit.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Use 'wp_save_image_editor_file' instead.
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.