Dynamic Widgets - Version 1.5.14

Version Description

When you upgrade manually, do a deactivate - activate cycle of the plugin.

This version has 1 bug fixed.

Download this release

Release Info

Developer qurl
Plugin Icon wp plugin Dynamic Widgets
Version 1.5.14
Comparing to
See all releases

Code changes from version 1.5.13 to 1.5.14

classes/dynwid_class.php CHANGED
@@ -635,15 +635,24 @@
635
  return $results;
636
  }
637
 
 
 
 
 
 
638
  private function getHostname() {
639
- $server_name = $_SERVER['SERVER_NAME'];
640
- $hostname = $_SERVER['HTTP_HOST'];
 
 
 
 
 
641
 
642
- if (! empty($hostname) && $hostname != $server_name ) {
643
- return $hostname;
644
  }
645
 
646
- return $server_name;
647
  }
648
 
649
  private function getIP() {
635
  return $results;
636
  }
637
 
638
+ /**
639
+ * dynWid::getHostname() Get Hostname
640
+ *
641
+ * @return string|null
642
+ */
643
  private function getHostname() {
644
+ if ( php_sapi_name() !== 'cli' ) {
645
+ $server_name = $_SERVER['SERVER_NAME'];
646
+ $hostname = $_SERVER['HTTP_HOST'];
647
+
648
+ if (! empty($hostname) && $hostname != $server_name ) {
649
+ return $hostname;
650
+ }
651
 
652
+ return $server_name;
 
653
  }
654
 
655
+ return NULL;
656
  }
657
 
658
  private function getIP() {
dynamic-widgets.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://dynamic-widgets.com/
5
  * Description: Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly show or hide widgets on WordPress pages.
6
  * Author: Qurl
7
- * Version: 1.5.13
8
  * Author URI: http://www.qurl.nl/
9
  * Tags: widget, widgets, dynamic, sidebar, custom, rules, logic, admin, condition, conditional tags, hide, show, wpml, qtranslate, wpec, buddypress, pods
10
  *
@@ -15,7 +15,7 @@
15
  *
16
  * Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
17
  *
18
- * @version $Id: dynamic-widgets.php 1712211 2017-08-11 17:00:21Z qurl $
19
  * @copyright 2017 Jacco Drabbe
20
  *
21
  * Thanks to Alexis Nomine for the contribution of the French (fr_FR) language files, several L10N fixes and change of the edit options UI.
@@ -36,6 +36,7 @@
36
  * Thanks to Nathan Wright of NW Consulting for the financial contribution to implement the shortcode filter feature.
37
  * Thanks to Mike Epstein to find a vulnerability in the DW settings.
38
  * Thanks to HANNA instruments for the financial contribution to implement the domain name / server name filter feature.
 
39
  *
40
  *
41
  * WPML Plugin support via API
@@ -82,7 +83,7 @@
82
  define('DW_PLUGIN', dirname(__FILE__) . '/' . 'plugin/');
83
  define('DW_TIME_LIMIT', 86400); // 1 day
84
  define('DW_URL_AUTHOR', 'http://www.qurl.nl');
85
- define('DW_VERSION', '1.5.13');
86
  define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
87
  define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
88
 
4
  * Plugin URI: http://dynamic-widgets.com/
5
  * Description: Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly show or hide widgets on WordPress pages.
6
  * Author: Qurl
7
+ * Version: 1.5.14
8
  * Author URI: http://www.qurl.nl/
9
  * Tags: widget, widgets, dynamic, sidebar, custom, rules, logic, admin, condition, conditional tags, hide, show, wpml, qtranslate, wpec, buddypress, pods
10
  *
15
  *
16
  * Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
17
  *
18
+ * @version $Id: dynamic-widgets.php 2032225 2019-02-16 17:53:18Z qurl $
19
  * @copyright 2017 Jacco Drabbe
20
  *
21
  * Thanks to Alexis Nomine for the contribution of the French (fr_FR) language files, several L10N fixes and change of the edit options UI.
36
  * Thanks to Nathan Wright of NW Consulting for the financial contribution to implement the shortcode filter feature.
37
  * Thanks to Mike Epstein to find a vulnerability in the DW settings.
38
  * Thanks to HANNA instruments for the financial contribution to implement the domain name / server name filter feature.
39
+ * Thanks to WordPress formm user @fjaeker for finding and debugging a problem in the Pages module since WordPress 5.
40
  *
41
  *
42
  * WPML Plugin support via API
83
  define('DW_PLUGIN', dirname(__FILE__) . '/' . 'plugin/');
84
  define('DW_TIME_LIMIT', 86400); // 1 day
85
  define('DW_URL_AUTHOR', 'http://www.qurl.nl');
86
+ define('DW_VERSION', '1.5.14');
87
  define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
88
  define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
89
 
dynwid_admin_edit.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * dynwid_admin_edit.php - Options settings
4
  *
5
- * @version $Id: dynwid_admin_edit.php 1698398 2017-07-18 19:34:08Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
@@ -22,8 +22,8 @@
22
  $GLOBALS['widget_id'] = $widget_id;
23
 
24
  if (! array_key_exists($widget_id, $DW->registered_widgets) ) {
25
- wp_die('WidgetID is not valid');
26
- }
27
  ?>
28
 
29
  <style type="text/css">
2
  /**
3
  * dynwid_admin_edit.php - Options settings
4
  *
5
+ * @version $Id: dynwid_admin_edit.php 2032225 2019-02-16 17:53:18Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
22
  $GLOBALS['widget_id'] = $widget_id;
23
 
24
  if (! array_key_exists($widget_id, $DW->registered_widgets) ) {
25
+ wp_die('WidgetID is not valid');
26
+ }
27
  ?>
28
 
29
  <style type="text/css">
dynwid_admin_save.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * dynwid_admin_save.php - Saving options to the database
4
  *
5
- * @version $Id: dynwid_admin_save.php 1698398 2017-07-18 19:34:08Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
@@ -321,8 +321,8 @@
321
  $_POST['page_act'] = array();
322
  }
323
 
324
- $DW->addMultiOption($widget_id, 'page', $_POST['page'], $_POST['page_act']);
325
- } else if ( $_POST['page'] == 'no' ) {
326
  $DW->addSingleOption($widget_id, 'page');
327
  }
328
 
2
  /**
3
  * dynwid_admin_save.php - Saving options to the database
4
  *
5
+ * @version $Id: dynwid_admin_save.php 2032225 2019-02-16 17:53:18Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
321
  $_POST['page_act'] = array();
322
  }
323
 
324
+ $DW->addMultiOption($widget_id, 'page', $_POST['pg'], $_POST['page_act']);
325
+ } else if ( $_POST['pg'] == 'no' ) {
326
  $DW->addSingleOption($widget_id, 'page');
327
  }
328
 
mods/pages_module.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Pages Module
4
  *
5
- * @version $Id: pages_module.php 1095126 2015-02-20 12:59:35Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
@@ -61,7 +61,7 @@
61
  }
62
  self::$info = $childs_infotext;
63
  self::GUIHeader(self::$option[self::$name], self::$question, self::$info);
64
- self::GUIOption();
65
 
66
  if ( $num_pages > 0 ) {
67
  $DW->dumpOpt(self::$opt_page_childs);
2
  /**
3
  * Pages Module
4
  *
5
+ * @version $Id: pages_module.php 2032225 2019-02-16 17:53:18Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
61
  }
62
  self::$info = $childs_infotext;
63
  self::GUIHeader(self::$option[self::$name], self::$question, self::$info);
64
+ self::GUIOption('pg');
65
 
66
  if ( $num_pages > 0 ) {
67
  $DW->dumpOpt(self::$opt_page_childs);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Qurl
3
  Donate link: http://www.qurl.nl/dynamic-widgets/donate/
4
  Tags: widget, dynamic, sidebar, custom, rules, logic, display, condition, hide, show
5
  Requires at least: 3.0.0
6
- Tested up to: 4.8
7
- Stable tag: 1.5.13
8
 
9
  Dynamic Widgets gives you full control on which pages a widget will display. It lets you dynamicly show or hide widgets on WordPress pages.
10
 
@@ -192,6 +192,10 @@ Please check the [Issue Tracker](http://www.qurl.nl/dynamic-widgets/issue-tracke
192
 
193
  == Changelog ==
194
 
 
 
 
 
195
  = Version 1.5.13 =
196
 
197
  * Widened the database fields
@@ -476,13 +480,16 @@ This version has 1 new feature and 1 bug fixed. See the changelog for details.
476
 
477
  == Upgrade Notice ==
478
 
479
- = 1.5.13 =
480
- When you upgrade manually, remove the dynamic-widgets directory first.
481
 
482
- This version has 1 feature added, 1 language added and 3 bugs fixed.
483
 
484
  == Screenshots ==
485
 
486
  1. Widgets overview page
487
  2. Widget Options page
488
  3. Widget with Dynamic Widgets info and link
 
 
 
 
3
  Donate link: http://www.qurl.nl/dynamic-widgets/donate/
4
  Tags: widget, dynamic, sidebar, custom, rules, logic, display, condition, hide, show
5
  Requires at least: 3.0.0
6
+ Tested up to: 5.0
7
+ Stable tag: 1.5.14
8
 
9
  Dynamic Widgets gives you full control on which pages a widget will display. It lets you dynamicly show or hide widgets on WordPress pages.
10
 
192
 
193
  == Changelog ==
194
 
195
+ = Version 1.5.14 =
196
+
197
+ * Bugfix for a problem introduced in WordPress 5 when using the Pages module. Kudo's to @fjaeker for doing debugging for this!
198
+
199
  = Version 1.5.13 =
200
 
201
  * Widened the database fields
480
 
481
  == Upgrade Notice ==
482
 
483
+ When you upgrade manually, do a deactivate - activate cycle of the plugin.
 
484
 
485
+ This version has 1 bug fixed.
486
 
487
  == Screenshots ==
488
 
489
  1. Widgets overview page
490
  2. Widget Options page
491
  3. Widget with Dynamic Widgets info and link
492
+
493
+ == Privacy Policy ==
494
+
495
+ Dynamic Widgets does not collect any private data, nor does it send any private data to remote servers. Please be aware that widgets might do. Dynamic Widgets does not read, write or alter contents or functionality of a widget it self, so this is beyond the scope and control of Dynamic Widgets.