Enhanced Text Widget - Version 1.5.6

Version Description

  • Adjusted PHP compatibility
Download this release

Release Info

Developer iclyde
Plugin Icon wp plugin Enhanced Text Widget
Version 1.5.6
Comparing to
See all releases

Code changes from version 1.5.5 to 1.5.6

analyst/main.php CHANGED
@@ -15,7 +15,7 @@ if (!function_exists('analyst_init')) {
15
  try {
16
  analyst_resolve_sdk($options['base-dir']);
17
  } catch (Exception $exception) {
18
- error_log('[ANALYST] Cannot resolve any supported SDK');
19
  return;
20
  }
21
 
@@ -30,7 +30,7 @@ if (!function_exists('analyst_init')) {
30
 
31
  $analyst->registerAccount(new Account\Account($options['client-id'], $options['client-secret'], $options['base-dir']));
32
  } catch (Exception $e) {
33
- error_log('Analyst SDK receive an error: [' . $e->getMessage() . '] Please contact our support at support@analyst.com');
34
  }
35
  }
36
  }
15
  try {
16
  analyst_resolve_sdk($options['base-dir']);
17
  } catch (Exception $exception) {
18
+ // error_log('[ANALYST] Cannot resolve any supported SDK');
19
  return;
20
  }
21
 
30
 
31
  $analyst->registerAccount(new Account\Account($options['client-id'], $options['client-secret'], $options['base-dir']));
32
  } catch (Exception $e) {
33
+ // error_log('Analyst SDK receive an error: [' . $e->getMessage() . '] Please contact our support at support@analyst.com');
34
  }
35
  }
36
  }
