image_editor_save_pre хук-фильтрWP 3.5.0

Filters the WP_Image_Editor instance for the image to be streamed to the browser.

Использование

add_filter( 'image_editor_save_pre', 'wp_kama_image_editor_save_pre_filter', 10, 2 );

/**
 * Function for `image_editor_save_pre` filter-hook.
 * 
 * @param WP_Image_Editor $image         The image editor instance.
 * @param int             $attachment_id The attachment post ID.
 *
 * @return WP_Image_Editor
 */
function wp_kama_image_editor_save_pre_filter( $image, $attachment_id ){

	// filter...
	return $image;
}
$image(WP_Image_Editor)
The image editor instance.
$attachment_id(int)
The attachment post ID.

Список изменений

С версии 3.5.0 Введена.

Где вызывается хук

wp_stream_image()
image_editor_save_pre
wp_save_image_file()
image_editor_save_pre
wp-admin/includes/image-edit.php 306
$image = apply_filters( 'image_editor_save_pre', $image, $attachment_id );
wp-admin/includes/image-edit.php 379
$image = apply_filters( 'image_editor_save_pre', $image, $post_id );

Где используется хук в WordPress

Использование не найдено.