edit_attachment

ACTION wp-includes\post.php (ligne 5095) 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
Sortie :
@param int $post_id Attachment ID.

Utilisation

Exécuter une action lors de la modification d'une pièce jointe

Action à la modification.

media
add_action('edit_attachment', 'on_attachment_edit', 10, 1);
function on_attachment_edit($attachment_id) {
    error_log('Attachment ' . $attachment_id . ' modified');
}

Actualités

Chargement des actualités...