Version Description
When you upgrade manually, remove the dynamic-widgets directory first.
This version has 1 feature added, 1 language added and 3 bugs fixed.
=
Download this release
Release Info
Developer | qurl |
Plugin | Dynamic Widgets |
Version | 1.5.8 |
Comparing to | |
See all releases |
Code changes from version 1.5.7 to 1.5.8
- classes/dynwid_class.php +4 -3
- dynamic-widgets.php +6 -5
- dynwid_admin.php +8 -7
- dynwid_admin_edit.php +4 -4
- dynwid_admin_save.php +5 -4
- dynwid_init_worker.php +2 -2
- dynwid_worker.php +12 -8
- img/facebook.png +0 -0
- img/qurl.png +0 -0
- img/twitter.png +0 -0
- mods/author_module.php +5 -5
- mods/category_module.php +6 -6
- mods/date_module.php +2 -2
- mods/device_module.php +25 -0
- mods/mobile_module.php +0 -14
- mods/pages_module.php +3 -3
- mods/single_module.php +3 -3
- mods/url_module.php +1 -1
- readme.txt +13 -4
classes/dynwid_class.php
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
|
9 |
class dynWid {
|
10 |
private $dbtable;
|
|
|
11 |
public $dwoptions = array();
|
12 |
public $dynwid_list;
|
13 |
public $enabled;
|
@@ -466,7 +467,7 @@
|
|
466 |
DWModule::registerOption(DW_Day::$option);
|
467 |
DWModule::registerOption(DW_E404::$option);
|
468 |
DWModule::registerOption(DW_Front_page::$option);
|
469 |
-
DWModule::registerOption(
|
470 |
DWModule::registerOption(DW_Page::$option);
|
471 |
DWModule::registerOption(DW_Pods::$option);
|
472 |
DWModule::registerOption(DW_QT::$option);
|
@@ -733,7 +734,7 @@
|
|
733 |
include_once(DW_MODULES . 'role_module.php');
|
734 |
include_once(DW_MODULES . 'tpl_module.php');
|
735 |
include_once(DW_MODULES . 'url_module.php');
|
736 |
-
include_once(DW_MODULES . '
|
737 |
DW_Browser::checkOverrule('DW_Browser');
|
738 |
DW_Date::checkOverrule('DW_Date');
|
739 |
DW_Day::checkOverrule('DW_Day');
|
@@ -741,7 +742,7 @@
|
|
741 |
DW_Role::checkOverrule('DW_Role');
|
742 |
DW_Tpl::checkOverrule('DW_Tpl');
|
743 |
DW_URL::checkOverrule('DW_URL');
|
744 |
-
DW_URL::checkOverrule('
|
745 |
|
746 |
// WPML Plugin Support
|
747 |
include_once(DW_MODULES . 'wpml_module.php');
|
8 |
|
9 |
class dynWid {
|
10 |
private $dbtable;
|
11 |
+
public $device;
|
12 |
public $dwoptions = array();
|
13 |
public $dynwid_list;
|
14 |
public $enabled;
|
467 |
DWModule::registerOption(DW_Day::$option);
|
468 |
DWModule::registerOption(DW_E404::$option);
|
469 |
DWModule::registerOption(DW_Front_page::$option);
|
470 |
+
DWModule::registerOption(DW_Device::$option);
|
471 |
DWModule::registerOption(DW_Page::$option);
|
472 |
DWModule::registerOption(DW_Pods::$option);
|
473 |
DWModule::registerOption(DW_QT::$option);
|
734 |
include_once(DW_MODULES . 'role_module.php');
|
735 |
include_once(DW_MODULES . 'tpl_module.php');
|
736 |
include_once(DW_MODULES . 'url_module.php');
|
737 |
+
include_once(DW_MODULES . 'device_module.php');
|
738 |
DW_Browser::checkOverrule('DW_Browser');
|
739 |
DW_Date::checkOverrule('DW_Date');
|
740 |
DW_Day::checkOverrule('DW_Day');
|
742 |
DW_Role::checkOverrule('DW_Role');
|
743 |
DW_Tpl::checkOverrule('DW_Tpl');
|
744 |
DW_URL::checkOverrule('DW_URL');
|
745 |
+
DW_URL::checkOverrule('DW_Device');
|
746 |
|
747 |
// WPML Plugin Support
|
748 |
include_once(DW_MODULES . 'wpml_module.php');
|
dynamic-widgets.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Dynamic Widgets
|
4 |
-
* Plugin URI: http://
|
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.
|
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,8 +15,8 @@
|
|
15 |
*
|
16 |
* Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
|
17 |
*
|
18 |
-
* @version $Id: dynamic-widgets.php
|
19 |
-
* @copyright
|
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.
|
22 |
* Thanks to Daniel Bihler for the contribution of the German (de_DE) language files.
|
@@ -32,6 +32,7 @@
|
|
32 |
* Thanks to Rick Anderson from Build Your Own Business Website (http://www.byobwebsite.com/) for the financial contribution to implement the AJAX lazy load taxonomy tree and the modules filter
|
33 |
* Thanks to Advancis (http://advancis.net/) for the help and financial contribution to find and fix a WPML category bug.
|
34 |
* Thanks to Borisa Djuraskovic for the contribution of the Serbo-Croatian (sr_RS) languages files.
|
|
|
35 |
*
|
36 |
*
|
37 |
* WPML Plugin support via API
|
@@ -76,7 +77,7 @@
|
|
76 |
define('DW_PLUGIN', dirname(__FILE__) . '/' . 'plugin/');
|
77 |
define('DW_TIME_LIMIT', 86400); // 1 day
|
78 |
define('DW_URL_AUTHOR', 'http://www.qurl.nl');
|
79 |
-
define('DW_VERSION', '1.5.
|
80 |
define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
|
81 |
define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
|
82 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Dynamic Widgets
|
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.8
|
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 937227 2014-06-23 15:10:15Z qurl $
|
19 |
+
* @copyright 2014 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.
|
22 |
* Thanks to Daniel Bihler for the contribution of the German (de_DE) language files.
|
32 |
* Thanks to Rick Anderson from Build Your Own Business Website (http://www.byobwebsite.com/) for the financial contribution to implement the AJAX lazy load taxonomy tree and the modules filter
|
33 |
* Thanks to Advancis (http://advancis.net/) for the help and financial contribution to find and fix a WPML category bug.
|
34 |
* Thanks to Borisa Djuraskovic for the contribution of the Serbo-Croatian (sr_RS) languages files.
|
35 |
+
* Thanks to Leon Juranic from DefenseCode to run it's scanner over the source code and finding a few vulnerabilities.
|
36 |
*
|
37 |
*
|
38 |
* WPML Plugin support via API
|
77 |
define('DW_PLUGIN', dirname(__FILE__) . '/' . 'plugin/');
|
78 |
define('DW_TIME_LIMIT', 86400); // 1 day
|
79 |
define('DW_URL_AUTHOR', 'http://www.qurl.nl');
|
80 |
+
define('DW_VERSION', '1.5.8');
|
81 |
define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
|
82 |
define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
|
83 |
|
dynwid_admin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* dynwid_admin.php - Startpage for admin
|
4 |
*
|
5 |
-
* @version $Id: dynwid_admin.php
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
?>
|
@@ -19,12 +19,13 @@
|
|
19 |
<?php _e('Dynamic Widgets', DW_L10N_DOMAIN); ?>
|
20 |
<input type="image" style="vertical-align: middle;" title="Donate for this plugin via PayPal" alt="Donate" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" onclick="jQuery('#paypal').submit()">
|
21 |
</div></h2>
|
22 |
-
<div style="
|
23 |
-
<div style="float:left
|
24 |
-
<
|
25 |
-
<
|
26 |
-
|
27 |
-
</div
|
|
|
28 |
|
29 |
<br style="clear:both" />
|
30 |
<?php
|
2 |
/**
|
3 |
* dynwid_admin.php - Startpage for admin
|
4 |
*
|
5 |
+
* @version $Id: dynwid_admin.php 937227 2014-06-23 15:10:15Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
?>
|
19 |
<?php _e('Dynamic Widgets', DW_L10N_DOMAIN); ?>
|
20 |
<input type="image" style="vertical-align: middle;" title="Donate for this plugin via PayPal" alt="Donate" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" onclick="jQuery('#paypal').submit()">
|
21 |
</div></h2>
|
22 |
+
<div style="padding:5px;width:360px;float:left;position:relative;top:-7px;">
|
23 |
+
<div style="float:left;">
|
24 |
+
<a target="_blank" href="https://www.facebook.com/qurl.nl"><img src="<?php echo $DW->plugin_url; ?>/img/facebook.png" alt="Facebook" title="Like Dynamic Widgets? Like my Facebook page!" style="margin-right:10px;" /></a>
|
25 |
+
<a target="_blank" href="https://twitter.com/s_jacco"><img src="<?php echo $DW->plugin_url; ?>/img/twitter.png" alt="Twitter" title="Follow me on Twitter" style="margin-right:10px;" /></a>
|
26 |
+
<a target="_blank" href="<?php echo DW_URL_AUTHOR; ?>/"><img src="<?php echo $DW->plugin_url; ?>/img/qurl.png" alt="QURL" title="QURL - Quality and Reliability" /></a>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
|
30 |
<br style="clear:both" />
|
31 |
<?php
|
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
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
@@ -377,9 +377,9 @@ div.settingbox {
|
|
377 |
$DW_Browser->admin();
|
378 |
}
|
379 |
|
380 |
-
if ( array_key_exists('
|
381 |
-
$
|
382 |
-
$
|
383 |
}
|
384 |
|
385 |
if ( array_key_exists('tpl', $DW->dwoptions) ) {
|
2 |
/**
|
3 |
* dynwid_admin_edit.php - Options settings
|
4 |
*
|
5 |
+
* @version $Id: dynwid_admin_edit.php 872198 2014-03-09 12:51:52Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
377 |
$DW_Browser->admin();
|
378 |
}
|
379 |
|
380 |
+
if ( array_key_exists('device', $DW->dwoptions) ) {
|
381 |
+
$DW_Device = new DW_Device();
|
382 |
+
$DW_Device->admin();
|
383 |
}
|
384 |
|
385 |
if ( array_key_exists('tpl', $DW->dwoptions) ) {
|
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
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
@@ -75,7 +75,8 @@
|
|
75 |
$count = $GLOBALS['wpdb']->get_var($query);
|
76 |
|
77 |
if ( $count > 0 && isset($_POST['individual']) && $_POST['individual'] == '1' ) {
|
78 |
-
$post_types =
|
|
|
79 |
|
80 |
foreach ( $post_types as $t ) {
|
81 |
$maintype = (! preg_match('/^single/', $t) ) ? $t . '-post' : $t;
|
@@ -128,8 +129,8 @@
|
|
128 |
// Browser
|
129 |
DWModule::save('browser', 'complex');
|
130 |
|
131 |
-
//
|
132 |
-
DWModule::save('
|
133 |
|
134 |
// Template
|
135 |
DWModule::save('tpl', 'complex');
|
2 |
/**
|
3 |
* dynwid_admin_save.php - Saving options to the database
|
4 |
*
|
5 |
+
* @version $Id: dynwid_admin_save.php 872198 2014-03-09 12:51:52Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
75 |
$count = $GLOBALS['wpdb']->get_var($query);
|
76 |
|
77 |
if ( $count > 0 && isset($_POST['individual']) && $_POST['individual'] == '1' ) {
|
78 |
+
$post_types = ( is_array($_POST['post_types']) ) ? $_POST['post_types'] : array();
|
79 |
+
$post_types = array_merge( array('single_post', 'single_tag'), $post_types );
|
80 |
|
81 |
foreach ( $post_types as $t ) {
|
82 |
$maintype = (! preg_match('/^single/', $t) ) ? $t . '-post' : $t;
|
129 |
// Browser
|
130 |
DWModule::save('browser', 'complex');
|
131 |
|
132 |
+
// Device
|
133 |
+
DWModule::save('device', 'complex');
|
134 |
|
135 |
// Template
|
136 |
DWModule::save('tpl', 'complex');
|
dynwid_init_worker.php
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
/**
|
3 |
* dynwid_init_worker.php
|
4 |
*
|
5 |
-
* @version $Id: dynwid_init_worker.php
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
9 |
$DW->message('Dynamic Widgets INIT');
|
10 |
-
echo "\n" . '<!-- Dynamic Widgets
|
11 |
|
12 |
// Register the overrule maintypes
|
13 |
$DW->registerOverrulers();
|
2 |
/**
|
3 |
* dynwid_init_worker.php
|
4 |
*
|
5 |
+
* @version $Id: dynwid_init_worker.php 937227 2014-06-23 15:10:15Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
9 |
$DW->message('Dynamic Widgets INIT');
|
10 |
+
echo "\n" . '<!-- Dynamic Widgets by QURL - http://www.qurl.nl //-->' . "\n";
|
11 |
|
12 |
// Register the overrule maintypes
|
13 |
$DW->registerOverrulers();
|
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
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
@@ -12,6 +12,10 @@
|
|
12 |
// Registering Custom Post Type & Custom Taxonomy to $DW (object overload)
|
13 |
include(DW_MODULES . 'custompost_module.php');
|
14 |
DWModule::registerPlugin(DW_CustomPost::$plugin);
|
|
|
|
|
|
|
|
|
15 |
|
16 |
// Template
|
17 |
if (! is_archive() && ! is_404() ) {
|
@@ -166,12 +170,12 @@
|
|
166 |
}
|
167 |
unset($qt_tmp);
|
168 |
|
169 |
-
// Browser,
|
170 |
foreach ( $opt as $condition ) {
|
171 |
if ( $condition->maintype == 'browser' && $condition->name == $DW->useragent ) {
|
172 |
(bool) $browser_tmp = $condition->value;
|
173 |
-
|
174 |
-
|
175 |
} else if ( $condition->maintype == 'tpl' && $condition->name == $DW->template ) {
|
176 |
(bool) $tpl_tmp = $condition->value;
|
177 |
} else if ( $condition->maintype == 'day' && $condition->name == date('N', current_time('timestamp', 0)) ) {
|
@@ -225,10 +229,10 @@
|
|
225 |
}
|
226 |
unset($browser_tmp);
|
227 |
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
|
233 |
if ( isset($tpl_tmp) && $tpl_tmp != $tpl ) {
|
234 |
$DW->message('Exception triggered for template, sets display to ' . ( ($tpl_tmp) ? 'TRUE' : 'FALSE' ) . ' (rule ETPL1)');
|
2 |
/**
|
3 |
* dynwid_worker.php - The worker does the actual work.
|
4 |
*
|
5 |
+
* @version $Id: dynwid_worker.php 872198 2014-03-09 12:51:52Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
12 |
// Registering Custom Post Type & Custom Taxonomy to $DW (object overload)
|
13 |
include(DW_MODULES . 'custompost_module.php');
|
14 |
DWModule::registerPlugin(DW_CustomPost::$plugin);
|
15 |
+
|
16 |
+
// Device
|
17 |
+
$DW->device = ( wp_is_mobile() ) ? 'mobile' : 'desktop';
|
18 |
+
$DW->message('Device = ' . $DW->device);
|
19 |
|
20 |
// Template
|
21 |
if (! is_archive() && ! is_404() ) {
|
170 |
}
|
171 |
unset($qt_tmp);
|
172 |
|
173 |
+
// Browser, Device, Template, Day, Week and URL
|
174 |
foreach ( $opt as $condition ) {
|
175 |
if ( $condition->maintype == 'browser' && $condition->name == $DW->useragent ) {
|
176 |
(bool) $browser_tmp = $condition->value;
|
177 |
+
} else if ( $condition->maintype == 'device' && $condition->name == $DW->device ) {
|
178 |
+
(bool) $device_tmp = $condition->value;
|
179 |
} else if ( $condition->maintype == 'tpl' && $condition->name == $DW->template ) {
|
180 |
(bool) $tpl_tmp = $condition->value;
|
181 |
} else if ( $condition->maintype == 'day' && $condition->name == date('N', current_time('timestamp', 0)) ) {
|
229 |
}
|
230 |
unset($browser_tmp);
|
231 |
|
232 |
+
if ( isset($device_tmp) && $device_tmp != $device ) {
|
233 |
+
$DW->message('Exception triggered for device, sets display to ' . ( ($device_tmp) ? 'TRUE' : 'FALSE' ) . ' (rule ED1)');
|
234 |
+
$device = $device_tmp;
|
235 |
+
}
|
236 |
|
237 |
if ( isset($tpl_tmp) && $tpl_tmp != $tpl ) {
|
238 |
$DW->message('Exception triggered for template, sets display to ' . ( ($tpl_tmp) ? 'TRUE' : 'FALSE' ) . ' (rule ETPL1)');
|
img/facebook.png
ADDED
Binary file
|
img/qurl.png
CHANGED
Binary file
|
img/twitter.png
ADDED
Binary file
|
mods/author_module.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Author Module
|
4 |
*
|
5 |
-
* @version $Id: author_module.php
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
@@ -14,7 +14,7 @@
|
|
14 |
|
15 |
public static function admin() {
|
16 |
parent::admin();
|
17 |
-
self::mkGUI();
|
18 |
}
|
19 |
|
20 |
public static function getAuthors() {
|
@@ -39,12 +39,12 @@
|
|
39 |
return $list;
|
40 |
}
|
41 |
|
42 |
-
public static function mkGUI($
|
43 |
$DW = &$GLOBALS['DW'];
|
44 |
$list = self::getAuthors();
|
45 |
|
46 |
-
if ( $
|
47 |
-
self::$opt = $DW->getDWOpt($
|
48 |
|
49 |
if ( count($list) > DW_LIST_LIMIT ) {
|
50 |
$select_style = DW_LIST_STYLE;
|
2 |
/**
|
3 |
* Author Module
|
4 |
*
|
5 |
+
* @version $Id: author_module.php 937227 2014-06-23 15:10:15Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
14 |
|
15 |
public static function admin() {
|
16 |
parent::admin();
|
17 |
+
self::mkGUI(self::$type, self::$option[self::$name], self::$question);
|
18 |
}
|
19 |
|
20 |
public static function getAuthors() {
|
39 |
return $list;
|
40 |
}
|
41 |
|
42 |
+
public static function mkGUI($type, $title, $question, $info = FALSE) {
|
43 |
$DW = &$GLOBALS['DW'];
|
44 |
$list = self::getAuthors();
|
45 |
|
46 |
+
if ( $info ) {
|
47 |
+
self::$opt = $DW->getDWOpt($GLOBALS['widget_id'], 'single-author');
|
48 |
|
49 |
if ( count($list) > DW_LIST_LIMIT ) {
|
50 |
$select_style = DW_LIST_STYLE;
|
mods/category_module.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Category Module
|
4 |
*
|
5 |
-
* @version $Id: category_module.php
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
@@ -18,11 +18,11 @@
|
|
18 |
|
19 |
parent::admin();
|
20 |
|
21 |
-
self::$opt = $DW->getDWOpt($
|
22 |
|
23 |
self::GUIHeader(self::$option[self::$name], self::$question, FALSE);
|
24 |
self::GUIOption();
|
25 |
-
self::GUIComplex();
|
26 |
self::GUIFooter();
|
27 |
}
|
28 |
|
@@ -39,7 +39,7 @@
|
|
39 |
return $arr;
|
40 |
}
|
41 |
|
42 |
-
public static function GUIComplex($
|
43 |
$DW = &$GLOBALS['DW'];
|
44 |
|
45 |
// Needs an own complex list
|
@@ -47,10 +47,10 @@
|
|
47 |
$catmap = self::getCatChilds(array(), 0, array());
|
48 |
|
49 |
if (! is_null($opt) ) {
|
50 |
-
self::$opt = $
|
51 |
}
|
52 |
if ( self::$opt->count > 0 ) {
|
53 |
-
$opt_category_childs = $DW->getDWOpt($
|
54 |
$childs = $opt_category_childs->act;
|
55 |
|
56 |
$DW->dumpOpt($opt_category_childs);
|
2 |
/**
|
3 |
* Category Module
|
4 |
*
|
5 |
+
* @version $Id: category_module.php 937227 2014-06-23 15:10:15Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
18 |
|
19 |
parent::admin();
|
20 |
|
21 |
+
self::$opt = $DW->getDWOpt($GLOBALS['widget_id'], self::$name);
|
22 |
|
23 |
self::GUIHeader(self::$option[self::$name], self::$question, FALSE);
|
24 |
self::GUIOption();
|
25 |
+
self::GUIComplex(NULL, NULL);
|
26 |
self::GUIFooter();
|
27 |
}
|
28 |
|
39 |
return $arr;
|
40 |
}
|
41 |
|
42 |
+
public static function GUIComplex($except, $list, $extra = FALSE, $name = NULL) {
|
43 |
$DW = &$GLOBALS['DW'];
|
44 |
|
45 |
// Needs an own complex list
|
47 |
$catmap = self::getCatChilds(array(), 0, array());
|
48 |
|
49 |
if (! is_null($opt) ) {
|
50 |
+
self::$opt = $name;
|
51 |
}
|
52 |
if ( self::$opt->count > 0 ) {
|
53 |
+
$opt_category_childs = $DW->getDWOpt($GLOBALS['widget_id'], ( ($extra) ? 'single-' : '' ) . 'category-childs');
|
54 |
$childs = $opt_category_childs->act;
|
55 |
|
56 |
$DW->dumpOpt($opt_category_childs);
|
mods/date_module.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Date Module
|
4 |
* Can't use DWOpts object because value = the actual date
|
5 |
*
|
6 |
-
* @version $Id: date_module.php
|
7 |
* @copyright 2011 Jacco Drabbe
|
8 |
*/
|
9 |
|
@@ -18,7 +18,7 @@
|
|
18 |
parent::admin();
|
19 |
|
20 |
$date_yes_selected = 'checked="checked"';
|
21 |
-
$opt_date = $DW->getOpt($
|
22 |
|
23 |
if ( count($opt_date) > 0 ) {
|
24 |
foreach ( $opt_date as $value ) {
|
3 |
* Date Module
|
4 |
* Can't use DWOpts object because value = the actual date
|
5 |
*
|
6 |
+
* @version $Id: date_module.php 937227 2014-06-23 15:10:15Z qurl $
|
7 |
* @copyright 2011 Jacco Drabbe
|
8 |
*/
|
9 |
|
18 |
parent::admin();
|
19 |
|
20 |
$date_yes_selected = 'checked="checked"';
|
21 |
+
$opt_date = $DW->getOpt($GLOBALS['widget_id'], 'date');
|
22 |
|
23 |
if ( count($opt_date) > 0 ) {
|
24 |
foreach ( $opt_date as $value ) {
|
mods/device_module.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Device Module
|
4 |
+
*
|
5 |
+
* @version $Id$
|
6 |
+
* @copyright 2014 Jacco Drabbe
|
7 |
+
*/
|
8 |
+
|
9 |
+
class DW_Device extends DWModule {
|
10 |
+
protected static $except = 'Except for:';
|
11 |
+
public static $option = array( 'device' => 'Device' );
|
12 |
+
protected static $overrule = TRUE;
|
13 |
+
protected static $question = 'Show widget when viewed by all devices?';
|
14 |
+
protected static $type = 'complex';
|
15 |
+
|
16 |
+
public static function admin() {
|
17 |
+
$DW = &$GLOBALS['DW'];
|
18 |
+
|
19 |
+
parent::admin();
|
20 |
+
|
21 |
+
$list = array( 'desktop' => __('Desktop'), 'mobile' => __('Mobile') );
|
22 |
+
self::mkGUI(self::$type, self::$option[self::$name], self::$question, self::$info, self::$except, $list);
|
23 |
+
}
|
24 |
+
}
|
25 |
+
?>
|
mods/mobile_module.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Mobile Module
|
4 |
-
*
|
5 |
-
* @version $Id$
|
6 |
-
* @copyright 2014 Jacco Drabbe
|
7 |
-
*/
|
8 |
-
|
9 |
-
class DW_Mobile extends DWModule {
|
10 |
-
public static $option = array( 'mobile' => 'Mobile device' );
|
11 |
-
protected static $overrule = TRUE;
|
12 |
-
protected static $question = 'Show widget when viewed by a mobile device?';
|
13 |
-
}
|
14 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mods/pages_module.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Pages Module
|
4 |
*
|
5 |
-
* @version $Id: pages_module.php
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
@@ -24,10 +24,10 @@
|
|
24 |
self::$opt = $DW->getDWOpt($_GET['id'], 'page');
|
25 |
self::$opt_page = self::$opt;
|
26 |
if ( self::$opt->count > 0 ) {
|
27 |
-
self::$opt_page_childs = $DW->getDWOpt($
|
28 |
}
|
29 |
|
30 |
-
$pages = get_pages();
|
31 |
$num_pages = count($pages);
|
32 |
unset($pages);
|
33 |
|
2 |
/**
|
3 |
* Pages Module
|
4 |
*
|
5 |
+
* @version $Id: pages_module.php 937227 2014-06-23 15:10:15Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
24 |
self::$opt = $DW->getDWOpt($_GET['id'], 'page');
|
25 |
self::$opt_page = self::$opt;
|
26 |
if ( self::$opt->count > 0 ) {
|
27 |
+
self::$opt_page_childs = $DW->getDWOpt($_GLOBALS['widget_id'], 'page-childs');
|
28 |
}
|
29 |
|
30 |
+
$pages = get_pages( array('post_status' => 'publish,private') );
|
31 |
$num_pages = count($pages);
|
32 |
unset($pages);
|
33 |
|
mods/single_module.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Single Post Module
|
4 |
*
|
5 |
-
* @version $Id: single_module.php
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
@@ -77,13 +77,13 @@
|
|
77 |
<table border="0" cellspacing="0" cellpadding="0">
|
78 |
<tr>
|
79 |
<td valign="top">
|
80 |
-
<?php DW_Author::mkGUI(TRUE); ?>
|
81 |
</td>
|
82 |
<td style="width:10px"></td>
|
83 |
<td valign="top">
|
84 |
<?php $opt = $DW->getDWOpt($widget_id, 'single-category'); ?>
|
85 |
<?php $DW->dumpOpt($opt); ?>
|
86 |
-
<?php DW_Category::GUIComplex(TRUE, $opt); ?>
|
87 |
</div>
|
88 |
</td>
|
89 |
</tr>
|
2 |
/**
|
3 |
* Single Post Module
|
4 |
*
|
5 |
+
* @version $Id: single_module.php 937227 2014-06-23 15:10:15Z qurl $
|
6 |
* @copyright 2011 Jacco Drabbe
|
7 |
*/
|
8 |
|
77 |
<table border="0" cellspacing="0" cellpadding="0">
|
78 |
<tr>
|
79 |
<td valign="top">
|
80 |
+
<?php DW_Author::mkGUI(self::$type, self::$option[self::$name], self::$question, TRUE); ?>
|
81 |
</td>
|
82 |
<td style="width:10px"></td>
|
83 |
<td valign="top">
|
84 |
<?php $opt = $DW->getDWOpt($widget_id, 'single-category'); ?>
|
85 |
<?php $DW->dumpOpt($opt); ?>
|
86 |
+
<?php DW_Category::GUIComplex(NULL, NULL, TRUE, $opt); ?>
|
87 |
</div>
|
88 |
</td>
|
89 |
</tr>
|
mods/url_module.php
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
parent::admin();
|
19 |
|
20 |
$url_yes_selected = 'checked="checked"';
|
21 |
-
$opt_url = $DW->getOpt($
|
22 |
$prefix = $DW->getURLPrefix();
|
23 |
|
24 |
foreach ( $opt_url as $opt ) {
|
18 |
parent::admin();
|
19 |
|
20 |
$url_yes_selected = 'checked="checked"';
|
21 |
+
$opt_url = $DW->getOpt($_GLOBALS['widget_id'], 'url');
|
22 |
$prefix = $DW->getURLPrefix();
|
23 |
|
24 |
foreach ( $opt_url as $opt ) {
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Qurl
|
|
3 |
Donate link: http://www.qurl.nl/dynamic-widgets/donate/
|
4 |
Tags: widget, widgets, dynamic, sidebar, custom, rules, logic, display, admin, condition, conditional tags, hide, show, wpml, qtranslate, wpec, buddypress, pods, bbpress
|
5 |
Requires at least: 3.0.0
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.5.
|
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 |
|
@@ -30,7 +30,7 @@ It is very hard to continue development and support for this plugin without cont
|
|
30 |
- Day of week
|
31 |
- Weeknumbers
|
32 |
- Browsers
|
33 |
-
-
|
34 |
- Theme Templates
|
35 |
- Languages (WPML or QTranslate)
|
36 |
- URL
|
@@ -59,6 +59,7 @@ It is very hard to continue development and support for this plugin without cont
|
|
59 |
- Day of week on day
|
60 |
- Weeknumer on number
|
61 |
- Browsers on browser name
|
|
|
62 |
- Theme Templates on template name
|
63 |
- Languages (WPML or QTranslate) on language
|
64 |
- URL on starting with URL, ending on URL or exact match
|
@@ -182,6 +183,13 @@ Please check the [Issue Tracker](http://www.qurl.nl/dynamic-widgets/issue-tracke
|
|
182 |
|
183 |
== Changelog ==
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
= Version 1.5.7 =
|
186 |
|
187 |
* Added Serbo-Croation language file (locale: sr_RS) - Hvala Borisa!
|
@@ -430,7 +438,8 @@ This version has 4 new features and 5 bugs fixed. See the changelog for details.
|
|
430 |
|
431 |
== Upgrade Notice ==
|
432 |
|
433 |
-
= 1.5.
|
|
|
434 |
|
435 |
This version has 1 feature added, 1 language added and 3 bugs fixed.
|
436 |
|
3 |
Donate link: http://www.qurl.nl/dynamic-widgets/donate/
|
4 |
Tags: widget, widgets, dynamic, sidebar, custom, rules, logic, display, admin, condition, conditional tags, hide, show, wpml, qtranslate, wpec, buddypress, pods, bbpress
|
5 |
Requires at least: 3.0.0
|
6 |
+
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.5.8
|
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 |
|
30 |
- Day of week
|
31 |
- Weeknumbers
|
32 |
- Browsers
|
33 |
+
- Devices (mobile, desktop)
|
34 |
- Theme Templates
|
35 |
- Languages (WPML or QTranslate)
|
36 |
- URL
|
59 |
- Day of week on day
|
60 |
- Weeknumer on number
|
61 |
- Browsers on browser name
|
62 |
+
- Devices on type
|
63 |
- Theme Templates on template name
|
64 |
- Languages (WPML or QTranslate) on language
|
65 |
- URL on starting with URL, ending on URL or exact match
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
+
= Version 1.5.8 =
|
187 |
+
|
188 |
+
* Renamed Mobile Device to Device for more expansion. WARNING: When you upgrade manually, remove the dynamic-widgets directory first!
|
189 |
+
* Removed the version number from the HTML comment.
|
190 |
+
* Fixed a few strict warnings.
|
191 |
+
* Fixed a few vulnerabilities discovered by Leon Juranic.
|
192 |
+
|
193 |
= Version 1.5.7 =
|
194 |
|
195 |
* Added Serbo-Croation language file (locale: sr_RS) - Hvala Borisa!
|
438 |
|
439 |
== Upgrade Notice ==
|
440 |
|
441 |
+
= 1.5.8 =
|
442 |
+
When you upgrade manually, remove the dynamic-widgets directory first.
|
443 |
|
444 |
This version has 1 feature added, 1 language added and 3 bugs fixed.
|
445 |
|