Dynamic Widgets - Version 1.1.1

Version Description

Be sure to deactivate Dynamic Widgets Plugin before installing the new version following steps 1 and 2 in the installation procedure. After the install you can re-activate the plugin.

Download this release

Release Info

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

Code changes from version 1.1 to 1.1.1

Files changed (4) hide show
  1. dynamic-widgets.php +3 -3
  2. dynwid_class.php +11 -3
  3. dynwid_worker.php +2 -2
  4. readme.txt +7 -1
dynamic-widgets.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://www.qurl.nl/2010/02/dynamic-widgets-1-1/
5
  * Description: Dynamic Widgets gives you more control over your widgets. It lets you dynamicly place widgets on pages by excluding or including rules by roles, for the homepage, single posts, pages, categories, archives and the error 404 page.
6
  * Author: Jacco
7
- * Version: 1.1
8
  * Author URI: http://www.qurl.nl/
9
  * Tags: widget, widgets, dynamic, sidebar, custom, rules
10
  *
@@ -15,14 +15,14 @@
15
  *
16
  * Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
17
  *
18
- * @version $Id: dynamic-widgets.php 202305 2010-02-05 18:19:21Z qurl $
19
  */
20
 
21
  // Constants
22
  define('DW_DB_TABLE', 'dynamic_widgets');
23
  define('DW_LIST_LIMIT', 20);
24
  define('DW_LIST_STYLE', 'style="overflow:auto;height:240px;"');
25
- define('DW_VERSION', '1.1');
26
  define('DEBUG', FALSE);
27
 
28
  // Functions
4
  * Plugin URI: http://www.qurl.nl/2010/02/dynamic-widgets-1-1/
5
  * Description: Dynamic Widgets gives you more control over your widgets. It lets you dynamicly place widgets on pages by excluding or including rules by roles, for the homepage, single posts, pages, categories, archives and the error 404 page.
6
  * Author: Jacco
7
+ * Version: 1.1.1
8
  * Author URI: http://www.qurl.nl/
9
  * Tags: widget, widgets, dynamic, sidebar, custom, rules
10
  *
15
  *
16
  * Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
17
  *
18
+ * @version $Id: dynamic-widgets.php 202758 2010-02-07 07:05:52Z qurl $
19
  */
20
 
21
  // Constants
22
  define('DW_DB_TABLE', 'dynamic_widgets');
23
  define('DW_LIST_LIMIT', 20);
24
  define('DW_LIST_STYLE', 'style="overflow:auto;height:240px;"');
25
+ define('DW_VERSION', '1.1.1');
26
  define('DEBUG', FALSE);
27
 
28
  // Functions
dynwid_class.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * dynwid_class.php - Dynamic Widgets Class
4
  *
5
- * @version $Id: dynwid_class.php 202305 2010-02-05 18:19:21Z qurl $
6
  */
7
 
8
  class dynWid {
@@ -146,13 +146,21 @@
146
  return $name;
147
  }
148
 
149
- public function getOptions($widget_id, $maintype) {
150
  $opt = array();
151
 
152
- $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
 
 
 
 
 
 
 
153
  WHERE widget_id LIKE '" . $widget_id . "'
154
  AND (maintype LIKE '" . $maintype . "%' OR maintype = 'role')
155
  ORDER BY name";
 
156
  $results = $this->wpdb->get_results($query);
157
 
158
  foreach ( $results as $myrow ) {
2
  /**
3
  * dynwid_class.php - Dynamic Widgets Class
4
  *
5
+ * @version $Id: dynwid_class.php 202758 2010-02-07 07:05:52Z qurl $
6
  */
7
 
8
  class dynWid {
146
  return $name;
147
  }
148
 
149
+ public function getOptions($widget_id, $maintype, $admin = TRUE) {
150
  $opt = array();
151
 
152
+ if ( $admin ) {
153
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
154
+ WHERE widget_id LIKE '" . $widget_id . "'
155
+ AND maintype LIKE '" . $maintype . "%'
156
+ ORDER BY name";
157
+
158
+ } else {
159
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
160
  WHERE widget_id LIKE '" . $widget_id . "'
161
  AND (maintype LIKE '" . $maintype . "%' OR maintype = 'role')
162
  ORDER BY name";
163
+ }
164
  $results = $this->wpdb->get_results($query);
165
 
166
  foreach ( $results as $myrow ) {
dynwid_worker.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * dynwid_worker.php - The worker does the actual work.
4
  *
5
- * @version $Id: dynwid_worker.php 202305 2010-02-05 18:19:21Z qurl $
6
  */
7
 
8
  require_once('dynwid_class.php');
@@ -21,7 +21,7 @@
21
  // Check if the widget has options set
22
  if ( in_array($widget_id,$DW->dynwid_list) ) {
23
  $act = array();
24
- $opt = $DW->getOptions($widget_id, $whereami);
25
  $display = TRUE;
26
  $role = TRUE;
27
 
2
  /**
3
  * dynwid_worker.php - The worker does the actual work.
4
  *
5
+ * @version $Id: dynwid_worker.php 202758 2010-02-07 07:05:52Z qurl $
6
  */
7
 
8
  require_once('dynwid_class.php');
21
  // Check if the widget has options set
22
  if ( in_array($widget_id,$DW->dynwid_list) ) {
23
  $act = array();
24
+ $opt = $DW->getOptions($widget_id, $whereami, FALSE);
25
  $display = TRUE;
26
  $role = TRUE;
27
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: widget, widgets, dynamic, sidebar, custom, rules
5
  Requires at least: 2.9.1
6
  Tested up to: 2.9.1
7
- Stable tag: 1.1
8
 
9
  Dynamic Widgets gives you more control over your widgets. It lets you dynamicly place widgets on WordPress pages.
10
 
@@ -63,6 +63,9 @@ Please file a [bugreport](http://www.qurl.nl/bugreport/). Please note the proced
63
 
64
  == Changelog ==
65
 
 
 
 
66
  = Version 1.1 =
67
  * Added support for widget display settings based on role, including not logged in (anonymous) users.
68
 
@@ -75,6 +78,9 @@ Please file a [bugreport](http://www.qurl.nl/bugreport/). Please note the proced
75
 
76
  == Release notes ==
77
 
 
 
 
78
  = Version 1.1 =
79
  This is the next official stable release. If you upgrade from a previous version, please follow the upgrade notice.
80
 
4
  Tags: widget, widgets, dynamic, sidebar, custom, rules
5
  Requires at least: 2.9.1
6
  Tested up to: 2.9.1
7
+ Stable tag: 1.1.1
8
 
9
  Dynamic Widgets gives you more control over your widgets. It lets you dynamicly place widgets on WordPress pages.
10
 
63
 
64
  == Changelog ==
65
 
66
+ = Version 1.1.1 =
67
+ * Bugfix for unexpected default option values when using role options.
68
+
69
  = Version 1.1 =
70
  * Added support for widget display settings based on role, including not logged in (anonymous) users.
71
 
78
 
79
  == Release notes ==
80
 
81
+ = Version 1.1.1
82
+ An unplanned release due to a bug in version 1.1. If you're using version 1.1 and using or planning to use role options, you should upgrade asap.
83
+
84
  = Version 1.1 =
85
  This is the next official stable release. If you upgrade from a previous version, please follow the upgrade notice.
86