Version Description
Download this release
Release Info
Developer | kasparsd |
Plugin | Widget Context |
Version | 0.4.4 |
Comparing to | |
See all releases |
Code changes from version 0.4.3 to 0.4.4
- readme.txt +3 -2
- widget-context.php +8 -7
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kaspa
|
|
4 |
Tags: widget, widget context, context, logic, widget logic
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.8.1
|
7 |
-
Stable tag: 0.4.
|
8 |
|
9 |
Show widgets in context -- only on certain posts, on front page, etc.
|
10 |
|
@@ -20,7 +20,8 @@ Install the plugin through **Add New Plugin** feature in your WordPress dashboar
|
|
20 |
|
21 |
== Changelog ==
|
22 |
|
23 |
-
* **0.4.
|
|
|
24 |
|
25 |
== Screenshots ==
|
26 |
|
4 |
Tags: widget, widget context, context, logic, widget logic
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.8.1
|
7 |
+
Stable tag: 0.4.4
|
8 |
|
9 |
Show widgets in context -- only on certain posts, on front page, etc.
|
10 |
|
20 |
|
21 |
== Changelog ==
|
22 |
|
23 |
+
* **0.4.4** -- Fixed widget control parameter transfer for widgets that don't use the new widget api.
|
24 |
+
* **0.4.2** -- Initial release on Plugin repository.
|
25 |
|
26 |
== Screenshots ==
|
27 |
|
widget-context.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Widget Context
|
4 |
Plugin URI: http://konstruktors.com/blog/
|
5 |
Description: Display widgets in context.
|
6 |
-
Version: 0.4.
|
7 |
Author: Kaspars Dambis
|
8 |
Author URI: http://konstruktors.com/blog/
|
9 |
|
@@ -171,8 +171,11 @@ class widget_context {
|
|
171 |
global $wp_registered_widget_controls;
|
172 |
|
173 |
$all_params = func_get_args();
|
174 |
-
|
175 |
-
|
|
|
|
|
|
|
176 |
$original_callback = $wp_registered_widget_controls[$widget_id]['callback_original_wc'];
|
177 |
|
178 |
// Display the original callback
|
@@ -182,7 +185,7 @@ class widget_context {
|
|
182 |
print '<!-- widget context [controls]: could not call the original callback function -->';
|
183 |
}
|
184 |
|
185 |
-
print $this->display_widget_context($original_callback, $
|
186 |
}
|
187 |
|
188 |
|
@@ -355,9 +358,7 @@ class widget_context {
|
|
355 |
}
|
356 |
|
357 |
|
358 |
-
function display_widget_context($args = array(), $
|
359 |
-
|
360 |
-
$wid = $params[1]['widget_id'];
|
361 |
|
362 |
$group = 'location'; // Produces: wl[$wid][$group][homepage/singlepost/...]
|
363 |
$options = get_option($this->options_name);
|
3 |
Plugin Name: Widget Context
|
4 |
Plugin URI: http://konstruktors.com/blog/
|
5 |
Description: Display widgets in context.
|
6 |
+
Version: 0.4.4
|
7 |
Author: Kaspars Dambis
|
8 |
Author URI: http://konstruktors.com/blog/
|
9 |
|
171 |
global $wp_registered_widget_controls;
|
172 |
|
173 |
$all_params = func_get_args();
|
174 |
+
if (is_array($all_params[1]))
|
175 |
+
$widget_id = $all_params[1]['widget_id'];
|
176 |
+
else
|
177 |
+
$widget_id = $all_params[0]['widget_id'];
|
178 |
+
|
179 |
$original_callback = $wp_registered_widget_controls[$widget_id]['callback_original_wc'];
|
180 |
|
181 |
// Display the original callback
|
185 |
print '<!-- widget context [controls]: could not call the original callback function -->';
|
186 |
}
|
187 |
|
188 |
+
print $this->display_widget_context($original_callback, $widget_id);
|
189 |
}
|
190 |
|
191 |
|
358 |
}
|
359 |
|
360 |
|
361 |
+
function display_widget_context($args = array(), $wid = null) {
|
|
|
|
|
362 |
|
363 |
$group = 'location'; // Produces: wl[$wid][$group][homepage/singlepost/...]
|
364 |
$options = get_option($this->options_name);
|