pre_post_update

ACTION wp-includes\post.php (ligne 4902) github
Fires immediately before an existing post is updated in the database.

Paramètres

Entrée :
$post_id, $data
Sortie :
@param int   $post_id Post ID.
@param array $data    Array of unslashed post data.

Utilisation

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

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

Actualités

Chargement des actualités...