Fires once an existing post has been updated. The dynamic portion of the hook name, `$post->post_type`, refers to the post type slug. Possible hook names include: - `edit_post_post` - `edit_post_page`
$post_id, $post
Sortie :
@param int $post_id Post ID. @param WP_Post $post Post object.
// Ajouter une fonction au hook action 'edit_post_{$post->post_type}'
add_action('edit_post_{$post->post_type}', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($post_id, $post) {
// Votre code ici
error_log('Hook edit_post_{$post->post_type} déclenché');
}
Chargement des actualités...