WP Maintenance Mode - Version 2.5.2

Version Description

Download this release

Release Info

Developer themeisle
Plugin Icon 128x128 WP Maintenance Mode
Version 2.5.2
Comparing to
See all releases

Code changes from version 2.5.1 to 2.5.2

CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  ##### [Version 2.5.1](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.0...v2.5.1) (2022-09-08)
2
 
3
  - Fixes a bug which was causing error on some instances
1
+ ##### [Version 2.5.2](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.1...v2.5.2) (2022-09-27)
2
+
3
+ * Fix maintenance mode issue for previously logged users [#321](https://github.com/Codeinwp/wp-maintenance-mode/issues/321)
4
+ * Allow comments into exclude textarea so that you can comment on the IP addresses for location, props [@joostdekeijzer](https://github.com/joostdekeijzer)
5
+ * Fix PHP notice errors on specific scenarios [#324](https://github.com/Codeinwp/wp-maintenance-mode/issues/324)
6
+ * Fix Otter for saving subscriber entry
7
+
8
  ##### [Version 2.5.1](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.0...v2.5.1) (2022-09-08)
9
 
10
  - Fixes a bug which was causing error on some instances
README.md CHANGED
@@ -7,7 +7,7 @@
7
  **Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
8
  **Requires at least:** 3.5
9
  **Tested up to:** 6.0
10
- **Stable tag:** 2.5.1
11
  **Requires PHP:** 5.6
12
  **License:** GPL-2.0+
13
 
@@ -91,6 +91,16 @@ Notice: `wp-cron.php` is excluded by default.
91
 
92
  ## Changelog ##
93
 
 
 
 
 
 
 
 
 
 
 
94
  ##### [Version 2.5.1](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.0...v2.5.1) (2022-09-08)
95
 
96
  - Fixes a bug which was causing error on some instances
7
  **Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
8
  **Requires at least:** 3.5
9
  **Tested up to:** 6.0
10
+ **Stable tag:** 2.5.2
11
  **Requires PHP:** 5.6
12
  **License:** GPL-2.0+
13
 
91
 
92
  ## Changelog ##
93
 
94
+ ##### [Version 2.5.2](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.1...v2.5.2) (2022-09-27)
95
+
96
+ * Fix maintenance mode issue for previously logged users [#321](https://github.com/Codeinwp/wp-maintenance-mode/issues/321)
97
+ * Allow comments into exclude textarea so that you can comment on the IP addresses for location, props [@joostdekeijzer](https://github.com/joostdekeijzer)
98
+ * Fix PHP notice errors on specific scenarios [#324](https://github.com/Codeinwp/wp-maintenance-mode/issues/324)
99
+ * Fix Otter for saving subscriber entry
100
+
101
+
102
+
103
+
104
  ##### [Version 2.5.1](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.0...v2.5.1) (2022-09-08)
105
 
106
  - Fixes a bug which was causing error on some instances
includes/classes/wp-maintenance-mode.php CHANGED
@@ -8,7 +8,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
8
 
9
  class WP_Maintenance_Mode {
10
 
11
- const VERSION = '2.5.1';
12
 
13
  protected $plugin_slug = 'wp-maintenance-mode';
14
  protected $plugin_settings;
@@ -69,6 +69,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
69
  add_action( 'wp_ajax_wpmm_add_subscriber', array( $this, 'add_subscriber' ) );
70
  add_action( 'wp_ajax_nopriv_wpmm_send_contact', array( $this, 'send_contact' ) );
71
  add_action( 'wp_ajax_wpmm_send_contact', array( $this, 'send_contact' ) );
 
72
 
73
  if ( isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) && get_post_status( $this->plugin_settings['design']['page_id'] ) === 'private' ) {
74
  wp_publish_post( $this->plugin_settings['design']['page_id'] );
@@ -78,7 +79,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
78
  add_filter(
79
  'pre_option_page_on_front',
80
  function ( $value ) {
81
- if ( ! is_user_logged_in() && isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) ) {
82
  $page_id = $this->plugin_settings['design']['page_id'];
83
 
84
  if ( ! function_exists( 'is_plugin_active' ) ) {
@@ -650,7 +651,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
650
  ! $this->check_search_bots() &&
651
  ! ( defined( 'WP_CLI' ) && WP_CLI )
652
  ) {
653
- if ( get_option( 'wpmm_new_look' ) ) {
654
  include_once wpmm_get_template_path( 'maintenance.php', true );
655
  return;
656
  }
@@ -861,6 +862,10 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
861
  $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? rawurldecode( $_SERVER['REQUEST_URI'] ) : '';
862
  $request_uri = wp_sanitize_redirect( $request_uri );
863
  foreach ( $excluded_list as $item ) {
 
 
 
 
864
  if ( empty( $item ) ) { // just to be sure :-)
865
  continue;
866
  }
@@ -997,11 +1002,11 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
997
  }
998
 
999
  $current_template = get_post_meta( $post->ID, '_wp_page_template', true );
1000
- if ( 'templates/wpmm-page-template.php' !== $current_template ) {
1001
  return $template;
1002
  }
1003
 
1004
- $file = WPMM_VIEWS_PATH . '/wpmm-page-template.php';
1005
  if ( file_exists( $file ) ) {
1006
  return $file;
1007
  }
@@ -1216,18 +1221,8 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
1216
  ) {
1217
  throw new Exception( __( 'Security check.', 'wp-maintenance-mode' ) );
1218
  }
1219
- // save
1220
- $exists = $wpdb->get_row( $wpdb->prepare( "SELECT id_subscriber FROM {$wpdb->prefix}wpmm_subscribers WHERE email = %s", $email ), ARRAY_A );
1221
- if ( empty( $exists ) ) {
1222
- $wpdb->insert(
1223
- $wpdb->prefix . 'wpmm_subscribers',
1224
- array(
1225
- 'email' => $email,
1226
- 'insert_date' => date( 'Y-m-d H:i:s' ),
1227
- ),
1228
- array( '%s', '%s' )
1229
- );
1230
- }
1231
 
1232
  wp_send_json_success( __( 'You successfully subscribed. Thanks!', 'wp-maintenance-mode' ) );
1233
  } catch ( Exception $ex ) {
@@ -1293,6 +1288,59 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
1293
  }
1294
  }
1295
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1296
  }
1297
 
1298
  }
8
 
9
  class WP_Maintenance_Mode {
10
 
11
+ const VERSION = '2.5.2';
12
 
13
  protected $plugin_slug = 'wp-maintenance-mode';
14
  protected $plugin_settings;
69
  add_action( 'wp_ajax_wpmm_add_subscriber', array( $this, 'add_subscriber' ) );
70
  add_action( 'wp_ajax_nopriv_wpmm_send_contact', array( $this, 'send_contact' ) );
71
  add_action( 'wp_ajax_wpmm_send_contact', array( $this, 'send_contact' ) );
72
+ add_action( 'otter_form_after_submit', array( $this, 'otter_add_subscriber' ) );
73
 
74
  if ( isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) && get_post_status( $this->plugin_settings['design']['page_id'] ) === 'private' ) {
75
  wp_publish_post( $this->plugin_settings['design']['page_id'] );
79
  add_filter(
80
  'pre_option_page_on_front',
81
  function ( $value ) {
82
+ if ( ( ! $this->check_user_role() && ! $this->check_exclude() ) && isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) ) {
83
  $page_id = $this->plugin_settings['design']['page_id'];
84
 
85
  if ( ! function_exists( 'is_plugin_active' ) ) {
651
  ! $this->check_search_bots() &&
652
  ! ( defined( 'WP_CLI' ) && WP_CLI )
653
  ) {
654
+ if ( isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) ) {
655
  include_once wpmm_get_template_path( 'maintenance.php', true );
656
  return;
657
  }
862
  $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? rawurldecode( $_SERVER['REQUEST_URI'] ) : '';
863
  $request_uri = wp_sanitize_redirect( $request_uri );
864
  foreach ( $excluded_list as $item ) {
865
+ if ( false !== strpos( $item, '#' ) ) {
866
+ $item = trim( substr( $item, 0, strpos( $item, '#' ) ) );
867
+ }
868
+
869
  if ( empty( $item ) ) { // just to be sure :-)
870
  continue;
871
  }
1002
  }
1003
 
1004
  $current_template = get_post_meta( $post->ID, '_wp_page_template', true );
1005
+ if ( ! empty( $current_template ) && 'templates/wpmm-page-template.php' !== $current_template ) {
1006
  return $template;
1007
  }
1008
 
1009
+ $file = WPMM_VIEWS_PATH . 'wpmm-page-template.php';
1010
  if ( file_exists( $file ) ) {
1011
  return $file;
1012
  }
1221
  ) {
1222
  throw new Exception( __( 'Security check.', 'wp-maintenance-mode' ) );
1223
  }
1224
+ // save.
1225
+ $this->insert_subscriber( $email );
 
 
 
 
 
 
 
 
 
 
1226
 
1227
  wp_send_json_success( __( 'You successfully subscribed. Thanks!', 'wp-maintenance-mode' ) );
1228
  } catch ( Exception $ex ) {
1288
  }
1289
  }
1290
 
1291
+ /**
1292
+ * Save subscriber into database.
1293
+ *
1294
+ * @param Form_Data_Request $form_data The form data.
1295
+ * @return void
1296
+ */
1297
+ public function otter_add_subscriber( $form_data ) {
1298
+ if ( $form_data ) {
1299
+ $input_data = $form_data->get_payload_field( 'formInputsData' );
1300
+ $input_data = array_map(
1301
+ function( $input_field ) {
1302
+ if ( isset( $input_field['type'] ) && 'email' === $input_field['type'] ) {
1303
+ return $input_field['value'];
1304
+ }
1305
+ return false;
1306
+ },
1307
+ $input_data
1308
+ );
1309
+ $input_data = array_filter( $input_data );
1310
+ if ( ! empty( $input_data ) ) {
1311
+ foreach ( $input_data as $email ) {
1312
+ $this->insert_subscriber( $email );
1313
+ }
1314
+ }
1315
+ }
1316
+ }
1317
+
1318
+ /**
1319
+ * Save subscriber into database.
1320
+ *
1321
+ * @param string $email Email address.
1322
+ * @global object $wpdb
1323
+ *
1324
+ * @return void
1325
+ */
1326
+ public function insert_subscriber( $email = '' ) {
1327
+ global $wpdb;
1328
+ if ( ! empty( $email ) ) {
1329
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery
1330
+ $exists = $wpdb->get_row( $wpdb->prepare( "SELECT id_subscriber FROM {$wpdb->prefix}wpmm_subscribers WHERE email = %s", $email ), ARRAY_A );
1331
+ if ( empty( $exists ) ) {
1332
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery
1333
+ $wpdb->insert(
1334
+ $wpdb->prefix . 'wpmm_subscribers',
1335
+ array(
1336
+ 'email' => sanitize_email( $email ),
1337
+ 'insert_date' => date( 'Y-m-d H:i:s' ),
1338
+ ),
1339
+ array( '%s', '%s' )
1340
+ );
1341
+ }
1342
+ }
1343
+ }
1344
  }
1345
 
1346
  }
readme.txt CHANGED
@@ -7,7 +7,7 @@ Author URI: https://themeisle.com/
7
  Tags: maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
8
  Requires at least: 3.5
9
  Tested up to: 6.0
10
- Stable tag: 2.5.1
11
  Requires PHP: 5.6
12
  License: GPL-2.0+
13
 
@@ -91,6 +91,16 @@ Notice: `wp-cron.php` is excluded by default.
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
 
 
 
 
94
  ##### [Version 2.5.1](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.0...v2.5.1) (2022-09-08)
95
 
96
  - Fixes a bug which was causing error on some instances
7
  Tags: maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
8
  Requires at least: 3.5
9
  Tested up to: 6.0
10
+ Stable tag: 2.5.2
11
  Requires PHP: 5.6
12
  License: GPL-2.0+
13
 
91
 
92
  == Changelog ==
93
 
94
+ ##### [Version 2.5.2](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.1...v2.5.2) (2022-09-27)
95
+
96
+ * Fix maintenance mode issue for previously logged users [#321](https://github.com/Codeinwp/wp-maintenance-mode/issues/321)
97
+ * Allow comments into exclude textarea so that you can comment on the IP addresses for location, props [@joostdekeijzer](https://github.com/joostdekeijzer)
98
+ * Fix PHP notice errors on specific scenarios [#324](https://github.com/Codeinwp/wp-maintenance-mode/issues/324)
99
+ * Fix Otter for saving subscriber entry
100
+
101
+
102
+
103
+
104
  ##### [Version 2.5.1](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.5.0...v2.5.1) (2022-09-08)
105
 
106
  - Fixes a bug which was causing error on some instances
vendor/autoload.php CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
- return ComposerAutoloaderInit73dcac62702aa48b2e533439663a28aa::getLoader();
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInita31e0d940a95177a20aa598bfdf190f6::getLoader();
vendor/codeinwp/themeisle-sdk/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ##### [Version 3.2.27](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.26...v3.2.27) (2022-08-23)
2
 
3
  - Add Promotion Module
1
+ ##### [Version 3.2.30](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.29...v3.2.30) (2022-09-15)
2
+
3
+ - fix filesystem wrong use - ref [#138](https://github.com/Codeinwp/themeisle-sdk/issues/138), props [@ethanclevenger91](https://github.com/ethanclevenger91) for reporting
4
+
5
+ ##### [Version 3.2.29](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.28...v3.2.29) (2022-09-08)
6
+
7
+ * Adds compatibility mechanism
8
+ * Adds content utms
9
+ * Adds usage time on uninstall feedback
10
+
11
+ ##### [Version 3.2.28](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.27...v3.2.28) (2022-08-30)
12
+
13
+ * Adds utm handler
14
+ * Improve promotions
15
+
16
  ##### [Version 3.2.27](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.26...v3.2.27) (2022-08-23)
17
 
18
  - Add Promotion Module
vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'a1e161cc7b075bdd9250');
1
+ <?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '73443c6739f6cbdbb5fd');
vendor/codeinwp/themeisle-sdk/assets/js/build/index.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,o=window.wp.i18n,n=window.wp.blockEditor,s=window.wp.components,i=window.wp.compose,r=window.wp.data,a=window.wp.hooks,l=window.wp.api;var c=e.n(l);const d={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},m={"blocks-css":{title:(0,o.__)("Custom CSS","otter-blocks"),description:(0,o.__)("Enable Otter and add your Custom CSS for this block."),image:"css.jpg"},"blocks-animation":{title:(0,o.__)("Animations","otter-blocks"),description:(0,o.__)("Enable Otter to add Animations to this block."),image:"animation.jpg"},"blocks-conditions":{title:(0,o.__)("Visibility Conditions","otter-blocks"),description:(0,o.__)("Enable Otter to add Visibility Conditions to this block."),image:"conditions.jpg"}},w=e=>{let{onClick:n}=e;return(0,t.createElement)("div",{style:d.skip.container},(0,t.createElement)(s.Button,{style:d.skip.button,variant:"tertiary",onClick:n},(0,o.__)("Skip for now")),(0,t.createElement)("span",{style:d.skip.poweredby},(0,o.__)("Recommended by ")+window.themeisleSDKPromotions.product))},p=(0,i.createHigherOrderComponent)((e=>i=>{if(i.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[a,l]=(0,t.useState)(!1),[p,u]=(0,t.useState)("default"),[b,_]=(0,t.useState)(!1),[k,y,h]=(()=>{const{createNotice:e}=(0,r.dispatch)("core/notices"),[n,s]=(0,t.useState)({}),[i,a]=(0,t.useState)("loading"),l=()=>{c().loadPromise.then((async()=>{try{const e=new(c().models.Settings),t=await e.fetch();s(t)}catch(e){a("error")}finally{a("loaded")}}))};return(0,t.useEffect)((()=>{l()}),[]),[e=>null==n?void 0:n[e],function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,o.__)("Settings saved.","textdomain");a("saving");const i=new(c().models.Settings)({[t]:n}).save();i.success(((t,n)=>{"success"===n&&(a("loaded"),e("success",s,{isDismissible:!0,type:"snackbar"})),"error"===n&&(a("error"),e("error",(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})),l()})),i.error((t=>{a("error"),e("error",t.responseJSON.message?t.responseJSON.message:(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})}))},i]})(),g=async()=>{var e;l(!0),await("otter-blocks",new Promise((e=>{wp.updates.ajax("install-plugin",{slug:"otter-blocks",success:()=>{e({success:!0})},error:t=>{e({success:!1,code:t.errorCode})}})}))),await(e=window.themeisleSDKPromotions.activationUrl,new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))}))),l(!1),u("installed")},S=()=>"installed"===p?(0,t.createElement)("p",null,(0,o.__)("Awesome! Refresh the page to see Otter in action.")):(0,t.createElement)(s.Button,{variant:"secondary",onClick:g,isBusy:a,style:d.button},(0,o.__)("Install & Activate Otter")),f=()=>{const e=JSON.parse(window.themeisleSDKPromotions.promotions_otter);e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,y("themeisle_sdk_promotions_otter",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1};return(0,t.useEffect)((()=>{b&&f()}),[b]),b?(0,t.createElement)(e,i):(0,t.createElement)(t.Fragment,null,(0,t.createElement)(e,i),(0,t.createElement)(n.InspectorControls,null,Object.keys(m).map((e=>{if(e===window.themeisleSDKPromotions.showPromotion){const o=m[e];return(0,t.createElement)(s.PanelBody,{title:o.title,initialOpen:!1},(0,t.createElement)("p",null,o.description),(0,t.createElement)(S,null),(0,t.createElement)("img",{style:d.image,src:window.themeisleSDKPromotions.assets+o.image}),(0,t.createElement)(w,{onClick:()=>_(!0)}))}}))))}return(0,t.createElement)(e,i)}),"withInspectorControl");(0,r.select)("core/edit-site")||(0,a.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",p)})();
1
+ (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,o=window.wp.i18n,n=window.wp.blockEditor,s=window.wp.components,i=window.wp.compose,r=window.wp.data,l=window.wp.hooks,a=window.wp.api;var c=e.n(a);const d={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},m={"blocks-css":{title:(0,o.__)("Custom CSS","textdomain"),description:(0,o.__)("Enable Otter Blocks to add Custom CSS for this block."),image:"css.jpg"},"blocks-animation":{title:(0,o.__)("Animations","textdomain"),description:(0,o.__)("Enable Otter Blocks to add Animations for this block."),image:"animation.jpg"},"blocks-conditions":{title:(0,o.__)("Visibility Conditions","textdomain"),description:(0,o.__)("Enable Otter Blocks to add Visibility Conditions for this block."),image:"conditions.jpg"}},w=e=>{let{onClick:n}=e;return(0,t.createElement)("div",{style:d.skip.container},(0,t.createElement)(s.Button,{style:d.skip.button,variant:"tertiary",onClick:n},(0,o.__)("Skip for now")),(0,t.createElement)("span",{style:d.skip.poweredby},(0,o.__)("Recommended by ")+window.themeisleSDKPromotions.product))},p=(0,i.createHigherOrderComponent)((e=>i=>{if(i.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[l,a]=(0,t.useState)(!1),[p,u]=(0,t.useState)("default"),[_,k]=(0,t.useState)(!1),[h,b,g]=(()=>{const{createNotice:e}=(0,r.dispatch)("core/notices"),[n,s]=(0,t.useState)({}),[i,l]=(0,t.useState)("loading"),a=()=>{c().loadPromise.then((async()=>{try{const e=new(c().models.Settings),t=await e.fetch();s(t)}catch(e){l("error")}finally{l("loaded")}}))};return(0,t.useEffect)((()=>{a()}),[]),[e=>null==n?void 0:n[e],function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,o.__)("Settings saved.","textdomain");l("saving");const i=new(c().models.Settings)({[t]:n}).save();i.success(((t,n)=>{"success"===n&&(l("loaded"),e("success",s,{isDismissible:!0,type:"snackbar"})),"error"===n&&(l("error"),e("error",(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})),a()})),i.error((t=>{l("error"),e("error",t.responseJSON.message?t.responseJSON.message:(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})}))},i]})(),y=async()=>{var e;a(!0),await("otter-blocks",new Promise((e=>{wp.updates.ajax("install-plugin",{slug:"otter-blocks",success:()=>{e({success:!0})},error:t=>{e({success:!1,code:t.errorCode})}})}))),b("themeisle_sdk_promotions_otter_installed",!Boolean(h("themeisle_sdk_promotions_otter_installed"))),await(e=window.themeisleSDKPromotions.activationUrl,new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))}))),a(!1),u("installed")},S=()=>"installed"===p?(0,t.createElement)("p",null,(0,t.createElement)("strong",null,(0,o.__)("Awesome! Refresh the page to see Otter Blocks in action."))):(0,t.createElement)(s.Button,{variant:"secondary",onClick:y,isBusy:l,style:d.button},(0,o.__)("Install & Activate Otter Blocks")),f=()=>{const e=JSON.parse(window.themeisleSDKPromotions.promotions_otter);e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,b("themeisle_sdk_promotions_otter",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1};return(0,t.useEffect)((()=>{_&&f()}),[_]),_?(0,t.createElement)(e,i):(0,t.createElement)(t.Fragment,null,(0,t.createElement)(e,i),(0,t.createElement)(n.InspectorControls,null,Object.keys(m).map((e=>{if(e===window.themeisleSDKPromotions.showPromotion){const o=m[e];return(0,t.createElement)(s.PanelBody,{title:o.title,initialOpen:!1},(0,t.createElement)("p",null,o.description),(0,t.createElement)(S,null),(0,t.createElement)("img",{style:d.image,src:window.themeisleSDKPromotions.assets+o.image}),(0,t.createElement)(w,{onClick:()=>k(!0)}))}}))))}return(0,t.createElement)(e,i)}),"withInspectorControl");(0,r.select)("core/edit-site")||(0,l.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",p)})();
vendor/codeinwp/themeisle-sdk/load.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  return;
15
  }