analyst/src/Account/Account.php CHANGED
@@ -243,8 +243,8 @@ class Account implements TrackerContract
243
  {
244
  if (!$this->isAllowingLogging()) return;
245
 
246
- $question = isset($_POST['question']) ? stripslashes($_POST['question']) : null;
247
- $reason = isset($_POST['reason']) ? stripslashes($_POST['reason']) : null;
248
 
249
  DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
  ->execute($this->requestor);
243
  {
244
  if (!$this->isAllowingLogging()) return;
245
 
246
+ $question = isset($_POST['question']) ? sanitize_text_field(stripslashes($_POST['question'])) : null;
247
+ $reason = isset($_POST['reason']) ? sanitize_text_field(stripslashes($_POST['reason'])) : null;
248
 
249
  DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
  ->execute($this->requestor);
analyst/src/Analyst.php CHANGED
@@ -65,9 +65,7 @@ class Analyst implements AnalystContract
65
 
66
  $this->accountDataFactory = AccountDataFactory::instance();
67
 
68
- if(strpos($_SERVER['REQUEST_URI'], 'plugin') !== false) {
69
- $this->mutator->initialize();
70
- }
71
 
72
  $this->collector = new Collector($this);
73
 
65
 
66
  $this->accountDataFactory = AccountDataFactory::instance();
67
 
68
+ $this->mutator->initialize();
 
 
69
 
70
  $this->collector = new Collector($this);
71
 
analyst/src/Collector.php CHANGED
@@ -153,7 +153,7 @@ class Collector
153
  */
154
  public function getServerIp()
155
  {
156
- return $_SERVER['SERVER_ADDR'];
157
  }
158
 
159
  /**
153
  */
154
  public function getServerIp()
155
  {
156
+ return sanitize_text_field($_SERVER['SERVER_ADDR']);
157
  }
158
 
159
  /**
analyst/src/Core/AbstractFactory.php CHANGED
@@ -12,7 +12,7 @@ abstract class AbstractFactory
12
  */
13
  protected static function unserialize($raw)
14
  {
15
- $instance = @unserialize($raw);
16
 
17
  $isProperObject = is_object($instance) && $instance instanceof static;
18
 
12
  */
13
  protected static function unserialize($raw)
14
  {
15
+ $instance = maybe_unserialize($raw);
16
 
17
  $isProperObject = is_object($instance) && $instance instanceof static;
18
 
analyst/src/Mutator.php CHANGED
@@ -60,10 +60,10 @@ class Mutator
60
 
61
  analyst_require_template('optin.php');
62
 
63
- analyst_require_template('forms/deactivate.php', [
64
- 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
- 'smileImage' => analyst_assets_url('img/smile.png'),
66
- ]);
67
 
68
  analyst_require_template('forms/install.php', [
69
  'pluginToInstall' => $this->cache->get('plugin_to_install'),
@@ -95,7 +95,7 @@ class Mutator
95
  public function registerHooks()
96
  {
97
  add_action('wp_ajax_analyst_notification_dismiss', function () {
98
- $this->factory->remove($_POST['id']);
99
 
100
  $this->factory->sync();
101
  });
60
 
61
  analyst_require_template('optin.php');
62
 
63
+ // analyst_require_template('forms/deactivate.php', [
64
+ // 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
+ // 'smileImage' => analyst_assets_url('img/smile.png'),
66
+ // ]);
67
 
68
  analyst_require_template('forms/install.php', [
69
  'pluginToInstall' => $this->cache->get('plugin_to_install'),
95
  public function registerHooks()
96
  {
97
  add_action('wp_ajax_analyst_notification_dismiss', function () {
98
+ $this->factory->remove(sanitize_text_field($_POST['id']));
99
 
100
  $this->factory->sync();
101
  });
analyst/templates/forms/deactivate.php CHANGED
@@ -3,12 +3,12 @@
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-deactivate-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 80px">
6
- <img src="<?=$pencilImage?>"/>
7
  </div>
8
  <div class="analyst-install-description-block" style="padding-left: 20px">
9
  <strong class="analyst-modal-header">Why do you deactivate?</strong>
10
  <div class="analyst-install-description-text" style="padding-top: 2px">
11
- Please let us know, so we can improve it! Thank you <img class="analyst-smile-image" src="<?=$smileImage?>" alt="">
12
  </div>
13
  </div>
14
  </div>
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-deactivate-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 80px">
6
+ <img src="<?php echo $pencilImage; ?>"/>
7
  </div>
8
  <div class="analyst-install-description-block" style="padding-left: 20px">
9
  <strong class="analyst-modal-header">Why do you deactivate?</strong>
10
  <div class="analyst-install-description-text" style="padding-top: 2px">
11
+ Please let us know, so we can improve it! Thank you <img class="analyst-smile-image" src="<?php echo $smileImage; ?>" alt="">
12
  </div>
13
  </div>
14
  </div>
analyst/templates/forms/install.php CHANGED
@@ -1,20 +1,20 @@
1
- <div id="analyst-install-modal" class="analyst-modal" style="display: none" analyst-plugin-id="<?=$pluginToInstall?>">
2
  <div class="analyst-modal-content" style="width: 450px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-install-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block">
6
- <img src="<?=$shieldImage?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">Stay on the safe side</strong>
10
  <p class="analyst-install-description-text">Receive our plugin’s alerts in
11
- case of <strong>critical security</strong> & feature
12
  updates and allow non-sensitive
13
  diagnostic tracking.</p>
14
  </div>
15
  </div>
16
  <div class="analyst-modal-def-top-padding">
17
- <button class="analyst-btn-success" id="analyst-install-action">Allow & Continue ></button>
18
  </div>
19
  <div class="analyst-modal-def-top-padding" id="analyst-permissions-block" style="display: none">
20
  <span>You’re granting these permissions:</span>
1
+ <div id="analyst-install-modal" class="analyst-modal" style="display: none" analyst-plugin-id="<?php echo $pluginToInstall; ?>">
2
  <div class="analyst-modal-content" style="width: 450px">
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-install-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block">
6
+ <img src="<?php echo $shieldImage; ?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">Stay on the safe side</strong>
10
  <p class="analyst-install-description-text">Receive our plugin’s alerts in
11
+ case of <strong>critical security</strong>, feature & special deal
12
  updates and allow non-sensitive
13
  diagnostic tracking.</p>
14
  </div>
15
  </div>
16
  <div class="analyst-modal-def-top-padding">
17
+ <button class="analyst-btn-success" id="analyst-install-action">Allow & Continue &gt;</button>
18
  </div>
19
  <div class="analyst-modal-def-top-padding" id="analyst-permissions-block" style="display: none">
20
  <span>You’re granting these permissions:</span>
analyst/templates/notice.php CHANGED
@@ -1,10 +1,10 @@
1
  <div class="notice notice-success analyst-notice">
2
  <p>
3
- <strong class="analyst-plugin-name"><?=$notice->getPluginName()?></strong>
4
- <?=$notice->getBody()?>
5
  </p>
6
 
7
- <button type="button" class="analyst-notice-dismiss notice-dismiss" analyst-notice-id="<?=$notice->getId()?>">
8
  <span class="screen-reader-text">Dismiss this notice.</span>
9
  </button>
10
  </div>
1
  <div class="notice notice-success analyst-notice">
2
  <p>
3
+ <strong class="analyst-plugin-name"><?php echo $notice->getPluginName(); ?></strong>
4
+ <?php echo $notice->getBody(); ?>
5
  </p>
6
 
7
+ <button type="button" class="analyst-notice-dismiss notice-dismiss" analyst-notice-id="<?php echo $notice->getId(); ?>">
8
  <span class="screen-reader-text">Dismiss this notice.</span>
9
  </button>
10
  </div>
analyst/templates/optout.php CHANGED
@@ -3,7 +3,7 @@
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-opt-out-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 120px">
6
- <img src="<?=$shieldImage?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">By opting out, we cannot alert you anymore in case of important security updates.</strong>
3
  <div class="analyst-disable-modal-mask" id="analyst-disable-opt-out-modal-mask" style="display: none"></div>
4
  <div style="display: flex">
5
  <div class="analyst-install-image-block" style="width: 120px">
6
+ <img src="<?php echo $shieldImage; ?>"/>
7
  </div>
8
  <div class="analyst-install-description-block">
9
  <strong class="analyst-modal-header">By opting out, we cannot alert you anymore in case of important security updates.</strong>
enhanced-text-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Enhanced Text Widget
4
  Plugin URI: http://wordpress.org/plugins/enhanced-text-widget/
5
  Description: An enhanced version of the default text widget where you may have Text, HTML, CSS, JavaScript, Flash, Shortcodes, and/or PHP as content with linkable widget title.
6
- Version: 1.5.5
7
  Author: Clever Widgets
8
  Author URI: https://themecheck.info
9
  Text Domain: enhanced-text-widget
3
  Plugin Name: Enhanced Text Widget
4
  Plugin URI: http://wordpress.org/plugins/enhanced-text-widget/
5
  Description: An enhanced version of the default text widget where you may have Text, HTML, CSS, JavaScript, Flash, Shortcodes, and/or PHP as content with linkable widget title.
6
+ Version: 1.5.6
7
  Author: Clever Widgets
8
  Author URI: https://themecheck.info
9
  Text Domain: enhanced-text-widget
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://sellcodes.com/5U4SICyc
4
  Tags: widget, clickable, linkable, linked title, text, php, javascript, flash, linked title text, linked, text widget, php widget, link widget title, bare widget, widget shortcodes, enhanced text, better text widget, simple, html widget, css
5
  Requires at least: 3.6
6
  Tested up to: 6.1
7
- Stable tag: 1.5.5
8
  License: MIT
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -57,6 +57,10 @@ Nothing right now.
57
  1. Widget options
58
 
59
  == Changelog ==
 
 
 
 
60
  = 1.5.5 =
61
  * Added try it out module
62
 
@@ -140,8 +144,5 @@ Nothing right now.
140
  * First release.
141
 
142
  == Upgrade Notice ==
143
- = 1.5.5 =
144
- * Tested up to WordPress 6.1-RC5
145
- * Updated try it out URL in readme
146
- * Adjusted carrousel module
147
- * Added try it out module
4
  Tags: widget, clickable, linkable, linked title, text, php, javascript, flash, linked title text, linked, text widget, php widget, link widget title, bare widget, widget shortcodes, enhanced text, better text widget, simple, html widget, css
5
  Requires at least: 3.6
6
  Tested up to: 6.1
7
+ Stable tag: 1.5.6
8
  License: MIT
9
  License URI: http://opensource.org/licenses/MIT
10
 
57
  1. Widget options
58
 
59
  == Changelog ==
60
+
61
+ = 1.5.6 =
62
+ * Adjusted PHP compatibility
63
+
64
  = 1.5.5 =
65
  * Added try it out module
66
 
144
  * First release.
145
 
146
  == Upgrade Notice ==
147
+ = 1.5.6 =
148
+ * Adjusted PHP compatibility