wp_ajax_crop_image_pre_save WordPress Action Hook

The wp_ajax_crop_image_pre_save hook is called before an image is cropped. This hook can be used to modify the image before it is saved.

do_action( 'wp_ajax_crop_image_pre_save', string $context, int $attachment_id, string $cropped ) #

Fires before a cropped image is saved.


Description

Allows to add filters to modify the way a cropped image is saved.


Top ↑

Parameters

$context

(string)The Customizer control requesting the cropped image.

$attachment_id

(int)The attachment ID of the original image.

$cropped

(string)Path to the cropped image file.


Top ↑

Source

File: wp-admin/includes/ajax-actions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.3.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.

Show More