attachment_updated

ACTION wp-includes\post.php (ligne 5108) github
Fires once an existing attachment has been updated.
traduction française
Se déclenche lorsqu'une pièce jointe existante a été mise à jour.

Paramètres

Entrée :
$post_id, $post_after, $post_before
Sortie :
@param int     $post_id      Post ID.
@param WP_Post $post_after   Post object following the update.
@param WP_Post $post_before  Post object before the update.

Utilisation

Exécuter une action après mise à jour d'une pièce jointe

Action après mise à jour.

media
add_action('attachment_updated', 'on_attachment_updated', 10, 3);
function on_attachment_updated($post_id, $post_after, $post_before) {
    error_log('Attachment updated');
}

Actualités

Chargement des actualités...