_import_gard_settings

The Google Adsense for Responsive Design - GARD import gard settings function.

Description

_import_gard_settings(); 

Usage

  1. if ( !function_exists( '_import_gard_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-adsense-for-responsive-design-gard/pro.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = _import_gard_settings(); 
  7.  

Defined (1)

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

/pro.php  
  1. function _import_gard_settings() { 
  2. global $adsizes; 
  3. global $wpdb; 
  4.  
  5. $GARD_ID = $wpdb->get_results("SELECT `option_value` FROM $wpdb->options WHERE `option_name` = 'GARD_ID' LIMIT 0 , 30 ");  
  6. $GARD_ID = $GARD_ID[0]->option_value; 
  7.  
  8. foreach ($adsizes as $key => $size) { 
  9. $result = $wpdb->get_results("SELECT `option_value` FROM `wp_options` WHERE `option_name` = 'GARD_{$key}' "); 
  10. $GARD_[$key] = $result[0]->option_value;  
  11. update_option('GARD_PRO_DEMO_GROUP_5_'.$key, $result[0]->option_value); 
  12.  
  13.  
  14. update_option('GARD_PRO_DEMO_GROUP_5_NAME', "Imported Settings"); 
  15. update_option('GARD_PRO_DEMO_GROUP_5_SC', ""); 
  16. update_option('GARD_PRO_DEMO_GROUP_5_ID', $GARD_ID); 
  17.  
  18. if (isset($_GET['debug'])) { 
  19. echo "Debug, settings dump:<br>GARD_ID: $GARD_ID <br> Ad Settings: <pre>".print_r($GARD_, true)."</pre>"; 
  20. echo "done.";