stats_merged_widget_admin_init

Delay conditional for current_user_can to after init.

Description

stats_merged_widget_admin_init(); 

Usage

  1. if ( !function_exists( 'stats_merged_widget_admin_init' ) ) { 
  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_merged_widget_admin_init(); 
  7.  

Defined (1)

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

/modules/stats.php  
  1. function stats_merged_widget_admin_init() { 
  2. if ( current_user_can( 'view_stats' ) ) { 
  3. add_action( 'wp_dashboard_setup', 'stats_register_widget_control_callback' ); // hacky but works