Fires immediately before an existing post is updated in the database.
$post_id, $data
Sortie :
@param int $post_id Post ID. @param array $data Array of unslashed post data.
// 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é');
}
Chargement des actualités...