Created
April 4, 2018 04:38
-
-
Save dcangulo/0929aeda03b3e704f9d44b4f2ea9f7f6 to your computer and use it in GitHub Desktop.
A dashboard widget code in WordPress. Visit https://www.davidangulo.xyz/ for more information.
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
<?php | |
/* | |
Plugin Name: Dashboard Widget Example | |
Plugin URI: https://www.davidangulo.xyz/portfolio/ | |
Description: Just another WordPress plugin with dashboard widget. | |
Version: 1.0.0 | |
Author: David Angulo | |
Author URI: https://www.davidangulo.xyz/ | |
License: GPL2 | |
*/ | |
add_action("wp_dashboard_setup","registerDashboardWidget"); | |
function registerDashboardWidget() { | |
wp_add_dashboard_widget("My Widget","My Widget","myPluginDashboardWidget"); | |
} | |
function myPluginDashboardWidget() { | |
echo "<h2>Hello World!</h2><p>This is my plugin's dashboard widget.</p>"; | |
} | |
//Visit the tutorial for more information | |
//https://www.davidangulo.xyz/website-development/how-to-create-a-dashboard-widget-in-wordpress/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment