Created
March 31, 2019 15:50
-
-
Save Glinkfr/008c99afcdf2b64ae9278f5f4e8e8981 to your computer and use it in GitHub Desktop.
Ajouter un widget dans le tableau de bord
This file contains 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
# ajoute un widget a la partie admin | |
function votre_dashboard_widget() { | |
echo'<h3>Bienvenue</h3><p>Votre contenu HTML ou PHP.</p>'; | |
} | |
function ajout_votre_dashboard_widget() { | |
wp_add_dashboard_widget( 'votre_dashboard_widget', __( 'Le titre du Widget' ), 'votre_dashboard_widget' ); | |
} | |
add_action('wp_dashboard_setup', 'ajout_votre_dashboard_widget' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment