UpdraftPlus WordPress Backup Plugin - Version 1.1.2

Version Description

  • 12/31/2012 =
  • Big code re-factoring; cloud access methods now modularised, paving way for easier adding of new methods
Download this release

Release Info

Developer DavidAnderson
Plugin Icon 128x128 UpdraftPlus WordPress Backup Plugin
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.2

Files changed (2) hide show
  1. readme.txt +1 -1
  2. updraftplus.php +42 -11
readme.txt CHANGED
@@ -87,7 +87,7 @@ No, there's no warranty or guarantee, etc. It's completely up to you to verify t
87
 
88
  == Changelog ==
89
 
90
- = 1.1.0 - 12/29/2012 =
91
  * Big code re-factoring; cloud access methods now modularised, paving way for easier adding of new methods
92
 
93
  = 1.0.16 - 12/24/2012 =
87
 
88
  == Changelog ==
89
 
90
+ = 1.1.2 - 12/31/2012 =
91
  * Big code re-factoring; cloud access methods now modularised, paving way for easier adding of new methods
92
 
93
  = 1.0.16 - 12/24/2012 =
updraftplus.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: UpdraftPlus - Backup/Restore
4
  Plugin URI: http://wordpress.org/extend/plugins/updraftplus
5
  Description: Uploads, themes, plugins, and your DB can be automatically backed up to Amazon S3, Google Drive, FTP, or emailed, on separate schedules.
6
  Author: David Anderson.
7
- Version: 1.1.0
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
@@ -56,7 +56,7 @@ define('UPDRAFT_DEFAULT_OTHERS_EXCLUDE','upgrade,cache,updraft,index.php');
56
 
57
  class UpdraftPlus {
58
 
59
- var $version = '1.1.0';
60
 
61
  // Choices will be shown in the admin menu in the order used here
62
  var $backup_methods = array (
@@ -1280,14 +1280,34 @@ class UpdraftPlus {
1280
  array($this,"settings_output"));
1281
  }
1282
 
 
 
 
 
 
 
 
 
1283
  function wordshell_random_advert($urls) {
1284
- $url_start = ($urls) ? '<a href="http://wordshell.net">' : "";
1285
- $url_end = ($urls) ? '</a>' : " (www.wordshell.net)";
1286
- $rad = rand(0,1);
1287
- if ($rad == 0) {
1288
- return "Like automating WordPress operations? Use the CLI? ${url_start}You will love WordShell${url_end} - saves time and money fast.";
1289
- } elseif ($rad == 1) {
1290
- return "${url_start}Check out WordShell${url_end} - manage WordPress from the command line - huge time-saver";
 
 
 
 
 
 
 
 
 
 
 
 
1291
  }
1292
  }
1293
 
@@ -1348,7 +1368,7 @@ class UpdraftPlus {
1348
  }
1349
 
1350
  if(isset($_POST['action']) && $_POST['action'] == 'updraft_backup') {
1351
- echo '<div class="updated fade" style="max-width: 800px; font-size:140%; padding:14px; clear:left;"><strong>Schedule backup:</strong> ';
1352
  if (wp_schedule_single_event(time()+5, 'updraft_backup_all') === false) {
1353
  echo "Failed.";
1354
  } else {
@@ -1374,7 +1394,7 @@ class UpdraftPlus {
1374
 
1375
  $ws_advert = $this->wordshell_random_advert(1);
1376
  echo <<<ENDHERE
1377
- <div class="updated fade" style="max-width: 800px; font-size:140%; padding:14px; clear:left;">${ws_advert}</div>
1378
  ENDHERE;
1379
 
1380
  if($deleted_old_dirs) {
@@ -1718,6 +1738,17 @@ echo $delete_local; ?> /> <br>Check this to delete the local backup file (only s
1718
  <td><input type="checkbox" name="updraft_debug_mode" value="1" <?php echo $debug_mode; ?> /> <br>Check this to receive more information on the backup process - useful if something is going wrong. You <strong>must</strong> send me this log if you are filing a bug report.</td>
1719
  </tr>
1720
  <tr>
 
 
 
 
 
 
 
 
 
 
 
1721
  <td>
1722
  <input type="hidden" name="action" value="update" />
1723
  <input type="submit" class="button-primary" value="Save Changes" />
4
  Plugin URI: http://wordpress.org/extend/plugins/updraftplus
5
  Description: Uploads, themes, plugins, and your DB can be automatically backed up to Amazon S3, Google Drive, FTP, or emailed, on separate schedules.
6
  Author: David Anderson.
7
+ Version: 1.1.2
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
56
 
57
  class UpdraftPlus {
58
 
59
+ var $version = '1.1.2';
60
 
61
  // Choices will be shown in the admin menu in the order used here
62
  var $backup_methods = array (
1280
  array($this,"settings_output"));
1281
  }
1282
 
1283
+ function url_start($urls,$url) {
1284
+ return ($urls) ? '<a href="http://'.$url.'">' : "";
1285
+ }
1286
+
1287
+ function url_end($urls,$url) {
1288
+ return ($urls) ? '</a>' : " (http://$url)";
1289
+ }
1290
+
1291
  function wordshell_random_advert($urls) {
1292
+ $rad = rand(0,5);
1293
+ switch ($rad) {
1294
+ case 0:
1295
+ return "Like automating WordPress operations? Use the CLI? ".$this->url_start($urls,'wordshell.net')."You will love WordShell".$this->url_end($urls,'www.wordshell.net')." - saves time and money fast.";
1296
+ break;
1297
+ case 1:
1298
+ return "Find UpdraftPlus useful? ".$this->url_start($urls,'david.dw-perspective.org.uk/donate')."Please make a donation.".$this->url_end($urls,'david.dw-perspective.org.uk/donate');
1299
+ case 2:
1300
+ return $this->url_start($urls,'wordshell.net')."Check out WordShell".$this->url_end($urls,'www.wordshell.net')." - manage WordPress from the command line - huge time-saver";
1301
+ break;
1302
+ case 3:
1303
+ return "Want some more useful plugins? ".$this->url_start($urls,'profiles.wordpress.org/DavidAnderson/')."See my WordPress profile page for others.".$this->url_end($urls,'profiles.wordpress.org/DavidAnderson/');
1304
+ break;
1305
+ case 4:
1306
+ return $this->url_start($urls,'www.simbahosting.co.uk')."Need high-quality WordPress hosting from WordPress specialists? (Including automatic backups and 1-click installer). Get it from the creators of UpdraftPlus.".$this->url_end($urls,'www.simbahosting.co.uk');
1307
+ break;
1308
+ case 5:
1309
+ return "Need custom WordPress services from experts (including bespoke development)?".$this->url_start($urls,'www.simbahosting.co.uk/s3/products-and-services/wordpress-experts/')." Get them from the creators of UpdraftPlus.".$this->url_end($urls,'www.simbahosting.co.uk/s3/products-and-services/wordpress-experts/');
1310
+ break;
1311
  }
1312
  }
1313
 
1368
  }
1369
 
1370
  if(isset($_POST['action']) && $_POST['action'] == 'updraft_backup') {
1371
+ echo '<div class="updated fade" style="max-width: 800px; font-size:140%; line-height: 140%; padding:14px; clear:left;"><strong>Schedule backup:</strong> ';
1372
  if (wp_schedule_single_event(time()+5, 'updraft_backup_all') === false) {
1373
  echo "Failed.";
1374
  } else {
1394
 
1395
  $ws_advert = $this->wordshell_random_advert(1);
1396
  echo <<<ENDHERE
1397
+ <div class="updated fade" style="max-width: 800px; font-size:140%; line-height: 140%; padding:14px; clear:left;">${ws_advert}</div>
1398
  ENDHERE;
1399
 
1400
  if($deleted_old_dirs) {
1738
  <td><input type="checkbox" name="updraft_debug_mode" value="1" <?php echo $debug_mode; ?> /> <br>Check this to receive more information on the backup process - useful if something is going wrong. You <strong>must</strong> send me this log if you are filing a bug report.</td>
1739
  </tr>
1740
  <tr>
1741
+ <td></td>
1742
+ <td>
1743
+ <p style="margin: 10px 0; padding: 10px; font-size: 140%; background-color: lightYellow; border-color: #E6DB55; border: 1px solid; border-radius: 4px;">
1744
+ <?php
1745
+ echo $this->wordshell_random_advert(1);
1746
+ ?>
1747
+ </p>
1748
+ </td>
1749
+ </tr>
1750
+ <tr>
1751
+ <td></td>
1752
  <td>
1753
  <input type="hidden" name="action" value="update" />
1754
  <input type="submit" class="button-primary" value="Save Changes" />