Changeset 2617376
- Timestamp:
- 10/20/2021 06:24:58 PM (4 years ago)
- Location:
- wp-customer-reviews/trunk
- Files:
-
- 4 edited
-
changelog.txt (modified) (1 diff)
-
include/admin/wp-customer-reviews-3-admin.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
wp-customer-reviews-3.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-customer-reviews/trunk/changelog.txt
r2617373 r2617376 1 = 3.6.1 = 2 * 10/20/2021 3 * [Bugfix] Automatically refresh templates on plugin version update. 4 1 5 = 3.6.0 = 2 6 * 10/20/2021 -
wp-customer-reviews/trunk/include/admin/wp-customer-reviews-3-admin.php
r2617373 r2617376 137 137 $url = get_admin_url().'admin.php?page='.$this->prefix.'_options'; 138 138 $this->redirect($url); 139 } 140 141 if ($this->options === false) {139 } else if ($this->options === false) { 140 $this->post_activate(); 141 } else if ($this->isVersionUpgrade()) { 142 142 $this->post_activate(); 143 143 } … … 148 148 149 149 function post_activate() { 150 if ($this->pro !== true) { 151 unset($this->options['templates']); 152 update_option($this->options_name, $this->options); 153 } 150 unset($this->options['templates']); 151 update_option($this->options_name, $this->options); 154 152 155 153 $this->create_settings(); … … 250 248 } 251 249 252 function get_cleaned_dbversion() { 253 $current_dbversion = ($this->options !== false && isset($this->options['dbversion'])) ? $this->options['dbversion'] : 0; 254 $current_dbversion = intval(str_replace('.', '', $current_dbversion)); 255 return $current_dbversion; 256 } 257 258 function check_migrate() { 259 $current_dbversion = $this->get_cleaned_dbversion(); 260 $plugin_db_version = intval(str_replace('.', '', $this->plugin_version)); 261 262 $this->merge_options(); 263 264 if ($current_dbversion == $plugin_db_version) { 265 return; 266 } 267 268 if ($current_dbversion == 0) { 269 // check if we need to migrate from 2.x to 3.x 270 include_once($this->getplugindir().'include/migrate/2x-3x.php'); 271 $migrate_ok = wpcr3_migrate_2x_3x($this, $current_dbversion); 272 } else { 273 // if we get here, we are upgrading 3.x to 3.x 274 include_once($this->getplugindir().'include/migrate/3x-3x.php'); 275 $migrate_ok = wpcr3_migrate_3x_3x($this, $current_dbversion); 276 } 277 278 if ($migrate_ok === true) { 279 // done with all migrations, push dbversion to current version 280 $this->update_db_version($plugin_db_version); 281 } 282 } 250 function get_cleaned_dbversion() { 251 $current_dbversion = ($this->options !== false && isset($this->options['dbversion'])) ? $this->options['dbversion'] : 0; 252 $current_dbversion = intval(str_replace('.', '', $current_dbversion)); 253 return $current_dbversion; 254 } 255 256 function get_cleaned_plugin_version() { 257 return intval(str_replace('.', '', $this->plugin_version)); 258 } 259 260 function isVersionUpgrade() { 261 $current_dbversion = $this->get_cleaned_dbversion(); 262 $plugin_db_version = $this->get_cleaned_plugin_version(); 263 return $current_dbversion != $plugin_db_version; 264 } 265 266 function check_migrate() { 267 $this->merge_options(); 268 269 if ($this->isVersionUpgrade() === false) { 270 return; 271 } 272 273 $current_dbversion = $this->get_cleaned_dbversion(); 274 $plugin_db_version = $this->get_cleaned_plugin_version(); 275 276 if ($current_dbversion == 0) { 277 // check if we need to migrate from 2.x to 3.x 278 include_once($this->getplugindir().'include/migrate/2x-3x.php'); 279 $migrate_ok = wpcr3_migrate_2x_3x($this, $current_dbversion); 280 } else { 281 // if we get here, we are upgrading 3.x to 3.x 282 include_once($this->getplugindir().'include/migrate/3x-3x.php'); 283 $migrate_ok = wpcr3_migrate_3x_3x($this, $current_dbversion); 284 } 285 286 if ($migrate_ok === true) { 287 // done with all migrations, push dbversion to current version 288 $this->update_db_version($plugin_db_version); 289 } 290 } 283 291 284 292 function my_add_settings_section($id, $label, $type) { -
wp-customer-reviews/trunk/readme.txt
r2617373 r2617376 63 63 == Changelog == 64 64 65 = 3.6.1 = 66 * 10/20/2021 67 * [Bugfix] Automatically refresh templates on plugin version update. 68 65 69 = 3.6.0 = 66 70 * 10/20/2021 -
wp-customer-reviews/trunk/wp-customer-reviews-3.php
r2617373 r2617376 4 4 * Plugin URI: https://wordpress.org/plugins/wp-customer-reviews/ 5 5 * Description: Allows your visitors to leave business / product reviews. Testimonials are in Microdata / Microformat and may display star ratings in search results. 6 * Version: 3.6. 06 * Version: 3.6.1 7 7 * Author: Aaron Queen 8 8 * Author URI: https://wordpress.org/plugins/wp-customer-reviews/
Note: See TracChangeset
for help on using the changeset viewer.