post_updated

ACTION wp-includes\post.php (ligne 5164) github
Fires once an existing post has been updated.

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

// Ajouter une fonction au hook action 'post_updated'
add_action('post_updated', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($post_id, $post_after, $post_before) {
    // Votre code ici
    error_log('Hook post_updated déclenché');
}

Actualités

Chargement des actualités...