16
  // Current SDK version and path.
17
- $themeisle_sdk_version = '3.2.27';
18
  $themeisle_sdk_path = dirname( __FILE__ );
19
 
20
  global $themeisle_sdk_max_version;
@@ -71,3 +71,105 @@ if ( ! function_exists( 'themeisle_sdk_load_latest' ) ) :
71
  }
72
  endif;
73
  add_action( 'init', 'themeisle_sdk_load_latest' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  return;
15
  }
16
  // Current SDK version and path.
17
+ $themeisle_sdk_version = '3.2.30';
18
  $themeisle_sdk_path = dirname( __FILE__ );
19
 
20
  global $themeisle_sdk_max_version;
71
  }
72
  endif;
73
  add_action( 'init', 'themeisle_sdk_load_latest' );
74
+
75
+ if ( ! function_exists( 'tsdk_utmify' ) ) {
76
+ /**
77
+ * Utmify a link.
78
+ *
79
+ * @param string $url URL to add utms.
80
+ * @param string $area Area in page where this is used ( CTA, image, section name).
81
+ * @param string $location Location, such as customizer, about page.
82
+ *
83
+ * @return string
84
+ */
85
+ function tsdk_utmify( $url, $area, $location = null ) {
86
+ static $current_page = null;
87
+ if ( $location === null && $current_page === null ) {
88
+ global $pagenow;
89
+ $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : $pagenow;
90
+ $current_page = isset( $screen->id ) ? $screen->id : ( ( $screen === null ) ? 'non-admin' : $screen );
91
+ $current_page = sanitize_key( str_replace( '.php', '', $current_page ) );
92
+ }
93
+ $location = $location === null ? $current_page : $location;
94
+ $content = sanitize_key(
95
+ trim(
96
+ str_replace(
97
+ [
98
+ 'https://',
99
+ 'themeisle.com',
100
+ '/themes/',
101
+ '/plugins/',
102
+ '/upgrade',
103
+ ],
104
+ '',
105
+ $url
106
+ ),
107
+ '/'
108
+ )
109
+ );
110
+ return esc_url_raw(
111
+ add_query_arg(
112
+ [
113
+ 'utm_source' => 'wpadmin',
114
+ 'utm_medium' => $location,
115
+ 'utm_campaign' => $area,
116
+ 'utm_content' => $content,
117
+ ],
118
+ $url
119
+ )
120
+ );
121
+ }
122
+
123
+ add_filter( 'tsdk_utmify', 'tsdk_utmify', 10, 3 );
124
+ }
125
+
126
+
127
+ if ( ! function_exists( 'tsdk_lstatus' ) ) {
128
+ /**
129
+ * Check license status.
130
+ *
131
+ * @param string $file Product basefile.
132
+ *
133
+ * @return string Status.
134
+ */
135
+ function tsdk_lstatus( $file ) {
136
+ return \ThemeisleSDK\Modules\Licenser::status( $file );
137
+ }
138
+ }
139
+ if ( ! function_exists( 'tsdk_lis_valid' ) ) {
140
+ /**
141
+ * Check if license is valid.
142
+ *
143
+ * @param string $file Product basefile.
144
+ *
145
+ * @return bool Validness.
146
+ */
147
+ function tsdk_lis_valid( $file ) {
148
+ return \ThemeisleSDK\Modules\Licenser::is_valid( $file );
149
+ }
150
+ }
151
+ if ( ! function_exists( 'tsdk_lplan' ) ) {
152
+ /**
153
+ * Get license plan.
154
+ *
155
+ * @param string $file Product basefile.
156
+ *
157
+ * @return string Plan.
158
+ */
159
+ function tsdk_lplan( $file ) {
160
+ return \ThemeisleSDK\Modules\Licenser::plan( $file );
161
+ }
162
+ }
163
+
164
+ if ( ! function_exists( 'tsdk_lkey' ) ) {
165
+ /**
166
+ * Get license key.
167
+ *
168
+ * @param string $file Product basefile.
169
+ *
170
+ * @return string Key.
171
+ */
172
+ function tsdk_lkey( $file ) {
173
+ return \ThemeisleSDK\Modules\Licenser::key( $file );
174
+ }
175
+ }
vendor/codeinwp/themeisle-sdk/src/Loader.php CHANGED
@@ -56,6 +56,7 @@ final class Loader {
56
  'recommendation',
57
  'notification',
58
  'promotions',
 
59
  ];
60
 
61
  /**
56
  'recommendation',
57
  'notification',
58
  'promotions',
59
+ 'compatibilities',
60
  ];
61
 
62
  /**
vendor/codeinwp/themeisle-sdk/src/Modules/Compatibilities.php ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The compatibilities model class for ThemeIsle SDK
4
+ *
5
+ * @package ThemeIsleSDK
6
+ * @subpackage Modules
7
+ * @copyright Copyright (c) 2017, Marius Cristea
8
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
+ * @since 1.0.0
10
+ */
11
+
12
+ namespace ThemeisleSDK\Modules;
13
+
14
+ use ThemeisleSDK\Common\Abstract_Module;
15
+ use ThemeisleSDK\Product;
16
+
17
+ // Exit if accessed directly.
18
+ if ( ! defined( 'ABSPATH' ) ) {
19
+ exit;
20
+ }
21
+
22
+ /**
23
+ * Promotions module for ThemeIsle SDK.
24
+ */
25
+ class Compatibilities extends Abstract_Module {
26
+ const REQUIRED = 'required';
27
+ const TESTED_UP = 'tested_up';
28
+
29
+ /**
30
+ * Should we load this module.
31
+ *
32
+ * @param Product $product Product object.
33
+ *
34
+ * @return bool
35
+ */
36
+ public function can_load( $product ) {
37
+ if ( $this->is_from_partner( $product ) ) {
38
+ return false;
39
+ }
40
+ if ( $product->is_theme() && ! current_user_can( 'switch_themes' ) ) {
41
+ return false;
42
+ }
43
+
44
+ if ( $product->is_plugin() && ! current_user_can( 'install_plugins' ) ) {
45
+ return false;
46
+ }
47
+
48
+ return true;
49
+ }
50
+
51
+ /**
52
+ * Registers the hooks.
53
+ *
54
+ * @param Product $product Product to load.
55
+ *
56
+ * @throws \Exception If the configuration is invalid.
57
+ *
58
+ * @return Compatibilities Module instance.
59
+ */
60
+ public function load( $product ) {
61
+
62
+
63
+ $this->product = $product;
64
+
65
+ $compatibilities = apply_filters( 'themeisle_sdk_compatibilities/' . $this->product->get_slug(), [] );
66
+ if ( empty( $compatibilities ) ) {
67
+ return $this;
68
+ }
69
+ $requirement = null;
70
+ $check_type = null;
71
+ foreach ( $compatibilities as $compatibility ) {
72
+
73
+ if ( empty( $compatibility['basefile'] ) ) {
74
+ return $this;
75
+ }
76
+ $requirement = new Product( $compatibility['basefile'] );
77
+ $tested_up = isset( $compatibility[ self::TESTED_UP ] ) ? $compatibility[ self::TESTED_UP ] : '999';
78
+ $required = $compatibility[ self::REQUIRED ];
79
+ if ( ! version_compare( $required, $tested_up, '<' ) ) {
80
+ throw new \Exception( sprintf( 'Invalid required/tested_up configuration. Required version %s should be lower than tested_up %s.', $required, $tested_up ) );
81
+ }
82
+ $check_type = self::REQUIRED;
83
+ if ( ! version_compare( $requirement->get_version(), $required, '<' ) ) {
84
+ $check_type = self::TESTED_UP;
85
+ if ( version_compare( $requirement->get_version(), $tested_up . '.9999', '<' ) ) {
86
+ return $this;
87
+ }
88
+ }
89
+
90
+ break;
91
+ }
92
+ if ( empty( $requirement ) ) {
93
+ return $this;
94
+ }
95
+ if ( $check_type === self::REQUIRED ) {
96
+ $this->mark_required( $product, $requirement );
97
+ }
98
+ if ( $check_type === self::TESTED_UP ) {
99
+ $this->mark_testedup( $product, $requirement );
100
+ }
101
+
102
+ return $this;
103
+ }
104
+
105
+ /**
106
+ * Mark the product tested up.
107
+ *
108
+ * @param Product $product Product object.
109
+ * @param Product $requirement Requirement object.
110
+ *
111
+ * @return void
112
+ */
113
+ public function mark_testedup( $product, $requirement ) {
114
+ add_action(
115
+ 'admin_head',
116
+ function () use ( $product, $requirement ) {
117
+ $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : '';
118
+
119
+ if ( empty( $screen ) || ! isset( $screen->id ) ) {
120
+ return;
121
+ }
122
+ if ( $requirement->is_theme() && $screen->id === 'themes' ) {
123
+ ?>
124
+ <script type="text/javascript">
125
+ jQuery(document).ready(function ($) {
126
+ setInterval(checkTheme, 500);
127
+ function checkTheme() {
128
+ var theme = jQuery( '.theme.active[data-slug="<?php echo esc_attr( $requirement->get_slug() ); ?>"]' );
129
+ var notice_id = 'testedup<?php echo esc_attr( $requirement->get_slug() . $product->get_slug() ); ?>';
130
+ var product_name = '<?php echo esc_attr( $product->get_friendly_name() ); ?>';
131
+ if (theme.length > 0 && jQuery('#' + notice_id).length === 0) {
132
+ theme.find('.theme-id-container').prepend('<div style="bottom:100%;top:auto;" id="'+notice_id+'" class="notice notice-warning"><strong>Warning:</strong> This theme has not been tested with your current version of <strong>' + product_name +'</strong>. Please update '+product_name+' plugin.</div>');
133
+ }
134
+ if (theme.length > 0 && jQuery('#' + notice_id + 'overlay').length === 0) {
135
+ jQuery('.theme-overlay.active .theme-author').after('<div style="bottom:100%;top:auto;" id="'+notice_id+'overlay" class="notice notice-warning"><p><strong>Warning:</strong> This theme has not been tested with your current version of <strong>' + product_name +'</strong>. Please update '+product_name+' plugin.</p></div>');
136
+ }
137
+ }
138
+ })
139
+
140
+ </script>
141
+ <?php
142
+ }
143
+ if ( $requirement->is_plugin() && $screen->id === 'plugins' ) {
144
+ ?>
145
+ <script type="text/javascript">
146
+ jQuery(document).ready(function ($) {
147
+ setInterval(checkPlugin, 500);
148
+ function checkPlugin() {
149
+ var plugin = jQuery( '.plugins .active[data-slug="<?php echo esc_attr( $requirement->get_slug() ); ?>"]' );
150
+ var notice_id = 'testedup<?php echo esc_attr( $requirement->get_slug() . $product->get_slug() ); ?>';
151
+ var product_name = '<?php echo esc_attr( $product->get_friendly_name() ); ?>';
152
+ var product_type = '<?php echo ( $product->is_plugin() ? 'plugin' : 'theme' ); ?>';
153
+ if (plugin.length > 0 && jQuery('#' + notice_id).length === 0) {
154
+ plugin.find('.column-description').append('<div style="bottom:100%;top:auto;" id="'+notice_id+'" class="notice notice-warning notice-alt notice-inline"><strong>Warning:</strong> This plugin has not been tested with your current version of <strong>' + product_name +'</strong>. Please update '+product_name+' '+product_type+'.</div>');
155
+ }
156
+ }
157
+ })
158
+
159
+ </script>
160
+ <?php
161
+ }
162
+ }
163
+ );
164
+
165
+ }
166
+
167
+ /**
168
+ * Mark the product requirements.
169
+ *
170
+ * @param Product $product Product object.
171
+ * @param Product $requirement Requirement object.
172
+ *
173
+ * @return void
174
+ */
175
+ public function mark_required( $product, $requirement ) {
176
+ add_filter(
177
+ 'upgrader_pre_download',
178
+ function ( $return, $package, $upgrader ) use ( $product, $requirement ) {
179
+ /**
180
+ * Upgrader object.
181
+ *
182
+ * @var \WP_Upgrader $upgrader Upgrader object.
183
+ */
184
+ $should_block = false;
185
+ if ( $product->is_theme()
186
+ && property_exists( $upgrader, 'skin' )
187
+ && property_exists( $upgrader->skin, 'theme_info' )
188
+ && $upgrader->skin->theme_info->template === $product->get_slug() ) {
189
+ $should_block = true;
190
+
191
+ }
192
+ if ( ! $should_block && $product->is_plugin()
193
+ && property_exists( $upgrader, 'skin' )
194
+ && property_exists( $upgrader->skin, 'plugin_info' )
195
+ && $upgrader->skin->plugin_info['Name'] === $product->get_name() ) {
196
+ $should_block = true;
197
+ }
198
+ if ( $should_block ) {
199
+ echo( sprintf(
200
+ '%s update requires a newer version of %s. Please %supdate%s %s %s.',
201
+ esc_attr( $product->get_friendly_name() ),
202
+ esc_attr( $requirement->get_friendly_name() ),
203
+ '<a href="' . esc_url( admin_url( $requirement->is_theme() ? 'themes.php' : 'plugins.php' ) ) . '">',
204
+ '</a>',
205
+ esc_attr( $requirement->get_friendly_name() ),
206
+ esc_attr( $requirement->is_theme() ? 'theme' : 'plugin' )
207
+ ) );
208
+ $upgrader->maintenance_mode( false );
209
+ die();
210
+ }
211
+
212
+ return $return;
213
+ },
214
+ 10,
215
+ 3
216
+ );
217
+
218
+ add_action(
219
+ 'admin_notices',
220
+ function () use ( $product, $requirement ) {
221
+ echo '<div class="notice notice-error "><p>';
222
+ echo( sprintf(
223
+ '%s requires a newer version of %s. Please %supdate%s %s %s to the latest version.',
224
+ '<strong>' . esc_attr( $product->get_friendly_name() ) . '</strong>',
225
+ '<strong>' . esc_attr( $requirement->get_friendly_name() ) . '</strong>',
226
+ '<a href="' . esc_url( admin_url( $requirement->is_theme() ? 'themes.php' : 'plugins.php' ) ) . '">',
227
+ '</a>',
228
+ '<strong>' . esc_attr( $requirement->get_friendly_name() ) . '</strong>',
229
+ esc_attr( $requirement->is_theme() ? 'theme' : 'plugin' )
230
+ ) );
231
+ echo '</p></div>';
232
+ }
233
+ );
234
+
235
+ }
236
+ }
vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php CHANGED
@@ -131,8 +131,9 @@ class Dashboard_Widget extends Abstract_Module {
131
  #themeisle h2.hndle {
132
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABbCAMAAADncTNAAAAAtFBMVEVHcEyAgIB/f3+xsbGgoaGBgYGCgoKKioqAgIC1tbW5ubnFx8iAgIDU1taBgYGCgoKAgIC0tLXW19jW2NiAgIC3uLiBgYHLzMy4uLhycnLW19d/f3/T1NW0tLTX19mVlZWvr6+BgYHl5eWKiottbW5JSUnW2Nm5ubnh4eHT1NWVlZVjY2N4eHh9fX6pqqq+v79PT0/39/fu7u7Nzc7Z2ttYWFgBAQHDw8P////JysoZGRk0NTZqJc/sAAAAIXRSTlMA0FL7/oEnEPL6eibivm9gwJya76/enFq2CXI+2lFAyM8GATmPAAADj0lEQVR4Xu2YaW/iOhSGAwRCWDosnXa6znjJvm8svf//f12TuARyhiR2pfnUR6gSEnr0+uT4xK7yRb755pvhHePli5K7Bfpkuhoq8ozRJdMH+WWha6Z3sqYparCSLRJqspjImVbANJU03cNMMpofAwQZCGsmpQYyFvVM0Q00OQ9koMl5IPcCoro+RA1Dt2Ea9n9eZ0+YHJLkgIlkDywQx00wCTyaReiKH8LbNU9ybJOdkchV6QFxyCFLbVvdfaREqgUWg/tx2UbqIcK2Hex2TdGLwFTjIj3XP3YfCZFsb23KRZn/3263oymSFI0/a5S4PqUBjoBIJBDjeEhCN0wxQSRybIxtJ3K5SGzuE/vAwIQc8ZmMMJFAIM4oikZItfEFtorGgoE43FObwqHU68OtPCnOz8KZ2Jbl5LgkSW0Tc7YyIz/EFWmS4jMbiZU5mJOmKRaJpKGGyLZtDJh3iyaNUu/3+xyKnrtFL71EG+FTiMpENhQtxUQ8kSOXCIr2tnCNhg/gTX0SHYFp0t7TCwQZ7U841yoHrW6rtGroUwTWVnLMssxx+H4bgZcSOFf5MYx0Ae8FghomMDyC2EBNImBywPkNTDNqGLQpIg2TjUNU8tBy9DQMo0DAZF16rAi7vJAtFTIYFAHUc6hIRW6OuOhJgaCSwmDEAYK4oa7ro+qIEyJU/US7KTJKPNSFT9tFgVFBu0SF1y7yjX4masRA9Da7EFGj28R/BkQz6xGIOurkx38T/bKs9Uk8aIiMwm/Jw0VP1yLrJwt13xAxvABBgsK4KWLov35DkRF7ZaqgzuZ7MQ8MOntmVYyAqKTwaICKqvSUFnVccMN5sziEP/5+xGDTahbH5Q3ZB76zr8fI+nJtvUUU3t3ml5GKviK/npCg3CGodnuJ4JVkfRFJYGVDBZrqKnn9RLf+CzDTS5PaN5J38+auzX4ykU4Qoj0rdKfcYs5ijfo9OL/uRUgZyQr7NCWtWwiUSLc4arfJa7lpszTA1OJZAQ8w8dXFrR5YHzCWSnS3pZ18tOi4Ps4vl/c7i/6qomjRecN+UubrPyPGn/VEMU3T0UFHkaPzpgjxmJsnjmrtionlMDZiog0TsY/DPtn8SXtlBvbtxKtwopy7lqW3smQO+yoGE1Uu55GJ3pmI8ygoejZNnqj0vnIRCyTKfLstRdtStGQi09myUsvwvlkuzSUXbV+Xz5ryBebV33fln/A/moud69FZiEYAAAAASUVORK5CYII=');
133
  background-repeat: no-repeat;
134
- background-position: 92% 50%;
135
  background-size: 25px;
 
136
  }
137
 
138
  #themeisle .inside {
131
  #themeisle h2.hndle {
132
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABbCAMAAADncTNAAAAAtFBMVEVHcEyAgIB/f3+xsbGgoaGBgYGCgoKKioqAgIC1tbW5ubnFx8iAgIDU1taBgYGCgoKAgIC0tLXW19jW2NiAgIC3uLiBgYHLzMy4uLhycnLW19d/f3/T1NW0tLTX19mVlZWvr6+BgYHl5eWKiottbW5JSUnW2Nm5ubnh4eHT1NWVlZVjY2N4eHh9fX6pqqq+v79PT0/39/fu7u7Nzc7Z2ttYWFgBAQHDw8P////JysoZGRk0NTZqJc/sAAAAIXRSTlMA0FL7/oEnEPL6eibivm9gwJya76/enFq2CXI+2lFAyM8GATmPAAADj0lEQVR4Xu2YaW/iOhSGAwRCWDosnXa6znjJvm8svf//f12TuARyhiR2pfnUR6gSEnr0+uT4xK7yRb755pvhHePli5K7Bfpkuhoq8ozRJdMH+WWha6Z3sqYparCSLRJqspjImVbANJU03cNMMpofAwQZCGsmpQYyFvVM0Q00OQ9koMl5IPcCoro+RA1Dt2Ea9n9eZ0+YHJLkgIlkDywQx00wCTyaReiKH8LbNU9ybJOdkchV6QFxyCFLbVvdfaREqgUWg/tx2UbqIcK2Hex2TdGLwFTjIj3XP3YfCZFsb23KRZn/3263oymSFI0/a5S4PqUBjoBIJBDjeEhCN0wxQSRybIxtJ3K5SGzuE/vAwIQc8ZmMMJFAIM4oikZItfEFtorGgoE43FObwqHU68OtPCnOz8KZ2Jbl5LgkSW0Tc7YyIz/EFWmS4jMbiZU5mJOmKRaJpKGGyLZtDJh3iyaNUu/3+xyKnrtFL71EG+FTiMpENhQtxUQ8kSOXCIr2tnCNhg/gTX0SHYFp0t7TCwQZ7U841yoHrW6rtGroUwTWVnLMssxx+H4bgZcSOFf5MYx0Ae8FghomMDyC2EBNImBywPkNTDNqGLQpIg2TjUNU8tBy9DQMo0DAZF16rAi7vJAtFTIYFAHUc6hIRW6OuOhJgaCSwmDEAYK4oa7ro+qIEyJU/US7KTJKPNSFT9tFgVFBu0SF1y7yjX4masRA9Da7EFGj28R/BkQz6xGIOurkx38T/bKs9Uk8aIiMwm/Jw0VP1yLrJwt13xAxvABBgsK4KWLov35DkRF7ZaqgzuZ7MQ8MOntmVYyAqKTwaICKqvSUFnVccMN5sziEP/5+xGDTahbH5Q3ZB76zr8fI+nJtvUUU3t3ml5GKviK/npCg3CGodnuJ4JVkfRFJYGVDBZrqKnn9RLf+CzDTS5PaN5J38+auzX4ykU4Qoj0rdKfcYs5ijfo9OL/uRUgZyQr7NCWtWwiUSLc4arfJa7lpszTA1OJZAQ8w8dXFrR5YHzCWSnS3pZ18tOi4Ps4vl/c7i/6qomjRecN+UubrPyPGn/VEMU3T0UFHkaPzpgjxmJsnjmrtionlMDZiog0TsY/DPtn8SXtlBvbtxKtwopy7lqW3smQO+yoGE1Uu55GJ3pmI8ygoejZNnqj0vnIRCyTKfLstRdtStGQi09myUsvwvlkuzSUXbV+Xz5ryBebV33fln/A/moud69FZiEYAAAAASUVORK5CYII=');
133
  background-repeat: no-repeat;
134
+ background-position: 2% 50%;
135
  background-size: 25px;
136
+ padding-left: 39px;
137
  }
138
 
139
  #themeisle .inside {
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php CHANGED
@@ -24,13 +24,30 @@ if ( ! defined( 'ABSPATH' ) ) {
24
  * Licenser module for ThemeIsle SDK.
25
  */
26
  class Licenser extends Abstract_Module {
27
-
 
 
 
 
 
 
 
 
 
 
 
28
  /**
29
  * Number of max failed checks before showing the license message.
30
  *
31
  * @var int $max_failed Maximum failed checks allowed before show the notice
32
  */
33
- private static $max_failed = 2;
 
 
 
 
 
 
34
  /**
35
  * License key string.
36
  *
@@ -215,6 +232,76 @@ class Licenser extends Abstract_Module {
215
  return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
216
  }
217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  /**
219
  * Return the last error message.
220
  *
@@ -256,12 +343,7 @@ class Licenser extends Abstract_Module {
256
  * @return int License plan.
257
  */
258
  public function get_plan() {
259
- $license_data = get_option( $this->product->get_key() . '_license_data', '' );
260
- if ( ! isset( $license_data->price_id ) ) {
261
- return - 1;
262
- }
263
-
264
- return (int) $license_data->price_id;
265
  }
266
 
267
  /**
@@ -379,7 +461,7 @@ class Licenser extends Abstract_Module {
379
  return $this->get_api_url();
380
  }
381
 
382
- return $this->get_api_url() . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
383
  }
384
 
385
  /**
@@ -853,7 +935,13 @@ class Licenser extends Abstract_Module {
853
  $this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
854
  $this->register_license_hooks();
855
  }
856
-
 
 
 
 
 
 
857
  $namespace = apply_filters( 'themesle_sdk_namespace_' . md5( $product->get_basefile() ), false );
858
 
859
  if ( false !== $namespace ) {
@@ -880,6 +968,20 @@ class Licenser extends Abstract_Module {
880
  );
881
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
882
  add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 ); //phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_args
 
 
 
 
 
 
 
 
 
 
 
 
 
 
883
 
884
  return $this;
885
  }
24
  * Licenser module for ThemeIsle SDK.
25
  */
26
  class Licenser extends Abstract_Module {
27
+ /**
28
+ * License VALID status string.
29
+ */
30
+ const STATUS_VALID = 'valid';
31
+ /**
32
+ * License NOT_ACTIVE status string.
33
+ */
34
+ const STATUS_NOT_ACTIVE = 'not_active';
35
+ /**
36
+ * License active expired status string.
37
+ */
38
+ const STATUS_ACTIVE_EXPIRED = 'active_expired';
39
  /**
40
  * Number of max failed checks before showing the license message.
41
  *
42
  * @var int $max_failed Maximum failed checks allowed before show the notice
43
  */
44
+ private static $max_failed = 1;
45
+ /**
46
+ * Flag to check if the global actions were loaded.
47
+ *
48
+ * @var bool If the globals actions were loaded.
49
+ */
50
+ private static $globals_loaded = false;
51
  /**
52
  * License key string.
53
  *
232
  return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
233
  }
234
 
235
+ /**
236
+ * Check status.
237
+ *
238
+ * @param string $product_file Product basefile.
239
+ *
240
+ * @return string Status license.
241
+ */
242
+ public static function status( $product_file ) {
243
+ $product = Product::get( $product_file );
244
+ if ( ! $product->requires_license() ) {
245
+ return self::STATUS_VALID;
246
+ }
247
+ $license_data = self::get_license_data( $product->get_key() );
248
+
249
+ $status = isset( $license_data->license ) ? $license_data->license : self::STATUS_NOT_ACTIVE;
250
+
251
+ return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
252
+ }
253
+
254
+ /**
255
+ * Product license data.
256
+ *
257
+ * @param string $key Product key.
258
+ *
259
+ * @return false|mixed|null
260
+ */
261
+ private static function get_license_data( $key ) {
262
+ $license_data = get_option( $key . '_license_data', '' );
263
+
264
+ return isset( $license_data->license ) ? $license_data : false;
265
+ }
266
+
267
+ /**
268
+ * Check if license is valid.
269
+ *
270
+ * @param string $product_file Product basefile.
271
+ *
272
+ * @return bool Is valid?
273
+ */
274
+ public static function is_valid( $product_file ) {
275
+ return self::status( $product_file ) === self::STATUS_VALID;
276
+ }
277
+
278
+ /**
279
+ * Get product plan.
280
+ *
281
+ * @param string $product_file Product file.
282
+ *
283
+ * @return int Plan id.
284
+ */
285
+ public static function plan( $product_file ) {
286
+ $product = Product::get( $product_file );
287
+ $data = self::get_license_data( $product->get_key() );
288
+
289
+ return isset( $data->price_id ) ? (int) $data->price_id : - 1;
290
+ }
291
+
292
+ /**
293
+ * Get product license key.
294
+ *
295
+ * @param string $product_file Product file.
296
+ *
297
+ * @return string
298
+ */
299
+ public static function key( $product_file ) {
300
+ $product = Product::get( $product_file );
301
+
302
+ return $product->get_license();
303
+ }
304
+
305
  /**
306
  * Return the last error message.
307
  *
343
  * @return int License plan.
344
  */
345
  public function get_plan() {
346
+ return self::plan( $this->product->get_basefile() );
 
 
 
 
 
347
  }
348
 
349
  /**
461
  return $this->get_api_url();
462
  }
463
 
464
+ return trim( $this->get_api_url(), '/' ) . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
465
  }
466
 
467
  /**
935
  $this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
936
  $this->register_license_hooks();
937
  }
938
+ if ( ! self::$globals_loaded ) {
939
+ add_filter( 'themeisle_sdk_license/status', [ __CLASS__, 'status' ], 999, 1 );
940
+ add_filter( 'themeisle_sdk_license/is-valid', [ __CLASS__, 'is_valid' ], 999, 1 );
941
+ add_filter( 'themeisle_sdk_license/plan', [ __CLASS__, 'plan' ], 999, 1 );
942
+ add_filter( 'themeisle_sdk_license/key', [ __CLASS__, 'key' ], 999, 1 );
943
+ $globals_loaded = true;
944
+ }
945
  $namespace = apply_filters( 'themesle_sdk_namespace_' . md5( $product->get_basefile() ), false );
946
 
947
  if ( false !== $namespace ) {
968
  );
969
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
970
  add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 ); //phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_args
971
+ if ( ! self::is_valid( $product->get_basefile() ) ) {
972
+ add_filter(
973
+ 'plugin_action_links_' . plugin_basename( $product->get_basefile() ),
974
+ function ( $actions ) {
975
+ if ( $this->get_license_status( true ) !== self::STATUS_ACTIVE_EXPIRED ) {
976
+ return $actions;
977
+ }
978
+ $new_actions['deactivate'] = $actions['deactivate'];
979
+ $new_actions['renew_link'] = '<a style="color:#d63638" href="' . esc_url( $this->renew_url() ) . '" target="_blank" rel="external noopener noreferrer">Renew license to update</a>';
980
+
981
+ return $new_actions;
982
+ }
983
+ );
984
+ }
985
 
986
  return $this;
987
  }
vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php CHANGED
@@ -65,11 +65,21 @@ class Promotions extends Abstract_Module {
65
  return;
66
  }
67
 
 
 
 
 
68
  $this->product = $product;
69
 
70
- if ( in_array( 'otter', $this->promotions_to_load ) && false === apply_filters( 'themeisle_sdk_load_promotions_otter', false ) && ! ( defined( 'OTTER_BLOCKS_VERSION' ) || $this->is_otter_installed() ) && version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) {
 
 
 
 
 
 
 
71
  add_filter( 'themeisle_sdk_load_promotions_otter', '__return_true' );
72
- add_action( 'init', array( $this, 'register_settings' ), 99 );
73
 
74
  if ( false !== $this->show_otter_promotion() ) {
75
  add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_assets' ) );
@@ -79,6 +89,23 @@ class Promotions extends Abstract_Module {
79
  return $this;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  /**
83
  * Register Settings
84
  *
@@ -96,21 +123,36 @@ class Promotions extends Abstract_Module {
96
  'default' => '{}',
97
  )
98
  );
 
 
 
 
 
 
 
 
 
 
 
99
  }
100
 
101
  /**
102
  * Get the Otter Blocks plugin status.
103
  *
 
 
104
  * @return string
105
  */
106
- private function is_otter_installed() {
107
- $status = false;
108
-
109
- if ( file_exists( ABSPATH . 'wp-content/plugins/otter-blocks/otter-blocks.php' ) ) {
 
 
110
  return true;
111
  }
112
 
113
- return $status;
114
  }
115
 
116
  /**
@@ -142,10 +184,26 @@ class Promotions extends Abstract_Module {
142
  return false;
143
  }
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  /**
146
  * Load Gutenberg editor assets.
147
  *
148
- * @since 1.0.0
149
  * @access public
150
  */
151
  public function enqueue_editor_assets() {
@@ -180,11 +238,12 @@ class Promotions extends Abstract_Module {
180
  'plugin_status' => 'all',
181
  'paged' => '1',
182
  'action' => 'activate',
 
183
  'plugin' => rawurlencode( 'otter-blocks/otter-blocks.php' ),
184
  '_wpnonce' => wp_create_nonce( 'activate-plugin_otter-blocks/otter-blocks.php' ),
185
  ),
186
- admin_url( 'plugins.php' )
187
- )
188
  ),
189
  )
190
  );
65
  return;
66
  }
67
 
68
+ if ( ! $this->is_writeable() || ! current_user_can( 'install_plugins' ) ) {
69
+ return;
70
+ }
71
+
72
  $this->product = $product;
73
 
74
+ add_action( 'init', array( $this, 'register_settings' ), 99 );
75
+ add_action( 'admin_init', array( $this, 'register_reference' ), 99 );
76
+
77
+ if ( in_array( 'otter', $this->promotions_to_load )
78
+ && false === apply_filters( 'themeisle_sdk_load_promotions_otter', false )
79
+ && ! ( defined( 'OTTER_BLOCKS_VERSION' )
80
+ || $this->is_plugin_installed( 'otter-blocks' ) )
81
+ && version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) {
82
  add_filter( 'themeisle_sdk_load_promotions_otter', '__return_true' );
 
83
 
84
  if ( false !== $this->show_otter_promotion() ) {
85
  add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_assets' ) );
89
  return $this;
90
  }
91
 
92
+ /**
93
+ * Register plugin reference.
94
+ *
95
+ * @return void
96
+ */
97
+ public function register_reference() {
98
+
99
+ $reference_key = ! isset( $_GET['reference_key'] ) ? '' : sanitize_key( $_GET['reference_key'] );
100
+ if ( empty( $reference_key ) ) {
101
+ return;
102
+ }
103
+ if ( get_option( 'otter_reference_key', false ) !== false ) {
104
+ return;
105
+ }
106
+ update_option( 'otter_reference_key', $reference_key );
107
+ }
108
+
109
  /**
110
  * Register Settings
111
  *
123
  'default' => '{}',
124
  )
125
  );
126
+
127
+ register_setting(
128
+ 'themeisle_sdk_settings',
129
+ 'themeisle_sdk_promotions_otter_installed',
130
+ array(
131
+ 'type' => 'boolean',
132
+ 'sanitize_callback' => 'rest_sanitize_boolean',
133
+ 'show_in_rest' => true,
134
+ 'default' => false,
135
+ )
136
+ );
137
  }
138
 
139
  /**
140
  * Get the Otter Blocks plugin status.
141
  *
142
+ * @param string $plugin Plugin slug.
143
+ *
144
  * @return string
145
  */
146
+ private function is_plugin_installed( $plugin ) {
147
+ static $allowed_keys = [ 'otter-blocks' => 'otter-blocks/otter-blocks.php' ];
148
+ if ( ! isset( $allowed_keys[ $plugin ] ) ) {
149
+ return false;
150
+ }
151
+ if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $allowed_keys[ $plugin ] ) ) {
152
  return true;
153
  }
