Skip to content

Commit

Permalink
1.5.3 - use autoloading on non-multisite
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnderson684 committed May 8, 2018
1 parent 672d134 commit 9595a06
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions class-udm-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if (!class_exists('Updraft_Manager_Updater_1_5')):
class Updraft_Manager_Updater_1_5 {

public $version = '1.5.2';
public $version = '1.5.3';

public $relative_plugin_file;
public $slug;
Expand Down Expand Up @@ -818,7 +818,11 @@ public function get_site_info() {
* @return Mixed
*/
public function get_option($option) {
return get_site_option($option);
if (is_multisite()) {
return get_site_option($option);
} else {
return get_option($option);
}
}

/**
Expand All @@ -830,7 +834,12 @@ public function get_option($option) {
* @return Boolean
*/
public function update_option($option, $val) {
return update_site_option($option, $val);
if (is_multisite()) {
return update_site_option($option, $val);
} else {
// On non-multisite, this results in storing in the same place - but also sets 'autoload' to true, which update_site_option() does not
return update_option($option, $val, true);
}
}

/**
Expand Down

0 comments on commit 9595a06

Please sign in to comment.