Backup and Restore WordPress – WPBackItUp Backup Plugin - Version 1.23.0

Version Description

Download this release

Release Info

Developer cssimmon
Plugin Icon 128x128 Backup and Restore WordPress – WPBackItUp Backup Plugin
Version 1.23.0
Comparing to
See all releases

Code changes from version 1.22.0 to 1.23.0

lib/includes/class-admin-notices.php CHANGED
@@ -21,11 +21,12 @@ if ( ! class_exists( 'WPBackitup_Admin_Notices' ) ) {
21
  //PROMO Constants
22
  private $BLACK_FRIDAY_2017_PROMO = 'black-friday-2017';
23
  private $SAFE_BETA_PROMO = 'safe-beta-december';
 
24
 
25
  public function __construct(){
26
 
27
  $today = date("Y-m-d H:i");
28
- //$today = date("Y-m-d H:i", strtotime("01 December 2017 5:00 AM UTC")); //todo: comment for LIVE
29
  $this->today =$today;
30
 
31
  //IS there a promo to run
@@ -38,6 +39,11 @@ if ( ! class_exists( 'WPBackitup_Admin_Notices' ) ) {
38
  */
39
  private function get_active_promo() {
40
 
 
 
 
 
 
41
  //Is the safe beta promo active
42
  // if ( false !== $this->get_safe_beta_notice_id()) {
43
  // return $this->SAFE_BETA_PROMO;
@@ -77,8 +83,11 @@ if ( ! class_exists( 'WPBackitup_Admin_Notices' ) ) {
77
  // $notice = $this->get_black_friday_notice();
78
  // $this->show_notice($promo,$notice);
79
  // break;
80
-
81
-
 
 
 
82
  default:
83
  $this->wordpress_review();
84
  }
@@ -112,24 +121,24 @@ if ( ! class_exists( 'WPBackitup_Admin_Notices' ) ) {
112
  * @param $id
113
  * @param $notice
114
  */
115
- // private function show_notice($id, $notice) {
116
- //
117
- // if (is_array($notice)) {
118
- // $promo_notice = array(
119
- // 'id' => $id,
120
- // 'days_after' => $notice['days_after'],
121
- // 'temp_days_after' => $notice['temp_days_after'],
122
- // 'type' => 'updated',
123
- // 'message' => $notice['message'],
124
- // 'link_1' => $notice['link_1'],
125
- // 'link_label_1' => $notice['link_label_1'],
126
- // 'link_label_2' => $notice['link_label_2'],
127
- // 'link_label_3' => $notice['link_label_3'],
128
- // );
129
- //
130
- // new WPBackitup_Admin_Notice($promo_notice);
131
- // }
132
- // }
133
 
134
  /**
135
  * Get SAFE promo ID
@@ -153,6 +162,28 @@ if ( ! class_exists( 'WPBackitup_Admin_Notices' ) ) {
153
  // return $id;
154
  // }
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
  /**
158
  * Get Black Friday Promo ID
@@ -301,5 +332,48 @@ if ( ! class_exists( 'WPBackitup_Admin_Notices' ) ) {
301
  //
302
  // }
303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  }
305
  }
21
  //PROMO Constants
22
  private $BLACK_FRIDAY_2017_PROMO = 'black-friday-2017';
23
  private $SAFE_BETA_PROMO = 'safe-beta-december';
24
+ private $INDEPENDENCE_DAY_PROMO = 'independence-day-promo';
25
 
26
  public function __construct(){
27
 
28
  $today = date("Y-m-d H:i");
29
+ //$today = date("Y-m-d H:i", strtotime("04 July 2018 5:00 AM UTC")); //todo: comment for LIVE
30
  $this->today =$today;
31
 
32
  //IS there a promo to run
39
  */
40
  private function get_active_promo() {
41
 
42
+ //Is the independence day sale active?
43
+ if ( false !== $this->get_indepence_day_promo_id()) {
44
+ return $this->INDEPENDENCE_DAY_PROMO;
45
+ }
46
+
47
  //Is the safe beta promo active
48
  // if ( false !== $this->get_safe_beta_notice_id()) {
49
  // return $this->SAFE_BETA_PROMO;
83
  // $notice = $this->get_black_friday_notice();
84
  // $this->show_notice($promo,$notice);
85
  // break;
86
+ case $this->INDEPENDENCE_DAY_PROMO:
87
+ $promo = sprintf("%s-%s",$this->promo,$this->get_indepence_day_promo_id());
88
+ $notice = $this->get_independence_day_notice();
89
+ $this->show_notice($promo,$notice);
90
+ break;
91
  default:
92
  $this->wordpress_review();
93
  }
121
  * @param $id
122
  * @param $notice
123
  */
124
+ private function show_notice($id, $notice) {
125
+
126
+ if (is_array($notice)) {
127
+ $promo_notice = array(
128
+ 'id' => $id,
129
+ 'days_after' => $notice['days_after'],
130
+ 'temp_days_after' => $notice['temp_days_after'],
131
+ 'type' => 'updated',
132
+ 'message' => $notice['message'],
133
+ 'link_1' => $notice['link_1'],
134
+ 'link_label_1' => $notice['link_label_1'],
135
+ 'link_label_2' => $notice['link_label_2'],
136
+ 'link_label_3' => $notice['link_label_3'],
137
+ );
138
+
139
+ new WPBackitup_Admin_Notice($promo_notice);
140
+ }
141
+ }
142
 
143
  /**
144
  * Get SAFE promo ID
162
  // return $id;
163
  // }
164
 
165
+ /**
166
+ * Get Independence Day promo ID
167
+ *
168
+ * @return bool|int false = no promo
169
+ *
170
+ */
171
+ private function get_indepence_day_promo_id() {
172
+ $id = false;
173
+
174
+ //12:00 AM EST = 5:00 AM UTC
175
+ //11:59 PM EST = 4:59 AM UTC
176
+
177
+ $promo_start = date( "Y-m-d H:i", strtotime( "02 July 2018 5:00 AM UTC" ) );
178
+ $promo_end = date( "Y-m-d H:i", strtotime( "08 July 2018 4:59 AM UTC" ) );
179
+
180
+ if ( $this->today >= $promo_start && $this->today <= $promo_end ) {
181
+ $id = 0;
182
+ }
183
+
184
+ return $id;
185
+ }
186
+
187
 
188
  /**
189
  * Get Black Friday Promo ID
332
  //
333
  // }
334
 
335
+
336
+ /**
337
+ * Get Independence day promo
338
+ *
339
+ * @return array|false false on no notice
340
+ */
341
+ private function get_independence_day_notice() {
342
+ $message= array();
343
+ $link_1=array();
344
+ $link_label_1=array();
345
+ $link_label_2=array();
346
+ $link_label_3=array();
347
+ $days_after=array();
348
+ $temp_days_after=array();
349
+
350
+ $id = $this->get_indepence_day_promo_id();
351
+ if (false===$id) return false;
352
+
353
+ $message[]=sprintf( "%s<p>%s<p>%s",
354
+ '<h2>' . esc_html__( "Celebrate Independence Day with WPBackItUp and Save 30%!", "wp-backitup") . ' </h2>',
355
+ __( "WPBackItUp would like to wish a happy Independence Day to all Americans!", "wp-backitup" ),
356
+ __( "This week only purchases and upgrades of WPBackItUp Premium will automatically receive <b>30%</b> off our regular prices.", "wp-backitup" )
357
+ );
358
+ $days_after[]=0;
359
+ $temp_days_after[]=1;
360
+ $link_1[] = "https://www.wpbackitup.com/pricing-purchase/?utm_medium=plugin&utm_source=wp-backitup&utm_campaign=plugin-independence-day-promo";
361
+ $link_label_1[] = esc_html__( 'Buy now!', 'wp-backitup' );
362
+ $link_label_2[] = esc_html__( 'Remind me later', 'wp-backitup' );
363
+ $link_label_3[] = esc_html__( 'I already purchased', 'wp-backitup' );
364
+
365
+
366
+ return array(
367
+ 'message'=>$message[$id],
368
+ 'days_after'=>$days_after[$id],
369
+ 'temp_days_after'=>$temp_days_after[$id],
370
+ 'link_1'=>$link_1[$id],
371
+ 'link_label_1'=>$link_label_1[$id],
372
+ 'link_label_2'=>$link_label_2[$id],
373
+ 'link_label_3'=>$link_label_3[$id],
374
+ );
375
+
376
+ }
377
+
378
  }
379
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: backup, backups, back up, backup plugin, database backup, multisite backup
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
- Stable tag: 1.21.0
8
  Author URI: https://www.wpbackitup.com
9
  Donate link: https://www.wpbackitup.com
10
  License: GPLv2 or later
@@ -19,6 +19,8 @@ WPBackItUp generates a compressed backup of your entire website no matter how la
19
 
20
  The WPBackItUp backup plugin has been available to the WordPress community since **2012** and is used to back up more than **30,000** websites every day. It's one of the most widely **tested**, **reliable**, and **highly rated** backup plugins available! And with our long history, you can feel confident that we are going to be around for many years to come.
21
 
 
 
22
  = The Simplest Way to Safeguard Your WordPress Site! =
23
  Simply install WPBackItUp and within minutes you will have a complete backup of your entire site.
24
 
@@ -215,6 +217,12 @@ Our online documentation and full list of FAQs can be found at [support.wpbackit
215
 
216
 
217
  == Changelog ==
 
 
 
 
 
 
218
  = 1.22 =
219
  *Release Date - June 29, 2018
220
 
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
+ Stable tag: 1.23.0
8
  Author URI: https://www.wpbackitup.com
9
  Donate link: https://www.wpbackitup.com
10
  License: GPLv2 or later
19
 
20
  The WPBackItUp backup plugin has been available to the WordPress community since **2012** and is used to back up more than **30,000** websites every day. It's one of the most widely **tested**, **reliable**, and **highly rated** backup plugins available! And with our long history, you can feel confident that we are going to be around for many years to come.
21
 
22
+ [vimeo https://vimeo.com/278025146]
23
+
24
  = The Simplest Way to Safeguard Your WordPress Site! =
25
  Simply install WPBackItUp and within minutes you will have a complete backup of your entire site.
26
 
217
 
218
 
219
  == Changelog ==
220
+ = 1.23 =
221
+ *Release Date - July 2, 2018
222
+
223
+ * UPDATE: Add Independence Day Promo
224
+ * Fix : Miscellaneous fixes
225
+
226
  = 1.22 =
227
  *Release Date - June 29, 2018
228
 
wp-backitup.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
7
  * Author: WPBackItUp
8
  * Author URI: https://www.wpbackitup.com
9
- * Version: 1.22.0
10
  * Text Domain: wp-backitup
11
  *
12
  * License: GPL3
@@ -32,7 +32,7 @@ define( 'WPBACKITUP__NAMESPACE', 'wp-backitup' );
32
  define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
33
 
34
  define( 'WPBACKITUP__MAJOR_VERSION', 1);
35
- define( 'WPBACKITUP__MINOR_VERSION', 22);
36
  define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
37
  define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
38
 
6
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
7
  * Author: WPBackItUp
8
  * Author URI: https://www.wpbackitup.com
9
+ * Version: 1.23.0
10
  * Text Domain: wp-backitup
11
  *
12
  * License: GPL3
32
  define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
33
 
34
  define( 'WPBACKITUP__MAJOR_VERSION', 1);
35
+ define( 'WPBACKITUP__MINOR_VERSION', 23);
36
  define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
37
  define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
38