Fires for a given custom post action request. The dynamic portion of the hook name, `$action`, refers to the custom post action.
$post_id
Sortie :
@param int $post_id Post ID sent with the request.
// Ajouter une fonction au hook action 'post_action_{$action}'
add_action('post_action_{$action}', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($post_id) {
// Votre code ici
error_log('Hook post_action_{$action} déclenché');
}
Chargement des actualités...