Skip to content

Instantly share code, notes, and snippets.

@NikV
Last active August 26, 2015 19:19
Show Gist options
  • Select an option

  • Save NikV/4b8033bd36766619c6b6 to your computer and use it in GitHub Desktop.

Select an option

Save NikV/4b8033bd36766619c6b6 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: EDD Graph Dashboard Widget
* Description:
* Author: Nikhil Vimal
* Author URI: http://nik.techvoltz.com
* Version: 1.0
* Plugin URI:
* License: GNU GPLv2+
*/
/**
* Register the dashboard widget for the graph
*/
function edd_graph_dashboard_widget() {
wp_add_dashboard_widget(
'edd_graph_dashboard_widget',
'Download Graph',
'edd_graph_dash_widget_callback'
);
}
/**
* The widget callback for the download report graph.
*/
function edd_graph_dash_widget_callback() {
return edd_reports_graph();
}
add_action( 'wp_dashboard_setup', 'edd_graph_dashboard_widget' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment