Created
December 19, 2022 14:59
-
-
Save thierrypigot/036e0d63861256746c7fbfdaca4fe5a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Hook d'action : | |
add_action('init', 'mon_hook'); | |
function mon_hook() { | |
// votre code ici | |
} | |
// Hook de filtre : | |
add_filter('the_content', 'mon_filtre'); | |
function mon_filtre($contenu) { | |
// votre code ici | |
return $contenu; | |
} | |
// Hook personnalisé : | |
add_action('mon_hook', 'ma_fonction'); | |
function ma_fonction() { | |
// votre code ici | |
} | |
// Hook personnalisé avec des arguments : | |
add_action('mon_hook', 'ma_fonction', 10, 3); | |
function ma_fonction($arg1, $arg2, $arg3) { | |
// votre code ici | |
} | |
// Hook de sécurité : | |
add_action('login_form_verify_password', 'ma_verification'); | |
function ma_verification() { | |
// votre code ici | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment