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 reactivate the plugin.
Download this release
Release Info
Developer | qurl |
Plugin | Dynamic Widgets |
Version | 1.3.6 |
Comparing to | |
See all releases |
Code changes from version 1.3.5 to 1.3.6
- dynamic-widgets.php +203 -60
- dynwid_admin.php +27 -10
- dynwid_admin_edit.php +162 -105
- dynwid_admin_overview.php +10 -10
- dynwid_admin_save.php +15 -8
- dynwid_class.php +28 -16
- dynwid_class_php4.php +30 -18
- dynwid_init_worker.php +20 -2
- dynwid_worker.php +19 -8
- locale/dynamic-widgets-nl.mo +0 -0
- locale/dynamic-widgets-nl.po +438 -0
- locale/dynamic-widgets.pot +433 -0
- plugin/wpml.php +22 -0
- plugin/wpsc.php +38 -0
- readme.txt +27 -6
dynamic-widgets.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://www.qurl.nl/dynamic-widgets/
|
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, dates, for the homepage, single posts, pages, authors, categories, archives, error page, search page and custom post types.
|
6 |
* Author: Jacco
|
7 |
-
* Version: 1.3.
|
8 |
* Author URI: http://www.qurl.nl/
|
9 |
* Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, conditional tags
|
10 |
*
|
@@ -15,24 +15,35 @@
|
|
15 |
*
|
16 |
* Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
|
17 |
*
|
18 |
-
* @version $Id: dynamic-widgets.php
|
19 |
*/
|
20 |
|
21 |
/*
|
22 |
WPML Plugin support via API
|
|
|
23 |
Using functions wpml_get_default_language() > dynwid_worker.php
|
24 |
-
wpml_get_current_language() > dynwid_worker.php,
|
25 |
-
wpml_get_content_translation() >
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
*/
|
27 |
|
28 |
// Constants
|
29 |
define('DW_DEBUG', FALSE);
|
30 |
define('DW_DB_TABLE', 'dynamic_widgets');
|
|
|
31 |
define('DW_LIST_LIMIT', 20);
|
32 |
define('DW_LIST_STYLE', 'style="overflow:auto;height:240px;"');
|
33 |
define('DW_OLD_METHOD', get_option('dynwid_old_method'));
|
34 |
-
define('
|
35 |
-
define('
|
|
|
|
|
|
|
36 |
define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
|
37 |
define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
|
38 |
|
@@ -45,6 +56,10 @@
|
|
45 |
require_once(dirname(__FILE__) . '/' . DW_CLASSFILE);
|
46 |
|
47 |
// Functions
|
|
|
|
|
|
|
|
|
48 |
function dynwid_activate() {
|
49 |
$wpdb = $GLOBALS['wpdb'];
|
50 |
$dbtable = $wpdb->prefix . DW_DB_TABLE;
|
@@ -64,19 +79,19 @@
|
|
64 |
$version = get_option('dynwid_version');
|
65 |
if ( $version !== FALSE ) {
|
66 |
/* 1.2 > Added support for widget display setting options for Author Pages.
|
67 |
-
|
68 |
if ( version_compare($version, '1.2', '<') ) {
|
69 |
$query = "SELECT widget_id FROM " . $dbtable . " WHERE maintype = 'archive'";
|
70 |
$results = $wpdb->get_results($query);
|
71 |
foreach ( $results as $myrow ) {
|
72 |
-
$query = "INSERT INTO "
|
73 |
$wpdb->query($query);
|
74 |
}
|
75 |
}
|
76 |
|
77 |
/* 1.3 > Added Date (range) support.
|
78 |
-
|
79 |
-
|
80 |
if ( version_compare($version, '1.3', '<') ) {
|
81 |
$query = "ALTER TABLE " . $dbtable . " CHANGE `value` `value` LONGTEXT NOT NULL";
|
82 |
$wpdb->query($query);
|
@@ -85,33 +100,44 @@
|
|
85 |
update_option('dynwid_version', DW_VERSION);
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
88 |
function dynwid_add_admin_menu() {
|
89 |
$DW = &$GLOBALS['DW'];
|
90 |
|
91 |
$screen = add_submenu_page('themes.php', 'Dynamic Widgets', 'Dynamic Widgets', 'switch_themes', 'dynwid-config', 'dynwid_admin_page');
|
92 |
-
add_action('admin_print_styles-' . $screen, 'dynwid_add_admin_styles');
|
93 |
-
add_action('admin_print_scripts-' . $screen, 'dynwid_add_admin_scripts');
|
94 |
-
|
95 |
-
// Contextual help
|
96 |
-
if ( $_GET['action'] == 'edit' ) {
|
97 |
-
$help = 'Widgets are always displayed by default (The \'<em>Yes</em>\' selection).<br />';
|
98 |
-
$help .= 'Click on the <img src="' . $DW->plugin_url . 'img/info.gif" alt="info" /> next to the options for more info.';
|
99 |
-
} else {
|
100 |
-
$help = '<p><strong>Static / Dynamic</strong><br />';
|
101 |
-
$help .= 'When a widget is <em>Static</em>, the widget uses the WordPress default. In other words, it\'s shown everywhere.<br />';
|
102 |
-
$help .= 'A widget is <em>Dynamic</em> when there are options set, i.e. not showing on the front page.</p>';
|
103 |
-
$help .= '<p><strong>Reset</strong><br />';
|
104 |
-
$help .= 'Reset makes the widget return to <em>Static</em>.</p>';
|
105 |
-
}
|
106 |
-
add_contextual_help($screen, $help);
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
115 |
function dynwid_add_admin_scripts() {
|
116 |
$DW = &$GLOBALS['DW'];
|
117 |
wp_enqueue_script('jquery');
|
@@ -119,11 +145,21 @@
|
|
119 |
wp_enqueue_script('jquery-ui-datepicker', $DW->plugin_url . 'jquery_datepicker.js', array('jquery-ui-core'));
|
120 |
}
|
121 |
|
|
|
|
|
|
|
|
|
122 |
function dynwid_add_admin_styles() {
|
123 |
$DW = &$GLOBALS['DW'];
|
124 |
wp_enqueue_style('jquery-ui-smoothness', $DW->plugin_url . 'jquery-ui-smoothness.css');
|
125 |
}
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
function dynwid_add_plugin_actions($all) {
|
128 |
$links = array();
|
129 |
$links[ ] = '<a href="themes.php?page=dynwid-config">' . __('Settings') . '</a>';
|
@@ -131,6 +167,10 @@
|
|
131 |
return array_merge($links, $all);
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
134 |
function dynwid_add_post_control() {
|
135 |
$post = $GLOBALS['post'];
|
136 |
$DW = &$GLOBALS['DW'];
|
@@ -157,6 +197,10 @@
|
|
157 |
}
|
158 |
}
|
159 |
|
|
|
|
|
|
|
|
|
160 |
function dynwid_add_tag_page() {
|
161 |
$DW = &$GLOBALS['DW'];
|
162 |
|
@@ -191,6 +235,10 @@
|
|
191 |
}
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
194 |
function dynwid_add_widget_control() {
|
195 |
$DW = &$GLOBALS['DW'];
|
196 |
|
@@ -206,8 +254,7 @@
|
|
206 |
|
207 |
/*
|
208 |
In odd cases params and/or params[0] seems not to be an array. Bugfix for:
|
209 |
-
Warning: Cannot use a scalar value as an array in ./wp-content/plugins/dynamic-widgets/dynamic-widgets.php
|
210 |
-
If the bug is not fixed, warning should now be on line 173
|
211 |
*/
|
212 |
|
213 |
/* Fixing params */
|
@@ -227,11 +274,15 @@
|
|
227 |
}
|
228 |
|
229 |
// Notifying user when options are saved and returned to ./wp-admin/widgets.php
|
230 |
-
if ( $_GET['dynwid_save'] == 'yes' ) {
|
231 |
add_action('sidebar_admin_page', 'dynwid_add_widget_page');
|
232 |
}
|
233 |
}
|
234 |
|
|
|
|
|
|
|
|
|
235 |
function dynwid_add_widget_page() {
|
236 |
$DW = &$GLOBALS['DW'];
|
237 |
|
@@ -244,6 +295,10 @@
|
|
244 |
echo '</div>';
|
245 |
}
|
246 |
|
|
|
|
|
|
|
|
|
247 |
function dynwid_admin_dump() {
|
248 |
$DW = &$GLOBALS['DW'];
|
249 |
|
@@ -255,11 +310,21 @@
|
|
255 |
die();
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
258 |
function dynwid_admin_page() {
|
259 |
$DW = &$GLOBALS['DW'];
|
260 |
require_once(dirname(__FILE__) . '/dynwid_admin.php');
|
261 |
}
|
262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
function dynwid_check_version($plugin_data, $r) {
|
264 |
$check = wp_remote_fopen(DW_VERSION_URL_CHECK . $r->new_version);
|
265 |
|
@@ -270,11 +335,19 @@
|
|
270 |
}
|
271 |
}
|
272 |
|
|
|
|
|
|
|
|
|
273 |
function dynwid_filter_init() {
|
274 |
$DW = &$GLOBALS['DW'];
|
275 |
require(dirname(__FILE__) . '/dynwid_init_worker.php');
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
278 |
function dynwid_filter_widgets() {
|
279 |
$DW = &$GLOBALS['DW'];
|
280 |
|
@@ -286,30 +359,44 @@
|
|
286 |
}
|
287 |
}
|
288 |
|
|
|
|
|
|
|
|
|
289 |
function dynwid_init() {
|
290 |
$GLOBALS['DW'] = new dynWid();
|
|
|
291 |
|
292 |
if ( is_admin() ) {
|
293 |
-
if ( $_POST['dynwid_save'] == 'yes' ) {
|
294 |
-
$DW = &$GLOBALS['DW'];
|
295 |
require_once(dirname(__FILE__) . '/dynwid_admin_save.php');
|
296 |
}
|
297 |
|
|
|
|
|
298 |
add_action('admin_menu', 'dynwid_add_admin_menu');
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
|
|
|
|
305 |
} else {
|
306 |
-
|
|
|
|
|
307 |
}
|
308 |
}
|
309 |
|
|
|
|
|
|
|
|
|
310 |
function dynwid_install() {
|
311 |
if ( function_exists('is_multisite') ) {
|
312 |
-
if ( is_multisite() && $_GET['networkwide'] == '1' ) {
|
313 |
$plugin = plugin_basename(__FILE__);
|
314 |
deactivate_plugins($plugin);
|
315 |
} else {
|
@@ -320,6 +407,11 @@
|
|
320 |
}
|
321 |
}
|
322 |
|
|
|
|
|
|
|
|
|
|
|
323 |
function dynwid_save_postdata($post_id) {
|
324 |
$DW = &$GLOBALS['DW'];
|
325 |
|
@@ -357,6 +449,11 @@
|
|
357 |
} // END if array_key_exists
|
358 |
}
|
359 |
|
|
|
|
|
|
|
|
|
|
|
360 |
function dynwid_save_tagdata($term_id) {
|
361 |
// Only act when tag is updated via 'edit', NOT via 'quick edit'
|
362 |
if ( $_POST['action'] == 'editedtag' ) {
|
@@ -367,7 +464,7 @@
|
|
367 |
}
|
368 |
|
369 |
// Housekeeping
|
370 |
-
$opt = $DW->getOptions('%','individual');
|
371 |
foreach ( $opt as $widget ) {
|
372 |
$DW->deleteOption($widget['widget_id'], 'single-tag', $term_id);
|
373 |
}
|
@@ -392,12 +489,43 @@
|
|
392 |
} // END if action
|
393 |
}
|
394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
function dynwid_uninstall() {
|
396 |
$wpdb = $GLOBALS['wpdb'];
|
397 |
$dbtable = $wpdb->prefix . DW_DB_TABLE;
|
398 |
|
399 |
// Housekeeping
|
|
|
|
|
400 |
delete_option('dynwid_version');
|
|
|
401 |
$query = "DROP TABLE IF EXISTS " . $dbtable;
|
402 |
$wpdb->query($query);
|
403 |
|
@@ -411,6 +539,10 @@
|
|
411 |
die();
|
412 |
}
|
413 |
|
|
|
|
|
|
|
|
|
414 |
function dynwid_widget_callback() {
|
415 |
$DW = &$GLOBALS['DW'];
|
416 |
|
@@ -423,22 +555,23 @@
|
|
423 |
|
424 |
// Now adding the dynwid text & link
|
425 |
echo '<p><b>Dynamic Widgets</b><br />';
|
426 |
-
echo 'This widget is <a title="Edit Dynamic Widgets Options" href="themes.php?page=dynwid-config&action=edit&id=' . $widget_id . '&returnurl=' . urlencode(
|
427 |
-
echo ( $DW->hasOptions($widget_id) ) ? '
|
428 |
echo '</a>.';
|
429 |
if ( $DW->hasOptions($widget_id) ) {
|
430 |
$s = array();
|
431 |
$buffer = array(
|
432 |
-
'role' => 'Role',
|
433 |
-
'date' => 'Date',
|
434 |
-
'front-page' => 'Front Page',
|
435 |
-
'single' => 'Single Posts',
|
436 |
-
'page' => 'Pages',
|
437 |
-
'author' => 'Author Pages',
|
438 |
-
'category' => 'Category Pages',
|
439 |
-
'archive' => 'Archive Pages',
|
440 |
-
'e404' => 'Error Page',
|
441 |
-
'search' => 'Search page'
|
|
|
442 |
);
|
443 |
|
444 |
// Adding Custom Post Types to $buffer
|
@@ -473,21 +606,31 @@
|
|
473 |
if (! empty($buffer[$type]) ) {
|
474 |
$string .= $buffer[$type];
|
475 |
}
|
476 |
-
$string .= ( ($last - 1) == $i ) ? ' and ' : ', ';
|
477 |
}
|
478 |
$type = $s[$last];
|
479 |
$string .= $buffer[$type];
|
480 |
|
481 |
-
$output = '<br /><small>
|
482 |
-
$output .= ( count($opt) > 1 ) ? '
|
483 |
-
$output .= '
|
484 |
echo $output;
|
485 |
}
|
486 |
echo '</p>';
|
487 |
}
|
488 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
function dynwid_worker($sidebars) {
|
490 |
$DW = &$GLOBALS['DW'];
|
|
|
|
|
|
|
491 |
require(dirname(__FILE__) . '/dynwid_worker.php');
|
492 |
|
493 |
return $sidebars;
|
4 |
* Plugin URI: http://www.qurl.nl/dynamic-widgets/
|
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, dates, for the homepage, single posts, pages, authors, categories, archives, error page, search page and custom post types.
|
6 |
* Author: Jacco
|
7 |
+
* Version: 1.3.6
|
8 |
* Author URI: http://www.qurl.nl/
|
9 |
* Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, conditional tags
|
10 |
*
|
15 |
*
|
16 |
* Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
|
17 |
*
|
18 |
+
* @version $Id: dynamic-widgets.php 301808 2010-10-19 18:03:00Z qurl $
|
19 |
*/
|
20 |
|
21 |
/*
|
22 |
WPML Plugin support via API
|
23 |
+
Using constants ICL_PLUGIN_PATH > dynwid_admin_edit.php
|
24 |
Using functions wpml_get_default_language() > dynwid_worker.php
|
25 |
+
wpml_get_current_language() > dynwid_worker.php, wpml.php
|
26 |
+
wpml_get_content_translation() > wpml.php
|
27 |
+
*/
|
28 |
+
|
29 |
+
/*
|
30 |
+
WPSC/WPEC Plugin support
|
31 |
+
Using constants WPSC_TABLE_PRODUCT_CATEGORIES > dynwid_admin_edit.php, dynwid_init_worker.php, wpsc.php
|
32 |
+
Using vars $wpsc_query > dynwid_init_worker.php, wpsc.php
|
33 |
*/
|
34 |
|
35 |
// Constants
|
36 |
define('DW_DEBUG', FALSE);
|
37 |
define('DW_DB_TABLE', 'dynamic_widgets');
|
38 |
+
define('DW_L10N_DOMAIN', 'dynamic-widgets');
|
39 |
define('DW_LIST_LIMIT', 20);
|
40 |
define('DW_LIST_STYLE', 'style="overflow:auto;height:240px;"');
|
41 |
define('DW_OLD_METHOD', get_option('dynwid_old_method'));
|
42 |
+
define('DW_PLUGIN', dirname(__FILE__) . '/' . 'plugin/');
|
43 |
+
define('DW_TIME_LIMIT', 86400); // 1 day
|
44 |
+
define('DW_URL', 'http://www.qurl.nl');
|
45 |
+
define('DW_VERSION', '1.3.6');
|
46 |
+
define('DW_VERSION_URL_CHECK', DW_URL . '/wp-content/uploads/php/dw_version.php?v=' . DW_VERSION . '&n=');
|
47 |
define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
|
48 |
define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
|
49 |
|
56 |
require_once(dirname(__FILE__) . '/' . DW_CLASSFILE);
|
57 |
|
58 |
// Functions
|
59 |
+
/**
|
60 |
+
* dynwid_activate() Activate the plugin
|
61 |
+
* @since 1.3.3
|
62 |
+
*/
|
63 |
function dynwid_activate() {
|
64 |
$wpdb = $GLOBALS['wpdb'];
|
65 |
$dbtable = $wpdb->prefix . DW_DB_TABLE;
|
79 |
$version = get_option('dynwid_version');
|
80 |
if ( $version !== FALSE ) {
|
81 |
/* 1.2 > Added support for widget display setting options for Author Pages.
|
82 |
+
Need to apply archive rule to author also to keep same behavior. */
|
83 |
if ( version_compare($version, '1.2', '<') ) {
|
84 |
$query = "SELECT widget_id FROM " . $dbtable . " WHERE maintype = 'archive'";
|
85 |
$results = $wpdb->get_results($query);
|
86 |
foreach ( $results as $myrow ) {
|
87 |
+
$query = "INSERT INTO " . $dbtable . "(widget_id, maintype, value) VALUES ('" . $myrow->widget_id . "', 'author', '0')";
|
88 |
$wpdb->query($query);
|
89 |
}
|
90 |
}
|
91 |
|
92 |
/* 1.3 > Added Date (range) support.
|
93 |
+
Need to change DB `value` to a LONGTEXT type
|
94 |
+
(not for the date of course, but for supporting next features which might need a lot of space) */
|
95 |
if ( version_compare($version, '1.3', '<') ) {
|
96 |
$query = "ALTER TABLE " . $dbtable . " CHANGE `value` `value` LONGTEXT NOT NULL";
|
97 |
$wpdb->query($query);
|
100 |
update_option('dynwid_version', DW_VERSION);
|
101 |
}
|
102 |
|
103 |
+
/**
|
104 |
+
* dynwid_add_admin_menu() Add plugin link to admin menu
|
105 |
+
* @since 1.0
|
106 |
+
*/
|
107 |
function dynwid_add_admin_menu() {
|
108 |
$DW = &$GLOBALS['DW'];
|
109 |
|
110 |
$screen = add_submenu_page('themes.php', 'Dynamic Widgets', 'Dynamic Widgets', 'switch_themes', 'dynwid-config', 'dynwid_admin_page');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
+
if ( $DW->enabled ) {
|
113 |
+
add_action('admin_print_styles-' . $screen, 'dynwid_add_admin_styles');
|
114 |
+
add_action('admin_print_scripts-' . $screen, 'dynwid_add_admin_scripts');
|
115 |
+
|
116 |
+
// Contextual help
|
117 |
+
if ( isset($_GET['action']) && $_GET['action'] == 'edit' ) {
|
118 |
+
$help = __('Widgets are always displayed by default', DW_L10N_DOMAIN) . ' (' . __('The') . ' \'<em>' . __('Yes') .'</em>\' ' . __('selection', DW_L10N_DOMAIN) . ').<br />';
|
119 |
+
$help .= __('Click on the', DW_L10N_DOMAIN) . ' <img src="' . $DW->plugin_url . 'img/info.gif" alt="info" /> ' . __('next to the options for more info', DW_L10N_DOMAIN) . '.';
|
120 |
+
} else {
|
121 |
+
$help = '<p><strong>' . __('Static', DW_L10N_DOMAIN) . ' / ' . __('Dynamic', DW_L10N_DOMAIN) . '</strong><br />';
|
122 |
+
$help .= __('When a widget is', DW_L10N_DOMAIN) . ' <em>' . __('Static', DW_L10N_DOMAIN) . '</em>, ' . __('the widget uses the WordPress default. In other words, it\'s shown everywhere', DW_L10N_DOMAIN) . '.<br />';
|
123 |
+
$help .= __('A widget is', DW_L10N_DOMAIN) . ' <em>' . __('Dynamic', DW_L10N_DOMAIN) . '</em> ' . __('when there are options set, i.e. not showing on the front page.', DW_L10N_DOMAIN) . '</p>';
|
124 |
+
$help .= '<p><strong>' . __('Reset', DW_L10N_DOMAIN) . '</strong><br />';
|
125 |
+
$help .= __('Reset makes the widget return to', DW_L10N_DOMAIN) . ' <em>' . __('Static', DW_L10N_DOMAIN) . '</em>.</p>';
|
126 |
+
}
|
127 |
+
add_contextual_help($screen, $help);
|
128 |
+
|
129 |
+
// Only show meta box in posts panel when there are widgets enabled.
|
130 |
+
$opt = $DW->getOptions('%','individual');
|
131 |
+
if ( count($opt) > 0 ) {
|
132 |
+
add_meta_box('dynwid', 'Dynamic Widgets', 'dynwid_add_post_control', 'post', 'side', 'low');
|
133 |
+
}
|
134 |
+
}
|
135 |
}
|
136 |
|
137 |
+
/**
|
138 |
+
* dynwid_add_admin_scripts() Enqueue jQuery UI scripts to admin page
|
139 |
+
* @since 1.3
|
140 |
+
*/
|
141 |
function dynwid_add_admin_scripts() {
|
142 |
$DW = &$GLOBALS['DW'];
|
143 |
wp_enqueue_script('jquery');
|
145 |
wp_enqueue_script('jquery-ui-datepicker', $DW->plugin_url . 'jquery_datepicker.js', array('jquery-ui-core'));
|
146 |
}
|
147 |
|
148 |
+
/**
|
149 |
+
* dynwid_add_admin_styles() Enqueue CSS to admin page
|
150 |
+
* @since 1.3
|
151 |
+
*/
|
152 |
function dynwid_add_admin_styles() {
|
153 |
$DW = &$GLOBALS['DW'];
|
154 |
wp_enqueue_style('jquery-ui-smoothness', $DW->plugin_url . 'jquery-ui-smoothness.css');
|
155 |
}
|
156 |
|
157 |
+
/**
|
158 |
+
* dynwid_add_plugin_actions() Add settings link in WP plugin overview
|
159 |
+
* @param array $all
|
160 |
+
* @return array
|
161 |
+
* @since 1.0
|
162 |
+
*/
|
163 |
function dynwid_add_plugin_actions($all) {
|
164 |
$links = array();
|
165 |
$links[ ] = '<a href="themes.php?page=dynwid-config">' . __('Settings') . '</a>';
|
167 |
return array_merge($links, $all);
|
168 |
}
|
169 |
|
170 |
+
/**
|
171 |
+
* dynwid_add_post_control() Add control widget to post screen
|
172 |
+
* @since 1.2
|
173 |
+
*/
|
174 |
function dynwid_add_post_control() {
|
175 |
$post = $GLOBALS['post'];
|
176 |
$DW = &$GLOBALS['DW'];
|
197 |
}
|
198 |
}
|
199 |
|
200 |
+
/**
|
201 |
+
* dynwid_add_tag_page() Add row to WP tags admin
|
202 |
+
* @since 1.2
|
203 |
+
*/
|
204 |
function dynwid_add_tag_page() {
|
205 |
$DW = &$GLOBALS['DW'];
|
206 |
|
235 |
}
|
236 |
}
|
237 |
|
238 |
+
/**
|
239 |
+
* dynwid_add_widget_control() Preparation for callback hook into WP widgets admin
|
240 |
+
* @since 1.2
|
241 |
+
*/
|
242 |
function dynwid_add_widget_control() {
|
243 |
$DW = &$GLOBALS['DW'];
|
244 |
|
254 |
|
255 |
/*
|
256 |
In odd cases params and/or params[0] seems not to be an array. Bugfix for:
|
257 |
+
Warning: Cannot use a scalar value as an array in ./wp-content/plugins/dynamic-widgets/dynamic-widgets.php
|
|
|
258 |
*/
|
259 |
|
260 |
/* Fixing params */
|
274 |
}
|
275 |
|
276 |
// Notifying user when options are saved and returned to ./wp-admin/widgets.php
|
277 |
+
if ( isset($_GET['dynwid_save']) && $_GET['dynwid_save'] == 'yes' ) {
|
278 |
add_action('sidebar_admin_page', 'dynwid_add_widget_page');
|
279 |
}
|
280 |
}
|
281 |
|
282 |
+
/**
|
283 |
+
* dynwid_add_widget_page() Save success message for WP widgets admin
|
284 |
+
* @since 1.2
|
285 |
+
*/
|
286 |
function dynwid_add_widget_page() {
|
287 |
$DW = &$GLOBALS['DW'];
|
288 |
|
295 |
echo '</div>';
|
296 |
}
|
297 |
|
298 |
+
/**
|
299 |
+
* dynwid_admin_dump() Dump function
|
300 |
+
* @since 1.0
|
301 |
+
*/
|
302 |
function dynwid_admin_dump() {
|
303 |
$DW = &$GLOBALS['DW'];
|
304 |
|
310 |
die();
|
311 |
}
|
312 |
|
313 |
+
/**
|
314 |
+
* dynwid_admin_page() Admin pages
|
315 |
+
* @since 1.0
|
316 |
+
*/
|
317 |
function dynwid_admin_page() {
|
318 |
$DW = &$GLOBALS['DW'];
|
319 |
require_once(dirname(__FILE__) . '/dynwid_admin.php');
|
320 |
}
|
321 |
|
322 |
+
/**
|
323 |
+
* dynwid_check_version() Displays changelog with latest version compared to installed version
|
324 |
+
* @param mixed $plugin_data
|
325 |
+
* @param object $r
|
326 |
+
* @since 1.3.1
|
327 |
+
*/
|
328 |
function dynwid_check_version($plugin_data, $r) {
|
329 |
$check = wp_remote_fopen(DW_VERSION_URL_CHECK . $r->new_version);
|
330 |
|
335 |
}
|
336 |
}
|
337 |
|
338 |
+
/**
|
339 |
+
* dynwid_filter_init() Init of the worker
|
340 |
+
* @since 1.3.5
|
341 |
+
*/
|
342 |
function dynwid_filter_init() {
|
343 |
$DW = &$GLOBALS['DW'];
|
344 |
require(dirname(__FILE__) . '/dynwid_init_worker.php');
|
345 |
}
|
346 |
|
347 |
+
/**
|
348 |
+
* dynwid_filter_widgets() Worker
|
349 |
+
* @since 1.3.5
|
350 |
+
*/
|
351 |
function dynwid_filter_widgets() {
|
352 |
$DW = &$GLOBALS['DW'];
|
353 |
|
359 |
}
|
360 |
}
|
361 |
|
362 |
+
/**
|
363 |
+
* dynwid_init() Init of the plugin
|
364 |
+
* @since 1.0
|
365 |
+
*/
|
366 |
function dynwid_init() {
|
367 |
$GLOBALS['DW'] = new dynWid();
|
368 |
+
$DW = &$GLOBALS['DW'];
|
369 |
|
370 |
if ( is_admin() ) {
|
371 |
+
if ( isset($_POST['dynwid_save']) && $_POST['dynwid_save'] == 'yes' ) {
|
|
|
372 |
require_once(dirname(__FILE__) . '/dynwid_admin_save.php');
|
373 |
}
|
374 |
|
375 |
+
load_plugin_textdomain(DW_L10N_DOMAIN, FALSE, dirname(plugin_basename(__FILE__)) . '/locale');
|
376 |
+
|
377 |
add_action('admin_menu', 'dynwid_add_admin_menu');
|
378 |
+
if ( $DW->enabled ) {
|
379 |
+
add_action('edit_tag_form_fields', 'dynwid_add_tag_page');
|
380 |
+
add_action('edited_term', 'dynwid_save_tagdata');
|
381 |
+
add_action('in_plugin_update_message-' . plugin_basename(__FILE__), 'dynwid_check_version', 10, 2);
|
382 |
+
add_action('plugin_action_links_' . plugin_basename(__FILE__), 'dynwid_add_plugin_actions');
|
383 |
+
add_action('save_post', 'dynwid_save_postdata');
|
384 |
+
add_action('sidebar_admin_setup', 'dynwid_add_widget_control');
|
385 |
+
}
|
386 |
} else {
|
387 |
+
if ( $DW->enabled ) {
|
388 |
+
add_action('wp_head', 'dynwid_filter_widgets');
|
389 |
+
}
|
390 |
}
|
391 |
}
|
392 |
|
393 |
+
/**
|
394 |
+
* dynwid_install() Installation
|
395 |
+
* @since 1.3.1
|
396 |
+
*/
|
397 |
function dynwid_install() {
|
398 |
if ( function_exists('is_multisite') ) {
|
399 |
+
if ( is_multisite() && isset($_GET['networkwide']) && $_GET['networkwide'] == '1' ) {
|
400 |
$plugin = plugin_basename(__FILE__);
|
401 |
deactivate_plugins($plugin);
|
402 |
} else {
|
407 |
}
|
408 |
}
|
409 |
|
410 |
+
/**
|
411 |
+
* dynwid_save_postdata() Save of options via post screen
|
412 |
+
* @param int $post_id
|
413 |
+
* @since 1.2
|
414 |
+
*/
|
415 |
function dynwid_save_postdata($post_id) {
|
416 |
$DW = &$GLOBALS['DW'];
|
417 |
|
449 |
} // END if array_key_exists
|
450 |
}
|
451 |
|
452 |
+
/**
|
453 |
+
* dynwid_save_tagdata() Save of tagdata
|
454 |
+
* @param int $term_id
|
455 |
+
* @since 1.2
|
456 |
+
*/
|
457 |
function dynwid_save_tagdata($term_id) {
|
458 |
// Only act when tag is updated via 'edit', NOT via 'quick edit'
|
459 |
if ( $_POST['action'] == 'editedtag' ) {
|
464 |
}
|
465 |
|
466 |
// Housekeeping
|
467 |
+
$opt = $DW->getOptions('%', 'individual');
|
468 |
foreach ( $opt as $widget ) {
|
469 |
$DW->deleteOption($widget['widget_id'], 'single-tag', $term_id);
|
470 |
}
|
489 |
} // END if action
|
490 |
}
|
491 |
|
492 |
+
/**
|
493 |
+
* dynwid_sql_mode() Internal check for STRICT sql mode
|
494 |
+
* @since 1.3.6
|
495 |
+
*/
|
496 |
+
function dynwid_sql_mode() {
|
497 |
+
$wpdb = $GLOBALS['wpdb'];
|
498 |
+
$strict_mode = array('STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES');
|
499 |
+
|
500 |
+
$query = "SELECT @@GLOBAL.sql_mode";
|
501 |
+
$result = $wpdb->get_var($query);
|
502 |
+
$sql_global = explode(',', $result);
|
503 |
+
|
504 |
+
$query = "SELECT @@SESSION.sql_mode";
|
505 |
+
$result = $wpdb->get_var($query);
|
506 |
+
$sql_session = explode(',', $result);
|
507 |
+
|
508 |
+
$sqlmode = array_merge($sql_global, $sql_session);
|
509 |
+
if ( (bool) array_intersect($sql_session, $strict_mode) ) {
|
510 |
+
return TRUE;
|
511 |
+
} else {
|
512 |
+
return FALSE;
|
513 |
+
}
|
514 |
+
}
|
515 |
+
|
516 |
+
/**
|
517 |
+
* dynwid_uninstall() Uninstall
|
518 |
+
* @since 1.0
|
519 |
+
*/
|
520 |
function dynwid_uninstall() {
|
521 |
$wpdb = $GLOBALS['wpdb'];
|
522 |
$dbtable = $wpdb->prefix . DW_DB_TABLE;
|
523 |
|
524 |
// Housekeeping
|
525 |
+
delete_option('dynwid_housekeeping_lastrun');
|
526 |
+
delete_option('dynwid_old_method');
|
527 |
delete_option('dynwid_version');
|
528 |
+
|
529 |
$query = "DROP TABLE IF EXISTS " . $dbtable;
|
530 |
$wpdb->query($query);
|
531 |
|
539 |
die();
|
540 |
}
|
541 |
|
542 |
+
/**
|
543 |
+
* dynwid_widget_callback() Callback function for hooking into WP widgets admin
|
544 |
+
* @since 1.2
|
545 |
+
*/
|
546 |
function dynwid_widget_callback() {
|
547 |
$DW = &$GLOBALS['DW'];
|
548 |
|
555 |
|
556 |
// Now adding the dynwid text & link
|
557 |
echo '<p><b>Dynamic Widgets</b><br />';
|
558 |
+
echo __('This widget is', DW_L10N_DOMAIN) . ' <a title="Edit Dynamic Widgets Options" href="themes.php?page=dynwid-config&action=edit&id=' . $widget_id . '&returnurl=' . urlencode(trailingslashit(admin_url()) . 'widgets.php') . '">';
|
559 |
+
echo ( $DW->hasOptions($widget_id) ) ? strtolower(__('Dynamic', DW_L10N_DOMAIN)) : strtolower(__('Static', DW_L10N_DOMAIN));
|
560 |
echo '</a>.';
|
561 |
if ( $DW->hasOptions($widget_id) ) {
|
562 |
$s = array();
|
563 |
$buffer = array(
|
564 |
+
'role' => __('Role'),
|
565 |
+
'date' => __('Date'),
|
566 |
+
'front-page' => __('Front Page', DW_L10N_DOMAIN),
|
567 |
+
'single' => __('Single Posts', DW_L10N_DOMAIN),
|
568 |
+
'page' => __('Pages'),
|
569 |
+
'author' => __('Author Pages', DW_L10N_DOMAIN),
|
570 |
+
'category' => __('Category Pages', DW_L10N_DOMAIN),
|
571 |
+
'archive' => __('Archive Pages', DW_L10N_DOMAIN),
|
572 |
+
'e404' => __('Error Page', DW_L10N_DOMAIN),
|
573 |
+
'search' => __('Search page', DW_L10N_DOMAIN),
|
574 |
+
'wpsc' => __('WPSC Category', DW_L10N_DOMAIN)
|
575 |
);
|
576 |
|
577 |
// Adding Custom Post Types to $buffer
|
606 |
if (! empty($buffer[$type]) ) {
|
607 |
$string .= $buffer[$type];
|
608 |
}
|
609 |
+
$string .= ( ($last - 1) == $i ) ? ' ' . __('and', DW_L10N_DOMAIN) . ' ' : ', ';
|
610 |
}
|
611 |
$type = $s[$last];
|
612 |
$string .= $buffer[$type];
|
613 |
|
614 |
+
$output = '<br /><small>';
|
615 |
+
$output .= ( count($opt) > 1 ) ? __('Options set for', DW_L10N_DOMAIN) : __('Option set for', DW_L10N_DOMAIN);
|
616 |
+
$output .= ' ' . $string . '.</small>';
|
617 |
echo $output;
|
618 |
}
|
619 |
echo '</p>';
|
620 |
}
|
621 |
|
622 |
+
/**
|
623 |
+
* dynwid_worker() Worker process
|
624 |
+
*
|
625 |
+
* @param array $sidebars
|
626 |
+
* @return array
|
627 |
+
* @since 1.0
|
628 |
+
*/
|
629 |
function dynwid_worker($sidebars) {
|
630 |
$DW = &$GLOBALS['DW'];
|
631 |
+
if ( $DW->wpsc ) {
|
632 |
+
$wpsc_query = &$GLOBALS['wpsc_query'];
|
633 |
+
}
|
634 |
require(dirname(__FILE__) . '/dynwid_worker.php');
|
635 |
|
636 |
return $sidebars;
|
dynwid_admin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* dynwid_admin.php - Startpage for admin
|
4 |
*
|
5 |
-
* @version $Id: dynwid_admin.php
|
6 |
*/
|
7 |
?>
|
8 |
|
@@ -10,21 +10,38 @@
|
|
10 |
<h2>Dynamic Widgets</h2>
|
11 |
|
12 |
<?php
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
?>
|
23 |
|
24 |
<!-- Footer //-->
|
25 |
<div class="clear"><br /><br /></div>
|
26 |
<div><small>
|
27 |
-
<a href="
|
28 |
</small></div>
|
29 |
|
30 |
</div> <!-- /wrap //-->
|
2 |
/**
|
3 |
* dynwid_admin.php - Startpage for admin
|
4 |
*
|
5 |
+
* @version $Id: dynwid_admin.php 300719 2010-10-16 19:15:37Z qurl $
|
6 |
*/
|
7 |
?>
|
8 |
|
10 |
<h2>Dynamic Widgets</h2>
|
11 |
|
12 |
<?php
|
13 |
+
if ( $DW->enabled ) {
|
14 |
+
if ( dynwid_sql_mode() ) {
|
15 |
+
echo '<div class="error" id="message"><p>';
|
16 |
+
_e('<b>WARNING</b> STRICT sql mode in effect. Dynamic Widgets might not work correctly. Please disable STRICT sql mode.', DW_L10N_DOMAIN);
|
17 |
+
echo '</p></div>';
|
18 |
+
}
|
19 |
|
20 |
+
// Actions
|
21 |
+
if ( isset($_GET['action']) && $_GET['action'] == 'edit' ) {
|
22 |
+
$dw_admin_script = '/dynwid_admin_edit.php';
|
23 |
+
} else {
|
24 |
+
$dw_admin_script = '/dynwid_admin_overview.php';
|
25 |
+
|
26 |
+
// Do some housekeeping
|
27 |
+
$lastrun = get_option('dynwid_housekeeping_lastrun');
|
28 |
+
if ( time() - $lastrun > DW_TIME_LIMIT ) {
|
29 |
+
$DW->housekeeping();
|
30 |
+
update_option('dynwid_housekeeping_lastrun', time());
|
31 |
+
}
|
32 |
+
}
|
33 |
+
require_once(dirname(__FILE__) . $dw_admin_script);
|
34 |
+
} else {
|
35 |
+
echo '<div class="error" id="message"><p>';
|
36 |
+
_e('Oops! Something went terrible wrong. Please reinstall Dynamic Widgets.', DW_L10N_DOMAIN);
|
37 |
+
echo '</p></div>';
|
38 |
+
}
|
39 |
?>
|
40 |
|
41 |
<!-- Footer //-->
|
42 |
<div class="clear"><br /><br /></div>
|
43 |
<div><small>
|
44 |
+
<a href="<?php echo DW_URL; ?>/dynamic-widgets/" target="_blank">Dynamic Widgets</a> v<?php echo DW_VERSION; ?> (<?php echo ( DW_CLASSFILE == 'dynwid_class_php4.php' ? 'PHP4' : 'PHP5' ) . ', ' . ( DW_OLD_METHOD ? __('OLD', DW_L10N_DOMAIN) : __('FILTER', DW_L10N_DOMAIN) ); ?>)
|
45 |
</small></div>
|
46 |
|
47 |
</div> <!-- /wrap //-->
|
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 |
*/
|
7 |
|
8 |
// WPML Plugin support
|
@@ -11,9 +11,15 @@
|
|
11 |
$wpml_icon = '<img src="' . $DW->plugin_url . DW_WPML_ICON . '" alt="WMPL" title="Dynamic Widgets syncs with other languages of these pages via WPML" />';
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
// Roles
|
15 |
$wp_roles = $GLOBALS['wp_roles'];
|
16 |
-
$roles = array_merge($wp_roles->role_names, array('anonymous' => 'Anonymous|User role'));
|
17 |
$jsroles = array();
|
18 |
foreach ( $roles as $rid => $role ) {
|
19 |
$roles[esc_attr($rid)] = translate_user_role($role);
|
@@ -63,7 +69,7 @@
|
|
63 |
|
64 |
// Front Page
|
65 |
if ( get_option('show_on_front') == 'page' ) {
|
66 |
-
$frontpage_yes_selected = 'disabled="
|
67 |
$frontpage_no_selected = $frontpage_yes_selected;
|
68 |
} else {
|
69 |
$frontpage_yes_selected = 'checked="checked"';
|
@@ -79,7 +85,7 @@
|
|
79 |
|
80 |
// Single Post
|
81 |
$single_yes_selected = 'checked="checked"';
|
82 |
-
$single_condition
|
83 |
$opt_single = $DW->getOptions($_GET['id'], 'single');
|
84 |
if ( count($opt_single) > 0 ) {
|
85 |
foreach ( $opt_single as $widget ) {
|
@@ -266,6 +272,33 @@
|
|
266 |
unset($search_yes_selected);
|
267 |
}
|
268 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
?>
|
270 |
|
271 |
<style type="text/css">
|
@@ -293,113 +326,120 @@ label {
|
|
293 |
}
|
294 |
</style>
|
295 |
|
296 |
-
<?php if ( $_POST['dynwid_save'] == 'yes' ) { ?>
|
297 |
<div class="updated fade" id="message">
|
298 |
<p>
|
299 |
-
<strong
|
300 |
</p>
|
301 |
</div>
|
302 |
-
<?php } else if ( $_GET['work'] == 'none' ) { ?>
|
303 |
<div class="error" id="message">
|
304 |
-
<p
|
305 |
</div>
|
306 |
-
<?php } else if ( $_GET['work'] == 'nonedate' ) { ?>
|
307 |
<div class="error" id="message">
|
308 |
-
<p
|
309 |
</div>
|
310 |
|
311 |
<?php } ?>
|
312 |
|
313 |
-
<h3
|
314 |
<?php echo ( DW_DEBUG ) ? '<pre>ID = ' . $_GET['id'] . '</pre><br />' : ''; ?>
|
315 |
|
316 |
-
<form action="<?php echo
|
317 |
<?php wp_nonce_field('plugin-name-action_edit_' . $_GET['id']); ?>
|
318 |
<input type="hidden" name="dynwid_save" value="yes" />
|
319 |
<input type="hidden" name="widget_id" value="<?php echo $_GET['id']; ?>" />
|
320 |
-
<input type="hidden" name="returnurl" value="<?php echo urldecode($_GET['returnurl']); ?>" />
|
321 |
|
322 |
-
<b
|
323 |
-
Show widget to everybody?
|
324 |
<?php $DW->dumpOpt($opt_role); ?>
|
325 |
<div>
|
326 |
<div id="role" class="infotext">
|
327 |
-
Setting options by role is very powerfull. It can override all other options!<br />
|
328 |
-
|
329 |
</div>
|
330 |
</div>
|
331 |
-
<input type="radio" name="role" value="yes" id="role-yes" <?php echo $role_yes_selected; ?> onclick="swChb(cRole, true);" /> <label for="role-yes"
|
332 |
-
<input type="radio" name="role" value="no" id="role-no" <?php echo $role_no_selected; ?> onclick="swChb(cRole, false)" /> <label for="role-no"
|
333 |
-
<div id="role-select" class="condition-select" <?php echo $role_condition_select_style; ?>>
|
334 |
<?php foreach ( $roles as $rid => $role ) { ?>
|
335 |
-
<input type="checkbox" id="role_act_<?php echo $rid; ?>" name="role_act[]" value="<?php echo $rid; ?>" <?php echo ( count($role_act) > 0 && in_array($rid
|
336 |
<?php } ?>
|
337 |
</div>
|
338 |
|
339 |
<br />
|
340 |
|
341 |
-
<b
|
342 |
-
Show widget always
|
343 |
<?php $DW->dumpOpt($opt_date); ?>
|
344 |
<div>
|
345 |
<div id="date" class="infotext">
|
346 |
-
Next to the above role option, the date option is also very powerfull. You've been warned
|
347 |
-
Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" /><br />
|
348 |
-
Date ranges can be made by entering a From AND a To date<br />
|
349 |
-
|
350 |
-
|
|
|
351 |
</div>
|
352 |
</div>
|
353 |
-
<input type="radio" name="date" value="yes" id="date-yes" <?php echo $date_yes_selected; ?> onclick="swTxt(cDate, true);" /> <label for="date-yes"
|
354 |
-
<input type="radio" name="date" value="no" id="date-no" <?php echo $date_no_selected; ?> onclick="swTxt(cDate, false)" /> <label for="date-no"
|
355 |
<div id="date-select" class="condition-select">
|
356 |
<table border="0" cellspacing="0" cellpadding="0">
|
357 |
<tr>
|
358 |
-
<td style="width:45px;"
|
359 |
-
<td><input id="date_start" type="text" name="date_start" value="<?php echo $date_start; ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_start')" /></td>
|
360 |
</tr>
|
361 |
<tr>
|
362 |
-
<td style="width:45px;"
|
363 |
-
<td><input id="date_end" type="text" name="date_end" value="<?php echo $date_end; ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_end')" /></td>
|
364 |
</tr>
|
365 |
</table>
|
366 |
</div>
|
367 |
|
368 |
<br />
|
369 |
|
370 |
-
<b
|
371 |
-
Show widget on the front page
|
372 |
<?php $DW->dumpOpt($opt_frontpage); ?>
|
373 |
<div>
|
374 |
<div id="frontpage" class="infotext">
|
375 |
-
This option only applies when your front page is set to display your latest posts (See Settings > Reading).<br />
|
376 |
-
|
|
|
377 |
</div>
|
378 |
</div>
|
379 |
-
<input type="radio" name="front-page" value="yes" id="front-page-yes" <?php echo $frontpage_yes_selected; ?> /> <label for="front-page-yes"
|
380 |
-
<input type="radio" name="front-page" value="no" id="front-page-no" <?php echo $frontpage_no_selected; ?> /> <label for="front-page-no"
|
381 |
|
382 |
<br /><br />
|
383 |
|
384 |
-
<b
|
385 |
-
Show widget default on single posts
|
386 |
<?php $DW->dumpOpt($opt_single); ?>
|
387 |
<div>
|
388 |
<div id="single" class="infotext">
|
389 |
-
When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won't be applied.
|
390 |
-
|
|
|
391 |
</div>
|
392 |
</div>
|
393 |
-
<input type="radio" name="single" value="yes" id="single-yes" <?php echo $single_yes_selected; ?> /> <label for="single-yes"
|
394 |
-
<input type="radio" name="single" value="no" id="single-no" <?php echo $single_no_selected; ?> /> <label for="single-no"
|
395 |
<?php $DW->dumpOpt($opt_individual); ?>
|
396 |
<input type="checkbox" id="individual" name="individual" value="1" <?php echo ( $individual ) ? 'checked="checked"' : ''; ?> onclick="chkInPosts()" />
|
397 |
-
<label for="individual"
|
398 |
<img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="Click to toggle info" onclick="divToggle('individual_post_tag')" />
|
399 |
<div>
|
400 |
<div id="individual_post_tag" class="infotext">
|
401 |
-
When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.
|
402 |
-
|
|
|
|
|
|
|
|
|
403 |
</div>
|
404 |
</div>
|
405 |
<?php foreach ( $single_post_act as $singlepost ) { ?>
|
@@ -411,23 +451,23 @@ Show widget default on single posts?<br />
|
|
411 |
<table border="0" cellspacing="0" cellpadding="0">
|
412 |
<tr>
|
413 |
<td valign="top">
|
414 |
-
Except the posts by author
|
415 |
<?php $DW->dumpOpt($opt_single_author); ?>
|
416 |
-
<div id="single-author-select" class="condition-select" <?php echo $author_condition_select_style; ?>>
|
417 |
<?php foreach ( $authors as $author ) { ?>
|
418 |
<?php $js_author_array[ ] = '\'single_author_act_' . $author->ID . '\''; ?>
|
419 |
-
<input type="checkbox" id="single_author_act_<?php echo $author->ID; ?>" name="single_author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( count($single_author_act) > 0 && in_array($author->ID,$single_author_act) ) ? 'checked="checked"' : ''; ?> onclick="ci('single_author_act_<?php echo $author->ID; ?>')" /> <label for="single_author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
|
420 |
<?php } ?>
|
421 |
</div>
|
422 |
</td>
|
423 |
<td style="width:10px"></td>
|
424 |
<td valign="top">
|
425 |
-
Except the posts in category
|
426 |
<?php $DW->dumpOpt($opt_single_category); ?>
|
427 |
-
<div id="single-category-select" class="condition-select" <?php echo $category_condition_select_style; ?>>
|
428 |
<?php foreach ( $category as $cat ) { ?>
|
429 |
<?php $js_category_array[ ] = '\'single_cat_act_' . $cat->cat_ID . '\''; ?>
|
430 |
-
<input type="checkbox" id="single_cat_act_<?php echo $cat->cat_ID; ?>" name="single_category_act[]" value="<?php echo $cat->cat_ID; ?>" <?php echo ( count($single_category_act) > 0 && in_array($cat->cat_ID,$single_category_act) ) ? 'checked="checked"' : ''; ?> onclick="ci('single_cat_act_<?php echo $cat->cat_ID; ?>')" /> <label for="single_cat_act_<?php echo $cat->cat_ID; ?>"><?php echo $cat->name; ?></label><br />
|
431 |
<?php } ?>
|
432 |
</div>
|
433 |
</td>
|
@@ -436,73 +476,73 @@ Show widget default on single posts?<br />
|
|
436 |
|
437 |
<br /><br />
|
438 |
|
439 |
-
<b
|
440 |
-
Show widget default on static pages
|
441 |
<?php $DW->dumpOpt($opt_page); ?>
|
442 |
-
<input type="radio" name="page" value="yes" id="page-yes" <?php echo $page_yes_selected; ?> /> <label for="page-yes"
|
443 |
-
<input type="radio" name="page" value="no" id="page-no" <?php echo $page_no_selected; ?> /> <label for="page-no"
|
444 |
-
Except the page(s)
|
445 |
-
<div id="page-select" class="condition-select" <?php echo $page_condition_select_style; ?>>
|
446 |
<?php foreach ( $pages as $page ) { ?>
|
447 |
-
<input type="checkbox" id="page_act_<?php echo $page->ID; ?>" name="page_act[]" value="<?php echo $page->ID; ?>" <?php echo ( count($page_act) > 0 && in_array($page->ID,$page_act) ) ? 'checked="checked"' : ''; ?> /> <label for="page_act_<?php echo $page->ID; ?>"><?php echo $page->post_title; ?> <?php echo ( get_option('show_on_front') == 'page' && isset($static_page[$page->ID]) ? '(' . $static_page[$page->ID] . ')' : '' ) ?></label><br />
|
448 |
<?php } ?>
|
449 |
</div>
|
450 |
|
451 |
<br /><br />
|
452 |
|
453 |
-
<b
|
454 |
-
Show widget default on author pages
|
455 |
<?php $DW->dumpOpt($opt_author); ?>
|
456 |
-
<input type="radio" name="author" value="yes" id="author-yes" <?php echo $author_yes_selected; ?> /> <label for="author-yes"
|
457 |
-
<input type="radio" name="author" value="no" id="author-no" <?php echo $author_no_selected; ?> /> <label for="author-no"
|
458 |
-
Except the author(s)
|
459 |
-
<div id="author-select" class="condition-select" <?php echo $author_condition_select_style; ?>>
|
460 |
<?php foreach ( $authors as $author ) { ?>
|
461 |
-
<input type="checkbox" id="author_act_<?php echo $author->ID; ?>" name="author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( count($author_act) > 0 && in_array($author->ID,$author_act) ) ? 'checked="checked"' : ''; ?> /> <label for="author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
|
462 |
<?php } ?></div>
|
463 |
|
464 |
<br /><br />
|
465 |
|
466 |
-
<b
|
467 |
-
Show widget default on category pages
|
468 |
<?php $DW->dumpOpt($opt_category); ?>
|
469 |
-
<input type="radio" name="category" value="yes" id="category-yes" <?php echo $category_yes_selected; ?> /> <label for="category-yes"
|
470 |
-
<input type="radio" name="category" value="no" id="category-no" <?php echo $category_no_selected; ?> /> <label for="category-no"
|
471 |
-
Except the categories
|
472 |
-
<div id="category-select" class="condition-select" <?php echo $category_condition_select_style; ?>>
|
473 |
<?php foreach ( $category as $cat ) { ?>
|
474 |
-
<input type="checkbox" id="cat_act_<?php echo $cat->cat_ID; ?>" name="category_act[]" value="<?php echo $cat->cat_ID; ?>" <?php echo ( count($category_act) > 0 && in_array($cat->cat_ID,$category_act) ) ? 'checked="checked"' : ''; ?> /> <label for="cat_act_<?php echo $cat->cat_ID; ?>"><?php echo $cat->name; ?></label><br />
|
475 |
<?php } ?>
|
476 |
</div>
|
477 |
|
478 |
<br /><br />
|
479 |
|
480 |
-
<b
|
481 |
-
Show widget on archive pages
|
482 |
<?php $DW->dumpOpt($opt_archive); ?>
|
483 |
<div>
|
484 |
<div id="archive" class="infotext">
|
485 |
-
This option does not include Author and Category Pages.
|
486 |
</div>
|
487 |
</div>
|
488 |
-
<input type="radio" name="archive" value="yes" id="archive-yes" <?php echo $archive_yes_selected; ?> /> <label for="archive-yes"
|
489 |
-
<input type="radio" name="archive" value="no" id="archive-no" <?php echo $archive_no_selected; ?> /> <label for="archive-no"
|
490 |
|
491 |
<br /><br />
|
492 |
|
493 |
-
<b
|
494 |
-
Show widget on the error page
|
495 |
<?php $DW->dumpOpt($opt_e404); ?>
|
496 |
-
<input type="radio" name="e404" value="yes" id="e404-yes" <?php echo $e404_yes_selected; ?> /> <label for="e404-yes"
|
497 |
-
<input type="radio" name="e404" value="no" id="e404-no" <?php echo $e404_no_selected; ?> /> <label for="e404-no"
|
498 |
|
499 |
<br /><br />
|
500 |
|
501 |
-
<b
|
502 |
-
Show widget on the search page
|
503 |
<?php $DW->dumpOpt($opt_search); ?>
|
504 |
-
<input type="radio" name="search" value="yes" id="search-yes" <?php echo $search_yes_selected; ?> /> <label for="search-yes"
|
505 |
-
<input type="radio" name="search" value="no" id="search-no" <?php echo $search_no_selected; ?> /> <label for="search-no"
|
506 |
|
507 |
<br /><br />
|
508 |
|
@@ -514,11 +554,11 @@ Show widget on the search page?<br />
|
|
514 |
'_builtin' => FALSE
|
515 |
);
|
516 |
$post_types = get_post_types($args, 'objects', 'and');
|
517 |
-
|
518 |
-
foreach ( $post_types as $ctid ) {
|
519 |
// Prepare
|
520 |
$custom_yes_selected = 'checked="checked"';
|
521 |
-
$opt_custom = $DW->getOptions($_GET['id'],
|
522 |
if ( count($opt_custom) > 0 ) {
|
523 |
$custom_act = array();
|
524 |
foreach ( $opt_custom as $custom_condition ) {
|
@@ -535,26 +575,26 @@ Show widget on the search page?<br />
|
|
535 |
}
|
536 |
}
|
537 |
|
538 |
-
$loop = new WP_Query( array('post_type' =>
|
539 |
if ( $loop->post_count > DW_LIST_LIMIT ) {
|
540 |
$custom_condition_select_style = DW_LIST_STYLE;
|
541 |
}
|
542 |
|
543 |
// Output
|
544 |
-
echo '<input type="hidden" name="post_types[]" value="' .
|
545 |
-
echo '<b>Custom Post Type <em>' . $ctid->label . '</em></b> ' . ( $DW->wpml ? $wpml_icon : '' ) . '<br />';
|
546 |
-
echo 'Show widget on ' . $ctid->label . '?<br />';
|
547 |
$DW->dumpOpt($opt_custom);
|
548 |
-
echo '<input type="radio" name="' .
|
549 |
-
echo '<input type="radio" name="' .
|
550 |
|
551 |
-
echo 'Except for:<br />';
|
552 |
-
echo '<div id="' .
|
553 |
|
554 |
while ( $loop->have_posts() ) : $loop->the_post();
|
555 |
-
echo '<input type="checkbox" id="' .
|
556 |
echo ( count($custom_act) > 0 && in_array($loop->post->ID,$custom_act) ) ? 'checked="checked"' : '';
|
557 |
-
echo ' /> <label for="' .
|
558 |
the_title();
|
559 |
echo '</label><br />';
|
560 |
endwhile;
|
@@ -563,13 +603,30 @@ Show widget on the search page?<br />
|
|
563 |
echo '<br /><br />';
|
564 |
}
|
565 |
} // end version compare >= WP 3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
?>
|
567 |
|
568 |
-
<input class="button-primary" type="submit" value="Save" />
|
569 |
</form>
|
570 |
|
571 |
-
<?php $url = (! empty($_GET['returnurl']) ) ? $_GET['returnurl'] : 'themes.php?page=dynwid-config'; ?>
|
572 |
-
<input class="button-secondary" type="
|
573 |
|
574 |
<script type="text/javascript">
|
575 |
function chkInPosts() {
|
2 |
/**
|
3 |
* dynwid_admin_edit.php - Options settings
|
4 |
*
|
5 |
+
* @version $Id: dynwid_admin_edit.php 301153 2010-10-18 11:27:55Z qurl $
|
6 |
*/
|
7 |
|
8 |
// WPML Plugin support
|
11 |
$wpml_icon = '<img src="' . $DW->plugin_url . DW_WPML_ICON . '" alt="WMPL" title="Dynamic Widgets syncs with other languages of these pages via WPML" />';
|
12 |
}
|
13 |
|
14 |
+
// WPSC/WPEC Plugin support (http://getshopped.org)
|
15 |
+
if ( defined('WPSC_TABLE_PRODUCT_CATEGORIES') ) {
|
16 |
+
$DW->wpsc = TRUE;
|
17 |
+
require_once(DW_PLUGIN . 'wpsc.php');
|
18 |
+
}
|
19 |
+
|
20 |
// Roles
|
21 |
$wp_roles = $GLOBALS['wp_roles'];
|
22 |
+
$roles = array_merge($wp_roles->role_names, array('anonymous' => __('Anonymous') . '|User role'));
|
23 |
$jsroles = array();
|
24 |
foreach ( $roles as $rid => $role ) {
|
25 |
$roles[esc_attr($rid)] = translate_user_role($role);
|
69 |
|
70 |
// Front Page
|
71 |
if ( get_option('show_on_front') == 'page' ) {
|
72 |
+
$frontpage_yes_selected = 'disabled="disabled"';
|
73 |
$frontpage_no_selected = $frontpage_yes_selected;
|
74 |
} else {
|
75 |
$frontpage_yes_selected = 'checked="checked"';
|
85 |
|
86 |
// Single Post
|
87 |
$single_yes_selected = 'checked="checked"';
|
88 |
+
$single_condition = '1';
|
89 |
$opt_single = $DW->getOptions($_GET['id'], 'single');
|
90 |
if ( count($opt_single) > 0 ) {
|
91 |
foreach ( $opt_single as $widget ) {
|
272 |
unset($search_yes_selected);
|
273 |
}
|
274 |
}
|
275 |
+
|
276 |
+
// WPSC/WPEC
|
277 |
+
if ( $DW->wpsc ) {
|
278 |
+
// Categories
|
279 |
+
$wpsc_yes_selected = 'checked="checked"';
|
280 |
+
$opt_wpsc = $DW->getOptions($_GET['id'], 'wpsc');
|
281 |
+
if ( count($opt_wpsc) > 0 ) {
|
282 |
+
$wpsc_act = array();
|
283 |
+
foreach ( $opt_wpsc as $wpsc_condition ) {
|
284 |
+
if ( $wpsc_condition['name'] == 'default' || empty($wpsc_condition['name']) ) {
|
285 |
+
$wpsc_default = $wpsc_condition['value'];
|
286 |
+
} else {
|
287 |
+
$wpsc_act[ ] = $wpsc_condition['name'];
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
if ( $wpsc_default == '0' ) {
|
292 |
+
$wpsc_no_selected = $wpsc_yes_selected;
|
293 |
+
unset($wpsc_yes_selected);
|
294 |
+
}
|
295 |
+
}
|
296 |
+
|
297 |
+
$wpsc = dw_wpsc_get_categories();
|
298 |
+
if ( count($wpsc) > DW_LIST_LIMIT ) {
|
299 |
+
$wpsc_condition_select_style = DW_LIST_STYLE;
|
300 |
+
}
|
301 |
+
}
|
302 |
?>
|
303 |
|
304 |
<style type="text/css">
|
326 |
}
|
327 |
</style>
|
328 |
|
329 |
+
<?php if ( isset($_POST['dynwid_save']) && $_POST['dynwid_save'] == 'yes' ) { ?>
|
330 |
<div class="updated fade" id="message">
|
331 |
<p>
|
332 |
+
<strong><?php _e('Widget options saved.'); ?></strong> <a href="themes.php?page=dynwid-config"><?php _e('Return', DW_L10N_DOMAIN); ?></a> <?php _e('to Dynamic Widgets overview', DW_L10N_DOMAIN); ?>.
|
333 |
</p>
|
334 |
</div>
|
335 |
+
<?php } else if ( isset($_GET['work']) && $_GET['work'] == 'none' ) { ?>
|
336 |
<div class="error" id="message">
|
337 |
+
<p><?php echo __('Dynamic does not mean static hiding of a widget.', DW_L10N_DOMAIN) . ' ' . __('Hint', DW_L10N_DOMAIN) . ': '; ?><a href="widgets.php"><?php _e('Remove', DW_L10N_DOMAIN); ?></a> <?php _e('the widget from the sidebar', DW_L10N_DOMAIN); ?>.</p>
|
338 |
</div>
|
339 |
+
<?php } else if ( isset($_GET['work']) && $_GET['work'] == 'nonedate' ) { ?>
|
340 |
<div class="error" id="message">
|
341 |
+
<p><?php _e('The From date can\'t be later than the To date.', DW_L10N_DOMAIN); ?></p>
|
342 |
</div>
|
343 |
|
344 |
<?php } ?>
|
345 |
|
346 |
+
<h3><?php _e('Edit options for', DW_L10N_DOMAIN); ?> <em><?php echo $DW->getName($_GET['id']); ?></em> <?php _e('Widget'); ?></h3>
|
347 |
<?php echo ( DW_DEBUG ) ? '<pre>ID = ' . $_GET['id'] . '</pre><br />' : ''; ?>
|
348 |
|
349 |
+
<form action="<?php echo trailingslashit(admin_url()) . 'themes.php?page=dynwid-config&action=edit&id=' . $_GET['id']; ?>" method="post">
|
350 |
<?php wp_nonce_field('plugin-name-action_edit_' . $_GET['id']); ?>
|
351 |
<input type="hidden" name="dynwid_save" value="yes" />
|
352 |
<input type="hidden" name="widget_id" value="<?php echo $_GET['id']; ?>" />
|
353 |
+
<input type="hidden" name="returnurl" value="<?php echo ( isset($_GET['returnurl']) ? urldecode($_GET['returnurl']) : '' ); ?>" />
|
354 |
|
355 |
+
<b><?php _e('Role'); ?></b> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" onclick="divToggle('role');" /><br />
|
356 |
+
<?php _e('Show widget to everybody?', DW_L10N_DOMAIN); ?><br />
|
357 |
<?php $DW->dumpOpt($opt_role); ?>
|
358 |
<div>
|
359 |
<div id="role" class="infotext">
|
360 |
+
<?php _e('Setting options by role is very powerfull. It can override all other options!<br />
|
361 |
+
Users who are not logged in, get the <em>Anonymous</em> role.', DW_L10N_DOMAIN); ?>
|
362 |
</div>
|
363 |
</div>
|
364 |
+
<input type="radio" name="role" value="yes" id="role-yes" <?php echo ( isset($role_yes_selected) ? $role_yes_selected : '' ); ?> onclick="swChb(cRole, true);" /> <label for="role-yes"><?php _e('Yes'); ?></label>
|
365 |
+
<input type="radio" name="role" value="no" id="role-no" <?php echo ( isset($role_no_selected) ? $role_no_selected : '' ); ?> onclick="swChb(cRole, false)" /> <label for="role-no"><?php _e('No'); ?>, <?php _e('only to', DW_L10N_DOMAIN); ?>:</label><br />
|
366 |
+
<div id="role-select" class="condition-select" <?php echo ( isset($role_condition_select_style) ? $role_condition_select_style : '' ); ?>>
|
367 |
<?php foreach ( $roles as $rid => $role ) { ?>
|
368 |
+
<input type="checkbox" id="role_act_<?php echo $rid; ?>" name="role_act[]" value="<?php echo $rid; ?>" <?php echo ( isset($role_act) && count($role_act) > 0 && in_array($rid, $role_act) ) ? 'checked="checked"' : ''; ?> /> <label for="role_act_<?php echo $rid; ?>"><?php echo $role; ?></label><br />
|
369 |
<?php } ?>
|
370 |
</div>
|
371 |
|
372 |
<br />
|
373 |
|
374 |
+
<b><?php _e('Date'); ?></b> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" onclick="divToggle('date');" /><br />
|
375 |
+
<?php _e('Show widget always?', DW_L10N_DOMAIN); ?><br />
|
376 |
<?php $DW->dumpOpt($opt_date); ?>
|
377 |
<div>
|
378 |
<div id="date" class="infotext">
|
379 |
+
<?php _e('Next to the above role option, the date option is also very powerfull. You\'ve been warned!', DW_L10N_DOMAIN); ?><br />
|
380 |
+
<?php _e('Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the'); ?> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" /><br />
|
381 |
+
<?php _e('Date ranges can be made by entering a From AND a To date<br />
|
382 |
+
When you want the widget to be displayed from a specific date, only fill in the From date<br />
|
383 |
+
When you want the widget to stop displaying on a specific date, only fill in the To date.
|
384 |
+
', DW_L10N_DOMAIN); ?>
|
385 |
</div>
|
386 |
</div>
|
387 |
+
<input type="radio" name="date" value="yes" id="date-yes" <?php echo ( isset($date_yes_selected) ? $date_yes_selected : '' ); ?> onclick="swTxt(cDate, true);" /> <label for="date-yes"><?php _e('Yes'); ?></label>
|
388 |
+
<input type="radio" name="date" value="no" id="date-no" <?php echo ( isset($date_no_selected) ? $date_no_selected : '' ); ?> onclick="swTxt(cDate, false)" /> <label for="date-no"><?php _e('No'); ?>, <?php _e('only', DW_L10N_DOMAIN); ?>:</label><br />
|
389 |
<div id="date-select" class="condition-select">
|
390 |
<table border="0" cellspacing="0" cellpadding="0">
|
391 |
<tr>
|
392 |
+
<td style="width:45px;"><?php _e('From', DW_L10N_DOMAIN); ?></td>
|
393 |
+
<td><input id="date_start" type="text" name="date_start" value="<?php echo ( isset($date_start) ? $date_start : '' ); ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_start')" /></td>
|
394 |
</tr>
|
395 |
<tr>
|
396 |
+
<td style="width:45px;"><?php _e('To', DW_L10N_DOMAIN); ?></td>
|
397 |
+
<td><input id="date_end" type="text" name="date_end" value="<?php echo ( isset($date_end) ? $date_end : '' ); ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_end')" /></td>
|
398 |
</tr>
|
399 |
</table>
|
400 |
</div>
|
401 |
|
402 |
<br />
|
403 |
|
404 |
+
<b><?php _e('Front Page', DW_L10N_DOMAIN); ?></b> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" onclick="divToggle('frontpage');" /><br />
|
405 |
+
<?php _e('Show widget on the front page?', DW_L10N_DOMAIN) ?><br />
|
406 |
<?php $DW->dumpOpt($opt_frontpage); ?>
|
407 |
<div>
|
408 |
<div id="frontpage" class="infotext">
|
409 |
+
<?php _e('This option only applies when your front page is set to display your latest posts (See Settings > Reading).<br />
|
410 |
+
When a static page is set, you can use the options for the static pages below.
|
411 |
+
', DW_L10N_DOMAIN); ?>
|
412 |
</div>
|
413 |
</div>
|
414 |
+
<input type="radio" name="front-page" value="yes" id="front-page-yes" <?php echo ( isset($frontpage_yes_selected) ? $frontpage_yes_selected : '' ); ?> /> <label for="front-page-yes"><?php _e('Yes'); ?></label>
|
415 |
+
<input type="radio" name="front-page" value="no" id="front-page-no" <?php echo ( isset($frontpage_no_selected) ? $frontpage_no_selected : '' ); ?> /> <label for="front-page-no"><?php _e('No'); ?></label>
|
416 |
|
417 |
<br /><br />
|
418 |
|
419 |
+
<b><?php _e('Single Posts'); ?></b> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="Click to toggle info" onclick="divToggle('single')" /><br />
|
420 |
+
<?php _e('Show widget default on single posts?', DW_L10N_DOMAIN) ?><br />
|
421 |
<?php $DW->dumpOpt($opt_single); ?>
|
422 |
<div>
|
423 |
<div id="single" class="infotext">
|
424 |
+
<?php _e('When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won\'t be applied.
|
425 |
+
If you want to use the rules in a logical OR condition. Add the same widget again and apply the other rule to that.
|
426 |
+
', DW_L10N_DOMAIN); ?>
|
427 |
</div>
|
428 |
</div>
|
429 |
+
<input type="radio" name="single" value="yes" id="single-yes" <?php echo ( isset($single_yes_selected) ? $single_yes_selected : '' ); ?> /> <label for="single-yes"><?php _e('Yes'); ?></label>
|
430 |
+
<input type="radio" name="single" value="no" id="single-no" <?php echo ( isset($single_no_selected) ? $single_no_selected : '' ); ?> /> <label for="single-no"><?php _e('No'); ?></label><br />
|
431 |
<?php $DW->dumpOpt($opt_individual); ?>
|
432 |
<input type="checkbox" id="individual" name="individual" value="1" <?php echo ( $individual ) ? 'checked="checked"' : ''; ?> onclick="chkInPosts()" />
|
433 |
+
<label for="individual"><?php _e('Make exception rule available to individual posts and tags.', DW_L10N_DOMAIN) ?> <?php echo ( isset($count_individual) ? $count_individual : '' ); ?></label>
|
434 |
<img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="Click to toggle info" onclick="divToggle('individual_post_tag')" />
|
435 |
<div>
|
436 |
<div id="individual_post_tag" class="infotext">
|
437 |
+
<?php _e('When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.
|
438 |
+
You can set the exception rule for tags in the single Edit Tag Panel (go to <a href="edit-tags.php?taxonomy=post_tag">Post Tags</a>,
|
439 |
+
click a tag), For individual posts in the <a href="post-new.php">New</a> or <a href="edit.php">Edit</a> Posts panel.
|
440 |
+
Exception rules for tags and individual posts in any combination work independantly, but will always be counted as one exception.<br />
|
441 |
+
Please note when exception rules are set for Author and/or Category, these will be removed.
|
442 |
+
', DW_L10N_DOMAIN); ?>
|
443 |
</div>
|
444 |
</div>
|
445 |
<?php foreach ( $single_post_act as $singlepost ) { ?>
|
451 |
<table border="0" cellspacing="0" cellpadding="0">
|
452 |
<tr>
|
453 |
<td valign="top">
|
454 |
+
<?php _e('Except the posts by author', DW_L10N_DOMAIN); ?>:
|
455 |
<?php $DW->dumpOpt($opt_single_author); ?>
|
456 |
+
<div id="single-author-select" class="condition-select" <?php echo ( isset($author_condition_select_style) ? $author_condition_select_style : '' ); ?>>
|
457 |
<?php foreach ( $authors as $author ) { ?>
|
458 |
<?php $js_author_array[ ] = '\'single_author_act_' . $author->ID . '\''; ?>
|
459 |
+
<input type="checkbox" id="single_author_act_<?php echo $author->ID; ?>" name="single_author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( isset($single_author_act) && count($single_author_act) > 0 && in_array($author->ID,$single_author_act) ) ? 'checked="checked"' : ''; ?> onclick="ci('single_author_act_<?php echo $author->ID; ?>')" /> <label for="single_author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
|
460 |
<?php } ?>
|
461 |
</div>
|
462 |
</td>
|
463 |
<td style="width:10px"></td>
|
464 |
<td valign="top">
|
465 |
+
<?php _e('Except the posts in category', DW_L10N_DOMAIN); ?>: <?php echo ( $DW->wpml ? $wpml_icon : '' ); ?>
|
466 |
<?php $DW->dumpOpt($opt_single_category); ?>
|
467 |
+
<div id="single-category-select" class="condition-select" <?php echo ( isset($category_condition_select_style) ? $category_condition_select_style : '' ); ?>>
|
468 |
<?php foreach ( $category as $cat ) { ?>
|
469 |
<?php $js_category_array[ ] = '\'single_cat_act_' . $cat->cat_ID . '\''; ?>
|
470 |
+
<input type="checkbox" id="single_cat_act_<?php echo $cat->cat_ID; ?>" name="single_category_act[]" value="<?php echo $cat->cat_ID; ?>" <?php echo ( isset($single_category_act) && count($single_category_act) > 0 && in_array($cat->cat_ID,$single_category_act) ) ? 'checked="checked"' : ''; ?> onclick="ci('single_cat_act_<?php echo $cat->cat_ID; ?>')" /> <label for="single_cat_act_<?php echo $cat->cat_ID; ?>"><?php echo $cat->name; ?></label><br />
|
471 |
<?php } ?>
|
472 |
</div>
|
473 |
</td>
|
476 |
|
477 |
<br /><br />
|
478 |
|
479 |
+
<b><?php _e('Pages'); ?></b> <?php echo ( $DW->wpml ? $wpml_icon : '' ); ?><br />
|
480 |
+
<?php _e('Show widget default on static pages?', DW_L10N_DOMAIN); ?><br />
|
481 |
<?php $DW->dumpOpt($opt_page); ?>
|
482 |
+
<input type="radio" name="page" value="yes" id="page-yes" <?php echo ( isset($page_yes_selected) ? $page_yes_selected : '' ); ?> /> <label for="page-yes"><?php _e('Yes'); ?></label>
|
483 |
+
<input type="radio" name="page" value="no" id="page-no" <?php echo ( isset($page_no_selected) ? $page_no_selected : '' ); ?> /> <label for="page-no"><?php _e('No'); ?></label><br />
|
484 |
+
<?php _e('Except the page(s)', DW_L10N_DOMAIN); ?>:<br />
|
485 |
+
<div id="page-select" class="condition-select" <?php echo ( isset($page_condition_select_style) ? $page_condition_select_style : '' ); ?>>
|
486 |
<?php foreach ( $pages as $page ) { ?>
|
487 |
+
<input type="checkbox" id="page_act_<?php echo $page->ID; ?>" name="page_act[]" value="<?php echo $page->ID; ?>" <?php echo ( isset($page_act) && count($page_act) > 0 && in_array($page->ID,$page_act) ) ? 'checked="checked"' : ''; ?> /> <label for="page_act_<?php echo $page->ID; ?>"><?php echo $page->post_title; ?> <?php echo ( get_option('show_on_front') == 'page' && isset($static_page[$page->ID]) ? '(' . $static_page[$page->ID] . ')' : '' ) ?></label><br />
|
488 |
<?php } ?>
|
489 |
</div>
|
490 |
|
491 |
<br /><br />
|
492 |
|
493 |
+
<b><?php _e('Author Pages', DW_L10N_DOMAIN); ?></b><br />
|
494 |
+
<?php _e('Show widget default on author pages?', DW_L10N_DOMAIN); ?><br />
|
495 |
<?php $DW->dumpOpt($opt_author); ?>
|
496 |
+
<input type="radio" name="author" value="yes" id="author-yes" <?php echo ( isset($author_yes_selected) ? $author_yes_selected : '' ); ?> /> <label for="author-yes"><?php _e('Yes'); ?></label>
|
497 |
+
<input type="radio" name="author" value="no" id="author-no" <?php echo ( isset($author_no_selected) ? $author_no_selected : '' ); ?> /> <label for="author-no"><?php _e('No'); ?></label><br />
|
498 |
+
<?php _e('Except the author(s)', DW_L10N_DOMAIN); ?>:<br />
|
499 |
+
<div id="author-select" class="condition-select" <?php echo ( isset($author_condition_select_style) ? $author_condition_select_style : '' ); ?>>
|
500 |
<?php foreach ( $authors as $author ) { ?>
|
501 |
+
<input type="checkbox" id="author_act_<?php echo $author->ID; ?>" name="author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( isset($author_act) && count($author_act) > 0 && in_array($author->ID,$author_act) ) ? 'checked="checked"' : ''; ?> /> <label for="author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
|
502 |
<?php } ?></div>
|
503 |
|
504 |
<br /><br />
|
505 |
|
506 |
+
<b><?php _e('Category Pages', DW_L10N_DOMAIN); ?></b> <?php echo ( $DW->wpml ? $wpml_icon : '' ); ?><br />
|
507 |
+
<?php _e('Show widget default on category pages?', DW_L10N_DOMAIN); ?><br />
|
508 |
<?php $DW->dumpOpt($opt_category); ?>
|
509 |
+
<input type="radio" name="category" value="yes" id="category-yes" <?php echo ( isset($category_yes_selected) ? $category_yes_selected : '' ); ?> /> <label for="category-yes"><?php _e('Yes'); ?></label>
|
510 |
+
<input type="radio" name="category" value="no" id="category-no" <?php echo ( isset($category_no_selected) ? $category_no_selected : '' ); ?> /> <label for="category-no"><?php _e('No'); ?></label><br />
|
511 |
+
<?php _e('Except the categories', DW_L10N_DOMAIN); ?>:<br />
|
512 |
+
<div id="category-select" class="condition-select" <?php echo ( isset($category_condition_select_style) ? $category_condition_select_style : '' ); ?>>
|
513 |
<?php foreach ( $category as $cat ) { ?>
|
514 |
+
<input type="checkbox" id="cat_act_<?php echo $cat->cat_ID; ?>" name="category_act[]" value="<?php echo $cat->cat_ID; ?>" <?php echo ( isset($category_act) && count($category_act) > 0 && in_array($cat->cat_ID,$category_act) ) ? 'checked="checked"' : ''; ?> /> <label for="cat_act_<?php echo $cat->cat_ID; ?>"><?php echo $cat->name; ?></label><br />
|
515 |
<?php } ?>
|
516 |
</div>
|
517 |
|
518 |
<br /><br />
|
519 |
|
520 |
+
<b><?php _e('Archive Pages', DW_L10N_DOMAIN); ?></b> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="Click to toggle info" onclick="divToggle('archive')" /><br />
|
521 |
+
<?php _e('Show widget on archive pages', DW_L10N_DOMAIN); ?>?<br />
|
522 |
<?php $DW->dumpOpt($opt_archive); ?>
|
523 |
<div>
|
524 |
<div id="archive" class="infotext">
|
525 |
+
<?php _e('This option does not include Author and Category Pages.'); ?>
|
526 |
</div>
|
527 |
</div>
|
528 |
+
<input type="radio" name="archive" value="yes" id="archive-yes" <?php echo ( isset($archive_yes_selected) ? $archive_yes_selected : '' ); ?> /> <label for="archive-yes"><?php _e('Yes'); ?></label>
|
529 |
+
<input type="radio" name="archive" value="no" id="archive-no" <?php echo ( isset($archive_no_selected) ? $archive_no_selected : '' ); ?> /> <label for="archive-no"><?php _e('No'); ?></label>
|
530 |
|
531 |
<br /><br />
|
532 |
|
533 |
+
<b><?php _e('Error Page', DW_L10N_DOMAIN); ?></b><br />
|
534 |
+
<?php _e('Show widget on the error page?', DW_L10N_DOMAIN); ?><br />
|
535 |
<?php $DW->dumpOpt($opt_e404); ?>
|
536 |
+
<input type="radio" name="e404" value="yes" id="e404-yes" <?php echo ( isset($e404_yes_selected) ? $e404_yes_selected : '' ); ?> /> <label for="e404-yes"><?php _e('Yes'); ?></label>
|
537 |
+
<input type="radio" name="e404" value="no" id="e404-no" <?php echo ( isset($e404_no_selected) ? $e404_no_selected : '' ); ?> /> <label for="e404-no"><?php _e('No'); ?></label>
|
538 |
|
539 |
<br /><br />
|
540 |
|
541 |
+
<b><?php _e('Search Page', DW_L10N_DOMAIN); ?></b><br />
|
542 |
+
<?php _e('Show widget on the search page?', DW_L10N_DOMAIN); ?><br />
|
543 |
<?php $DW->dumpOpt($opt_search); ?>
|
544 |
+
<input type="radio" name="search" value="yes" id="search-yes" <?php echo ( isset($search_yes_selected) ? $search_yes_selected : '' ); ?> /> <label for="search-yes"><?php _e('Yes'); ?></label>
|
545 |
+
<input type="radio" name="search" value="no" id="search-no" <?php echo ( isset($search_no_selected) ? $search_no_selected : '' ); ?> /> <label for="search-no"><?php _e('No'); ?></label>
|
546 |
|
547 |
<br /><br />
|
548 |
|
554 |
'_builtin' => FALSE
|
555 |
);
|
556 |
$post_types = get_post_types($args, 'objects', 'and');
|
557 |
+
|
558 |
+
foreach ( $post_types as $type => $ctid ) {
|
559 |
// Prepare
|
560 |
$custom_yes_selected = 'checked="checked"';
|
561 |
+
$opt_custom = $DW->getOptions($_GET['id'], $type);
|
562 |
if ( count($opt_custom) > 0 ) {
|
563 |
$custom_act = array();
|
564 |
foreach ( $opt_custom as $custom_condition ) {
|
575 |
}
|
576 |
}
|
577 |
|
578 |
+
$loop = new WP_Query( array('post_type' => $type) );
|
579 |
if ( $loop->post_count > DW_LIST_LIMIT ) {
|
580 |
$custom_condition_select_style = DW_LIST_STYLE;
|
581 |
}
|
582 |
|
583 |
// Output
|
584 |
+
echo '<input type="hidden" name="post_types[]" value="' . $type . '" />';
|
585 |
+
echo '<b>' . __('Custom Post Type') . ' <em>' . $ctid->label . '</em></b> ' . ( $DW->wpml ? $wpml_icon : '' ) . '<br />';
|
586 |
+
echo __('Show widget on', DW_L10N_DOMAIN) . ' ' . $ctid->label . '?<br />';
|
587 |
$DW->dumpOpt($opt_custom);
|
588 |
+
echo '<input type="radio" name="' . $type . '" value="yes" id="' . $type . '-yes" ' . ( isset($custom_yes_selected) ? $custom_yes_selected : '' ) . ' /> <label for="' . $type . '-yes">' . __('Yes') . '</label> ';
|
589 |
+
echo '<input type="radio" name="' . $type . '" value="no" id="' . $type . '-no" ' . ( isset($custom_no_selected) ? $custom_no_selected : '' ) . ' /> <label for="' . $type . '-no">' . __('No') . '</label><br />';
|
590 |
|
591 |
+
echo __('Except for') . ':<br />';
|
592 |
+
echo '<div id="' . $type . '-select" class="condition-select" ' . ( isset($custom_condition_select_style) ? $custom_condition_select_style : '' ) . '>';
|
593 |
|
594 |
while ( $loop->have_posts() ) : $loop->the_post();
|
595 |
+
echo '<input type="checkbox" id="' . $type . '_act_' . $loop->post->ID . '" name="' . $type . '_act[]" value="' . $loop->post->ID . '" ';
|
596 |
echo ( count($custom_act) > 0 && in_array($loop->post->ID,$custom_act) ) ? 'checked="checked"' : '';
|
597 |
+
echo ' /> <label for="' . $type . '_act_' . $loop->post->ID . '">';
|
598 |
the_title();
|
599 |
echo '</label><br />';
|
600 |
endwhile;
|
603 |
echo '<br /><br />';
|
604 |
}
|
605 |
} // end version compare >= WP 3.0
|
606 |
+
|
607 |
+
if ( $DW->wpsc ) {
|
608 |
+
?>
|
609 |
+
<b><?php _e('WPSC Category', DW_L10N_DOMAIN); ?></b><br />
|
610 |
+
<?php _e('Show widget default on WPSC categories?', DW_L10N_DOMAIN); ?><br />
|
611 |
+
<?php $DW->dumpOpt($opt_wpsc); ?>
|
612 |
+
<input type="radio" name="wpsc" value="yes" id="wpsc-yes" <?php echo ( isset($wpsc_yes_selected) ? $wpsc_yes_selected : '' ); ?> /> <label for="wpsc-yes"><?php _e('Yes'); ?></label>
|
613 |
+
<input type="radio" name="wpsc" value="no" id="wpsc-no" <?php echo ( isset($wpsc_no_selected) ? $wpsc_no_selected : '' ); ?> /> <label for="wpsc-no"><?php _e('No'); ?></label><br />
|
614 |
+
<?php _e('Except the categories', DW_L10N_DOMAIN); ?>:<br />
|
615 |
+
<div id="wpsc-select" class="condition-select" <?php echo ( isset($wpsc_condition_select_style) ? $wpsc_condition_select_style : '' ); ?>>
|
616 |
+
<?php foreach ( $wpsc as $id => $cat ) { ?>
|
617 |
+
<input type="checkbox" id="wpsc_act_<?php echo $id; ?>" name="wpsc_act[]" value="<?php echo $id; ?>" <?php echo ( count($wpsc_act) > 0 && in_array($id, $wpsc_act) ) ? 'checked="checked"' : ''; ?> /> <label for="wpsc_act_<?php echo $id; ?>"><?php echo $cat; ?></label><br />
|
618 |
+
<?php } ?>
|
619 |
+
</div>
|
620 |
+
<br /><br />
|
621 |
+
<?php
|
622 |
+
} // DW->wpsc
|
623 |
?>
|
624 |
|
625 |
+
<input class="button-primary" type="submit" value="<?php _e('Save'); ?>" />
|
626 |
</form>
|
627 |
|
628 |
+
<?php $url = (! empty($_GET['returnurl']) ) ? urldecode($_GET['returnurl']) : trailingslashit(admin_url()) . 'themes.php?page=dynwid-config'; ?>
|
629 |
+
<input class="button-secondary" type="button" value="<?php _e('Return', DW_L10N_DOMAIN); ?>" style="position:relative;top:-23px;left:80px;" onclick="location.href='<?php echo $url; ?>'" />
|
630 |
|
631 |
<script type="text/javascript">
|
632 |
function chkInPosts() {
|
dynwid_admin_overview.php
CHANGED
@@ -2,22 +2,22 @@
|
|
2 |
/**
|
3 |
* dynwid_admin_overview.php - Overview page
|
4 |
*
|
5 |
-
* @version $Id: dynwid_admin_overview.php
|
6 |
*/
|
7 |
|
8 |
// Special case: Reset action needs to go back to overview.
|
9 |
-
if ( $_GET['action'] == 'reset' ) {
|
10 |
check_admin_referer('plugin-name-action_reset_' . $_GET['id']);
|
11 |
$DW->resetOptions($_GET['id']);
|
12 |
?>
|
13 |
<div class="updated fade" id="message">
|
14 |
<p>
|
15 |
-
<strong
|
16 |
</p>
|
17 |
</div>
|
18 |
<?php
|
19 |
}
|
20 |
-
if ( $_GET['action'] == 'dynwid_set_method' ) {
|
21 |
if ( $_GET['oldmethod'] == 'on' ) {
|
22 |
update_option('dynwid_old_method', TRUE);
|
23 |
} else {
|
@@ -25,7 +25,7 @@
|
|
25 |
}
|
26 |
?>
|
27 |
<div class="updated fade" id="message">
|
28 |
-
<p><strong
|
29 |
</div>
|
30 |
<?php
|
31 |
}
|
@@ -56,21 +56,21 @@
|
|
56 |
?>
|
57 |
<tr>
|
58 |
<td class="name">
|
59 |
-
<p class="row-title"><a title="Edit this widget options" href="themes.php?page=dynwid-config&action=edit&id=<?php echo $widget_id; ?>"><?php echo $name; ?></a></p>
|
60 |
<div class="row-actions">
|
61 |
<span class="edit">
|
62 |
-
<a title="Edit this widget options" href="themes.php?page=dynwid-config&action=edit&id=<?php echo $widget_id; ?>"
|
63 |
</span>
|
64 |
<?php if ( $DW->hasOptions($widget_id) ) { ?>
|
65 |
<span class="delete">
|
66 |
<?php $href = wp_nonce_url('themes.php?page=dynwid-config&action=reset&id=' . $widget_id, 'plugin-name-action_reset_' . $widget_id); ?>
|
67 |
-
| <a class="submitdelete" title="Reset widget to Static" onclick="if ( confirm('You are about to reset this widget \'<?php echo strip_tags($DW->getName($widget_id)); ?>\'\n \'Cancel\' to stop, \'OK\' to reset.') ) { return true;}return false;" href="<?php echo $href; ?>">Reset</a>
|
68 |
</span>
|
69 |
<?php } ?>
|
70 |
</div>
|
71 |
</td>
|
72 |
<td>
|
73 |
-
<?php echo ( $DW->hasOptions($widget_id) ) ? 'Dynamic' : 'Static'; ?>
|
74 |
</td>
|
75 |
</tr>
|
76 |
<?php } // END if (! empty($name) ) ?>
|
@@ -85,7 +85,7 @@
|
|
85 |
|
86 |
<div class="clear"><br /><br /></div>
|
87 |
|
88 |
-
<a href="#" onclick="jQuery('#un').slideToggle('fast'); return false;"
|
89 |
<div id="un" style="display:none">
|
90 |
<br /> <strong>wp_head() check: </strong>
|
91 |
<?php
|
2 |
/**
|
3 |
* dynwid_admin_overview.php - Overview page
|
4 |
*
|
5 |
+
* @version $Id: dynwid_admin_overview.php 300719 2010-10-16 19:15:37Z qurl $
|
6 |
*/
|
7 |
|
8 |
// Special case: Reset action needs to go back to overview.
|
9 |
+
if ( isset($_GET['action']) && $_GET['action'] == 'reset' ) {
|
10 |
check_admin_referer('plugin-name-action_reset_' . $_GET['id']);
|
11 |
$DW->resetOptions($_GET['id']);
|
12 |
?>
|
13 |
<div class="updated fade" id="message">
|
14 |
<p>
|
15 |
+
<strong><?php _e('Widget options have been reset to default.', DW_L10N_DOMAIN); ?></strong><br />
|
16 |
</p>
|
17 |
</div>
|
18 |
<?php
|
19 |
}
|
20 |
+
if ( isset($_GET['action']) && $_GET['action'] == 'dynwid_set_method' ) {
|
21 |
if ( $_GET['oldmethod'] == 'on' ) {
|
22 |
update_option('dynwid_old_method', TRUE);
|
23 |
} else {
|
25 |
}
|
26 |
?>
|
27 |
<div class="updated fade" id="message">
|
28 |
+
<p><strong <?php echo __('Method set to', DW_L10N_DOMAIN) . ( get_option('dynwid_old_method') ? '\''. __('OLD', DW_L10N_DOMAIN) .'\'' : '\'' . __('FILTER', DW_L10N_DOMAIN) . '\'' ); ?>.</strong></p>
|
29 |
</div>
|
30 |
<?php
|
31 |
}
|
56 |
?>
|
57 |
<tr>
|
58 |
<td class="name">
|
59 |
+
<p class="row-title"><a title="<?php _e('Edit this widget options', DW_L10N_DOMAIN); ?>" href="themes.php?page=dynwid-config&action=edit&id=<?php echo $widget_id; ?>"><?php echo $name; ?></a></p>
|
60 |
<div class="row-actions">
|
61 |
<span class="edit">
|
62 |
+
<a title="Edit this widget options" href="themes.php?page=dynwid-config&action=edit&id=<?php echo $widget_id; ?>"><?php _e('Edit'); ?></a>
|
63 |
</span>
|
64 |
<?php if ( $DW->hasOptions($widget_id) ) { ?>
|
65 |
<span class="delete">
|
66 |
<?php $href = wp_nonce_url('themes.php?page=dynwid-config&action=reset&id=' . $widget_id, 'plugin-name-action_reset_' . $widget_id); ?>
|
67 |
+
| <a class="submitdelete" title="<?php _e('Reset widget to Static', DW_L10N_DOMAIN); ?>" onclick="if ( confirm('You are about to reset this widget \'<?php echo strip_tags($DW->getName($widget_id)); ?>\'\n \'Cancel\' to stop, \'OK\' to reset.') ) { return true;}return false;" href="<?php echo $href; ?>">Reset</a>
|
68 |
</span>
|
69 |
<?php } ?>
|
70 |
</div>
|
71 |
</td>
|
72 |
<td>
|
73 |
+
<?php echo ( $DW->hasOptions($widget_id) ) ? __('Dynamic', DW_L10N_DOMAIN) : __('Static', DW_L10N_DOMAIN); ?>
|
74 |
</td>
|
75 |
</tr>
|
76 |
<?php } // END if (! empty($name) ) ?>
|
85 |
|
86 |
<div class="clear"><br /><br /></div>
|
87 |
|
88 |
+
<a href="#" onclick="jQuery('#un').slideToggle('fast'); return false;"><?php _e('Advanced'); ?> ></a>
|
89 |
<div id="un" style="display:none">
|
90 |
<br /> <strong>wp_head() check: </strong>
|
91 |
<?php
|
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 |
*/
|
7 |
|
8 |
// Security - nonce
|
@@ -136,7 +136,7 @@
|
|
136 |
}
|
137 |
|
138 |
// -- Author
|
139 |
-
if ( count($_POST['single_author_act']) > 0 ) {
|
140 |
if ( $_POST['single'] == 'yes' ) {
|
141 |
$DW->addSingleOption($_POST['widget_id'], 'single', '1');
|
142 |
}
|
@@ -144,7 +144,7 @@
|
|
144 |
}
|
145 |
|
146 |
// -- Category
|
147 |
-
if ( count($_POST['single_category_act']) > 0 ) {
|
148 |
if ( $_POST['single'] == 'yes' && count($_POST['single_author_act']) == 0 ) {
|
149 |
$DW->addSingleOption($_POST['widget_id'], 'single', '1');
|
150 |
}
|
@@ -152,7 +152,7 @@
|
|
152 |
}
|
153 |
|
154 |
// -- Individual / Posts / Tag
|
155 |
-
if ( $_POST['individual'] == '1' ) {
|
156 |
$DW->addSingleOption($_POST['widget_id'], 'individual', '1');
|
157 |
if ( count($_POST['single_post_act']) > 0 ) {
|
158 |
$DW->addMultiOption($_POST['widget_id'], 'single-post', $_POST['single'], $_POST['single_post_act']);
|
@@ -163,21 +163,21 @@
|
|
163 |
}
|
164 |
|
165 |
// Pages
|
166 |
-
if ( count($_POST['page_act']) > 0 ) {
|
167 |
$DW->addMultiOption($_POST['widget_id'], 'page', $_POST['page'], $_POST['page_act']);
|
168 |
} else if ( $_POST['page'] == 'no' ) {
|
169 |
$DW->addSingleOption($_POST['widget_id'], 'page');
|
170 |
}
|
171 |
|
172 |
// Author
|
173 |
-
if ( count($_POST['author_act']) > 0 ) {
|
174 |
$DW->addMultiOption($_POST['widget_id'], 'author', $_POST['author'], $_POST['author_act']);
|
175 |
} else if ( $_POST['author'] == 'no' ) {
|
176 |
$DW->addSingleOption($_POST['widget_id'], 'author');
|
177 |
}
|
178 |
|
179 |
// Categories
|
180 |
-
if ( count($_POST['category_act']) > 0 ) {
|
181 |
$DW->addMultiOption($_POST['widget_id'], 'category', $_POST['category'], $_POST['category_act']);
|
182 |
} else if ( $_POST['category'] == 'no' ) {
|
183 |
$DW->addSingleOption($_POST['widget_id'], 'category');
|
@@ -210,6 +210,13 @@
|
|
210 |
}
|
211 |
}
|
212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
// Redirect to ReturnURL
|
214 |
if (! empty($_POST['returnurl']) ) {
|
215 |
$q = array();
|
@@ -233,7 +240,7 @@
|
|
233 |
$q[ ] = 'dynwid_save=yes';
|
234 |
$q[ ] = 'widget_id=' . $_POST['widget_id'];
|
235 |
|
236 |
-
wp_redirect(
|
237 |
die();
|
238 |
}
|
239 |
?>
|
2 |
/**
|
3 |
* dynwid_admin_save.php - Saving options to the database
|
4 |
*
|
5 |
+
* @version $Id: dynwid_admin_save.php 299409 2010-10-12 20:24:48Z qurl $
|
6 |
*/
|
7 |
|
8 |
// Security - nonce
|
136 |
}
|
137 |
|
138 |
// -- Author
|
139 |
+
if ( isset($_POST['single_author_act']) && count($_POST['single_author_act']) > 0 ) {
|
140 |
if ( $_POST['single'] == 'yes' ) {
|
141 |
$DW->addSingleOption($_POST['widget_id'], 'single', '1');
|
142 |
}
|
144 |
}
|
145 |
|
146 |
// -- Category
|
147 |
+
if ( isset($_POST['single_category_act']) && count($_POST['single_category_act']) > 0 ) {
|
148 |
if ( $_POST['single'] == 'yes' && count($_POST['single_author_act']) == 0 ) {
|
149 |
$DW->addSingleOption($_POST['widget_id'], 'single', '1');
|
150 |
}
|
152 |
}
|
153 |
|
154 |
// -- Individual / Posts / Tag
|
155 |
+
if ( isset($_POST['individual']) && $_POST['individual'] == '1' ) {
|
156 |
$DW->addSingleOption($_POST['widget_id'], 'individual', '1');
|
157 |
if ( count($_POST['single_post_act']) > 0 ) {
|
158 |
$DW->addMultiOption($_POST['widget_id'], 'single-post', $_POST['single'], $_POST['single_post_act']);
|
163 |
}
|
164 |
|
165 |
// Pages
|
166 |
+
if ( isset($_POST['page_act']) && count($_POST['page_act']) > 0 ) {
|
167 |
$DW->addMultiOption($_POST['widget_id'], 'page', $_POST['page'], $_POST['page_act']);
|
168 |
} else if ( $_POST['page'] == 'no' ) {
|
169 |
$DW->addSingleOption($_POST['widget_id'], 'page');
|
170 |
}
|
171 |
|
172 |
// Author
|
173 |
+
if ( isset($_POST['author_act']) && count($_POST['author_act']) > 0 ) {
|
174 |
$DW->addMultiOption($_POST['widget_id'], 'author', $_POST['author'], $_POST['author_act']);
|
175 |
} else if ( $_POST['author'] == 'no' ) {
|
176 |
$DW->addSingleOption($_POST['widget_id'], 'author');
|
177 |
}
|
178 |
|
179 |
// Categories
|
180 |
+
if ( isset($_POST['category_act']) && count($_POST['category_act']) > 0 ) {
|
181 |
$DW->addMultiOption($_POST['widget_id'], 'category', $_POST['category'], $_POST['category_act']);
|
182 |
} else if ( $_POST['category'] == 'no' ) {
|
183 |
$DW->addSingleOption($_POST['widget_id'], 'category');
|
210 |
}
|
211 |
}
|
212 |
|
213 |
+
// WPSC/WPEC Plugin support
|
214 |
+
if ( isset($_POST['wpsc_act']) && count($_POST['wpsc_act']) > 0 ) {
|
215 |
+
$DW->addMultiOption($_POST['widget_id'], 'wpsc', $_POST['wpsc'], $_POST['wpsc_act']);
|
216 |
+
} else if ( isset($_POST['wpsc']) && $_POST['wpsc'] == 'no' ) {
|
217 |
+
$DW->addSingleOption($_POST['widget_id'], 'wpsc');
|
218 |
+
}
|
219 |
+
|
220 |
// Redirect to ReturnURL
|
221 |
if (! empty($_POST['returnurl']) ) {
|
222 |
$q = array();
|
240 |
$q[ ] = 'dynwid_save=yes';
|
241 |
$q[ ] = 'widget_id=' . $_POST['widget_id'];
|
242 |
|
243 |
+
wp_redirect( $script_url . '?' . implode('&', $q) );
|
244 |
die();
|
245 |
}
|
246 |
?>
|
dynwid_class.php
CHANGED
@@ -2,13 +2,14 @@
|
|
2 |
/**
|
3 |
* dynwid_class.php - Dynamic Widgets Class (PHP5)
|
4 |
*
|
5 |
-
* @version $Id: dynwid_class.php
|
6 |
*/
|
7 |
|
8 |
class dynWid {
|
9 |
public $custom_post_type;
|
10 |
private $dbtable;
|
11 |
public $dynwid_list;
|
|
|
12 |
private $firstmessage;
|
13 |
private $registered_sidebars;
|
14 |
public $registered_widget_controls;
|
@@ -19,6 +20,7 @@
|
|
19 |
public $whereami;
|
20 |
private $wpdb;
|
21 |
public $wpml; // WPML Plugin support
|
|
|
22 |
|
23 |
public function __construct() {
|
24 |
if ( is_user_logged_in() ) {
|
@@ -35,11 +37,23 @@
|
|
35 |
$this->sidebars = wp_get_sidebars_widgets();
|
36 |
$this->plugin_url = WP_PLUGIN_URL . '/' . str_replace( basename(__FILE__), '', plugin_basename(__FILE__) );
|
37 |
|
|
|
38 |
$this->wpdb = $GLOBALS['wpdb'];
|
39 |
$this->dbtable = $this->wpdb->prefix . DW_DB_TABLE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
// WPML Plugin support
|
42 |
$this->wpml = FALSE;
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
public function addDate($widget_id, $dates) {
|
@@ -220,7 +234,7 @@
|
|
220 |
|
221 |
$name = $lookup[$id]['name'];
|
222 |
|
223 |
-
if ( $type == 'W' ) {
|
224 |
// Retrieve optional set title
|
225 |
$number = $lookup[$id]['params'][0]['number'];
|
226 |
$option_name = $lookup[$id]['callback'][0]->option_name;
|
@@ -277,6 +291,18 @@
|
|
277 |
}
|
278 |
}
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
public function message($text) {
|
281 |
if ( DW_DEBUG ) {
|
282 |
if ( $this->firstmessage ) {
|
@@ -292,19 +318,5 @@
|
|
292 |
$query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "'";
|
293 |
$this->wpdb->query($query);
|
294 |
}
|
295 |
-
|
296 |
-
// WPML Plugin support
|
297 |
-
public function wpml_get_id($content_id, $content_type = 'post_page') {
|
298 |
-
$language_code = wpml_get_default_language();
|
299 |
-
$lang = wpml_get_content_translation($content_type, $content_id, $language_code);
|
300 |
-
|
301 |
-
if ( is_array($lang) ) {
|
302 |
-
$id = $lang[$language_code];
|
303 |
-
} else {
|
304 |
-
$id = 0;
|
305 |
-
}
|
306 |
-
|
307 |
-
return $id;
|
308 |
-
}
|
309 |
}
|
310 |
?>
|
2 |
/**
|
3 |
* dynwid_class.php - Dynamic Widgets Class (PHP5)
|
4 |
*
|
5 |
+
* @version $Id: dynwid_class.php 300505 2010-10-15 19:15:45Z qurl $
|
6 |
*/
|
7 |
|
8 |
class dynWid {
|
9 |
public $custom_post_type;
|
10 |
private $dbtable;
|
11 |
public $dynwid_list;
|
12 |
+
public $enabled;
|
13 |
private $firstmessage;
|
14 |
private $registered_sidebars;
|
15 |
public $registered_widget_controls;
|
20 |
public $whereami;
|
21 |
private $wpdb;
|
22 |
public $wpml; // WPML Plugin support
|
23 |
+
public $wpsc; // WPSC/WPEC Plugin support
|
24 |
|
25 |
public function __construct() {
|
26 |
if ( is_user_logged_in() ) {
|
37 |
$this->sidebars = wp_get_sidebars_widgets();
|
38 |
$this->plugin_url = WP_PLUGIN_URL . '/' . str_replace( basename(__FILE__), '', plugin_basename(__FILE__) );
|
39 |
|
40 |
+
// DB init
|
41 |
$this->wpdb = $GLOBALS['wpdb'];
|
42 |
$this->dbtable = $this->wpdb->prefix . DW_DB_TABLE;
|
43 |
+
$query = "SHOW TABLES LIKE '" . $this->dbtable . "'";
|
44 |
+
$result = $this->wpdb->get_var($query);
|
45 |
+
|
46 |
+
if ( is_null($result) ) {
|
47 |
+
$this->enabled = FALSE;
|
48 |
+
} else {
|
49 |
+
$this->enabled = TRUE;
|
50 |
+
}
|
51 |
|
52 |
// WPML Plugin support
|
53 |
$this->wpml = FALSE;
|
54 |
+
|
55 |
+
// WPSC/WPEC Plugin support
|
56 |
+
$this->wpsc = FALSE;
|
57 |
}
|
58 |
|
59 |
public function addDate($widget_id, $dates) {
|
234 |
|
235 |
$name = $lookup[$id]['name'];
|
236 |
|
237 |
+
if ( $type == 'W' && isset($lookup[$id]['params'][0]['number']) ) {
|
238 |
// Retrieve optional set title
|
239 |
$number = $lookup[$id]['params'][0]['number'];
|
240 |
$option_name = $lookup[$id]['callback'][0]->option_name;
|
291 |
}
|
292 |
}
|
293 |
|
294 |
+
public function housekeeping() {
|
295 |
+
$widgets = array_keys($this->registered_widgets);
|
296 |
+
|
297 |
+
$query = "SELECT DISTINCT widget_id FROM " . $this->dbtable;
|
298 |
+
$results = $this->wpdb->get_results($query);
|
299 |
+
foreach ( $results as $myrow ) {
|
300 |
+
if (! in_array($myrow->widget_id, $widgets) ) {
|
301 |
+
$this->resetOptions($myrow->widget_id);
|
302 |
+
}
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
public function message($text) {
|
307 |
if ( DW_DEBUG ) {
|
308 |
if ( $this->firstmessage ) {
|
318 |
$query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "'";
|
319 |
$this->wpdb->query($query);
|
320 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
}
|
322 |
?>
|
dynwid_class_php4.php
CHANGED
@@ -3,12 +3,13 @@
|
|
3 |
* dynwid_class_php4.php - Dynamic Widgets Class for PHP4
|
4 |
* Needs at least PHP 4.1.0
|
5 |
*
|
6 |
-
* @version $Id: dynwid_class_php4.php
|
7 |
*/
|
8 |
|
9 |
class dynWid {
|
10 |
var $custom_post_type;
|
11 |
var $dbtable; /* private */
|
|
|
12 |
var $dynwid_list;
|
13 |
var $firstmessage; /* private */
|
14 |
var $registered_sidebars; /* private */
|
@@ -20,6 +21,7 @@
|
|
20 |
var $whereami;
|
21 |
var $wpdb; /* private */
|
22 |
var $wpml; /* WPML Plugin support */
|
|
|
23 |
|
24 |
/* Old constructor redirect to new constructor */
|
25 |
function dynWid() {
|
@@ -41,11 +43,23 @@
|
|
41 |
$this->sidebars = wp_get_sidebars_widgets();
|
42 |
$this->plugin_url = WP_PLUGIN_URL . '/' . str_replace( basename(__FILE__), '', plugin_basename(__FILE__) );
|
43 |
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
// WPML Plugin support
|
48 |
$this->wpml = FALSE;
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
function addDate($widget_id, $dates) {
|
@@ -227,7 +241,7 @@
|
|
227 |
|
228 |
$name = $lookup[$id]['name'];
|
229 |
|
230 |
-
if ( $type == 'W' ) {
|
231 |
// Retrieve optional set title
|
232 |
$number = $lookup[$id]['params'][0]['number'];
|
233 |
$option_name = $lookup[$id]['callback'][0]->option_name;
|
@@ -284,6 +298,18 @@
|
|
284 |
}
|
285 |
}
|
286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
function message($text) {
|
288 |
if ( DW_DEBUG ) {
|
289 |
if ( $this->firstmessage ) {
|
@@ -299,19 +325,5 @@
|
|
299 |
$query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "'";
|
300 |
$this->wpdb->query($query);
|
301 |
}
|
302 |
-
|
303 |
-
// WPML Plugin support
|
304 |
-
function wpml_get_id($content_id, $content_type = 'post_page') {
|
305 |
-
$language_code = wpml_get_default_language();
|
306 |
-
$lang = wpml_get_content_translation($content_type, $content_id, $language_code);
|
307 |
-
|
308 |
-
if ( is_array($lang) ) {
|
309 |
-
$id = $lang[$language_code];
|
310 |
-
} else {
|
311 |
-
$id = 0;
|
312 |
-
}
|
313 |
-
|
314 |
-
return $id;
|
315 |
-
}
|
316 |
}
|
317 |
?>
|
3 |
* dynwid_class_php4.php - Dynamic Widgets Class for PHP4
|
4 |
* Needs at least PHP 4.1.0
|
5 |
*
|
6 |
+
* @version $Id: dynwid_class_php4.php 300505 2010-10-15 19:15:45Z qurl $
|
7 |
*/
|
8 |
|
9 |
class dynWid {
|
10 |
var $custom_post_type;
|
11 |
var $dbtable; /* private */
|
12 |
+
var $enabled;
|
13 |
var $dynwid_list;
|
14 |
var $firstmessage; /* private */
|
15 |
var $registered_sidebars; /* private */
|
21 |
var $whereami;
|
22 |
var $wpdb; /* private */
|
23 |
var $wpml; /* WPML Plugin support */
|
24 |
+
var $wpsc; /* WPSC/WPEC Plugin support */
|
25 |
|
26 |
/* Old constructor redirect to new constructor */
|
27 |
function dynWid() {
|
43 |
$this->sidebars = wp_get_sidebars_widgets();
|
44 |
$this->plugin_url = WP_PLUGIN_URL . '/' . str_replace( basename(__FILE__), '', plugin_basename(__FILE__) );
|
45 |
|
46 |
+
// DB init
|
47 |
+
$this->wpdb = $GLOBALS['wpdb'];
|
48 |
+
$this->dbtable = $this->wpdb->prefix . DW_DB_TABLE;
|
49 |
+
$query = "SHOW TABLES LIKE '" . $this->dbtable . "'";
|
50 |
+
$result = $this->wpdb->get_var($query);
|
51 |
+
|
52 |
+
if ( is_null($result) ) {
|
53 |
+
$this->enabled = FALSE;
|
54 |
+
} else {
|
55 |
+
$this->enabled = TRUE;
|
56 |
+
}
|
57 |
|
58 |
// WPML Plugin support
|
59 |
$this->wpml = FALSE;
|
60 |
+
|
61 |
+
// WPSC/WPEC Plugin support
|
62 |
+
$this->wpsc = FALSE;
|
63 |
}
|
64 |
|
65 |
function addDate($widget_id, $dates) {
|
241 |
|
242 |
$name = $lookup[$id]['name'];
|
243 |
|
244 |
+
if ( $type == 'W' && isset($lookup[$id]['params'][0]['number']) ) {
|
245 |
// Retrieve optional set title
|
246 |
$number = $lookup[$id]['params'][0]['number'];
|
247 |
$option_name = $lookup[$id]['callback'][0]->option_name;
|
298 |
}
|
299 |
}
|
300 |
|
301 |
+
function housekeeping() {
|
302 |
+
$widgets = array_keys($this->registered_widgets);
|
303 |
+
|
304 |
+
$query = "SELECT DISTINCT widget_id FROM " . $this->dbtable;
|
305 |
+
$results = $this->wpdb->get_results($query);
|
306 |
+
foreach ( $results as $myrow ) {
|
307 |
+
if (! in_array($myrow->widget_id, $widgets) ) {
|
308 |
+
$this->resetOptions($myrow->widget_id);
|
309 |
+
}
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
313 |
function message($text) {
|
314 |
if ( DW_DEBUG ) {
|
315 |
if ( $this->firstmessage ) {
|
325 |
$query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "'";
|
326 |
$this->wpdb->query($query);
|
327 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
}
|
329 |
?>
|
dynwid_init_worker.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
/**
|
4 |
* dynwid_init_worker.php
|
5 |
*
|
6 |
-
* @version $Id: dynwid_init_worker.php
|
7 |
-
* @copyright 2010 Jacco Drabbe
|
8 |
*/
|
9 |
|
10 |
$DW->message('Dynamic Widgets INIT');
|
|
|
11 |
|
12 |
// WPML Plugin Support
|
13 |
if ( defined('ICL_PLUGIN_PATH') ) {
|
@@ -22,6 +22,7 @@
|
|
22 |
if ( $wpmlang != $curlang ) {
|
23 |
$DW->wpml = TRUE;
|
24 |
$DW->message('WPML enabled, default language: ' . $wpmlang);
|
|
|
25 |
}
|
26 |
}
|
27 |
}
|
@@ -31,6 +32,7 @@
|
|
31 |
$custom_post_type = FALSE;
|
32 |
$DW->whereami = $DW->detectPage();
|
33 |
$DW->message('Page is ' . $DW->whereami);
|
|
|
34 |
if ( $DW->whereami == 'single' ) {
|
35 |
$post = $GLOBALS['post'];
|
36 |
$DW->message('post_id = ' . $post->ID);
|
@@ -46,6 +48,22 @@
|
|
46 |
}
|
47 |
}
|
48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$DW->dwList($DW->whereami);
|
50 |
|
51 |
?>
|
3 |
/**
|
4 |
* dynwid_init_worker.php
|
5 |
*
|
6 |
+
* @version $Id: dynwid_init_worker.php 300086 2010-10-14 17:33:59Z qurl $
|
|
|
7 |
*/
|
8 |
|
9 |
$DW->message('Dynamic Widgets INIT');
|
10 |
+
echo "\n" . '<!-- Dynamic Widgets v' . DW_VERSION . ' //-->' . "\n";
|
11 |
|
12 |
// WPML Plugin Support
|
13 |
if ( defined('ICL_PLUGIN_PATH') ) {
|
22 |
if ( $wpmlang != $curlang ) {
|
23 |
$DW->wpml = TRUE;
|
24 |
$DW->message('WPML enabled, default language: ' . $wpmlang);
|
25 |
+
require_once(DW_PLUGIN . 'wpml.php');
|
26 |
}
|
27 |
}
|
28 |
}
|
32 |
$custom_post_type = FALSE;
|
33 |
$DW->whereami = $DW->detectPage();
|
34 |
$DW->message('Page is ' . $DW->whereami);
|
35 |
+
|
36 |
if ( $DW->whereami == 'single' ) {
|
37 |
$post = $GLOBALS['post'];
|
38 |
$DW->message('post_id = ' . $post->ID);
|
48 |
}
|
49 |
}
|
50 |
}
|
51 |
+
|
52 |
+
if ( $DW->whereami == 'page' ) {
|
53 |
+
// WPSC/WPEC Plugin Support
|
54 |
+
if ( defined('WPSC_TABLE_PRODUCT_CATEGORIES') ) {
|
55 |
+
$wpsc_query = &$GLOBALS['wpsc_query'];
|
56 |
+
|
57 |
+
if ( $wpsc_query->category > 0 ) {
|
58 |
+
$DW->wpsc = TRUE;
|
59 |
+
$DW->whereami = 'wpsc';
|
60 |
+
$DW->message('WPSC detected, page changed to ' . $DW->whereami . ', category: ' . $wpsc_query->category);
|
61 |
+
|
62 |
+
require_once(DW_PLUGIN . 'wpsc.php');
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
$DW->dwList($DW->whereami);
|
68 |
|
69 |
?>
|
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 |
*/
|
7 |
|
8 |
foreach ( $sidebars as $sidebar_id => $widgets ) {
|
@@ -103,11 +103,12 @@
|
|
103 |
// Display exceptions (custom post type)
|
104 |
if ( $DW->custom_post_type ) {
|
105 |
// Custom Post Type behaves the same as a single post
|
|
|
106 |
if ( count($act) > 0 ) {
|
107 |
$id = $post->ID;
|
108 |
$DW->message('PostID: ' . $id);
|
109 |
if ( $DW->wpml ) {
|
110 |
-
$id =
|
111 |
$DW->message('WPML ObjectID: ' . $id);
|
112 |
}
|
113 |
|
@@ -120,6 +121,7 @@
|
|
120 |
// no custom post type
|
121 |
switch ( $DW->whereami ) {
|
122 |
case 'single':
|
|
|
123 |
$act_author = array();
|
124 |
$act_category = array();
|
125 |
$act_post = array();
|
@@ -132,7 +134,7 @@
|
|
132 |
foreach ( $categories as $category ) {
|
133 |
$id = $category->cat_ID;
|
134 |
if ( $DW->wpml ) {
|
135 |
-
$id =
|
136 |
}
|
137 |
$post_category[ ] = $id;
|
138 |
}
|
@@ -212,7 +214,7 @@
|
|
212 |
if ( count($act) > 0 ) {
|
213 |
$home_id = get_option('page_for_posts');
|
214 |
if ( $DW->wpml ) {
|
215 |
-
$home_id =
|
216 |
$DW->message('WPML ObjectID: ' . $home_id);
|
217 |
}
|
218 |
|
@@ -228,7 +230,7 @@
|
|
228 |
$post = $GLOBALS['post'];
|
229 |
$id = $post->ID;
|
230 |
if ( $DW->wpml ) {
|
231 |
-
$id =
|
232 |
$DW->message('WPML ObjectID: ' . $id);
|
233 |
}
|
234 |
|
@@ -248,11 +250,10 @@
|
|
248 |
|
249 |
case 'category':
|
250 |
if ( count($act) > 0 ) {
|
251 |
-
$
|
252 |
-
$id = $category[0]->cat_ID;
|
253 |
$DW->message('CatID: ' . $id);
|
254 |
if ( $DW->wpml ) {
|
255 |
-
$id =
|
256 |
$DW->message('WPML ObjectID: ' . $id);
|
257 |
}
|
258 |
|
@@ -262,6 +263,16 @@
|
|
262 |
}
|
263 |
}
|
264 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
} // END switch ( $DW->whereami )
|
266 |
} // END if/else ( $DW->custom_post_type )
|
267 |
} /* END if ( count($opt) > 0 ) */
|
2 |
/**
|
3 |
* dynwid_worker.php - The worker does the actual work.
|
4 |
*
|
5 |
+
* @version $Id: dynwid_worker.php 301153 2010-10-18 11:27:55Z qurl $
|
6 |
*/
|
7 |
|
8 |
foreach ( $sidebars as $sidebar_id => $widgets ) {
|
103 |
// Display exceptions (custom post type)
|
104 |
if ( $DW->custom_post_type ) {
|
105 |
// Custom Post Type behaves the same as a single post
|
106 |
+
$post = $GLOBALS['post'];
|
107 |
if ( count($act) > 0 ) {
|
108 |
$id = $post->ID;
|
109 |
$DW->message('PostID: ' . $id);
|
110 |
if ( $DW->wpml ) {
|
111 |
+
$id = dw_wpml_get_id($id, 'post_' . $post_type);
|
112 |
$DW->message('WPML ObjectID: ' . $id);
|
113 |
}
|
114 |
|
121 |
// no custom post type
|
122 |
switch ( $DW->whereami ) {
|
123 |
case 'single':
|
124 |
+
$post = $GLOBALS['post'];
|
125 |
$act_author = array();
|
126 |
$act_category = array();
|
127 |
$act_post = array();
|
134 |
foreach ( $categories as $category ) {
|
135 |
$id = $category->cat_ID;
|
136 |
if ( $DW->wpml ) {
|
137 |
+
$id = dw_wpml_get_id($id, 'tax_category');
|
138 |
}
|
139 |
$post_category[ ] = $id;
|
140 |
}
|
214 |
if ( count($act) > 0 ) {
|
215 |
$home_id = get_option('page_for_posts');
|
216 |
if ( $DW->wpml ) {
|
217 |
+
$home_id = dw_wpml_get_id($home_id);
|
218 |
$DW->message('WPML ObjectID: ' . $home_id);
|
219 |
}
|
220 |
|
230 |
$post = $GLOBALS['post'];
|
231 |
$id = $post->ID;
|
232 |
if ( $DW->wpml ) {
|
233 |
+
$id = dw_wpml_get_id($id);
|
234 |
$DW->message('WPML ObjectID: ' . $id);
|
235 |
}
|
236 |
|
250 |
|
251 |
case 'category':
|
252 |
if ( count($act) > 0 ) {
|
253 |
+
$id = get_query_var('cat');
|
|
|
254 |
$DW->message('CatID: ' . $id);
|
255 |
if ( $DW->wpml ) {
|
256 |
+
$id = dw_wpml_get_id($id, 'tax_category');
|
257 |
$DW->message('WPML ObjectID: ' . $id);
|
258 |
}
|
259 |
|
263 |
}
|
264 |
}
|
265 |
break;
|
266 |
+
|
267 |
+
case 'wpsc':
|
268 |
+
if ( count($act) > 0 ) {
|
269 |
+
if ( is_dw_wpsc_category($act) ) {
|
270 |
+
$display = $other;
|
271 |
+
$DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EWPSC1)');
|
272 |
+
}
|
273 |
+
}
|
274 |
+
break;
|
275 |
+
|
276 |
} // END switch ( $DW->whereami )
|
277 |
} // END if/else ( $DW->custom_post_type )
|
278 |
} /* END if ( count($opt) > 0 ) */
|
locale/dynamic-widgets-nl.mo
ADDED
Binary file
|
locale/dynamic-widgets-nl.po
ADDED
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Dynamic Widgets NL\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-10-16 21:05+0100\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: Jacco\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: Dutch\n"
|
13 |
+
"X-Poedit-Country: NETHERLANDS\n"
|
14 |
+
|
15 |
+
#: ../dynwid_admin_edit.php:22
|
16 |
+
msgid "Anonymous"
|
17 |
+
msgstr "Anoniem"
|
18 |
+
|
19 |
+
#: ../dynwid_admin_edit.php:332
|
20 |
+
msgid "Widget options saved."
|
21 |
+
msgstr "Widget opties bewaard"
|
22 |
+
|
23 |
+
#: ../dynwid_admin_edit.php:332
|
24 |
+
#: ../dynwid_admin_edit.php:629
|
25 |
+
msgid "Return"
|
26 |
+
msgstr "Terug"
|
27 |
+
|
28 |
+
#: ../dynwid_admin_edit.php:332
|
29 |
+
msgid "to Dynamic Widgets overview"
|
30 |
+
msgstr "naar Dynamic Widgets overzicht"
|
31 |
+
|
32 |
+
#: ../dynwid_admin_edit.php:337
|
33 |
+
msgid "Dynamic does not mean static hiding of a widget."
|
34 |
+
msgstr "Dynamisch houdt niet in het statisch verbergen van een widget."
|
35 |
+
|
36 |
+
#: ../dynwid_admin_edit.php:337
|
37 |
+
msgid "Hint"
|
38 |
+
msgstr "Hint"
|
39 |
+
|
40 |
+
#: ../dynwid_admin_edit.php:337
|
41 |
+
msgid "Remove"
|
42 |
+
msgstr "Verwijderen"
|
43 |
+
|
44 |
+
#: ../dynwid_admin_edit.php:337
|
45 |
+
msgid "the widget from the sidebar"
|
46 |
+
msgstr "de widget in de sidebar"
|
47 |
+
|
48 |
+
#: ../dynwid_admin_edit.php:341
|
49 |
+
msgid "The From date can't be later than the To date."
|
50 |
+
msgstr "The 'van' datum kan niet later zijn dan de 'tot' datum."
|
51 |
+
|
52 |
+
#: ../dynwid_admin_edit.php:346
|
53 |
+
msgid "Edit options for"
|
54 |
+
msgstr "Wijzig de opties voor"
|
55 |
+
|
56 |
+
#: ../dynwid_admin_edit.php:346
|
57 |
+
msgid "Widget"
|
58 |
+
msgstr "Widget"
|
59 |
+
|
60 |
+
#: ../dynwid_admin_edit.php:355
|
61 |
+
#: ../dynamic-widgets.php:564
|
62 |
+
msgid "Role"
|
63 |
+
msgstr "Rol"
|
64 |
+
|
65 |
+
#: ../dynwid_admin_edit.php:356
|
66 |
+
msgid "Show widget to everybody?"
|
67 |
+
msgstr "Toon de widget aan iedereen?"
|
68 |
+
|
69 |
+
#: ../dynwid_admin_edit.php:360
|
70 |
+
msgid ""
|
71 |
+
"Setting options by role is very powerfull. It can override all other options!<br />\n"
|
72 |
+
"\t\t\t\t\t\tUsers who are not logged in, get the <em>Anonymous</em> role."
|
73 |
+
msgstr ""
|
74 |
+
"De rol opties zijn zeer bijzonder. Ze kunnen alle andere opties overstijgen!<br />\n"
|
75 |
+
"\t\t\t\t\t\tGebruikers die niet ingelogd zijn, krijgen de <em>anonieme</em> rol."
|
76 |
+
|
77 |
+
#: ../dynwid_admin_edit.php:364
|
78 |
+
#: ../dynwid_admin_edit.php:387
|
79 |
+
#: ../dynwid_admin_edit.php:414
|
80 |
+
#: ../dynwid_admin_edit.php:429
|
81 |
+
#: ../dynwid_admin_edit.php:482
|
82 |
+
#: ../dynwid_admin_edit.php:496
|
83 |
+
#: ../dynwid_admin_edit.php:509
|
84 |
+
#: ../dynwid_admin_edit.php:528
|
85 |
+
#: ../dynwid_admin_edit.php:536
|
86 |
+
#: ../dynwid_admin_edit.php:544
|
87 |
+
#: ../dynwid_admin_edit.php:588
|
88 |
+
#: ../dynwid_admin_edit.php:612
|
89 |
+
#: ../dynamic-widgets.php:118
|
90 |
+
msgid "Yes"
|
91 |
+
msgstr "Ja"
|
92 |
+
|
93 |
+
#: ../dynwid_admin_edit.php:365
|
94 |
+
#: ../dynwid_admin_edit.php:388
|
95 |
+
#: ../dynwid_admin_edit.php:415
|
96 |
+
#: ../dynwid_admin_edit.php:430
|
97 |
+
#: ../dynwid_admin_edit.php:483
|
98 |
+
#: ../dynwid_admin_edit.php:497
|
99 |
+
#: ../dynwid_admin_edit.php:510
|
100 |
+
#: ../dynwid_admin_edit.php:529
|
101 |
+
#: ../dynwid_admin_edit.php:537
|
102 |
+
#: ../dynwid_admin_edit.php:545
|
103 |
+
#: ../dynwid_admin_edit.php:589
|
104 |
+
#: ../dynwid_admin_edit.php:613
|
105 |
+
msgid "No"
|
106 |
+
msgstr "Nee"
|
107 |
+
|
108 |
+
#: ../dynwid_admin_edit.php:365
|
109 |
+
msgid "only to"
|
110 |
+
msgstr "alleen aan"
|
111 |
+
|
112 |
+
#: ../dynwid_admin_edit.php:374
|
113 |
+
#: ../dynamic-widgets.php:565
|
114 |
+
msgid "Date"
|
115 |
+
msgstr "Datum"
|
116 |
+
|
117 |
+
#: ../dynwid_admin_edit.php:375
|
118 |
+
msgid "Show widget always?"
|
119 |
+
msgstr "Altijd de widget tonen?"
|
120 |
+
|
121 |
+
#: ../dynwid_admin_edit.php:379
|
122 |
+
msgid "Next to the above role option, the date option is also very powerfull. You've been warned!"
|
123 |
+
msgstr "Net zoals de bovenstaande opties, is de datum opties zeer bijzonder. U bent gewaarschuwd!"
|
124 |
+
|
125 |
+
#: ../dynwid_admin_edit.php:380
|
126 |
+
msgid "Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the"
|
127 |
+
msgstr "Voer datum in volgens hets JJJJ-MM-DD formaat. U kunt ook de kalander gebruiken door te klikken op"
|
128 |
+
|
129 |
+
#: ../dynwid_admin_edit.php:381
|
130 |
+
msgid ""
|
131 |
+
"Date ranges can be made by entering a From AND a To date<br />\n"
|
132 |
+
" \t\t\t\t\tWhen you want the widget to be displayed from a specific date, only fill in the From date<br />\n"
|
133 |
+
" \t\t\t\t\tWhen you want the widget to stop displaying on a specific date, only fill in the To date.\n"
|
134 |
+
" \t\t\t\t"
|
135 |
+
msgstr ""
|
136 |
+
"Datum periodes kunnen worden gemaakt door het invoeren van een 'van' en een 'tot' datum<br />\n"
|
137 |
+
" \t\t\t\t\tWanneer u de widget vanaf een bepaalde datum wilt tonen, vul dan alleen de 'van' datum in<br />\n"
|
138 |
+
" \t\t\t\t\tWanneer u de widget vanaf een bepaalde datum niet meer wilt tonen, vul dan alleen de 'tot' datum in.\n"
|
139 |
+
" \t\t\t\t"
|
140 |
+
|
141 |
+
#: ../dynwid_admin_edit.php:388
|
142 |
+
msgid "only"
|
143 |
+
msgstr "alleen"
|
144 |
+
|
145 |
+
#: ../dynwid_admin_edit.php:392
|
146 |
+
msgid "From"
|
147 |
+
msgstr "Van"
|
148 |
+
|
149 |
+
#: ../dynwid_admin_edit.php:396
|
150 |
+
msgid "To"
|
151 |
+
msgstr "Tot"
|
152 |
+
|
153 |
+
#: ../dynwid_admin_edit.php:404
|
154 |
+
#: ../dynamic-widgets.php:566
|
155 |
+
msgid "Front Page"
|
156 |
+
msgstr "Startpagina"
|
157 |
+
|
158 |
+
#: ../dynwid_admin_edit.php:405
|
159 |
+
msgid "Show widget on the front page?"
|
160 |
+
msgstr "De widget op de startpagina tonen?"
|
161 |
+
|
162 |
+
#: ../dynwid_admin_edit.php:409
|
163 |
+
msgid ""
|
164 |
+
"This option only applies when your front page is set to display your latest posts (See Settings > Reading).<br />\n"
|
165 |
+
"\t\t\t\t\t\tWhen a static page is set, you can use the options for the static pages below.\n"
|
166 |
+
"\t\t\t\t\t"
|
167 |
+
msgstr ""
|
168 |
+
"Deze optie werkt alleen als de hoofdpagina de laatste posts toont (Zie Instellingen > Lezen).<br />\n"
|
169 |
+
"\t\t\t\t\t\tWanneer deze optie op statische pagina staat, kunt u gebruik maken van de onderstaande pagina opties.\n"
|
170 |
+
"\t\t\t\t\t"
|
171 |
+
|
172 |
+
#: ../dynwid_admin_edit.php:419
|
173 |
+
#: ../dynamic-widgets.php:567
|
174 |
+
msgid "Single Posts"
|
175 |
+
msgstr "Berichten"
|
176 |
+
|
177 |
+
#: ../dynwid_admin_edit.php:420
|
178 |
+
msgid "Show widget default on single posts?"
|
179 |
+
msgstr "De widget bij de berichten tonen?"
|
180 |
+
|
181 |
+
#: ../dynwid_admin_edit.php:424
|
182 |
+
msgid ""
|
183 |
+
"When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won't be applied.\n"
|
184 |
+
" \t\t\t\t\tIf you want to use the rules in a logical OR condition. Add the same widget again and apply the other rule to that.\n"
|
185 |
+
" \t\t\t\t\t"
|
186 |
+
msgstr ""
|
187 |
+
"Wanneer u een auteur <b>EN</b> een categorie uitzondering gebruikt, worden beide regels gecontroleerd.\n"
|
188 |
+
" \t\t\t\t\tAls u de regels in een logische OR wilt gebruiken kunt u de widget opnieuw toevoegen en daarop dan de andere regel toepassen.\n"
|
189 |
+
" \t\t\t\t\t"
|
190 |
+
|
191 |
+
#: ../dynwid_admin_edit.php:433
|
192 |
+
msgid "Make exception rule available to individual posts and tags."
|
193 |
+
msgstr "Maak de uitzonderings regel beschikbaar voor individuele berichten en tags"
|
194 |
+
|
195 |
+
#: ../dynwid_admin_edit.php:437
|
196 |
+
msgid ""
|
197 |
+
"When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.\n"
|
198 |
+
"\t\t\t\t\t\tYou can set the exception rule for tags in the single Edit Tag Panel (go to <a href=\"edit-tags.php?taxonomy=post_tag\">Post Tags</a>,\n"
|
199 |
+
"\t\t\t\t\t\tclick a tag), For individual posts in the <a href=\"post-new.php\">New</a> or <a href=\"edit.php\">Edit</a> Posts panel.\n"
|
200 |
+
"\t\t\t\t\t\tException rules for tags and individual posts in any combination work independantly, but will always be counted as one exception.<br />\n"
|
201 |
+
" \t\t\t\t\tPlease note when exception rules are set for Author and/or Category, these will be removed.\n"
|
202 |
+
" \t\t\t\t"
|
203 |
+
msgstr ""
|
204 |
+
"Wanneer u deze optie aan zet, heeft u de gelegenheid om uitzonderings regels te gebruiken in individuele posts en tags.\n"
|
205 |
+
"\t\t\t\t\t\tU kunt de uitzonderingsregel vinden in het wijzigen Tag Paneel (ga naar <a href=\"edit-tags.php?taxonomy=post_tag\">Post Tags</a>,\n"
|
206 |
+
"\t\t\t\t\t\tklik op een tag), Voor individuele posts in het <a href=\"post-new.php\">Nieuw</a> of <a href=\"edit.php\">Wijzig</a> Posts paneel.\n"
|
207 |
+
"\t\t\t\t\t\tUitzonderings regels voor tags en individuele posts werken onafhankelijk van elkaar, maar worden altijd geteld als een enkele uitzondering.<br />\n"
|
208 |
+
" \t\t\t\t\tLet er op dat uitzonderings regels voor auteur en categorie worden verwijderd.\n"
|
209 |
+
" \t\t\t\t"
|
210 |
+
|
211 |
+
#: ../dynwid_admin_edit.php:454
|
212 |
+
msgid "Except the posts by author"
|
213 |
+
msgstr "Behalve de berichten van"
|
214 |
+
|
215 |
+
#: ../dynwid_admin_edit.php:465
|
216 |
+
msgid "Except the posts in category"
|
217 |
+
msgstr "Behalve de berichten in de categorie"
|
218 |
+
|
219 |
+
#: ../dynwid_admin_edit.php:479
|
220 |
+
#: ../dynamic-widgets.php:568
|
221 |
+
msgid "Pages"
|
222 |
+
msgstr "Pagina's"
|
223 |
+
|
224 |
+
#: ../dynwid_admin_edit.php:480
|
225 |
+
msgid "Show widget default on static pages?"
|
226 |
+
msgstr "Toon de widget op pagina's?"
|
227 |
+
|
228 |
+
#: ../dynwid_admin_edit.php:484
|
229 |
+
msgid "Except the page(s)"
|
230 |
+
msgstr "Behalve de pagina('s)"
|
231 |
+
|
232 |
+
#: ../dynwid_admin_edit.php:493
|
233 |
+
#: ../dynamic-widgets.php:569
|
234 |
+
msgid "Author Pages"
|
235 |
+
msgstr "Auteur pagina's"
|
236 |
+
|
237 |
+
#: ../dynwid_admin_edit.php:494
|
238 |
+
msgid "Show widget default on author pages?"
|
239 |
+
msgstr "Toon de widget op auteurs pagina's?"
|
240 |
+
|
241 |
+
#: ../dynwid_admin_edit.php:498
|
242 |
+
msgid "Except the author(s)"
|
243 |
+
msgstr "Behalve van"
|
244 |
+
|
245 |
+
#: ../dynwid_admin_edit.php:506
|
246 |
+
#: ../dynamic-widgets.php:570
|
247 |
+
msgid "Category Pages"
|
248 |
+
msgstr "Categorie pagina's"
|
249 |
+
|
250 |
+
#: ../dynwid_admin_edit.php:507
|
251 |
+
msgid "Show widget default on category pages?"
|
252 |
+
msgstr "Toon de widget standaard op de categorie pagina's?"
|
253 |
+
|
254 |
+
#: ../dynwid_admin_edit.php:511
|
255 |
+
#: ../dynwid_admin_edit.php:614
|
256 |
+
msgid "Except the categories"
|
257 |
+
msgstr "Behalve de categoriën"
|
258 |
+
|
259 |
+
#: ../dynwid_admin_edit.php:520
|
260 |
+
#: ../dynamic-widgets.php:571
|
261 |
+
msgid "Archive Pages"
|
262 |
+
msgstr "Archief pagina's"
|
263 |
+
|
264 |
+
#: ../dynwid_admin_edit.php:521
|
265 |
+
msgid "Show widget on archive pages"
|
266 |
+
msgstr "Toon de widget op archief pagina's"
|
267 |
+
|
268 |
+
#: ../dynwid_admin_edit.php:525
|
269 |
+
msgid "This option does not include Author and Category Pages."
|
270 |
+
msgstr "Deze optie bevat niet auteurs en categorie pagina's"
|
271 |
+
|
272 |
+
#: ../dynwid_admin_edit.php:533
|
273 |
+
#: ../dynamic-widgets.php:572
|
274 |
+
msgid "Error Page"
|
275 |
+
msgstr "Foutmeldings pagina"
|
276 |
+
|
277 |
+
#: ../dynwid_admin_edit.php:534
|
278 |
+
msgid "Show widget on the error page?"
|
279 |
+
msgstr "Toon de widget op de foutmeldings pagina?"
|
280 |
+
|
281 |
+
#: ../dynwid_admin_edit.php:541
|
282 |
+
msgid "Search Page"
|
283 |
+
msgstr "Zoek pagina"
|
284 |
+
|
285 |
+
#: ../dynwid_admin_edit.php:542
|
286 |
+
msgid "Show widget on the search page?"
|
287 |
+
msgstr "Toon de widget op de zoekpagina?"
|
288 |
+
|
289 |
+
#: ../dynwid_admin_edit.php:585
|
290 |
+
msgid "Custom Post Type"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: ../dynwid_admin_edit.php:586
|
294 |
+
msgid "Show widget on"
|
295 |
+
msgstr "Toon de widget op"
|
296 |
+
|
297 |
+
#: ../dynwid_admin_edit.php:591
|
298 |
+
msgid "Except for"
|
299 |
+
msgstr "Behalve voor"
|
300 |
+
|
301 |
+
#: ../dynwid_admin_edit.php:609
|
302 |
+
#: ../dynamic-widgets.php:574
|
303 |
+
msgid "WPSC Category"
|
304 |
+
msgstr "WPSC Categorie"
|
305 |
+
|
306 |
+
#: ../dynwid_admin_edit.php:610
|
307 |
+
msgid "Show widget default on WPSC categories?"
|
308 |
+
msgstr "Toon de widget standaard in de WPSC categoriën?"
|
309 |
+
|
310 |
+
#: ../dynwid_admin_edit.php:625
|
311 |
+
msgid "Save"
|
312 |
+
msgstr "Opslaan"
|
313 |
+
|
314 |
+
#: ../dynwid_admin.php:16
|
315 |
+
msgid "<b>WARNING</b> STRICT sql mode in effect. Dynamic Widgets might not work correctly. Please disable STRICT sql mode."
|
316 |
+
msgstr "<b>LET OP</b> STRICT sql mode gedecteerd. Dynamic Widgets werkt mogelijk niet correct. U wordt aangeraden STRICT sql mode uit te schakelen."
|
317 |
+
|
318 |
+
#: ../dynwid_admin.php:36
|
319 |
+
msgid "Oops! Something went terrible wrong. Please reinstall Dynamic Widgets."
|
320 |
+
msgstr "Oeps! Er is een onhelstelbare fout opgetreden. U wordt aangeraden om Dynamic Widgets opnieuw te installeren."
|
321 |
+
|
322 |
+
#: ../dynwid_admin.php:44
|
323 |
+
#: ../dynwid_admin_overview.php:28
|
324 |
+
msgid "OLD"
|
325 |
+
msgstr "OUD"
|
326 |
+
|
327 |
+
#: ../dynwid_admin.php:44
|
328 |
+
#: ../dynwid_admin_overview.php:28
|
329 |
+
msgid "FILTER"
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: ../dynwid_admin_overview.php:15
|
333 |
+
msgid "Widget options have been reset to default."
|
334 |
+
msgstr "De widget opties zijn hersteld naar standaard"
|
335 |
+
|
336 |
+
#: ../dynwid_admin_overview.php:28
|
337 |
+
msgid "Method set to"
|
338 |
+
msgstr "Methode is nu"
|
339 |
+
|
340 |
+
#: ../dynwid_admin_overview.php:59
|
341 |
+
msgid "Edit this widget options"
|
342 |
+
msgstr "Wijzig de widget opties voor"
|
343 |
+
|
344 |
+
#: ../dynwid_admin_overview.php:62
|
345 |
+
msgid "Edit"
|
346 |
+
msgstr "Wijzig"
|
347 |
+
|
348 |
+
#: ../dynwid_admin_overview.php:67
|
349 |
+
msgid "Reset widget to Static"
|
350 |
+
msgstr "Zet de widget terug naar statisch"
|
351 |
+
|
352 |
+
#: ../dynwid_admin_overview.php:73
|
353 |
+
#: ../dynamic-widgets.php:121
|
354 |
+
#: ../dynamic-widgets.php:123
|
355 |
+
#: ../dynamic-widgets.php:559
|
356 |
+
msgid "Dynamic"
|
357 |
+
msgstr "Dyamisch"
|
358 |
+
|
359 |
+
#: ../dynwid_admin_overview.php:73
|
360 |
+
#: ../dynamic-widgets.php:121
|
361 |
+
#: ../dynamic-widgets.php:122
|
362 |
+
#: ../dynamic-widgets.php:125
|
363 |
+
#: ../dynamic-widgets.php:559
|
364 |
+
msgid "Static"
|
365 |
+
msgstr "Statisch"
|
366 |
+
|
367 |
+
#: ../dynwid_admin_overview.php:88
|
368 |
+
msgid "Advanced"
|
369 |
+
msgstr "Geavanceerd"
|
370 |
+
|
371 |
+
#: ../dynamic-widgets.php:118
|
372 |
+
msgid "Widgets are always displayed by default"
|
373 |
+
msgstr "Widgets worden standaard altijd getoond"
|
374 |
+
|
375 |
+
#: ../dynamic-widgets.php:118
|
376 |
+
msgid "The"
|
377 |
+
msgstr "De"
|
378 |
+
|
379 |
+
#: ../dynamic-widgets.php:118
|
380 |
+
msgid "selection"
|
381 |
+
msgstr "selectie"
|
382 |
+
|
383 |
+
#: ../dynamic-widgets.php:119
|
384 |
+
msgid "Click on the"
|
385 |
+
msgstr "Klik op de"
|
386 |
+
|
387 |
+
#: ../dynamic-widgets.php:119
|
388 |
+
msgid "next to the options for more info"
|
389 |
+
msgstr "bij de opties voor meer informatie"
|
390 |
+
|
391 |
+
#: ../dynamic-widgets.php:122
|
392 |
+
msgid "When a widget is"
|
393 |
+
msgstr "Wanneer een widget"
|
394 |
+
|
395 |
+
#: ../dynamic-widgets.php:122
|
396 |
+
msgid "the widget uses the WordPress default. In other words, it's shown everywhere"
|
397 |
+
msgstr "de widget staat op de standaard instelling. Met andere woorden, deze wordt overal getoond"
|
398 |
+
|
399 |
+
#: ../dynamic-widgets.php:123
|
400 |
+
msgid "A widget is"
|
401 |
+
msgstr "Een widget is"
|
402 |
+
|
403 |
+
#: ../dynamic-widgets.php:123
|
404 |
+
msgid "when there are options set, i.e. not showing on the front page."
|
405 |
+
msgstr "als er opties gewijzigd zijn, bijvoorbeeld niet tonen op de startpagina."
|
406 |
+
|
407 |
+
#: ../dynamic-widgets.php:124
|
408 |
+
msgid "Reset"
|
409 |
+
msgstr "Herstellen"
|
410 |
+
|
411 |
+
#: ../dynamic-widgets.php:125
|
412 |
+
msgid "Reset makes the widget return to"
|
413 |
+
msgstr "Herstellen zorgt ervoor dat de widget teruggezet wordt naar"
|
414 |
+
|
415 |
+
#: ../dynamic-widgets.php:165
|
416 |
+
msgid "Settings"
|
417 |
+
msgstr "Instellingen"
|
418 |
+
|
419 |
+
#: ../dynamic-widgets.php:558
|
420 |
+
msgid "This widget is"
|
421 |
+
msgstr "Deze widget is"
|
422 |
+
|
423 |
+
#: ../dynamic-widgets.php:573
|
424 |
+
msgid "Search page"
|
425 |
+
msgstr "Zoek pagina"
|
426 |
+
|
427 |
+
#: ../dynamic-widgets.php:609
|
428 |
+
msgid "and"
|
429 |
+
msgstr "en"
|
430 |
+
|
431 |
+
#: ../dynamic-widgets.php:615
|
432 |
+
msgid "Options set for"
|
433 |
+
msgstr "Opties voor"
|
434 |
+
|
435 |
+
#: ../dynamic-widgets.php:615
|
436 |
+
msgid "Option set for"
|
437 |
+
msgstr "Optie voor"
|
438 |
+
|
locale/dynamic-widgets.pot
ADDED
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Dynamic Widgets\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-10-16 21:05+0100\n"
|
6 |
+
"PO-Revision-Date: 2010-10-16 21:06+0100\n"
|
7 |
+
"Last-Translator: Jacco\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: English\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
# WordPress MO
|
19 |
+
#: ../dynwid_admin_edit.php:22
|
20 |
+
msgid "Anonymous"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: ../dynwid_admin_edit.php:332
|
24 |
+
msgid "Widget options saved."
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: ../dynwid_admin_edit.php:332
|
28 |
+
#: ../dynwid_admin_edit.php:629
|
29 |
+
msgid "Return"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: ../dynwid_admin_edit.php:332
|
33 |
+
msgid "to Dynamic Widgets overview"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: ../dynwid_admin_edit.php:337
|
37 |
+
msgid "Dynamic does not mean static hiding of a widget."
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: ../dynwid_admin_edit.php:337
|
41 |
+
msgid "Hint"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: ../dynwid_admin_edit.php:337
|
45 |
+
msgid "Remove"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../dynwid_admin_edit.php:337
|
49 |
+
msgid "the widget from the sidebar"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: ../dynwid_admin_edit.php:341
|
53 |
+
msgid "The From date can't be later than the To date."
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../dynwid_admin_edit.php:346
|
57 |
+
msgid "Edit options for"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
# WordPress MO
|
61 |
+
#: ../dynwid_admin_edit.php:346
|
62 |
+
msgid "Widget"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
# WordPress MO
|
66 |
+
#: ../dynwid_admin_edit.php:355
|
67 |
+
#: ../dynamic-widgets.php:564
|
68 |
+
msgid "Role"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: ../dynwid_admin_edit.php:356
|
72 |
+
msgid "Show widget to everybody?"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../dynwid_admin_edit.php:360
|
76 |
+
msgid ""
|
77 |
+
"Setting options by role is very powerfull. It can override all other options!<br />\n"
|
78 |
+
"\t\t\t\t\t\tUsers who are not logged in, get the <em>Anonymous</em> role."
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
# WordPress MO
|
82 |
+
#: ../dynwid_admin_edit.php:364
|
83 |
+
#: ../dynwid_admin_edit.php:387
|
84 |
+
#: ../dynwid_admin_edit.php:414
|
85 |
+
#: ../dynwid_admin_edit.php:429
|
86 |
+
#: ../dynwid_admin_edit.php:482
|
87 |
+
#: ../dynwid_admin_edit.php:496
|
88 |
+
#: ../dynwid_admin_edit.php:509
|
89 |
+
#: ../dynwid_admin_edit.php:528
|
90 |
+
#: ../dynwid_admin_edit.php:536
|
91 |
+
#: ../dynwid_admin_edit.php:544
|
92 |
+
#: ../dynwid_admin_edit.php:588
|
93 |
+
#: ../dynwid_admin_edit.php:612
|
94 |
+
#: ../dynamic-widgets.php:118
|
95 |
+
msgid "Yes"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
# WordPress MO
|
99 |
+
#: ../dynwid_admin_edit.php:365
|
100 |
+
#: ../dynwid_admin_edit.php:388
|
101 |
+
#: ../dynwid_admin_edit.php:415
|
102 |
+
#: ../dynwid_admin_edit.php:430
|
103 |
+
#: ../dynwid_admin_edit.php:483
|
104 |
+
#: ../dynwid_admin_edit.php:497
|
105 |
+
#: ../dynwid_admin_edit.php:510
|
106 |
+
#: ../dynwid_admin_edit.php:529
|
107 |
+
#: ../dynwid_admin_edit.php:537
|
108 |
+
#: ../dynwid_admin_edit.php:545
|
109 |
+
#: ../dynwid_admin_edit.php:589
|
110 |
+
#: ../dynwid_admin_edit.php:613
|
111 |
+
msgid "No"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: ../dynwid_admin_edit.php:365
|
115 |
+
msgid "only to"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
# WordPress MO
|
119 |
+
#: ../dynwid_admin_edit.php:374
|
120 |
+
#: ../dynamic-widgets.php:565
|
121 |
+
msgid "Date"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: ../dynwid_admin_edit.php:375
|
125 |
+
msgid "Show widget always?"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: ../dynwid_admin_edit.php:379
|
129 |
+
msgid "Next to the above role option, the date option is also very powerfull. You've been warned!"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: ../dynwid_admin_edit.php:380
|
133 |
+
msgid "Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: ../dynwid_admin_edit.php:381
|
137 |
+
msgid ""
|
138 |
+
"Date ranges can be made by entering a From AND a To date<br />\n"
|
139 |
+
" \t\t\t\t\tWhen you want the widget to be displayed from a specific date, only fill in the From date<br />\n"
|
140 |
+
" \t\t\t\t\tWhen you want the widget to stop displaying on a specific date, only fill in the To date.\n"
|
141 |
+
" \t\t\t\t"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: ../dynwid_admin_edit.php:388
|
145 |
+
msgid "only"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: ../dynwid_admin_edit.php:392
|
149 |
+
msgid "From"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: ../dynwid_admin_edit.php:396
|
153 |
+
msgid "To"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: ../dynwid_admin_edit.php:404
|
157 |
+
#: ../dynamic-widgets.php:566
|
158 |
+
msgid "Front Page"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../dynwid_admin_edit.php:405
|
162 |
+
msgid "Show widget on the front page?"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../dynwid_admin_edit.php:409
|
166 |
+
msgid ""
|
167 |
+
"This option only applies when your front page is set to display your latest posts (See Settings > Reading).<br />\n"
|
168 |
+
"\t\t\t\t\t\tWhen a static page is set, you can use the options for the static pages below.\n"
|
169 |
+
"\t\t\t\t\t"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#: ../dynwid_admin_edit.php:419
|
173 |
+
#: ../dynamic-widgets.php:567
|
174 |
+
msgid "Single Posts"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../dynwid_admin_edit.php:420
|
178 |
+
msgid "Show widget default on single posts?"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../dynwid_admin_edit.php:424
|
182 |
+
msgid ""
|
183 |
+
"When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won't be applied.\n"
|
184 |
+
" \t\t\t\t\tIf you want to use the rules in a logical OR condition. Add the same widget again and apply the other rule to that.\n"
|
185 |
+
" \t\t\t\t\t"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: ../dynwid_admin_edit.php:433
|
189 |
+
msgid "Make exception rule available to individual posts and tags."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: ../dynwid_admin_edit.php:437
|
193 |
+
msgid ""
|
194 |
+
"When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.\n"
|
195 |
+
"\t\t\t\t\t\tYou can set the exception rule for tags in the single Edit Tag Panel (go to <a href=\"edit-tags.php?taxonomy=post_tag\">Post Tags</a>,\n"
|
196 |
+
"\t\t\t\t\t\tclick a tag), For individual posts in the <a href=\"post-new.php\">New</a> or <a href=\"edit.php\">Edit</a> Posts panel.\n"
|
197 |
+
"\t\t\t\t\t\tException rules for tags and individual posts in any combination work independantly, but will always be counted as one exception.<br />\n"
|
198 |
+
" \t\t\t\t\tPlease note when exception rules are set for Author and/or Category, these will be removed.\n"
|
199 |
+
" \t\t\t\t"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: ../dynwid_admin_edit.php:454
|
203 |
+
msgid "Except the posts by author"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: ../dynwid_admin_edit.php:465
|
207 |
+
msgid "Except the posts in category"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
# WordPress MO
|
211 |
+
#: ../dynwid_admin_edit.php:479
|
212 |
+
#: ../dynamic-widgets.php:568
|
213 |
+
msgid "Pages"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: ../dynwid_admin_edit.php:480
|
217 |
+
msgid "Show widget default on static pages?"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: ../dynwid_admin_edit.php:484
|
221 |
+
msgid "Except the page(s)"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: ../dynwid_admin_edit.php:493
|
225 |
+
#: ../dynamic-widgets.php:569
|
226 |
+
msgid "Author Pages"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: ../dynwid_admin_edit.php:494
|
230 |
+
msgid "Show widget default on author pages?"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: ../dynwid_admin_edit.php:498
|
234 |
+
msgid "Except the author(s)"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: ../dynwid_admin_edit.php:506
|
238 |
+
#: ../dynamic-widgets.php:570
|
239 |
+
msgid "Category Pages"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: ../dynwid_admin_edit.php:507
|
243 |
+
msgid "Show widget default on category pages?"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: ../dynwid_admin_edit.php:511
|
247 |
+
#: ../dynwid_admin_edit.php:614
|
248 |
+
msgid "Except the categories"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: ../dynwid_admin_edit.php:520
|
252 |
+
#: ../dynamic-widgets.php:571
|
253 |
+
msgid "Archive Pages"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: ../dynwid_admin_edit.php:521
|
257 |
+
msgid "Show widget on archive pages"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: ../dynwid_admin_edit.php:525
|
261 |
+
msgid "This option does not include Author and Category Pages."
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: ../dynwid_admin_edit.php:533
|
265 |
+
#: ../dynamic-widgets.php:572
|
266 |
+
msgid "Error Page"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: ../dynwid_admin_edit.php:534
|
270 |
+
msgid "Show widget on the error page?"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: ../dynwid_admin_edit.php:541
|
274 |
+
msgid "Search Page"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: ../dynwid_admin_edit.php:542
|
278 |
+
msgid "Show widget on the search page?"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: ../dynwid_admin_edit.php:585
|
282 |
+
msgid "Custom Post Type"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: ../dynwid_admin_edit.php:586
|
286 |
+
msgid "Show widget on"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: ../dynwid_admin_edit.php:591
|
290 |
+
msgid "Except for"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: ../dynwid_admin_edit.php:609
|
294 |
+
#: ../dynamic-widgets.php:574
|
295 |
+
msgid "WPSC Category"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: ../dynwid_admin_edit.php:610
|
299 |
+
msgid "Show widget default on WPSC categories?"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
# WordPress MO
|
303 |
+
#: ../dynwid_admin_edit.php:625
|
304 |
+
msgid "Save"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: ../dynwid_admin.php:16
|
308 |
+
msgid "<b>WARNING</b> STRICT sql mode in effect. Dynamic Widgets might not work correctly. Please disable STRICT sql mode."
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: ../dynwid_admin.php:36
|
312 |
+
msgid "Oops! Something went terrible wrong. Please reinstall Dynamic Widgets."
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: ../dynwid_admin.php:44
|
316 |
+
#: ../dynwid_admin_overview.php:28
|
317 |
+
msgid "OLD"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: ../dynwid_admin.php:44
|
321 |
+
#: ../dynwid_admin_overview.php:28
|
322 |
+
msgid "FILTER"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: ../dynwid_admin_overview.php:15
|
326 |
+
msgid "Widget options have been reset to default."
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: ../dynwid_admin_overview.php:28
|
330 |
+
msgid "Method set to"
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: ../dynwid_admin_overview.php:59
|
334 |
+
msgid "Edit this widget options"
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
# WordPress MO
|
338 |
+
#: ../dynwid_admin_overview.php:62
|
339 |
+
msgid "Edit"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: ../dynwid_admin_overview.php:67
|
343 |
+
msgid "Reset widget to Static"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: ../dynwid_admin_overview.php:73
|
347 |
+
#: ../dynamic-widgets.php:121
|
348 |
+
#: ../dynamic-widgets.php:123
|
349 |
+
#: ../dynamic-widgets.php:559
|
350 |
+
msgid "Dynamic"
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: ../dynwid_admin_overview.php:73
|
354 |
+
#: ../dynamic-widgets.php:121
|
355 |
+
#: ../dynamic-widgets.php:122
|
356 |
+
#: ../dynamic-widgets.php:125
|
357 |
+
#: ../dynamic-widgets.php:559
|
358 |
+
msgid "Static"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: ../dynwid_admin_overview.php:88
|
362 |
+
msgid "Advanced"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: ../dynamic-widgets.php:118
|
366 |
+
msgid "Widgets are always displayed by default"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: ../dynamic-widgets.php:118
|
370 |
+
msgid "The"
|
371 |
+
msgstr ""
|
372 |
+
|
373 |
+
#: ../dynamic-widgets.php:118
|
374 |
+
msgid "selection"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: ../dynamic-widgets.php:119
|
378 |
+
msgid "Click on the"
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: ../dynamic-widgets.php:119
|
382 |
+
msgid "next to the options for more info"
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: ../dynamic-widgets.php:122
|
386 |
+
msgid "When a widget is"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: ../dynamic-widgets.php:122
|
390 |
+
msgid "the widget uses the WordPress default. In other words, it's shown everywhere"
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: ../dynamic-widgets.php:123
|
394 |
+
msgid "A widget is"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: ../dynamic-widgets.php:123
|
398 |
+
msgid "when there are options set, i.e. not showing on the front page."
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: ../dynamic-widgets.php:124
|
402 |
+
msgid "Reset"
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: ../dynamic-widgets.php:125
|
406 |
+
msgid "Reset makes the widget return to"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
# WordPress MO
|
410 |
+
#: ../dynamic-widgets.php:165
|
411 |
+
msgid "Settings"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: ../dynamic-widgets.php:558
|
415 |
+
msgid "This widget is"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: ../dynamic-widgets.php:573
|
419 |
+
msgid "Search page"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: ../dynamic-widgets.php:609
|
423 |
+
msgid "and"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: ../dynamic-widgets.php:615
|
427 |
+
msgid "Options set for"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: ../dynamic-widgets.php:615
|
431 |
+
msgid "Option set for"
|
432 |
+
msgstr ""
|
433 |
+
|
plugin/wpml.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WordPress MultiLingual Plugin
|
4 |
+
* http://wpml.org/
|
5 |
+
*
|
6 |
+
*
|
7 |
+
* @version $Id: wpml.php 299409 2010-10-12 20:24:48Z qurl $
|
8 |
+
*/
|
9 |
+
|
10 |
+
function dw_wpml_get_id($content_id, $content_type = 'post_page') {
|
11 |
+
$language_code = wpml_get_default_language();
|
12 |
+
$lang = wpml_get_content_translation($content_type, $content_id, $language_code);
|
13 |
+
|
14 |
+
if ( is_array($lang) ) {
|
15 |
+
$id = $lang[$language_code];
|
16 |
+
} else {
|
17 |
+
$id = 0;
|
18 |
+
}
|
19 |
+
|
20 |
+
return $id;
|
21 |
+
}
|
22 |
+
?>
|
plugin/wpsc.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WordPress Shopping Cart / WordPress E-Commerce Plugin
|
4 |
+
* http://getshopped.org/
|
5 |
+
*
|
6 |
+
* @version $Id: wpsc.php 299409 2010-10-12 20:24:48Z qurl $
|
7 |
+
*/
|
8 |
+
|
9 |
+
function dw_wpsc_get_categories() {
|
10 |
+
$wpdb = &$GLOBALS['wpdb'];
|
11 |
+
|
12 |
+
$categories = array();
|
13 |
+
$table = WPSC_TABLE_PRODUCT_CATEGORIES;
|
14 |
+
$fields = array('id', 'name');
|
15 |
+
$query = "SELECT " . implode(', ', $fields) . " FROM " . $table . " WHERE active = '1' ORDER BY name";
|
16 |
+
$results = $wpdb->get_results($query);
|
17 |
+
|
18 |
+
foreach ( $results as $myrow ) {
|
19 |
+
$categories[$myrow->id] = $myrow->name;
|
20 |
+
}
|
21 |
+
|
22 |
+
return $categories;
|
23 |
+
}
|
24 |
+
|
25 |
+
function is_dw_wpsc_category($id) {
|
26 |
+
$wpsc_query = &$GLOBALS['wpsc_query'];
|
27 |
+
|
28 |
+
if ( is_int($id) ) {
|
29 |
+
$id = array($id);
|
30 |
+
}
|
31 |
+
|
32 |
+
if ( in_array($wpsc_query->category, $id) ) {
|
33 |
+
return TRUE;
|
34 |
+
} else {
|
35 |
+
return FALSE;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, conditional tags
|
5 |
Requires at least: 2.9.1
|
6 |
Tested up to: 3.0.1
|
7 |
-
Stable tag: 1.3.
|
8 |
|
9 |
Dynamic Widgets gives you more control over your widgets. It lets you dynamicly place widgets on WordPress pages.
|
10 |
|
@@ -24,6 +24,8 @@ Dynamic Widgets gives you more control over your widgets. It lets you dynamicly
|
|
24 |
- Error Page
|
25 |
- Search Page
|
26 |
- Custom Post Types (since WordPress 3.0)
|
|
|
|
|
27 |
* Exceptions can be created for:
|
28 |
- User roles on role, including not logged in (anonymous) users
|
29 |
- Dates on from, to or range
|
@@ -32,6 +34,11 @@ Dynamic Widgets gives you more control over your widgets. It lets you dynamicly
|
|
32 |
- Author pages on Author
|
33 |
- Category pages on Category name
|
34 |
- Custom Posts Type on Custom post name (since WordPress 3.0)
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
== Installation ==
|
37 |
|
@@ -45,7 +52,7 @@ Installation of this plugin is fairly easy:
|
|
45 |
|
46 |
== Frequently Asked Questions ==
|
47 |
|
48 |
-
For the latest FAQ, please visit the [online FAQ](http://www.qurl.nl/faq/).
|
49 |
|
50 |
= What are the (system) requirements to use this plugin? =
|
51 |
|
@@ -58,6 +65,10 @@ For the latest FAQ, please visit the [online FAQ](http://www.qurl.nl/faq/).
|
|
58 |
|
59 |
Start immediately looking for another hoster. YES, immediately! NOW! Pronto! PHP4 was introduced in the year 2000 and is [not supported](http://en.wikipedia.org/wiki/PHP#Release_history) anymore. As I don't have PHP4 anymore, I can only be sure for about 80% the plugin will work. Please let me know if it doesn't. I'll try to work out a solution.
|
60 |
|
|
|
|
|
|
|
|
|
61 |
= Does the plugin work on WordPress 3.0 MU? =
|
62 |
|
63 |
Yes, but only if you activate the plugin on a per site base. Network Activation is not supported.
|
@@ -84,7 +95,7 @@ Your theme probably uses a 'default display widgets policy'. When a sidebar beco
|
|
84 |
|
85 |
= I have found a bug! Now what? =
|
86 |
|
87 |
-
Please file a [bugreport](http://www.qurl.nl/bugreport/). Please note the procedure how to create a dump in the previous answer. After you've filed the report, I'll get back to you asap.
|
88 |
|
89 |
= How do I completely remove Dynamic Widgets? =
|
90 |
|
@@ -96,12 +107,22 @@ Please file a [bugreport](http://www.qurl.nl/bugreport/). Please note the proced
|
|
96 |
|
97 |
== Release notes ==
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
You can switch to the OLD method by clicking on the 'Advanced >' link in the Dynamic Widgets overview page and checking 'Use OLD method'.
|
102 |
|
103 |
== Changelog ==
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
= Version 1.3.5 =
|
106 |
|
107 |
* Added support for themes which use the WP function is_active_sidebar() when the method is set to FILTER (default).
|
4 |
Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, conditional tags
|
5 |
Requires at least: 2.9.1
|
6 |
Tested up to: 3.0.1
|
7 |
+
Stable tag: 1.3.6
|
8 |
|
9 |
Dynamic Widgets gives you more control over your widgets. It lets you dynamicly place widgets on WordPress pages.
|
10 |
|
24 |
- Error Page
|
25 |
- Search Page
|
26 |
- Custom Post Types (since WordPress 3.0)
|
27 |
+
- WP Shopping Cart / WP E-Commerce Categories
|
28 |
+
|
29 |
* Exceptions can be created for:
|
30 |
- User roles on role, including not logged in (anonymous) users
|
31 |
- Dates on from, to or range
|
34 |
- Author pages on Author
|
35 |
- Category pages on Category name
|
36 |
- Custom Posts Type on Custom post name (since WordPress 3.0)
|
37 |
+
- WP Shopping Cart / WP E-Commerce Categories on Category name
|
38 |
+
|
39 |
+
* Plugin support for:
|
40 |
+
- WP MultiLingual (WPML)
|
41 |
+
- WP Shopping Cart / WP E-Commerce (WPSC / WPEC)
|
42 |
|
43 |
== Installation ==
|
44 |
|
52 |
|
53 |
== Frequently Asked Questions ==
|
54 |
|
55 |
+
For the latest FAQ, please visit the [online FAQ](http://www.qurl.nl/dynamic-widgets/faq/).
|
56 |
|
57 |
= What are the (system) requirements to use this plugin? =
|
58 |
|
65 |
|
66 |
Start immediately looking for another hoster. YES, immediately! NOW! Pronto! PHP4 was introduced in the year 2000 and is [not supported](http://en.wikipedia.org/wiki/PHP#Release_history) anymore. As I don't have PHP4 anymore, I can only be sure for about 80% the plugin will work. Please let me know if it doesn't. I'll try to work out a solution.
|
67 |
|
68 |
+
= I'm not sure my theme is calling `wp_head()`. Can I check? =
|
69 |
+
|
70 |
+
Yes, you can. In the Dynamic Widgets Overview page, click the 'Advanced >' link at the bottom. You should see if `wp_head()` is called in your theme. It is possible Dynamic Widgets can't detect if the theme is calling `wp_head()`. Please contact the author of the theme to ask for it. You can also of course just try Dynamic Widgets to see if it works.
|
71 |
+
|
72 |
= Does the plugin work on WordPress 3.0 MU? =
|
73 |
|
74 |
Yes, but only if you activate the plugin on a per site base. Network Activation is not supported.
|
95 |
|
96 |
= I have found a bug! Now what? =
|
97 |
|
98 |
+
Please file a [bugreport](http://www.qurl.nl/dynamic-widgets/bugreport/). Please note the procedure how to create a dump in the previous answer. After you've filed the report, I'll get back to you asap.
|
99 |
|
100 |
= How do I completely remove Dynamic Widgets? =
|
101 |
|
107 |
|
108 |
== Release notes ==
|
109 |
|
110 |
+
With version 1.3.6 of Dynamic Widgets I've implemented l10n support. Not all text strings are already in the POT file which you can find in the `locale` directory. The first text strings I have already translated into Dutch. You're invited to add another translation. When you have a finished translation PO and MO file, please send it to me, so I can include it into the repository.
|
|
|
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= Version 1.3.6 =
|
115 |
+
|
116 |
+
* Added l10n support.
|
117 |
+
* Added Dutch language files (locale: nl)
|
118 |
+
* Added support for WP Shopping Cart / WP E-Commerce Categories.
|
119 |
+
* Bugfix for error 404 (file not found) when saving options.
|
120 |
+
* Bugfix for unexpected behavior in subsequent category pages.
|
121 |
+
* Bugfix for unexpected behavior in single post when using individual exception rules.
|
122 |
+
* Bugfix for unexpected behavior in Custom Post Types.
|
123 |
+
* Bugfix for incorrect use and display of Custom Post Types in Widget Edit Options screen.
|
124 |
+
* Removed several PHP notices.
|
125 |
+
|
126 |
= Version 1.3.5 =
|
127 |
|
128 |
* Added support for themes which use the WP function is_active_sidebar() when the method is set to FILTER (default).
|