gapp_options

The Google Analytics Post Pageviews gapp options function.

Description

gapp_options(); 

Usage

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

Defined (1)

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

/google-analytics-post-pageviews.php  
  1. function gapp_options() { 
  2.  
  3. $options = get_option('gapp'); 
  4.  
  5. if (!isset($options['gapp_clientid'])) { 
  6. if (isset($options['gapp_pnumber'])) { 
  7. $options['gapp_clientid'] = $options['gapp_pnumber'] . '.apps.googleusercontent.com'; 
  8. } else { 
  9. $options['gapp_clientid'] = null; 
  10.  
  11. if (isset($options['gapp_pnumber'])) unset($options['gapp_pnumber']); 
  12. if (!isset($options['gapp_psecret'])) $options['gapp_psecret'] = null; 
  13. if (!isset($options['gapp_gid'])) $options['gapp_gid'] = null; 
  14. if (!isset($options['gapp_gmail'])) $options['gapp_gmail'] = null; 
  15. if (!isset($options['gapp_token'])) $options['gapp_token'] = null; 
  16. if (!isset($options['gapp_defaultval'])) $options['gapp_defaultval'] = 0; 
  17. if (!isset($options['gapp_token_refresh'])) $options['gapp_token_refresh'] = null; 
  18. if (!isset($options['gapp_expires'])) $options['gapp_expires'] = null; 
  19. if (!isset($options['gapp_wid'])) $options['gapp_wid'] = null; 
  20. if (!isset($options['gapp_column'])) $options['gapp_column'] = true; 
  21. if (!isset($options['gapp_trailing'])) $options['gapp_trailing'] = true; 
  22. if (!isset($options['gapp_cache'])) $options['gapp_cache'] = 60; 
  23. if (!isset($options['gapp_metric'])) $options['gapp_metric'] = 'ga:pageviews'; 
  24. if (!preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/', $options['gapp_startdate'])) $options['gapp_startdate'] = '2007-09-29'; 
  25.  
  26. return $options; 
  27.