Last active
December 17, 2019 14:44
-
-
Save gagimilicevic/4d73e3ced66af8011c4cc13957ad34f6 to your computer and use it in GitHub Desktop.
Adding WordPress Dashboard Widget
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
| /** | |
| * Add a widget to the dashboard. | |
| * | |
| * This function is hooked into the 'wp_dashboard_setup' action below. | |
| */ | |
| function dewploy_add_dashboard_widgets() { | |
| // Add function here | |
| wp_add_dashboard_widget( | |
| 'dewploy_dashboard_widget', // Widget slug. | |
| esc_html__( 'Holiday Sitters Widget', 'dewploy' ), // Title. | |
| 'dewploy_dashboard_widget_render' // Display function. | |
| ); | |
| } | |
| add_action( 'wp_dashboard_setup', 'dewploy_add_dashboard_widgets' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment