gglnltcs_scripts

The BestWebSoft Google Analytics gglnltcs scripts function.

Description

gglnltcs_scripts(); 

Usage

  1. if ( !function_exists( 'gglnltcs_scripts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bestwebsoft-google-analytics/bws-google-analytics.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gglnltcs_scripts(); 
  7.  

Defined (1)

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

/bws-google-analytics.php  
  1. function gglnltcs_scripts() { 
  2. /** Load plugin styles and scripts only on the plugin settings page */ 
  3. if ( isset( $_REQUEST['page'] ) && "bws-google-analytics.php" == $_REQUEST['page'] ) { 
  4. /** This function is called from the inside of the function "gglnltcs_add_admin_menu" */ 
  5. wp_enqueue_style( 'gglnltcs_stylesheet', plugins_url( 'css/style.css', __FILE__ ) ); 
  6. wp_enqueue_style( 'gglnltcs_jquery_ui_stylesheet', plugins_url( 'css/jquery-ui.css', __FILE__ ) ); 
  7.  
  8. wp_enqueue_script( 'gglnltcs_google_js_api', 'http://www.google.com/jsapi' ); /** Load Google object. It will be used for visualization.*/ 
  9. wp_enqueue_script( 'gglnltcs_script', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery-ui-datepicker' ) ); /** Load main plugin script. It is important to load google object first.*/ 
  10. /** Script Localization */ 
  11. wp_localize_script( 'gglnltcs_script', 'gglnltcsLocalize', array( 
  12. 'matchPattern' => __( 'Date values must match the pattern YYYY-MM-DD.', 'gglnltcs' ),  
  13. 'metricsValidation' => __( 'Any request must supply at least one metric.', 'gglnltcs' ),  
  14. 'invalidDateRange' => __( 'Invalid Date Range.', 'gglnltcs' ),  
  15. 'chartVisitors' => __( 'Unique Visitors', 'gglnltcs' ),  
  16. 'chartNewVisits' => __( 'New Visits', 'gglnltcs' ),  
  17. 'chartVisits' => __( 'Visits', 'gglnltcs' ),  
  18. 'chartBounceRate' => __( 'Bounce Rate', 'gglnltcs' ),  
  19. 'chartAvgTime' => __( 'Average Visit Duration', 'gglnltcs' ),  
  20. 'chartPageviews' => __( 'Pageviews', 'gglnltcs' ),  
  21. 'chartPerVisit' => __( 'Pages / Visit', 'gglnltcs' ),  
  22. 'ajaxApiError' => __( 'Failed to process the received data correctly', 'gglnltcs' ),  
  23. 'gglnltcs_ajax_nonce' => wp_create_nonce( 'gglnltcs_ajax_nonce_value' ),  
  24. ));