wp_image_editor_before_change
Filter HookDescription
Filters the WP_Image_Editor instance before applying changes to the image.Hook Information
File Location |
wp-admin/includes/image-edit.php
View on GitHub
|
Hook Type | Filter |
Line Number | 695 |
Hook Parameters
Type | Name | Description |
---|---|---|
WP_Image_Editor
|
$image
|
WP_Image_Editor instance. |
array
|
$changes
|
Array of change operations. |
Usage Examples
Basic Usage
<?php
// Hook into wp_image_editor_before_change
add_filter('wp_image_editor_before_change', 'my_custom_filter', 10, 2);
function my_custom_filter($image, $changes) {
// Your custom filtering logic here
return $image;
}
Source Code Context
wp-admin/includes/image-edit.php:695
- How this hook is used in WordPress core
<?php
690 * @since 3.5.0
691 *
692 * @param WP_Image_Editor $image WP_Image_Editor instance.
693 * @param array $changes Array of change operations.
694 */
695 $image = apply_filters( 'wp_image_editor_before_change', $image, $changes );
696 } elseif ( is_gd_image( $image ) ) {
697
698 /**
699 * Filters the GD image resource before applying changes to the image.
700 *
PHP Documentation
<?php
/**
* Filters the WP_Image_Editor instance before applying changes to the image.
*
* @since 3.5.0
*
* @param WP_Image_Editor $image WP_Image_Editor instance.
* @param array $changes Array of change operations.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/image-edit.php
Related Hooks
Related hooks will be displayed here in future updates.