Changeset 3042738
- Timestamp:
- 02/28/2024 05:16:14 PM (23 months ago)
- Location:
- air-quality-data-from-foobot/trunk
- Files:
-
- 8 edited
-
admin/admin.php (modified) (5 diffs)
-
aq-data-foobot.php (modified) (3 diffs)
-
includes/api.php (modified) (5 diffs)
-
includes/database.php (modified) (15 diffs)
-
includes/helpers.php (modified) (2 diffs)
-
includes/sensors.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
air-quality-data-from-foobot/trunk/admin/admin.php
r2228648 r3042738 43 43 register_setting( 44 44 'baindesignFoobot', // New options group 45 'baindesign_foobot_api_settings' // Entry in options table45 BD0019__API_OPTIONS_NAME 46 46 ); 47 47 … … 56 56 // API Key 57 57 add_settings_field( 58 'baindesign_foobot_api_key', // ID58 BD0019__API_KEY_FIELD, // ID 59 59 __('API Key', 'aq-data-foobot'), // Label 60 'baindesign_foobot_api_key_field_render', // Function to display60 BD0019__API_KEY_FIELD . '_field_render', // Function to display 61 61 // inputs 62 62 'baindesignFoobot', // Page to display on … … 66 66 // API username 67 67 add_settings_field( 68 'baindesign_foobot_api_user', // ID68 BD0019__API_USER_FIELD, // ID 69 69 __('API User', 'aq-data-foobot'), // Label 70 'baindesign_foobot_api_user_field_render', // Function to70 BD0019__API_USER_FIELD . '_field_render', // Function to 71 71 // display inputs 72 72 'baindesignFoobot', // Page to display on … … 77 77 function baindesign_foobot_api_user_field_render() 78 78 { 79 $options = get_option('baindesign_foobot_api_settings');80 79 ?> 81 <input type='email' name='baindesign_foobot_api_settings[baindesign_foobot_api_user]' placeholder='<?php _e("Your API email", 'aq-data-foobot'); ?>' value='<?php echo esc_html( $options['baindesign_foobot_api_user']); ?>'>80 <input type='email' name='baindesign_foobot_api_settings[baindesign_foobot_api_user]' placeholder='<?php _e("Your API email", 'aq-data-foobot'); ?>' value='<?php echo esc_html(BD0019__API_USER); ?>'> 82 81 <?php 83 82 } … … 85 84 function baindesign_foobot_api_key_field_render() 86 85 { 87 $options = get_option('baindesign_foobot_api_settings');88 86 ?> 89 <textarea rows="7" cols="50" name='baindesign_foobot_api_settings[baindesign_foobot_api_key]' placeholder='<?php _e("Your API key", 'aq-data-foobot'); ?>'><?php echo esc_textarea( $options['baindesign_foobot_api_key']); ?></textarea>87 <textarea rows="7" cols="50" name='baindesign_foobot_api_settings[baindesign_foobot_api_key]' placeholder='<?php _e("Your API key", 'aq-data-foobot'); ?>'><?php echo esc_textarea(BD0019__API_KEY); ?></textarea> 90 88 <?php 91 89 } -
air-quality-data-from-foobot/trunk/aq-data-foobot.php
r3042147 r3042738 6 6 * Description: Call your air quality data via the Foobot API. 7 7 * Author: Bain Design 8 * Version: 1.2. 08 * Version: 1.2.1 9 9 * Author URI: http://bain.design 10 10 * License: GNU General Public License v2.0 … … 13 13 * Plugin Slug: aq-data-foobot 14 14 */ 15 16 if (!defined('ABSPATH')) { 17 die('Invalid request.'); 18 } 19 20 global $wpdb; 21 22 define('BD0019__DEVICE_DB_VERSION', '1.2'); 23 define('BD0019__SENSOR_DB_VERSION', '1.4'); 24 define('BD0019__API_OPTIONS_NAME', 'baindesign_foobot_api_settings'); 25 define('BD0019__API_OPTIONS', get_option(BD0019__API_OPTIONS_NAME)); 26 define('BD0019__API_KEY_FIELD', 'baindesign_foobot_api_key'); 27 define('BD0019__API_KEY', BD0019__API_OPTIONS[BD0019__API_KEY_FIELD]); 28 define('BD0019__API_USER_FIELD', 'baindesign_foobot_api_user'); 29 define('BD0019__API_USER', BD0019__API_OPTIONS[BD0019__API_USER_FIELD]); 30 define('BD0019__SENSOR_DB_TABLE', $wpdb->prefix . 'bd_foobot_sensor_data'); 31 define('BD0019__DEVICE_DB_TABLE', $wpdb->prefix . 'bd_foobot_device_data'); 15 32 16 33 // Includes … … 26 43 // Misc 27 44 include( $path . 'includes/helpers.php'); 45 46 28 47 29 48 /** -
air-quality-data-from-foobot/trunk/includes/api.php
r3042147 r3042738 29 29 30 30 if (is_wp_error($request)) { 31 // DEBUG 32 if (BD0019__DEBUG === 1){ 33 error_log($request->get_error_message(), true); 34 } 31 35 return false; // Bail early 32 36 } … … 35 39 36 40 $api_data = json_decode( $body, true); 41 42 // DEBUG 43 if (BD0019__DEBUG === 1) { 44 error_log(print_r($api_data, TRUE)); 45 } 37 46 38 47 return $api_data; … … 58 67 function bd_foobot_call_api_sensors( $uuid ) 59 68 { 69 // DEBUG 70 if (BD0019__DEBUG === 1) { 71 error_log(sprintf("New API call made for %s.", $uuid)); 72 } 73 60 74 $key = bd_foobot_get_api_key(); 61 75 … … 70 84 71 85 if (is_wp_error($request)) { 86 // DEBUG 87 if (BD0019__DEBUG === 1){ 88 error_log(print_r($request->get_error_message(), true)); 89 } 72 90 return false; // Bail early 73 91 } … … 77 95 $api_data = json_decode( $body, true); // Output array 78 96 97 // DEBUG 98 if (BD0019__DEBUG === 1) { 99 error_log(print_r($api_data, true)); 100 } 101 79 102 return $api_data; 80 103 } 81 104 82 105 /** 83 * 84 * These functions use transients to avoid hitting the API 85 * limit. 86 */ 87 88 // Update device data 106 * Get device names and UUIDs 107 * 108 * Use this function to request device data. 109 * Uses transients to avoid repeated requests 110 * hitting API limit. 111 * 112 * @return array $output Device data (name, UUID) 113 */ 89 114 function bd_foobot_call_api_trans_devices() 90 115 { 91 global $wpdb; 92 93 // If an API call has been made within the last 24 hours, 94 // return. 95 if (1 == get_transient('foobot-api-device-updated')) { 116 // Vars 117 $output = ''; 118 $transient_id = 'foobot-api-device-updated'; 119 $transient = get_transient($transient_id); 120 $expiry = 86400; // 24 hours 121 122 // Check if transient already set / not expired 123 // If set, return. 124 if (1 === $transient) { // Transient set. 125 // DEBUG 126 if (BD0019__DEBUG === 1) { 127 error_log(sprintf("Transient %s set. No API call made.", $transient_id)); 128 } 96 129 return; 97 } 98 99 // Get the device data 100 $device_data = bd_foobot_call_api_devices(); 101 102 // Transient is set for 24 hours 103 set_transient('foobot-api-device-updated', 1, (60 * 60 * 24)); 104 105 return $device_data; 106 } 107 108 // Update sensor data 109 function bd_foobot_call_api_trans_sensors( $uuid ) 110 { 111 global $wpdb; 112 113 // If an API call has been made within the last 5 mins, 114 // return. 115 if (1 == get_transient('foobot-api-data-updated-' . $uuid )) { 116 130 } else { 131 // Get the device data via new API call 132 // DEBUG 133 if (BD0019__DEBUG === 1) { 134 error_log(sprintf("New API call made for devices.")); 135 } 136 $data = bd_foobot_call_api_devices(); 137 138 if (is_wp_error($data)) { 139 return; // Bail early 140 } else { 141 $output = $data; 142 } 143 144 // Set a transient 145 // DEBUG 146 if (BD0019__DEBUG === 1) { 147 error_log(sprintf("Setting transient %s.", $transient_id)); 148 } 149 set_transient($transient_id, 1, $expiry); 150 } 151 return $output; 152 } 153 154 /** 155 * Get sensor data 156 * 157 * Use this function to request sensor data from a specified device. 158 * Uses transients to avoid repeated requests 159 * hitting API limit. 160 * 161 * @param string $uuid UUID of device 162 * @return array $output Sensor data 163 */ 164 function bd_foobot_call_api_trans_sensors($uuid) 165 { 166 // Vars 167 $output = ''; 168 $transient_id = 'foobot-api-data-updated-' . $uuid; 169 $transient = get_transient($transient_id); 170 $expiry = 600; // 10 mins 171 172 // Check if transient already set / not expired 173 // If set, return. 174 if (1 === $transient) { // Transient set. 175 // DEBUG 176 if (BD0019__DEBUG === 1) { 177 error_log(sprintf("Transient %s set for UUID %s. No API call made.", $transient_id, $uuid)); 178 } 117 179 return; 118 } 119 120 // Get the device data 121 $data = bd_foobot_call_api_sensors( $uuid ); 122 if (is_wp_error($data)) { 123 return false; // Bail early 124 } 125 126 // Transient is set for 10 mins 127 set_transient('foobot-api-data-updated-' . $uuid, 1, (60 * 10)); 128 129 return $data; 130 } 180 } else { 181 // Get the device data via new API call 182 $data = bd_foobot_call_api_sensors($uuid); 183 184 // DEBUG 185 if (BD0019__DEBUG === 1) { 186 error_log(print_r($data, TRUE)); 187 } 188 189 if (is_wp_error($data)) { 190 return; // Bail early 191 } else { 192 $output = $data; 193 } 194 195 // Set a transient 196 // DEBUG 197 if (BD0019__DEBUG === 1) { 198 error_log(sprintf("Setting transient %s.", $transient_id)); 199 } 200 set_transient($transient_id, 1, $expiry); 201 } 202 return $output; 203 } -
air-quality-data-from-foobot/trunk/includes/database.php
r3042147 r3042738 1 1 <?php 2 2 3 /** 4 * Set database versions 5 */ 6 7 // Device 8 global $bd_foobot_device_db_version; 9 $bd_foobot_device_db_version = '1.2'; 10 11 // Sensors 12 global $bd_foobot_sensor_db_version; 13 $bd_foobot_sensor_db_version = '1.4'; 14 15 /** Get Options 16 * ============ 17 * 18 * Retrieve values stored in WordPress database 19 * options table. 20 */ 21 22 // Get API key from the database 3 if (!defined('ABSPATH')) { 4 die('Invalid request.'); 5 } 6 7 // Get API key 23 8 function bd_foobot_get_api_key() 24 9 { 25 $options = get_option('baindesign_foobot_api_settings'); 26 return $options['baindesign_foobot_api_key']; 10 $key = BD0019__API_KEY; 11 if ($key){ 12 return $key; 13 } else { 14 return "API key not found"; 15 // DEBUG 16 if (BD0019__DEBUG === 1){ 17 error_log(print_r("API key not found", true)); 18 } 19 } 27 20 } 28 21 … … 30 23 function bd_foobot_get_api_user() 31 24 { 32 $options = get_option('baindesign_foobot_api_settings'); 33 return $options['baindesign_foobot_api_user']; 25 $user = BD0019__API_USER; 26 if ($user){ 27 return $user; 28 } else { 29 return "API username not found"; 30 // DEBUG 31 if (BD0019__DEBUG === 1){ 32 error_log(print_r("API user not found", true)); 33 } 34 } 34 35 } 35 36 … … 50 51 { 51 52 global $wpdb; 52 global $bd_foobot_sensor_db_version;53 53 54 54 $table_name = $wpdb->prefix . 'bd_foobot_sensor_data'; 55 55 56 56 $charset_collate = $wpdb->get_charset_collate(); 57 58 // DEBUG 59 if (BD0019__DEBUG === 1){ 60 error_log(print_r("Creating table " . $table_name, true)); 61 } 57 62 58 63 $sql = "CREATE TABLE $table_name ( … … 80 85 dbDelta($sql); 81 86 82 add_option('bd_foobot_sensor_db_version', $bd_foobot_sensor_db_version);87 add_option('bd_foobot_sensor_db_version', BD0019__SENSOR_DB_VERSION); 83 88 } 84 89 … … 87 92 { 88 93 global $wpdb; 89 global $bd_foobot_device_db_version;90 94 91 95 $table_name = $wpdb->prefix . 'bd_foobot_device_data'; 92 96 93 97 $charset_collate = $wpdb->get_charset_collate(); 98 99 // DEBUG 100 if (BD0019__DEBUG === 1){ 101 error_log(print_r("Creating table " . $table_name, true)); 102 } 94 103 95 104 $sql = "CREATE TABLE $table_name ( … … 104 113 dbDelta($sql); 105 114 106 add_option('bd_foobot_device_db_version', $bd_foobot_device_db_version);115 add_option('bd_foobot_device_db_version', BD0019__DEVICE_DB_VERSION); 107 116 } 108 117 … … 122 131 // Vars 123 132 global $wpdb; 124 $table_name = $wpdb->prefix . 'bd_foobot_sensor_data'; 125 126 // $data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM `{$table_name}` ORDER BY `id` DESC LIMIT 1", $sensor) ); 127 $data = $wpdb->get_row("SELECT * FROM `{$table_name}` ORDER BY `id` DESC LIMIT 1", ARRAY_A); 133 $data = array(); 134 $table_name = BD0019__SENSOR_DB_TABLE; 135 136 // Build query 137 $query = $wpdb->prepare(" 138 SELECT * 139 FROM %i 140 ORDER BY 'id' 141 DESC LIMIT 1 142 ", $table_name, 143 ); 144 145 // Now we query the db. 146 $data = $wpdb->get_row( $query, ARRAY_A ); 147 148 // DEBUG 149 if (BD0019__DEBUG === 1){ 150 error_log(print_r("Fetching data from table " . $table_name, true)); 151 $wpdb->print_error(); 152 error_log(print_r($data, true)); 153 } 128 154 129 155 return $data; … … 136 162 137 163 global $wpdb; 138 $wpdb->show_errors(); 164 165 // DEBUG 166 if (BD0019__DEBUG === 1){$wpdb->show_errors();} 139 167 140 168 // Vars 141 $table_name = $wpdb->prefix . 'bd_foobot_sensor_data';169 $table_name = BD0019__SENSOR_DB_TABLE; 142 170 143 171 // Update the device table if required 144 172 bd_foobot_update_sensor_data($uuid); 145 173 174 // Build query 175 $query = $wpdb->prepare(" 176 SELECT * 177 FROM {$table_name} 178 WHERE `uuid` = %s 179 ORDER BY `id` DESC 180 LIMIT 1 181 ", $uuid); 182 146 183 // Now we query the db. 147 $data = $wpdb->get_results("SELECT * FROM `{$table_name}` WHERE `uuid`='$uuid' ORDER BY `id` DESC LIMIT 1", ARRAY_A); 184 $data = $wpdb->get_results( $query, ARRAY_A ); 185 186 // DEBUG 187 if (BD0019__DEBUG === 1){ 188 error_log(print_r("Fetching data from " . DB_NAME . " > " . BD0019__SENSOR_DB_TABLE, true)); 189 $wpdb->print_error(); 190 error_log(print_r($data, true)); 191 } 148 192 149 193 return $data; 150 194 151 // Show error if any 152 $wpdb->print_error(); 153 } 154 155 // Fetch device data 195 } 196 197 /** 198 * Fetch device data from the database 199 * 200 * Devices on the user account are stored in a custom table. 201 * This is used to prevent hitting API limits. 202 * 203 * If the API has been called recently, we use this function 204 * instead to get the device data. 205 * 206 * NOTE: This table is updates with devices each time the 207 * API call is made. Devices are never removed. In order to 208 * get current devices, we need to check only the most recent. 209 * 210 * @return array $latest_devices Array of last devices returned by API. 211 */ 156 212 function bd_foobot_fetch_db_devices() 157 213 { 158 214 159 215 global $wpdb; 160 $wpdb->show_errors(); 216 217 // DEBUG 218 if (BD0019__DEBUG === 1){$wpdb->show_errors();} 161 219 162 220 // Vars 163 $table_name = $wpdb->prefix . 'bd_foobot_device_data';221 $table_name = BD0019__DEVICE_DB_TABLE; 164 222 165 223 // Update the device table if required 166 224 bd_foobot_update_device_data(); 167 225 226 // DEBUG 227 if (BD0019__DEBUG === 1){ 228 error_log(sprintf("Fetching device data from database (%s)", $table_name, true)); 229 } 230 168 231 // Get all the results 169 232 // TO DO: Only return results from the last 24 hours? … … 175 238 176 239 //$data = $wpdb->get_row( "SELECT * FROM `{$table_name}` WHERE timestamp >= DATE_SUB(NOW(), INTERVAL 1 DAY)", ARRAY_A ); 240 177 241 $data = array(); 178 $data = $wpdb->get_row("SELECT * FROM `{$table_name}` ORDER BY `id` DESC LIMIT 1", ARRAY_A); 179 242 243 // Build query 244 $query = $wpdb->prepare(" 245 SELECT * 246 FROM %i 247 ORDER BY 'id' 248 DESC LIMIT 1 249 ", $table_name, 250 ); 251 252 // Now we query the db. 253 $data = $wpdb->get_row( $query, ARRAY_A ); 254 255 error_log(print_r("Most recent device found:", true)); 256 error_log(print_r($data, true)); 257 258 // Get timestamp of most recent API call. 259 // We will use this to find all devices returned 260 // in the last API call. 180 261 $timestamp = $data["timestamp"]; 181 262 182 //$latest = array(); 183 $latest = $wpdb->get_results("SELECT * FROM `{$table_name}` WHERE `timestamp`= $timestamp ORDER BY `id` DESC", ARRAY_A); 184 if (count($latest) > 0) { 185 return $latest; // returns an array with the latest devices 263 /** 264 * Build new query to return rows that match timestamp 265 */ 266 $query2 = $wpdb->prepare(" 267 SELECT * 268 FROM %i 269 WHERE `timestamp` = %d 270 ORDER BY `id` 271 DESC 272 ", $table_name, $timestamp 273 ); 274 275 // Run query 276 $latest_devices = $wpdb->get_results( $query2, ARRAY_A ); 277 278 // Return results 279 // DEBUG 280 if (BD0019__DEBUG === 1){ 281 error_log(sprintf("All devices found that match timestamp %d: ", $timestamp, true)); 282 error_log(print_r($latest_devices, true)); 283 } 284 if (count($latest_devices) > 0) { 285 return $latest_devices; // returns an array with the latest devices 186 286 } else { 287 if (BD0019__DEBUG === 1){ 288 error_log(print_r("No devices found for timestamp %d.", $timestamp, true)); 289 } 187 290 return; 188 291 } 189 292 190 //echo '<h3>Latest</h3>'; 191 //echo '<pre><code>'; 192 //var_dump( $latest ); 193 //echo '</code></pre>'; 194 195 // Show error if any 196 // $wpdb->print_error(); 293 197 294 } 198 295 … … 216 313 217 314 global $wpdb; 218 // Turn on errors display 219 //$wpdb->show_errors(); 315 316 // DEBUG 317 if (BD0019__DEBUG === 1){$wpdb->show_errors();} 220 318 221 319 $table_name = $wpdb->prefix . 'bd_foobot_device_data'; … … 225 323 foreach ($device_api_data as $data) { 226 324 $device_data = array(); 227 //echo '<pre><code>';228 //var_dump( $data );229 //echo '</code></pre>';230 325 231 326 // Loop the device data 232 327 foreach ($data as $key => $value) { 233 328 $device_data[] = array($key => $value); 234 //echo '<pre><code>';235 //var_dump( $key. ' ' .$value );236 //echo '</code></pre>';237 238 //echo '<h5>Device data in loop</h5>';239 //echo '<pre><code>';240 //var_dump( $device_data );241 //echo '</code></pre>';242 329 } 243 //echo '<h5>Device data after loop</h5>';244 //echo '<pre><code>';245 //var_dump( $device_data );246 //echo '</code></pre>';247 330 248 331 // vars … … 252 335 $name = $device_data[3]['name']; 253 336 254 //echo '<pre><code>';255 //var_dump( $uuid );256 //echo '</code></pre>';257 337 258 338 // Insert data into db table … … 281 361 282 362 // DEBUG 283 // $wpdb->show_errors(); // Turn on errors display 284 285 $table_name = $wpdb->prefix . 'bd_foobot_sensor_data'; 363 if (BD0019__DEBUG === 1){ 364 $wpdb->show_errors(); 365 error_log(print_r($data, true)); 366 }; 286 367 287 368 // Vars … … 307 388 // Insert data into db table 308 389 $wpdb->insert( 309 $table_name,390 BD0019__SENSOR_DB_TABLE, 310 391 array( 311 392 'timestamp' => $time, … … 344 425 } 345 426 427 /** 428 * Update device data 429 */ 346 430 function bd_foobot_update_device_data() 347 431 { -
air-quality-data-from-foobot/trunk/includes/helpers.php
r3042147 r3042738 11 11 function bd_get_foobot_device_uuid( $device_name ) 12 12 { 13 // DEBUG 14 if (BD0019__DEBUG === 1){ 15 error_log(sprintf("Getting the UUID for %s", $device_name, true)); 16 } 17 13 18 $devices = bd_foobot_fetch_db_devices(); 19 14 20 // Get array columns 15 21 $col = array_column( $devices, 'name' ); … … 63 69 } 64 70 endif; 71 72 /** 73 * Get Device name from UUID 74 * 75 * Looks up the given UUID in the Device database table, 76 * and returns the Device Name if found. 77 * 78 * @param string $uuid Device UUID 79 * @return string $output Device name 80 */ 81 if(!function_exists('bd324_get_device_name_from_uuid')): 82 function bd324_get_device_name_from_uuid($uuid) 83 { 84 global $wpdb; 85 86 /* Vars */ 87 $output = ''; 88 $table_name = BD0019__DEVICE_DB_TABLE; 89 90 // Build query 91 $query = $wpdb->prepare(" 92 SELECT * 93 FROM %i 94 WHERE `uuid` = %s 95 LIMIT 1 96 ", $table_name, $uuid 97 ); 98 99 // Now we query the db. 100 $device_data = $wpdb->get_row( $query, ARRAY_A ); 101 $device_name = $device_data['name']; 102 103 // DEBUG 104 if (BD0019__DEBUG === 1){ 105 error_log(sprintf("Fetching device name for %s from %s", $uuid, $table_name)); 106 } 107 108 if ($device_name){ 109 // DEBUG 110 if (BD0019__DEBUG === 1){ 111 error_log(print_r($device_name, true)); 112 } 113 $output = $device_name; 114 } else { 115 // DEBUG 116 if (BD0019__DEBUG === 1){ 117 error_log(sprintf("Device name not found for %s", $uuid, true)); 118 error_log(print_r($device_name, true)); 119 $wpdb->print_error(); 120 } 121 return; 122 } 123 124 return $output; 125 } 126 endif; 127 -
air-quality-data-from-foobot/trunk/includes/sensors.php
r3042147 r3042738 13 13 // Get the target device UUID 14 14 $uuid = bd_get_foobot_device_uuid( $device_name ); 15 if($uuid==='error_device_not_found'){ 15 16 // No device found 17 if($uuid ==='error_device_not_found' || $uuid ==='' || $uuid ===NULL){ 16 18 $content = '<div class="foobot-data foobot-data__error">'; 17 19 $content.= sprintf( … … 65 67 // Error message 66 68 $content = '<div class="foobot-data foobot-data__error">'; 67 $content .= __('Sorry, something went wrong. Please try again later', 'aq-data-foobot'); 69 $content.= sprintf( 70 __('The requested device has been found ("%s" UUID %s), but no data has been sent. Please confirm your device is working via the Foobot app or dashboard.', 'aq-data-foobot'), $device_name, $uuid 71 ); 68 72 $content .= '</div>'; 69 73 -
air-quality-data-from-foobot/trunk/readme.txt
r3042147 r3042738 5 5 Requires at least: 5.3 6 6 Tested up to: 6.4 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later … … 41 41 == Changelog == 42 42 43 = 1.2.1 = 44 * Fix database error 45 43 46 = 1.2 = 44 47 * Display data timestamp in WordPress format … … 54 57 == Upgrade Notice == 55 58 56 = 1. 0=57 * Initial plugin version59 = 1.2.1 = 60 * Fix database error 58 61 59 62 = 1.2 = … … 62 65 * Force temp to show decimals 63 66 67 = 1.0 = 68 * Initial plugin version 69 64 70 == Credits == 65 71 -
air-quality-data-from-foobot/trunk/uninstall.php
r2228648 r3042738 6 6 } 7 7 8 $options_name = 'baindesign_foobot_api_settings';8 $options_name = BD0019__API_OPTIONS_TABLE; 9 9 10 10 delete_option($options_name);
Note: See TracChangeset
for help on using the changeset viewer.