stats_load

Load Stats.

Description

stats_load(); 

Usage

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

Defined (1)

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

/modules/stats.php  
  1. function stats_load() { 
  2. global $wp_roles; 
  3.  
  4. Jetpack::enable_module_configurable( __FILE__ ); 
  5. Jetpack::module_configuration_load( __FILE__, 'stats_configuration_load' ); 
  6. Jetpack::module_configuration_head( __FILE__, 'stats_configuration_head' ); 
  7. Jetpack::module_configuration_screen( __FILE__, 'stats_configuration_screen' ); 
  8.  
  9. // Tell HQ about changed posts 
  10. $post_stati = get_post_stati( array( 'public' => true ) ); // All public post stati 
  11. $post_stati[] = 'private'; // Content from private stati will be redacted 
  12. Jetpack_Sync::sync_posts( __FILE__, array( 
  13. 'post_types' => get_post_types( array( 'public' => true ) ), // All public post types 
  14. 'post_stati' => $post_stati,  
  15. ) ); 
  16.  
  17. // Generate the tracking code afterwp) has queried for posts. 
  18.  
  19. add_action( 'wp_head', 'stats_admin_bar_head', 100 ); 
  20.  
  21. add_action( 'wp_head', 'stats_hide_smile_css' ); 
  22.  
  23.  
  24. // Map stats caps 
  25. add_filter( 'map_meta_cap', 'stats_map_meta_caps', 10, 4 ); 
  26.  
  27. if ( isset( $_GET['oldwidget'] ) ) { 
  28. // Old one. 
  29. } else { 
  30.  
  31.  
  32.