Fires before a cropped image is saved. Allows to add filters to modify the way a cropped image is saved.
$context, $attachment_id, $cropped
Sortie :
@param string $context The Customizer control requesting the cropped image. @param int $attachment_id The attachment ID of the original image. @param string $cropped Path to the cropped image file.
// Ajouter une fonction au hook action 'wp_ajax_crop_image_pre_save'
add_action('wp_ajax_crop_image_pre_save', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($context, $attachment_id, $cropped) {
// Votre code ici
error_log('Hook wp_ajax_crop_image_pre_save déclenché');
}
Chargement des actualités...