Skip to content

Instantly share code, notes, and snippets.

@ahmad24
Last active December 30, 2015 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ahmad24/7768359 to your computer and use it in GitHub Desktop.
Save ahmad24/7768359 to your computer and use it in GitHub Desktop.
wordpress : Dashboard Widget
<?php
/*
Plugin Name: Dashboard Widget Example Plugin
Plugin URI: http://example.com/wordpress-plugins/my-plugin
Description: A plugin to create dashboard widgets in WordPress
Version: 1.0
Author: Brad Williams
Author URI: http://wrox.com
License: GPLv2
*/
add_action( 'wp_dashboard_setup', 'boj_dashboard_example_widgets' );
function boj_dashboard_example_widgets() {
//create a custom dashboard widget
wp_add_dashboard_widget( 'dashboard_custom_feed',
'My Plugin Information', 'boj_dashboard_example_display' );
}
function boj_dashboard_example_display() {
echo ' <p> Please contact support@example.com to report bugs. </p> ';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment