stats_register_dashboard_widget

Register Stats Dashboard Widget.

Description

stats_register_dashboard_widget(); 

Usage

  1. if ( !function_exists( 'stats_register_dashboard_widget' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/stats.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = stats_register_dashboard_widget(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/stats.php  
  1. function stats_register_dashboard_widget() { 
  2. if ( ! current_user_can( 'view_stats' ) ) 
  3. return; 
  4.  
  5. // wp_dashboard_empty: we load in the content after the page load via JS 
  6. wp_add_dashboard_widget( 'dashboard_stats', __( 'Site Stats', jetpack ), 'wp_dashboard_empty', 'stats_dashboard_widget_control' ); 
  7.  
  8. add_action( 'admin_head', 'stats_dashboard_head' );