154
 
155
+ return false;
156
  }
157
 
158
  /**
184
  return false;
185
  }
186
 
187
+ /**
188
+ * Check if the path is writable.
189
+ *
190
+ * @return boolean
191
+ * @access public
192
+ */
193
+ public function is_writeable() {
194
+
195
+ include_once ABSPATH . 'wp-admin/includes/file.php';
196
+ $filesystem_method = get_filesystem_method();
197
+
198
+ if ( 'direct' === $filesystem_method ) {
199
+ return true;
200
+ }
201
+ return false;
202
+ }
203
+
204
  /**
205
  * Load Gutenberg editor assets.
206
  *
 
207
  * @access public
208
  */
209
  public function enqueue_editor_assets() {
238
  'plugin_status' => 'all',
239
  'paged' => '1',
240
  'action' => 'activate',
241
+ 'reference_key' => $this->product->get_key(),
242
  'plugin' => rawurlencode( 'otter-blocks/otter-blocks.php' ),
243
  '_wpnonce' => wp_create_nonce( 'activate-plugin_otter-blocks/otter-blocks.php' ),
244
  ),
245
+ admin_url( 'plugins.php' )
246
+ )
247
  ),
248
  )
249
  );
vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php CHANGED
@@ -701,10 +701,11 @@ class Uninstall_Feedback extends Abstract_Module {
701
  $disclosure_new_labels = apply_filters( $this->product->get_slug() . '_themeisle_sdk_disclosure_content_labels', [], $this->product );
702
  $disclosure_labels = array_merge(
703
  [
704
- 'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
705
  'items' => [
706
  sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
707
  sprintf( '%sCurrent website:%s %s %s %s', '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ),
 
708
  sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
709
  ],
710
  ],
@@ -785,11 +786,12 @@ class Uninstall_Feedback extends Abstract_Module {
785
  * @return bool Is the request succesfull?
786
  */
787
  protected function call_api( $attributes ) {
788
- $slug = $this->product->get_slug();
789
- $version = $this->product->get_version();
790
- $attributes['slug'] = $slug;
791
- $attributes['version'] = $version;
792
- $attributes['url'] = get_site_url();
 
793
 
794
  $response = wp_remote_post(
795
  self::FEEDBACK_ENDPOINT,
701
  $disclosure_new_labels = apply_filters( $this->product->get_slug() . '_themeisle_sdk_disclosure_content_labels', [], $this->product );
702
  $disclosure_labels = array_merge(
703
  [
704
+ 'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No email address or IP addresses are transmitted after you submit the survey.',
705
  'items' => [
706
  sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
707
  sprintf( '%sCurrent website:%s %s %s %s', '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ),
708
+ sprintf( '%sUsage time:%s %s %s%s', '<strong>', '</strong>', '<code>', ( time() - $this->product->get_install_time() ), 's</code>' ),
709
  sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
710
  ],
711
  ],
786
  * @return bool Is the request succesfull?
787
  */
788
  protected function call_api( $attributes ) {
789
+ $slug = $this->product->get_slug();
790
+ $version = $this->product->get_version();
791
+ $attributes['slug'] = $slug;
792
+ $attributes['version'] = $version;
793
+ $attributes['url'] = get_site_url();
794
+ $attributes['active_time'] = ( time() - $this->product->get_install_time() );
795
 
796
  $response = wp_remote_post(
797
  self::FEEDBACK_ENDPOINT,
vendor/codeinwp/themeisle-sdk/src/Product.php CHANGED
@@ -106,10 +106,17 @@ class Product {
106
  * @var string $version The product version.
107
  */
108
  private $version;
 
 
 
 
 
 
109
  /**
110
  * Root api endpoint.
111
  */
112
  const API_URL = 'https://api.themeisle.com/';
 
113
  /**
114
  * ThemeIsle_SDK_Product constructor.
115
  *
@@ -128,8 +135,25 @@ class Product {
128
  $install = time();
129
  update_option( $this->get_key() . '_install', time() );
130
  }
131
- $this->install = $install;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
 
133
  }
134
 
135
  /**
106
  * @var string $version The product version.
107
  */
108
  private $version;
109
+ /**
110
+ * Holds a map of loaded products objects.
111
+ *
112
+ * @var array Array of loaded products.
113
+ */
114
+ private static $cached_products = [];
115
  /**
116
  * Root api endpoint.
117
  */
118
  const API_URL = 'https://api.themeisle.com/';
119
+
120
  /**
121
  * ThemeIsle_SDK_Product constructor.
122
  *
135
  $install = time();
136
  update_option( $this->get_key() . '_install', time() );
137
  }
138
+ $this->install = $install;
139
+ self::$cached_products[ crc32( $basefile ) ] = $this;
140
+ }
141
+
142
+ /**
143
+ * Return a product.
144
+ *
145
+ * @param string $basefile Product basefile.
146
+ *
147
+ * @return Product Product Object.
148
+ */
149
+ public static function get( $basefile ) {
150
+ $key = crc32( $basefile );
151
+ if ( isset( self::$cached_products[ $key ] ) ) {
152
+ return self::$cached_products[ $key ];
153
+ }
154
+ self::$cached_products[ $key ] = new Product( $basefile );
155
 
156
+ return self::$cached_products[ $key ];
157
  }
158
 
159
  /**
vendor/codeinwp/themeisle-sdk/start.php CHANGED
@@ -33,6 +33,7 @@ $files_to_load = [
33
  $themeisle_library_path . '/src/Modules/Review.php',
34
  $themeisle_library_path . '/src/Modules/Recommendation.php',
35
  $themeisle_library_path . '/src/Modules/Promotions.php',
 
36
  ];
37
 
38
  $files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
@@ -42,7 +43,6 @@ foreach ( $files_to_load as $file ) {
42
  require_once $file;
43
  }
44
  }
45
-
46
  Loader::init();
47
 
48
  foreach ( $products as $product ) {
33
  $themeisle_library_path . '/src/Modules/Review.php',
34
  $themeisle_library_path . '/src/Modules/Recommendation.php',
35
  $themeisle_library_path . '/src/Modules/Promotions.php',
36
+ $themeisle_library_path . '/src/Modules/Compatibilities.php',
37
  ];
38
 
39
  $files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
43
  require_once $file;
44
  }
45
  }
 
46
  Loader::init();
47
 
48
  foreach ( $products as $product ) {
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit73dcac62702aa48b2e533439663a28aa
6
  {
7
  private static $loader;
8
 
@@ -22,18 +22,18 @@ class ComposerAutoloaderInit73dcac62702aa48b2e533439663a28aa
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit73dcac62702aa48b2e533439663a28aa', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
- spl_autoload_unregister(array('ComposerAutoloaderInit73dcac62702aa48b2e533439663a28aa', 'loadClassLoader'));
28
 
29
  require __DIR__ . '/autoload_static.php';
30
- call_user_func(\Composer\Autoload\ComposerStaticInit73dcac62702aa48b2e533439663a28aa::getInitializer($loader));
31
 
32
  $loader->register(true);
33
 
34
- $includeFiles = \Composer\Autoload\ComposerStaticInit73dcac62702aa48b2e533439663a28aa::$files;
35
  foreach ($includeFiles as $fileIdentifier => $file) {
36
- composerRequire73dcac62702aa48b2e533439663a28aa($fileIdentifier, $file);
37
  }
38
 
39
  return $loader;
@@ -45,7 +45,7 @@ class ComposerAutoloaderInit73dcac62702aa48b2e533439663a28aa
45
  * @param string $file
46
  * @return void
47
  */
48
- function composerRequire73dcac62702aa48b2e533439663a28aa($fileIdentifier, $file)
49
  {
50
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
51
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInita31e0d940a95177a20aa598bfdf190f6
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInita31e0d940a95177a20aa598bfdf190f6', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInita31e0d940a95177a20aa598bfdf190f6', 'loadClassLoader'));
28
 
29
  require __DIR__ . '/autoload_static.php';
30
+ call_user_func(\Composer\Autoload\ComposerStaticInita31e0d940a95177a20aa598bfdf190f6::getInitializer($loader));
31
 
32
  $loader->register(true);
33
 
34
+ $includeFiles = \Composer\Autoload\ComposerStaticInita31e0d940a95177a20aa598bfdf190f6::$files;
35
  foreach ($includeFiles as $fileIdentifier => $file) {
36
+ composerRequirea31e0d940a95177a20aa598bfdf190f6($fileIdentifier, $file);
37
  }
38
 
39
  return $loader;
45
  * @param string $file
46
  * @return void
47
  */
48
+ function composerRequirea31e0d940a95177a20aa598bfdf190f6($fileIdentifier, $file)
49
  {
50
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
51
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit73dcac62702aa48b2e533439663a28aa
8
  {
9
  public static $files = array (
10
  '7c3f92ec501ce72fe4f09265dc506991' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
@@ -17,7 +17,7 @@ class ComposerStaticInit73dcac62702aa48b2e533439663a28aa
17
  public static function getInitializer(ClassLoader $loader)
18
  {
19
  return \Closure::bind(function () use ($loader) {
20
- $loader->classMap = ComposerStaticInit73dcac62702aa48b2e533439663a28aa::$classMap;
21
 
22
  }, null, ClassLoader::class);
23
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInita31e0d940a95177a20aa598bfdf190f6
8
  {
9
  public static $files = array (
10
  '7c3f92ec501ce72fe4f09265dc506991' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
17
  public static function getInitializer(ClassLoader $loader)
18
  {
19
  return \Closure::bind(function () use ($loader) {
20
+ $loader->classMap = ComposerStaticInita31e0d940a95177a20aa598bfdf190f6::$classMap;
21
 
22
  }, null, ClassLoader::class);
23
  }
vendor/composer/installed.json CHANGED
@@ -2,23 +2,23 @@
2
  "packages": [
3
  {
4
  "name": "codeinwp/themeisle-sdk",
5
- "version": "3.2.27",
6
- "version_normalized": "3.2.27.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
10
- "reference": "bab0314e1f6e2f811116a2da7736b94cbe6af90f"
11
  },
12
  "dist": {
13
  "type": "zip",
14
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/bab0314e1f6e2f811116a2da7736b94cbe6af90f",
15
- "reference": "bab0314e1f6e2f811116a2da7736b94cbe6af90f",
16
  "shasum": ""
17
  },
18
  "require-dev": {
19
  "codeinwp/phpcs-ruleset": "dev-main"
20
  },
21
- "time": "2022-08-23T13:09:40+00:00",
22
  "type": "library",
23
  "installation-source": "dist",
24
  "notification-url": "https://packagist.org/downloads/",
@@ -39,7 +39,7 @@
39
  ],
40
  "support": {
41
  "issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
42
- "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.27"
43
  },
44
  "install-path": "../codeinwp/themeisle-sdk"
45
  }
2
  "packages": [
3
  {
4
  "name": "codeinwp/themeisle-sdk",
5
+ "version": "3.2.30",
6
+ "version_normalized": "3.2.30.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
10
+ "reference": "7239104ae452b13cd6d506d44e8fc127232d35ce"
11
  },
12
  "dist": {
13
  "type": "zip",
14
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/7239104ae452b13cd6d506d44e8fc127232d35ce",
15
+ "reference": "7239104ae452b13cd6d506d44e8fc127232d35ce",
16
  "shasum": ""
17
  },
18
  "require-dev": {
19
  "codeinwp/phpcs-ruleset": "dev-main"
20
  },
21
+ "time": "2022-09-15T19:54:34+00:00",
22
  "type": "library",
23
  "installation-source": "dist",
24
  "notification-url": "https://packagist.org/downloads/",
39
  ],
40
  "support": {
41
  "issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
42
+ "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.30"
43
  },
44
  "install-path": "../codeinwp/themeisle-sdk"
45
  }
vendor/composer/installed.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php return array(
2
  'root' => array(
3
  'name' => 'codeinwp/wp-maintenance-mode',
4
- 'pretty_version' => '2.5.1',
5
- 'version' => '2.5.1.0',
6
  'reference' => NULL,
7
  'type' => 'wordpress-plugin',
8
  'install_path' => __DIR__ . '/../../',
@@ -11,17 +11,17 @@
11
  ),
12
  'versions' => array(
13
  'codeinwp/themeisle-sdk' => array(
14
- 'pretty_version' => '3.2.27',
15
- 'version' => '3.2.27.0',
16
- 'reference' => 'bab0314e1f6e2f811116a2da7736b94cbe6af90f',
17
  'type' => 'library',
18
  'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
19
  'aliases' => array(),
20
  'dev_requirement' => false,
21
  ),
22
  'codeinwp/wp-maintenance-mode' => array(
23
- 'pretty_version' => '2.5.1',
24
- 'version' => '2.5.1.0',
25
  'reference' => NULL,
26
  'type' => 'wordpress-plugin',
27
  'install_path' => __DIR__ . '/../../',
1
  <?php return array(
2
  'root' => array(
3
  'name' => 'codeinwp/wp-maintenance-mode',
4
+ 'pretty_version' => '2.5.2',
5
+ 'version' => '2.5.2.0',
6
  'reference' => NULL,
7
  'type' => 'wordpress-plugin',
8
  'install_path' => __DIR__ . '/../../',
11
  ),
12
  'versions' => array(
13
  'codeinwp/themeisle-sdk' => array(
14
+ 'pretty_version' => '3.2.30',
15
+ 'version' => '3.2.30.0',
16
+ 'reference' => '7239104ae452b13cd6d506d44e8fc127232d35ce',
17
  'type' => 'library',
18
  'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
19
  'aliases' => array(),
20
  'dev_requirement' => false,
21
  ),
22
  'codeinwp/wp-maintenance-mode' => array(
23
+ 'pretty_version' => '2.5.2',
24
+ 'version' => '2.5.2.0',
25
  'reference' => NULL,
26
  'type' => 'wordpress-plugin',
27
  'install_path' => __DIR__ . '/../../',
views/maintenance.php CHANGED
@@ -54,13 +54,13 @@ if ( isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_n
54
  if ( ! empty( $text ) ) {
55
  $allowed_html = wp_kses_allowed_html( 'post' );
56
 
57
- $allowed_html['form'] = array(
58
  'id' => array(),
59
  'class' => array(),
60
  'action' => array(),
61
  'method' => array(),
62
  );
63
- $allowed_html['input'] = array(
64
  'type' => array(),
65
  'id' => array(),
66
  'name' => array(),
@@ -68,6 +68,14 @@ if ( isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_n
68
  'class' => array(),
69
  'placeholder' => array(),
70
  );
 
 
 
 
 
 
 
 
71
  ?>
72
  <!-- Text -->
73
  <h2><?php echo wp_kses( $text, $allowed_html ); ?></h2>
54
  if ( ! empty( $text ) ) {
55
  $allowed_html = wp_kses_allowed_html( 'post' );
56
 
57
+ $allowed_html['form'] = array(
58
  'id' => array(),
59
  'class' => array(),
60
  'action' => array(),
61
  'method' => array(),
62
  );
63
+ $allowed_html['input'] = array(
64
  'type' => array(),
65
  'id' => array(),
66
  'name' => array(),
68
  'class' => array(),
69
  'placeholder' => array(),
70
  );
71
+ $allowed_html['iframe'] = array(
72
+ 'src' => array(),
73
+ 'height' => array(),
74
+ 'width' => array(),
75
+ 'frameborder' => array(),
76
+ 'allowfullscreen' => array(),
77
+ 'data-*' => true,
78
+ );
79
  ?>
80
  <!-- Text -->
81
  <h2><?php echo wp_kses( $text, $allowed_html ); ?></h2>
views/settings.php CHANGED
@@ -8,6 +8,9 @@
8
  defined( 'ABSPATH' ) || exit;
9
 
10
  $is_old_version = version_compare( $GLOBALS['wp_version'], '5.8', '<' );
 
 
 
11
  ?>
12
  <div class="wrap">
13
  <h2 class="wpmm-title"><?php echo esc_html( get_admin_page_title() ); ?>
@@ -203,7 +206,7 @@ $is_old_version = version_compare( $GLOBALS['wp_version'], '5.8', '<' );
203
  $exclude_list = ! empty( $this->plugin_settings['general']['exclude'] ) && is_array( $this->plugin_settings['general']['exclude'] ) ? $this->plugin_settings['general']['exclude'] : array();
204
  ?>
205
  <textarea rows="7" name="options[general][exclude]" style="width: 625px;"><?php echo esc_textarea( implode( "\n", $exclude_list ) ); ?></textarea>
206
- <p class="description"><?php esc_html_e( 'Exclude feed, pages, archives or IPs from maintenance mode. Add one slug / IP per line!', 'wp-maintenance-mode' ); ?></p>
207
  </td>
208
  </tr>
209
  <tr valign="top">
8
  defined( 'ABSPATH' ) || exit;
9
 
10
  $is_old_version = version_compare( $GLOBALS['wp_version'], '5.8', '<' );
11
+ if ( ! isset( $this->plugin_settings['design']['page_id'] ) ) {
12
+ $this->plugin_settings['design']['page_id'] = 0;
13
+ }
14
  ?>
15
  <div class="wrap">
16
  <h2 class="wpmm-title"><?php echo esc_html( get_admin_page_title() ); ?>
206
  $exclude_list = ! empty( $this->plugin_settings['general']['exclude'] ) && is_array( $this->plugin_settings['general']['exclude'] ) ? $this->plugin_settings['general']['exclude'] : array();
207
  ?>
208
  <textarea rows="7" name="options[general][exclude]" style="width: 625px;"><?php echo esc_textarea( implode( "\n", $exclude_list ) ); ?></textarea>
209
+ <p class="description"><?php esc_html_e( 'Exclude feed, pages, archives or IPs from maintenance mode. Add one slug / IP per line! Comments start with # and can be appended at the end of a line.', 'wp-maintenance-mode' ); ?></p>
210
  </td>
211
  </tr>
212
  <tr valign="top">
wp-maintenance-mode.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Plugin Name: WP Maintenance Mode & Coming Soon
6
  * Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
7
- * Version: 2.5.1
8
  * Author: Themeisle
9
  * Author URI: https://themeisle.com/
10
  * Twitter: themeisle
4
  *
5
  * Plugin Name: WP Maintenance Mode & Coming Soon
6
  * Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
7
+ * Version: 2.5.2
8
  * Author: Themeisle
9
  * Author URI: https://themeisle.com/
10
  * Twitter: themeisle