Version Description
Download this release
Release Info
Developer | pmenard |
Plugin | Simply Exclude |
Version | 2.0.6.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.6.4 to 2.0.6.5
- readme.txt +3 -3
- simplyexclude.php +215 -455
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: pmenard
|
|
3 |
Donate link: http://www.codehooligans.com
|
4 |
Tags: admin, posts, pages, categories, tags, Post Type, Taxonomy, exclude, include, is_front, is_archive, is_search, is_feed, is_author
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 4
|
7 |
Stable tag: 2.0.6.4
|
8 |
License: GPLv2
|
9 |
License URI: http://www.opensource.org/licenses/GPL-2.0
|
@@ -51,8 +51,8 @@ At the time (version 1.6.1) the plugin only effects Pages included in the tradit
|
|
51 |
== Changelog ==
|
52 |
|
53 |
= 2.0.6.4 =
|
54 |
-
- Corrected reported
|
55 |
-
- Added a
|
56 |
|
57 |
= 2.0.6.3 =
|
58 |
- Updated logic such that excluding posts for Archive will also automatically exclude post from Archive Widget. This way you don't get links showing from the widget that cause 404 errors. See support thread https://wordpress.org/support/topic/archive-month-shows-when-all-posts-in-month-are-excluded-giving-404-error
|
3 |
Donate link: http://www.codehooligans.com
|
4 |
Tags: admin, posts, pages, categories, tags, Post Type, Taxonomy, exclude, include, is_front, is_archive, is_search, is_feed, is_author
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 4,1
|
7 |
Stable tag: 2.0.6.4
|
8 |
License: GPLv2
|
9 |
License URI: http://www.opensource.org/licenses/GPL-2.0
|
51 |
== Changelog ==
|
52 |
|
53 |
= 2.0.6.4 =
|
54 |
+
- Corrected issue reported related to Missing argument 2 for SimplyExclude::se_widget_getarchives_where()
|
55 |
+
- Added a filter 'se_filters_priority' to allow control the priority of the se_filter hook. This can also be set via a define in wp-config.php or functions.php as define('SE_FILTERS_PRIORITY', 99);
|
56 |
|
57 |
= 2.0.6.3 =
|
58 |
- Updated logic such that excluding posts for Archive will also automatically exclude post from Archive Widget. This way you don't get links showing from the widget that cause 404 errors. See support thread https://wordpress.org/support/topic/archive-month-shows-when-all-posts-in-month-are-excluded-giving-404-error
|
simplyexclude.php
CHANGED
@@ -6,13 +6,14 @@ Description: Provides an interface to selectively exclude/include all Taxonomies
|
|
6 |
Author: Paul Menard
|
7 |
Version: 2.0.6.4
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
-
Text Domain:
|
10 |
Domain Path: /languages
|
11 |
License: GNU General Public License v2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
14 |
*/
|
15 |
|
|
|
16 |
|
17 |
class SimplyExclude
|
18 |
{
|
@@ -34,13 +35,11 @@ class SimplyExclude
|
|
34 |
private $tabs = array();
|
35 |
private $current_tab;
|
36 |
|
37 |
-
private $FILTER_STATE = array();
|
38 |
-
|
39 |
public function __construct() {
|
40 |
|
41 |
-
$this->se_version = "2.0.6.
|
42 |
|
43 |
-
$this->admin_menu_label = __("Simply Exclude",
|
44 |
$this->options_key = "simplyexclude_v2";
|
45 |
|
46 |
$plugindir_node = dirname(plugin_basename(__FILE__));
|
@@ -51,13 +50,13 @@ class SimplyExclude
|
|
51 |
$this->page_hooks = array();
|
52 |
|
53 |
/* Setup the tetdomain for i18n language handling see http://codex.wordpress.org/Function_Reference/load_plugin_textdomain */
|
54 |
-
load_plugin_textdomain(
|
55 |
|
56 |
-
add_action( 'init',
|
57 |
-
add_action( 'admin_init',
|
58 |
-
add_action( 'admin_menu',
|
59 |
-
add_action( 'admin_footer',
|
60 |
-
add_action( 'wp_ajax_se_update',
|
61 |
|
62 |
// In 2.0.6.4 added a define to allow control of the SE_FILTERS_PRIORITY
|
63 |
//https://wordpress.org/support/topic/first-install-problems-in-wordpress-40?replies=3#post-6579114
|
@@ -76,58 +75,26 @@ class SimplyExclude
|
|
76 |
{
|
77 |
|
78 |
$this->tabs = array(
|
79 |
-
'taxonomies' => __('Taxonomies',
|
80 |
-
'post_types' => __('Post Types',
|
81 |
-
'users' => __('Users',
|
82 |
);
|
83 |
$this->current_tab = '';
|
84 |
|
85 |
$this->se_load_config();
|
86 |
-
|
87 |
-
add_action( 'admin_enqueue_scripts', array($this,'admin_enqueue_scripts') );
|
88 |
|
89 |
-
add_action('edit_category_form_fields', array($this,'se_show_taxonomy_term_fields'), 99, 1);
|
90 |
-
add_action('edit_tag_form_fields', array($this,'se_show_taxonomy_term_fields'), 99, 1);
|
91 |
-
add_action('edited_term', array($this,'se_save_taxonomy_term_fields'), 99, 3);
|
92 |
-
|
93 |
-
add_action( 'show_user_profile', array($this,'se_show_user_profile'), 99 );
|
94 |
-
add_action( 'edit_user_profile', array($this,'se_show_user_profile'), 99 );
|
95 |
-
|
96 |
-
add_action( 'profile_update', array($this,'se_save_user_profile'), 99);
|
97 |
-
|
98 |
-
add_filter( 'plugin_action_links_'. basename( dirname( __FILE__ ) ). '/' .basename( __FILE__ ), array($this,'plugin_settings'));
|
99 |
-
|
100 |
-
}
|
101 |
-
|
102 |
-
function admin_enqueue_scripts( $page = '' ) {
|
103 |
-
|
104 |
if ( ($this->check_url('wp-admin/edit-tags.php'))
|
105 |
|| ($this->check_url('wp-admin/edit.php'))
|
106 |
|| ($this->check_url('wp-admin/users.php')) )
|
107 |
{
|
108 |
-
|
109 |
-
if (function_exists('get_current_screen'))
|
110 |
-
$current_screen = get_current_screen();
|
111 |
-
else
|
112 |
-
{
|
113 |
-
global $current_screen;
|
114 |
-
}
|
115 |
-
//echo "current_screen<pre>"; print_r($current_screen); echo "</pre>";
|
116 |
-
//echo "screen->id[". $current_screen->id ."]<br />";
|
117 |
-
|
118 |
-
$se_taxonomies = $this->se_load_taxonomy_list();
|
119 |
-
//echo "se_taxonomies<pre>"; print_r($se_taxonomies); echo "</pre>";
|
120 |
-
|
121 |
-
|
122 |
wp_enqueue_style( 'simplyexclude-stylesheet', $this->plugindir_url .'/simplyexclude_style_admin.css', false, $this->se_version);
|
123 |
|
124 |
wp_enqueue_script('jquery');
|
125 |
wp_enqueue_script('jquery-ui-core');
|
126 |
wp_enqueue_script('jquery-ui-dialog');
|
127 |
-
wp_enqueue_script('jquery-color'); // Needed for animate color fade on changed elements.
|
128 |
|
129 |
wp_enqueue_style( 'simplyexclude-jquery-ui',
|
130 |
-
$this->plugindir_url .'/js/jquery-ui/css/flick/jquery-ui.css',
|
131 |
null, $this->se_version );
|
132 |
|
133 |
wp_enqueue_script('simplyexclude-admin-dialog-js', $this->plugindir_url .'/js/simplyexclude_admin_dialog.js',
|
@@ -136,11 +103,23 @@ class SimplyExclude
|
|
136 |
wp_enqueue_script('simplyexclude-admin-ajax-js', $this->plugindir_url .'/js/simplyexclude_admin_ajax.js',
|
137 |
array('jquery', 'jquery-ui-core'), $this->se_version);
|
138 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
// Adds a 'Settings' link on the Plugins listing row. Cool!
|
142 |
function plugin_settings( $links ) {
|
143 |
-
$settings_link = '<a href="admin.php?page=se_manage_settings">'.__( 'Settings',
|
144 |
array_unshift( $links, $settings_link );
|
145 |
|
146 |
return $links;
|
@@ -150,27 +129,21 @@ class SimplyExclude
|
|
150 |
{
|
151 |
if (!is_admin())
|
152 |
{
|
153 |
-
add_filter('widget_pages_args',
|
154 |
|
155 |
// Not needed since wp_list_pages is user managable.
|
156 |
-
//aad_filter('wp_list_pages_excludes', array(
|
157 |
|
158 |
// Suport for the Category list/dropdown widget
|
159 |
-
add_filter(
|
160 |
-
add_filter(
|
161 |
-
|
162 |
-
//add_filter( 'wp_list_categories', array($this, 'se_wp_list_categories_proc'), 99);
|
163 |
-
add_filter( 'get_categories_taxonomy', array($this, 'get_categories_taxonomy_proc'), 99);
|
164 |
-
add_filter( 'get_terms', array($this, 'se_get_terms_proc'), 99, 3);
|
165 |
|
166 |
// Support for the Tag Clod widget. This widget supports both the post_tag and category taxonomies.
|
167 |
-
add_filter('widget_tag_cloud_args',
|
168 |
-
|
169 |
-
// Support for the Recent Posts widget.
|
170 |
-
add_filter( 'widget_posts_args', array($this, 'se_widget_recent_posts_proc'), 99);
|
171 |
|
172 |
// Support for Archive widget. This widget will output a month or year archive listing/dropdown of posts
|
173 |
-
add_filter('getarchives_where',
|
|
|
174 |
}
|
175 |
}
|
176 |
|
@@ -178,18 +151,18 @@ class SimplyExclude
|
|
178 |
{
|
179 |
// Add the Main Nav item to the WP menu
|
180 |
add_menu_page( 'Simply Exclude', 'Simply Exclude', 'manage_options', 'se_manage_settings',
|
181 |
-
array(
|
182 |
|
183 |
// Add our Options sub menu.
|
184 |
$this->pagehooks['se_manage_settings'] = add_submenu_page( 'se_manage_settings', 'Settings', 'Settings', 'manage_options',
|
185 |
-
'se_manage_settings', array(
|
186 |
-
add_action('load-'. $this->pagehooks['se_manage_settings'], array(
|
187 |
|
188 |
|
189 |
// Add our Help sub menu.
|
190 |
$this->pagehooks['se_manage_help'] = add_submenu_page( 'se_manage_settings', 'Help', 'Help', 'manage_options',
|
191 |
-
'se_manage_help', array(
|
192 |
-
add_action('load-'. $this->pagehooks['se_manage_help'], array(
|
193 |
|
194 |
if ( !current_user_can('manage_options') )
|
195 |
return;
|
@@ -205,11 +178,11 @@ class SimplyExclude
|
|
205 |
if ((isset($this->se_cfg['data']['taxonomies'][$t_item->name]['options']['showhide']))
|
206 |
&& ($this->se_cfg['data']['taxonomies'][$t_item->name]['options']['showhide'] == 'show'))
|
207 |
{
|
208 |
-
add_filter( "manage_edit-". $t_item->name ."_columns", array(
|
209 |
-
add_filter( "manage_". $t_item->name. "_custom_column", array(
|
210 |
}
|
211 |
}
|
212 |
-
//add_action("delete_term", array(
|
213 |
}
|
214 |
|
215 |
// Now add a submenu for each registered post_type
|
@@ -221,11 +194,11 @@ class SimplyExclude
|
|
221 |
if ((isset($this->se_cfg['data']['post_types'][$t_item->name]['options']['showhide']))
|
222 |
&& ($this->se_cfg['data']['post_types'][$t_item->name]['options']['showhide'] == 'show'))
|
223 |
{
|
224 |
-
add_filter( "manage_". $t_item->name ."_posts_columns", array(
|
225 |
-
add_action( "manage_". $t_item->name ."_posts_custom_column", array(
|
226 |
|
227 |
-
add_meta_box($this->options_key, $this->admin_menu_label, array(
|
228 |
-
add_action('save_post', array(
|
229 |
}
|
230 |
}
|
231 |
}
|
@@ -234,8 +207,8 @@ class SimplyExclude
|
|
234 |
if ((isset($this->se_cfg['data']['se_types']['users']['options']['showhide']))
|
235 |
&& ($this->se_cfg['data']['se_types']['users']['options']['showhide'] == 'show'))
|
236 |
{
|
237 |
-
add_filter( "manage_users_columns", array(
|
238 |
-
add_filter( 'manage_users_custom_column', array(
|
239 |
}
|
240 |
}
|
241 |
|
@@ -276,9 +249,9 @@ class SimplyExclude
|
|
276 |
$this->current_tab = 'taxonomies';
|
277 |
}
|
278 |
|
279 |
-
add_meta_box('se_settings_about_sidebar', 'About this Plugin', array(
|
280 |
$this->pagehooks['se_manage_settings'], 'side', 'core');
|
281 |
-
add_meta_box('se_settings_donate_sidebar', 'Make a Donation', array(
|
282 |
$this->pagehooks['se_manage_settings'], 'side', 'core');
|
283 |
|
284 |
}
|
@@ -305,9 +278,9 @@ class SimplyExclude
|
|
305 |
wp_enqueue_script('jquery-ui-accordion');
|
306 |
}
|
307 |
|
308 |
-
add_meta_box('se_settings_about_sidebar', 'About this Plugin', array(
|
309 |
$this->pagehooks['se_manage_help'], 'side', 'core');
|
310 |
-
add_meta_box('se_settings_donate_sidebar', 'Make a Donation', array(
|
311 |
$this->pagehooks['se_manage_help'], 'side', 'core');
|
312 |
}
|
313 |
|
@@ -348,8 +321,8 @@ class SimplyExclude
|
|
348 |
<td class="description"><?php echo $this->get_taxonomy_action_label($taxonomy, $action_key, 'description');//$action_val['description'] ?></td>
|
349 |
<td class="inc-excl">
|
350 |
<ul class="se-actions-list">
|
351 |
-
<li><input type="radio" id="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_i" name="se_cfg[<?php echo $taxonomy; ?>][actions][<?php echo $action_key ?>]" value="i" <?php if ($action_val == 'i') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_i"><?php _e('Include only',
|
352 |
-
<li><input type="radio" id="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_e" name="se_cfg[<?php echo $taxonomy; ?>][actions][<?php echo $action_key ?>]" value="e" <?php if ($action_val == 'e') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_e"><?php _e('Exclude',
|
353 |
</td>
|
354 |
<tr>
|
355 |
<?php
|
@@ -391,17 +364,17 @@ class SimplyExclude
|
|
391 |
<td class="inc-excl">
|
392 |
<ul class="se-actions-list">
|
393 |
|
394 |
-
<li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_i" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="i" <?php if ($action_val == 'i') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_i"><?php _e('Include only',
|
395 |
-
<li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_e" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="e" <?php if ($action_val == 'e') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_e"><?php _e('Exclude',
|
396 |
<?php
|
397 |
if (($action_key == "is_home")
|
398 |
&& ((isset($this->current_post_type['options']['capability_type']))
|
399 |
&& ($this->current_post_type['options']['capability_type'] == "post"))) {
|
400 |
-
?><li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="a" <?php if ($action_val == 'a') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a"><?php _e('Include All',
|
401 |
} else if (($action_key == "is_feed")
|
402 |
&& ((isset($this->current_post_type['options']['capability_type']))
|
403 |
&& ($this->current_post_type['options']['capability_type'] == "post"))) {
|
404 |
-
?><li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="a" <?php if ($action_val == 'a') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a"><?php _e('Include All',
|
405 |
}
|
406 |
?>
|
407 |
</td>
|
@@ -444,8 +417,8 @@ class SimplyExclude
|
|
444 |
<td class="description"><?php echo $this->get_se_type_action_label($se_type, $action_key, 'description'); ?></td>
|
445 |
<td class="inc-excl">
|
446 |
<ul class="se-actions-list">
|
447 |
-
<li><input type="radio" id="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_i" name="se_cfg[<?php echo $se_type; ?>][actions][<?php echo $action_key ?>]" value="i" <?php if ($action_val == 'i') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_i"><?php _e('Include only',
|
448 |
-
<li><input type="radio" id="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_e" name="se_cfg[<?php echo $se_type; ?>][actions][<?php echo $action_key ?>]" value="e" <?php if ($action_val == 'e') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_e"><?php _e('Exclude',
|
449 |
</td>
|
450 |
<tr>
|
451 |
<?php
|
@@ -477,19 +450,19 @@ class SimplyExclude
|
|
477 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
478 |
<thead>
|
479 |
<tr>
|
480 |
-
<th class="action" colspan="2"><?php _e('Active',
|
481 |
</tr>
|
482 |
</thead>
|
483 |
<tbody>
|
484 |
<tr>
|
485 |
-
<td class="description"><?php _e("Is this Taxonomy active? This is sometimes convenient instead of unsetting all Taxonomy terms.",
|
486 |
<td class="inc-excl">
|
487 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][active]" value="yes"
|
488 |
<?php if ($this->current_taxonomy['options']['active'] == 'yes')
|
489 |
-
echo "checked='checked'"; ?> /> <?php _e('Active',
|
490 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][active]" value="no"
|
491 |
<?php if ($this->current_taxonomy['options']['active'] == 'no')
|
492 |
-
echo "checked='checked'"; ?> /> <?php _e('Disabled',
|
493 |
</td>
|
494 |
</tr>
|
495 |
</tbody>
|
@@ -511,19 +484,19 @@ class SimplyExclude
|
|
511 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
512 |
<thead>
|
513 |
<tr>
|
514 |
-
<th class="action" colspan="2"><?php _e('Active',
|
515 |
</tr>
|
516 |
</thead>
|
517 |
<tbody>
|
518 |
<tr>
|
519 |
-
<td class="description"><?php _e("Is this Post Type Active? This is sometimes convenient instead of unsetting all Post Type items.",
|
520 |
<td class="inc-excl">
|
521 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][active]" value="yes"
|
522 |
<?php if ($this->current_post_type['options']['active'] == 'yes')
|
523 |
-
echo "checked='checked'"; ?> /> <?php _e('Active',
|
524 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][active]" value="no"
|
525 |
<?php if ($this->current_post_type['options']['active'] == 'no')
|
526 |
-
echo "checked='checked'"; ?> /> <?php _e('Disabled',
|
527 |
</td>
|
528 |
</tr>
|
529 |
</tbody>
|
@@ -545,19 +518,19 @@ class SimplyExclude
|
|
545 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
546 |
<thead>
|
547 |
<tr>
|
548 |
-
<th class="action" colspan="2"><?php _e('Active',
|
549 |
</tr>
|
550 |
</thead>
|
551 |
<tbody>
|
552 |
<tr>
|
553 |
-
<td class="description"><?php _e("Active?",
|
554 |
<td class="inc-excl">
|
555 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][active]" value="yes"
|
556 |
<?php if ($this->current_se_type['options']['active'] == 'yes')
|
557 |
-
echo "checked='checked'"; ?> /> <?php _e('Active',
|
558 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][active]" value="no"
|
559 |
<?php if ($this->current_se_type['options']['active'] == 'no')
|
560 |
-
echo "checked='checked'"; ?> /> <?php _e('Disabled',
|
561 |
</td>
|
562 |
</tr>
|
563 |
</tbody>
|
@@ -586,19 +559,19 @@ class SimplyExclude
|
|
586 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
587 |
<thead>
|
588 |
<tr>
|
589 |
-
<th class="action" colspan="2"><?php _e('Show/Hide',
|
590 |
</tr>
|
591 |
</thead>
|
592 |
<tbody>
|
593 |
<tr>
|
594 |
-
<td class="description"><?php _e("Show the extra columns on the Taxonomy listing and the Taxonomy edit form?",
|
595 |
<td class="inc-excl">
|
596 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][showhide]" value="show"
|
597 |
<?php if ($this->current_taxonomy['options']['showhide'] == 'show')
|
598 |
-
echo "checked='checked'"; ?> /> <?php _e('Show',
|
599 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][showhide]" value="hide"
|
600 |
<?php if ($this->current_taxonomy['options']['showhide'] == 'hide')
|
601 |
-
echo "checked='checked'"; ?> /> <?php _e('Hide',
|
602 |
</td>
|
603 |
</tr>
|
604 |
</table>
|
@@ -617,19 +590,19 @@ class SimplyExclude
|
|
617 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
618 |
<thead>
|
619 |
<tr>
|
620 |
-
<th class="action" colspan="2"><?php _e('Show/Hide',
|
621 |
</tr>
|
622 |
</thead>
|
623 |
<tbody>
|
624 |
<tr>
|
625 |
-
<td class="description"><?php _e("Show the extra columns on the Post Type listing and the Post Type edit form?",
|
626 |
<td class="inc-excl">
|
627 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][showhide]" value="show"
|
628 |
<?php if ($this->current_post_type['options']['showhide'] == 'show')
|
629 |
-
echo "checked='checked'"; ?> /> <?php _e('Show',
|
630 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][showhide]" value="hide"
|
631 |
<?php if ($this->current_post_type['options']['showhide'] == 'hide')
|
632 |
-
echo "checked='checked'"; ?> /> <?php _e('Hide',
|
633 |
</td>
|
634 |
</tr>
|
635 |
</table>
|
@@ -648,19 +621,19 @@ class SimplyExclude
|
|
648 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
649 |
<thead>
|
650 |
<tr>
|
651 |
-
<th class="action" colspan="2"><?php _e('Show/Hide',
|
652 |
</tr>
|
653 |
</thead>
|
654 |
<tbody>
|
655 |
<tr>
|
656 |
-
<td class="description"><?php _e("Show the extra columns on the listing and the edit form?",
|
657 |
<td class="inc-excl">
|
658 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][showhide]" value="show"
|
659 |
<?php if ($this->current_se_type['options']['showhide'] == 'show')
|
660 |
-
echo "checked='checked'"; ?> /> <?php _e('Show',
|
661 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][showhide]" value="hide"
|
662 |
<?php if ($this->current_se_type['options']['showhide'] == 'hide')
|
663 |
-
echo "checked='checked'"; ?> /> <?php _e('Hide',
|
664 |
</td>
|
665 |
</tr>
|
666 |
</table>
|
@@ -691,22 +664,22 @@ class SimplyExclude
|
|
691 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
692 |
<thead>
|
693 |
<tr>
|
694 |
-
<th class="action" colspan="2"><?php _e('Query Filtering',
|
695 |
</tr>
|
696 |
</thead>
|
697 |
<tbody>
|
698 |
<tr>
|
699 |
<td class="description">
|
700 |
-
<p><?php _e("Override query filtering for Main Loop Only or All Loops?",
|
701 |
-
<p><?php _e("The Simply-Exclude plugin was designed to only work with the main page query. But sometimes other plugins or your theme will effect how the main filtering works. So if you are having trouble attempting to filter categories from your home page you might want to try and set this option to 'All' and see if it corrects your issue.",
|
702 |
</td>
|
703 |
<td class="inc-excl">
|
704 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][qover]" value="main"
|
705 |
<?php if ($this->current_taxonomy['options']['qover'] == 'main')
|
706 |
-
echo "checked='checked'"; ?> /> <?php _e('Main Loop Only',
|
707 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][qover]" value="all"
|
708 |
<?php if ($this->current_taxonomy['options']['qover'] == 'all')
|
709 |
-
echo "checked='checked'"; ?> /> <?php _e('All Loops',
|
710 |
</td>
|
711 |
</tr>
|
712 |
</table>
|
@@ -726,22 +699,22 @@ class SimplyExclude
|
|
726 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
727 |
<thead>
|
728 |
<tr>
|
729 |
-
<th class="action" colspan="2"><?php _e('Query Filtering',
|
730 |
</tr>
|
731 |
</thead>
|
732 |
<tbody>
|
733 |
<tr>
|
734 |
<td class="description">
|
735 |
-
<p><?php _e("Override query filtering for Main Loop Only or All Loops?",
|
736 |
-
<p><?php _e("The Simply-Exclude plugin was designed to only work with the main page query. But sometimes other plugins or your theme will effect how the main filtering works. So if you are having trouble attempting to filter categories from your home page you might want to try and set this option to 'All' and see if it corrects your issue.",
|
737 |
</td>
|
738 |
<td class="inc-excl">
|
739 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][qover]" value="main"
|
740 |
<?php if ($this->current_post_type['options']['qover'] == 'main')
|
741 |
-
echo "checked='checked'"; ?> /> <?php _e('Main Loop Only',
|
742 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][qover]" value="all"
|
743 |
<?php if ($this->current_post_type['options']['qover'] == 'all')
|
744 |
-
echo "checked='checked'"; ?> /> <?php _e('All Loops',
|
745 |
</td>
|
746 |
</tr>
|
747 |
</table>
|
@@ -761,22 +734,22 @@ class SimplyExclude
|
|
761 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
762 |
<thead>
|
763 |
<tr>
|
764 |
-
<th class="action" colspan="2"><?php _e('Query Filtering',
|
765 |
</tr>
|
766 |
</thead>
|
767 |
<tbody>
|
768 |
<tr>
|
769 |
<td class="description">
|
770 |
-
<p><?php _e("Override query filtering for Main Loop Only or All Loops?",
|
771 |
-
<p><?php _e("The Simply-Exclude plugin was designed to only work with the main page query. But sometimes other plugins or your theme will effect how the main filtering works. So if you are having trouble attempting to filter categories from your home page you might want to try and set this option to 'All' and see if it corrects your issue.",
|
772 |
</td>
|
773 |
<td class="inc-excl">
|
774 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][qover]" value="main"
|
775 |
<?php if ($this->current_se_type['options']['qover'] == 'main')
|
776 |
-
echo "checked='checked'"; ?> /> <?php _e('Main Loop Only',
|
777 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][qover]" value="all"
|
778 |
<?php if ($this->current_se_type['options']['qover'] == 'all')
|
779 |
-
echo "checked='checked'"; ?> /> <?php _e('All Loops',
|
780 |
</td>
|
781 |
</tr>
|
782 |
</table>
|
@@ -792,9 +765,8 @@ class SimplyExclude
|
|
792 |
function se_manage_taxonomy_columns($columns)
|
793 |
{
|
794 |
if (current_user_can('manage_options')) {
|
795 |
-
if (!isset($columns['se-actions']))
|
796 |
-
$columns['se-actions'] = __('Simply Exclude', '
|
797 |
-
}
|
798 |
}
|
799 |
return $columns;
|
800 |
}
|
@@ -802,9 +774,8 @@ class SimplyExclude
|
|
802 |
function se_manage_post_type_columns($columns)
|
803 |
{
|
804 |
if (current_user_can('manage_options')) {
|
805 |
-
if (!isset($columns['se_actions']))
|
806 |
-
$columns['se-actions'] = __('Simply Exclude', '
|
807 |
-
}
|
808 |
}
|
809 |
return $columns;
|
810 |
}
|
@@ -812,9 +783,8 @@ class SimplyExclude
|
|
812 |
function se_manage_user_columns($columns)
|
813 |
{
|
814 |
if (current_user_can('manage_options')) {
|
815 |
-
if (!isset($columns['se_actions']))
|
816 |
-
$columns['se-actions'] = __('Simply Exclude', '
|
817 |
-
}
|
818 |
}
|
819 |
return $columns;
|
820 |
}
|
@@ -918,9 +888,6 @@ class SimplyExclude
|
|
918 |
|
919 |
if ((isset($this->current_taxonomy['actions'])) && (count($this->current_taxonomy['actions'])))
|
920 |
{
|
921 |
-
//echo "current_taxonomy<pre>"; print_r($this->current_taxonomy); echo "</pre>";
|
922 |
-
|
923 |
-
|
924 |
?><ul class="se-actions-list"><?php
|
925 |
foreach ($this->current_taxonomy['actions'] as $action_key => $action_val)
|
926 |
{
|
@@ -932,7 +899,7 @@ class SimplyExclude
|
|
932 |
if ((isset($this->current_taxonomy['terms'][$action_key][$term->term_id]))
|
933 |
&& ($this->current_taxonomy['terms'][$action_key][$term->term_id] == "on"))
|
934 |
echo "checked='checked' ";
|
935 |
-
?> /> <
|
936 |
class="se-term-label"><?php echo $this->get_taxonomy_action_label($taxonomy, $action_key, 'name'); ?></label></li>
|
937 |
|
938 |
<?php
|
@@ -962,7 +929,8 @@ class SimplyExclude
|
|
962 |
if ((isset($this->current_post_type['terms'][$action_key][$p_item->ID]))
|
963 |
&& ($this->current_post_type['terms'][$action_key][$p_item->ID] == "on"))
|
964 |
echo "checked='checked' ";
|
965 |
-
?> /> <
|
|
|
966 |
|
967 |
<?php
|
968 |
}
|
@@ -991,7 +959,8 @@ class SimplyExclude
|
|
991 |
if ((isset($this->current_se_type['terms'][$action_key][$user->ID]))
|
992 |
&& ($this->current_se_type['terms'][$action_key][$user->ID] == "on"))
|
993 |
echo "checked='checked' ";
|
994 |
-
?> /> <
|
|
|
995 |
|
996 |
<?php
|
997 |
}
|
@@ -1366,34 +1335,34 @@ class SimplyExclude
|
|
1366 |
$this->se_cfg['options']['plugins'] = array();
|
1367 |
|
1368 |
$this->se_cfg['options']['plugins']['google-sitemap-generator'] = array();
|
1369 |
-
$this->se_cfg['options']['plugins']['google-sitemap-generator']['name'] = __("Google XML Sitemaps",
|
1370 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['url'] = "http://wordpress.org/extend/plugins/google-sitemap-generator/";
|
1371 |
-
$this->se_cfg['options']['plugins']['google-sitemap-generator']['desc'] = __("Warning: Page ID listed in the Sitemap plugin will be removed and replaced with Page ID from the Simply Exclude plugin. Post ID values will be ignored",
|
1372 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['version'] = "3.1.6";
|
1373 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['active'] = false;
|
1374 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['plugin_key'] = "google-sitemap-generator/sitemap.php";
|
1375 |
|
1376 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions'] = array();
|
1377 |
-
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['pages']['desc'] = __("Update Excluded Pages",
|
1378 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['pages']['update'] = false;
|
1379 |
-
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['categories']['desc'] = __("Update Excluded Categories",
|
1380 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['categories']['update'] = false;
|
1381 |
|
1382 |
|
1383 |
$this->se_cfg['options']['plugins']['search-unleashed'] = array();
|
1384 |
-
$this->se_cfg['options']['plugins']['search-unleashed']['name'] = __("Search Unleashed",
|
1385 |
$this->se_cfg['options']['plugins']['search-unleashed']['url'] = "http://wordpress.org/extend/plugins/search-unleashed/";
|
1386 |
-
$this->se_cfg['options']['plugins']['search-unleashed']['desc'] = __("Warning: Page ID listed in the Search Unleashed plugin will be removed and replaced with Page ID from the Simply Exclude plugin. Post ID values will be ignored",
|
1387 |
$this->se_cfg['options']['plugins']['search-unleashed']['version'] = "1.0.5";
|
1388 |
$this->se_cfg['options']['plugins']['search-unleashed']['active'] = false;
|
1389 |
$this->se_cfg['options']['plugins']['search-unleashed']['plugin_key'] = "search-unleashed/search-unleashed.php";
|
1390 |
|
1391 |
$this->se_cfg['options']['plugins']['search-unleashed']['actions'] = array();
|
1392 |
-
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['pages']['desc'] = __("Update Excluded Pages",
|
1393 |
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['pages']['update'] = false;
|
1394 |
-
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['categories']['desc'] = __("Update Excluded Categories",
|
1395 |
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['categories']['update'] = false;
|
1396 |
-
$this->se_cfg['options']['plugins']['search-unleashed']['desc'] = __("Warning: Page ID listed in the Search Unleashed plugin will be removed and replaced with Page ID from the Simply Exclude plugin. Post ID values will be ignored",
|
1397 |
|
1398 |
foreach($this->se_cfg['options']['plugins'] as $plugin => $plugin_data)
|
1399 |
{
|
@@ -1685,15 +1654,13 @@ class SimplyExclude
|
|
1685 |
|
1686 |
if ($taxonomy == "category")
|
1687 |
{
|
1688 |
-
$taxonomy_actions['widget_category']
|
1689 |
-
$taxonomy_actions['widget_tag_cloud']
|
1690 |
-
//$taxonomy_actions['widget_recent_posts'] = "e";
|
1691 |
}
|
1692 |
|
1693 |
if ($taxonomy == "post_tag")
|
1694 |
{
|
1695 |
-
$taxonomy_actions['widget_tag_cloud']
|
1696 |
-
//$taxonomy_actions['widget_recent_posts'] = "e";
|
1697 |
}
|
1698 |
|
1699 |
return $taxonomy_actions;
|
@@ -1710,13 +1677,11 @@ class SimplyExclude
|
|
1710 |
|
1711 |
if ($post_type_object->capability_type == "post")
|
1712 |
{
|
1713 |
-
$taxonomy_actions['is_home']
|
1714 |
-
$taxonomy_actions['is_archive']
|
1715 |
-
$taxonomy_actions['is_search']
|
1716 |
-
$taxonomy_actions['is_feed']
|
1717 |
-
//$taxonomy_actions['widget_archives']
|
1718 |
-
//$taxonomy_actions['widget_recent_posts'] = "e";
|
1719 |
-
|
1720 |
}
|
1721 |
else if ($post_type == "page")
|
1722 |
{
|
@@ -1762,11 +1727,11 @@ class SimplyExclude
|
|
1762 |
switch($key)
|
1763 |
{
|
1764 |
case 'name':
|
1765 |
-
return __("Front/Home",
|
1766 |
break;
|
1767 |
|
1768 |
case 'description':
|
1769 |
-
return __("Visibility on the front/main page.",
|
1770 |
|
1771 |
default:
|
1772 |
return;
|
@@ -1779,11 +1744,11 @@ class SimplyExclude
|
|
1779 |
switch($key)
|
1780 |
{
|
1781 |
case 'name':
|
1782 |
-
return __("Archives",
|
1783 |
break;
|
1784 |
|
1785 |
case 'description':
|
1786 |
-
return __("Visibility on the archive of categories on the sidebar.",
|
1787 |
|
1788 |
default:
|
1789 |
return;
|
@@ -1797,11 +1762,11 @@ class SimplyExclude
|
|
1797 |
switch($key)
|
1798 |
{
|
1799 |
case 'name':
|
1800 |
-
return __("Searches",
|
1801 |
break;
|
1802 |
|
1803 |
case 'description':
|
1804 |
-
return __("Visibility in search results.",
|
1805 |
|
1806 |
default:
|
1807 |
return;
|
@@ -1815,11 +1780,11 @@ class SimplyExclude
|
|
1815 |
switch($key)
|
1816 |
{
|
1817 |
case 'name':
|
1818 |
-
return __("Feeds",
|
1819 |
break;
|
1820 |
|
1821 |
case 'description':
|
1822 |
-
return __("Visibility in RSS/RSS2/Atom feeds.",
|
1823 |
|
1824 |
default:
|
1825 |
return;
|
@@ -1833,11 +1798,11 @@ class SimplyExclude
|
|
1833 |
switch($key)
|
1834 |
{
|
1835 |
case 'name':
|
1836 |
-
return __("Categories
|
1837 |
break;
|
1838 |
|
1839 |
case 'description':
|
1840 |
-
return __("Exclude from WordPress List Category Widget.",
|
1841 |
break;
|
1842 |
|
1843 |
default:
|
@@ -1854,11 +1819,11 @@ class SimplyExclude
|
|
1854 |
switch($key)
|
1855 |
{
|
1856 |
case 'name':
|
1857 |
-
return __("Tag Cloud
|
1858 |
break;
|
1859 |
|
1860 |
case 'description':
|
1861 |
-
return __("Exclude from WordPress Tag Cloud Widget.",
|
1862 |
break;
|
1863 |
|
1864 |
default:
|
@@ -1869,28 +1834,6 @@ class SimplyExclude
|
|
1869 |
return;
|
1870 |
break;
|
1871 |
|
1872 |
-
/*
|
1873 |
-
case 'widget_recent_posts':
|
1874 |
-
if (($taxonomy == "post_tag") || ($taxonomy == "category"))
|
1875 |
-
{
|
1876 |
-
switch($key)
|
1877 |
-
{
|
1878 |
-
case 'name':
|
1879 |
-
return __("Recent Posts (W)", 'simply-exclude');
|
1880 |
-
break;
|
1881 |
-
|
1882 |
-
case 'description':
|
1883 |
-
return __("Exclude from WordPress Recent Posts Widget.", 'simply-exclude');
|
1884 |
-
break;
|
1885 |
-
|
1886 |
-
default:
|
1887 |
-
return;
|
1888 |
-
break;
|
1889 |
-
}
|
1890 |
-
}
|
1891 |
-
return;
|
1892 |
-
break;
|
1893 |
-
*/
|
1894 |
default:
|
1895 |
return;
|
1896 |
break;
|
@@ -1906,11 +1849,11 @@ class SimplyExclude
|
|
1906 |
switch($key)
|
1907 |
{
|
1908 |
case 'name':
|
1909 |
-
return __("Front/Home",
|
1910 |
break;
|
1911 |
|
1912 |
case 'description':
|
1913 |
-
return __("Visibility on the front/main page. Set 'Include All' to have this Post Type displayed in addition to the normal Posts.",
|
1914 |
|
1915 |
default:
|
1916 |
return;
|
@@ -1923,11 +1866,11 @@ class SimplyExclude
|
|
1923 |
switch($key)
|
1924 |
{
|
1925 |
case 'name':
|
1926 |
-
return __("Archives",
|
1927 |
break;
|
1928 |
|
1929 |
case 'description':
|
1930 |
-
return __("Visibility on the Post Type
|
1931 |
|
1932 |
default:
|
1933 |
return;
|
@@ -1940,11 +1883,11 @@ class SimplyExclude
|
|
1940 |
switch($key)
|
1941 |
{
|
1942 |
case 'name':
|
1943 |
-
return __("Feeds",
|
1944 |
break;
|
1945 |
|
1946 |
case 'description':
|
1947 |
-
return __("Visibility in RSS/RSS2/Atom feeds.",
|
1948 |
|
1949 |
default:
|
1950 |
return;
|
@@ -1957,11 +1900,11 @@ class SimplyExclude
|
|
1957 |
switch($key)
|
1958 |
{
|
1959 |
case 'name':
|
1960 |
-
return __("Searches",
|
1961 |
break;
|
1962 |
|
1963 |
case 'description':
|
1964 |
-
return __("Visibility in search results.",
|
1965 |
|
1966 |
default:
|
1967 |
return;
|
@@ -1973,11 +1916,11 @@ class SimplyExclude
|
|
1973 |
switch($key)
|
1974 |
{
|
1975 |
case 'name':
|
1976 |
-
return __("Pages
|
1977 |
break;
|
1978 |
|
1979 |
case 'description':
|
1980 |
-
return __("
|
1981 |
|
1982 |
default:
|
1983 |
return;
|
@@ -1985,18 +1928,17 @@ class SimplyExclude
|
|
1985 |
return;
|
1986 |
break;
|
1987 |
|
1988 |
-
/*
|
1989 |
case 'widget_archives':
|
1990 |
|
1991 |
if ($post_type == "post") {
|
1992 |
switch($key)
|
1993 |
{
|
1994 |
case 'name':
|
1995 |
-
return __("Archives
|
1996 |
break;
|
1997 |
|
1998 |
case 'description':
|
1999 |
-
return __("Exclude from
|
2000 |
|
2001 |
default:
|
2002 |
return;
|
@@ -2004,29 +1946,7 @@ class SimplyExclude
|
|
2004 |
}
|
2005 |
return;
|
2006 |
break;
|
2007 |
-
*/
|
2008 |
-
/*
|
2009 |
-
case 'widget_recent_posts':
|
2010 |
-
if ($post_type == "post") {
|
2011 |
-
|
2012 |
-
switch($key)
|
2013 |
-
{
|
2014 |
-
case 'name':
|
2015 |
-
return __("Recent Posts (W)", 'simply-exclude');
|
2016 |
-
break;
|
2017 |
|
2018 |
-
case 'description':
|
2019 |
-
return __("Exclude from WordPress Recent Posts Widget.", 'simply-exclude');
|
2020 |
-
break;
|
2021 |
-
|
2022 |
-
default:
|
2023 |
-
return;
|
2024 |
-
break;
|
2025 |
-
}
|
2026 |
-
}
|
2027 |
-
return;
|
2028 |
-
break;
|
2029 |
-
*/
|
2030 |
default:
|
2031 |
return;
|
2032 |
break;
|
@@ -2043,11 +1963,11 @@ class SimplyExclude
|
|
2043 |
switch($key)
|
2044 |
{
|
2045 |
case 'name':
|
2046 |
-
return __("Front/Home",
|
2047 |
break;
|
2048 |
|
2049 |
case 'description':
|
2050 |
-
return __("Visibility on the front/main page.",
|
2051 |
break;
|
2052 |
|
2053 |
default:
|
@@ -2061,11 +1981,11 @@ class SimplyExclude
|
|
2061 |
switch($key)
|
2062 |
{
|
2063 |
case 'name':
|
2064 |
-
return __("Archives",
|
2065 |
break;
|
2066 |
|
2067 |
case 'description':
|
2068 |
-
return __("Visibility on the archive of categories on the sidebar.",
|
2069 |
break;
|
2070 |
|
2071 |
default:
|
@@ -2079,11 +1999,11 @@ class SimplyExclude
|
|
2079 |
switch($key)
|
2080 |
{
|
2081 |
case 'name':
|
2082 |
-
return __("Searches",
|
2083 |
break;
|
2084 |
|
2085 |
case 'description':
|
2086 |
-
return __("Visibility in search results.",
|
2087 |
break;
|
2088 |
|
2089 |
default:
|
@@ -2097,11 +2017,11 @@ class SimplyExclude
|
|
2097 |
switch($key)
|
2098 |
{
|
2099 |
case 'name':
|
2100 |
-
return __("Feeds",
|
2101 |
break;
|
2102 |
|
2103 |
case 'description':
|
2104 |
-
return __("Visibility in RSS/RSS2/Atom feeds.",
|
2105 |
break;
|
2106 |
|
2107 |
default:
|
@@ -2132,7 +2052,7 @@ class SimplyExclude
|
|
2132 |
return $query;
|
2133 |
|
2134 |
// Check our debug
|
2135 |
-
if (( current_user_can('manage_options') )
|
2136 |
$se_debug = true;
|
2137 |
else
|
2138 |
$se_debug = false;
|
@@ -2417,6 +2337,12 @@ class SimplyExclude
|
|
2417 |
}
|
2418 |
|
2419 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2420 |
/****************************************************************************************************************************/
|
2421 |
/* */
|
2422 |
/* WIDGET FILTER LOGIC */
|
@@ -2463,28 +2389,20 @@ class SimplyExclude
|
|
2463 |
return $args;
|
2464 |
}
|
2465 |
|
2466 |
-
function
|
2467 |
{
|
2468 |
-
|
2469 |
-
|
2470 |
-
//if ((isset($args['include'])) || (isset($args['exclude'])))
|
2471 |
-
// return;
|
2472 |
-
|
2473 |
-
if (isset($args['taxonomy']))
|
2474 |
-
$taxonomy = $args['taxonomy'];
|
2475 |
-
else
|
2476 |
-
$taxonomy = 'category';
|
2477 |
|
2478 |
$this->se_load_config();
|
2479 |
-
|
2480 |
-
$this->FILTER_STATE = array();
|
2481 |
-
$this->FILTER_STATE[] = 'widget_categories_args';
|
2482 |
|
2483 |
-
|
2484 |
-
|
|
|
|
|
2485 |
{
|
2486 |
-
$action = $this->se_cfg['data']['taxonomies'][
|
2487 |
-
$terms = $this->se_cfg['data']['taxonomies'][
|
2488 |
|
2489 |
$all_cat_ids = array();
|
2490 |
|
@@ -2511,89 +2429,9 @@ class SimplyExclude
|
|
2511 |
$args['exclude'] = implode(',', $all_cat_ids);
|
2512 |
}
|
2513 |
}
|
2514 |
-
|
2515 |
-
//echo "AFTER: args<pre>"; print_r($args); echo "</pre>";
|
2516 |
return $args;
|
2517 |
}
|
2518 |
|
2519 |
-
// function se_wp_list_categories_proc($output, $args) {
|
2520 |
-
// $this->FILTER_STATE[] = 'wp_list_categories';
|
2521 |
-
// //echo "output<pre>"; print_r($output); echo "</pre>";
|
2522 |
-
// //echo "args<pre>"; print_r($args); echo "</pre>";
|
2523 |
-
//
|
2524 |
-
// return $args;
|
2525 |
-
// }
|
2526 |
-
|
2527 |
-
function get_categories_taxonomy_proc( $taxonomy, $args ) {
|
2528 |
-
$this->FILTER_STATE[] = 'get_categories_taxonomy';
|
2529 |
-
|
2530 |
-
return $taxonomy;
|
2531 |
-
}
|
2532 |
-
|
2533 |
-
function se_get_terms_proc( $terms, $taxonomies, $args ) {
|
2534 |
-
//echo "FILTER_STATE<pre>"; print_r($this->FILTER_STATE); echo "</pre>";
|
2535 |
-
|
2536 |
-
//echo "BEFORE: terms<pre>"; print_r($terms); echo "</pre>";
|
2537 |
-
|
2538 |
-
if (count($this->FILTER_STATE) < 2) return $terms;
|
2539 |
-
if (($this->FILTER_STATE[0] == 'widget_categories_args') && ($this->FILTER_STATE[1] = 'get_categories_taxonomy')) {
|
2540 |
-
|
2541 |
-
//echo "terms<pre>"; print_r($terms); echo "</pre>";
|
2542 |
-
//echo "taxonomies<pre>"; print_r($taxonomies); echo "</pre>";
|
2543 |
-
//echo "args<pre>"; print_r($args); echo "</pre>";
|
2544 |
-
|
2545 |
-
//echo "se_cfg[data]<br />"; print_r($this->se_cfg['data']['post_types']); echo "</pre>";
|
2546 |
-
|
2547 |
-
if ( (isset($this->se_cfg['data']['post_types'])) && (count($this->se_cfg['data']['post_types'])) ) {
|
2548 |
-
foreach($this->se_cfg['data']['post_types'] as $post_type => $post_type_set) {
|
2549 |
-
//echo "post_type[". $post_type ."]<pre>"; print_r($post_type_set); echo "</pre>";
|
2550 |
-
|
2551 |
-
if ((isset($post_type_set['actions']['is_archive'])) && ($post_type_set['actions']['is_archive'] == 'e')
|
2552 |
-
&& (isset($post_type_set['terms']['is_archive'])) && (!empty($post_type_set['terms']['is_archive']))) {
|
2553 |
-
|
2554 |
-
$post_type_taxonomy_names = get_object_taxonomies( $post_type );
|
2555 |
-
if (!empty($post_type_taxonomy_names)) {
|
2556 |
-
//echo "post_type_taxonomy_names<pre>"; print_r($post_type_taxonomy_names); echo "</pre>";
|
2557 |
-
|
2558 |
-
$common_taxonomy_names = array_intersect_assoc($taxonomies, $post_type_taxonomy_names);
|
2559 |
-
if (!empty($common_taxonomy_names)) {
|
2560 |
-
//echo "common_taxonomy_names<pre>"; print_r($common_taxonomy_names); echo "</pre>";
|
2561 |
-
|
2562 |
-
foreach($common_taxonomy_names as $common_taxonomy_name) {
|
2563 |
-
foreach($post_type_set['terms']['is_archive'] as $post_id => $state) {
|
2564 |
-
//echo "post_id[". $post_id ."] common_taxonomy_name[". $common_taxonomy_name ."]<br />";
|
2565 |
-
$post_terms = get_the_terms( $post_id, $common_taxonomy_name );
|
2566 |
-
//echo "post_terms<pre>"; print_r($post_terms); echo "</pre>";
|
2567 |
-
if (!empty($post_terms)) {
|
2568 |
-
foreach($post_terms as $post_term_idx => $post_term) {
|
2569 |
-
foreach($terms as $term_idx => $term) {
|
2570 |
-
if ($post_term->term_id == $term->term_id) {
|
2571 |
-
if ($term->count > 0) {
|
2572 |
-
$terms[$term_idx]->count -= 1;
|
2573 |
-
}
|
2574 |
-
}
|
2575 |
-
}
|
2576 |
-
}
|
2577 |
-
}
|
2578 |
-
}
|
2579 |
-
}
|
2580 |
-
}
|
2581 |
-
}
|
2582 |
-
}
|
2583 |
-
}
|
2584 |
-
}
|
2585 |
-
}
|
2586 |
-
foreach($terms as $term_idx => $term) {
|
2587 |
-
if ($term->count == 0) {
|
2588 |
-
unset($terms[$term_idx]);
|
2589 |
-
}
|
2590 |
-
}
|
2591 |
-
$terms = array_values($terms);
|
2592 |
-
//echo "AFTER: terms<pre>"; print_r($terms); echo "</pre>";
|
2593 |
-
return $terms;
|
2594 |
-
}
|
2595 |
-
|
2596 |
-
|
2597 |
// The tag Cloud widget now supports using either taxonomy (post_tag or category).
|
2598 |
function se_widget_tag_cloud_args_proc($args)
|
2599 |
{
|
@@ -2694,88 +2532,13 @@ class SimplyExclude
|
|
2694 |
return $args;
|
2695 |
}
|
2696 |
|
2697 |
-
function se_widget_recent_posts_proc($args) {
|
2698 |
-
//echo "args<pre>"; print_r($args); echo "</pre>";
|
2699 |
-
|
2700 |
-
$this->se_load_config();
|
2701 |
-
|
2702 |
-
//echo "se_cfg<pre>"; print_r($this->se_cfg); echo "</pre>";
|
2703 |
-
$action_data = $this->se_get_action_data('is_archive');
|
2704 |
-
//echo "action_data<pre>"; print_r($action_data); echo "</pre>";
|
2705 |
-
//die();
|
2706 |
-
|
2707 |
-
$post__in = array();
|
2708 |
-
$post__not_in = array();
|
2709 |
-
|
2710 |
-
if ($action_data) {
|
2711 |
-
foreach($action_data as $key => $key_data) {
|
2712 |
-
if ($key == "post_types") {
|
2713 |
-
|
2714 |
-
foreach($key_data as $key_key => $key_key_data) {
|
2715 |
-
//echo "key_key[". $key_key ."]<br />";
|
2716 |
-
//echo "key_key_data<pre>"; print_r($key_key_data); echo "</pre>";
|
2717 |
-
|
2718 |
-
if ($key_key_data['actions'] == 'e') {
|
2719 |
-
$post__not_in = array_merge($post__not_in, $key_key_data['terms']);
|
2720 |
-
|
2721 |
-
} else if ($key_key_data['actions'] == 'i') {
|
2722 |
-
$post__in = array_merge($post__in, $key_key_data['terms']);
|
2723 |
-
}
|
2724 |
-
}
|
2725 |
-
} else if ($key == "taxonomies") {
|
2726 |
-
|
2727 |
-
foreach($key_data as $key_key => $key_key_data) {
|
2728 |
-
//echo "key_key[". $key_key ."]<br />";
|
2729 |
-
//echo "key_key_data<pre>"; print_r($key_key_data); echo "</pre>";
|
2730 |
-
if ((isset($key_key_data['terms'])) && (!empty($key_key_data['terms']))) {
|
2731 |
-
$posts_ids = get_objects_in_term( $key_key_data['terms'], $key_key );
|
2732 |
-
if ( !is_wp_error( $posts_ids ) ) {
|
2733 |
-
//echo "posts_ids<pre>"; print_r($posts_ids); echo "</pre>";
|
2734 |
-
|
2735 |
-
if ($key_key_data['actions'] == 'e') {
|
2736 |
-
$post__not_in = array_merge($post__not_in, $posts_ids);
|
2737 |
-
} else if ($key_key_data['actions'] == 'i') {
|
2738 |
-
$post__in = array_merge($post__in, $posts_ids);
|
2739 |
-
}
|
2740 |
-
}
|
2741 |
-
}
|
2742 |
-
}
|
2743 |
-
}
|
2744 |
-
}
|
2745 |
-
}
|
2746 |
-
|
2747 |
-
if (!empty($post__not_in)) {
|
2748 |
-
if (isset($args['post__not_in'])) {
|
2749 |
-
$args['post__not_in'] = array_unique(array_merge($args['post__not_in'], $post__not_in));
|
2750 |
-
} else {
|
2751 |
-
$args['post__not_in'] = array_unique($post__not_in);
|
2752 |
-
}
|
2753 |
-
//$where_sql .= " AND ID NOT IN(". implode(',', $post__not_in) .") ";
|
2754 |
-
|
2755 |
-
} else if (!empty($post__in)) {
|
2756 |
-
if (isset($args['post__in'])) {
|
2757 |
-
$args['post__in'] = array_unique(array_merge($args['post__in'], $post__not_in));
|
2758 |
-
} else {
|
2759 |
-
$args['post__in'] = array_unique($post__in);
|
2760 |
-
}
|
2761 |
-
}
|
2762 |
-
//echo "args<pre>"; print_r($args); echo "</pre>";
|
2763 |
-
return $args;
|
2764 |
-
}
|
2765 |
-
|
2766 |
function se_widget_getarchives_where($where_sql) {
|
2767 |
-
|
2768 |
-
|
2769 |
-
//echo "where_sql[". $where_sql ."]<br />";
|
2770 |
-
//echo "args<pre>"; print_r($args); echo "</pre>";
|
2771 |
|
2772 |
$this->se_load_config();
|
2773 |
|
2774 |
-
//echo "se_cfg<pre>"; print_r($this->se_cfg); echo "</pre>";
|
2775 |
$action_data = $this->se_get_action_data('is_archive');
|
2776 |
-
//echo "action_data<pre>"; print_r($action_data); echo "</pre>";
|
2777 |
-
//die();
|
2778 |
-
|
2779 |
|
2780 |
$post__in = array();
|
2781 |
$post__not_in = array();
|
@@ -2785,9 +2548,6 @@ class SimplyExclude
|
|
2785 |
if ($key == "post_types") {
|
2786 |
|
2787 |
foreach($key_data as $key_key => $key_key_data) {
|
2788 |
-
//echo "key_key[". $key_key ."]<br />";
|
2789 |
-
//echo "key_key_data<pre>"; print_r($key_key_data); echo "</pre>";
|
2790 |
-
|
2791 |
if ($key_key_data['actions'] == 'e') {
|
2792 |
$post__not_in = array_merge($post__not_in, $key_key_data['terms']);
|
2793 |
|
@@ -2798,13 +2558,9 @@ class SimplyExclude
|
|
2798 |
} else if ($key == "taxonomies") {
|
2799 |
|
2800 |
foreach($key_data as $key_key => $key_key_data) {
|
2801 |
-
//echo "key_key[". $key_key ."]<br />";
|
2802 |
-
//echo "key_key_data<pre>"; print_r($key_key_data); echo "</pre>";
|
2803 |
if ((isset($key_key_data['terms'])) && (!empty($key_key_data['terms']))) {
|
2804 |
$posts_ids = get_objects_in_term( $key_key_data['terms'], $key_key );
|
2805 |
if ( !is_wp_error( $posts_ids ) ) {
|
2806 |
-
//echo "posts_ids<pre>"; print_r($posts_ids); echo "</pre>";
|
2807 |
-
|
2808 |
if ($key_key_data['actions'] == 'e') {
|
2809 |
$post__not_in = array_merge($post__not_in, $posts_ids);
|
2810 |
} else if ($key_key_data['actions'] == 'i') {
|
@@ -2818,15 +2574,11 @@ class SimplyExclude
|
|
2818 |
}
|
2819 |
|
2820 |
if (!empty($post__not_in)) {
|
2821 |
-
|
2822 |
-
$where_sql .= " AND ID NOT IN(". implode(',', array_unique($post__not_in)) .") ";
|
2823 |
|
2824 |
} else if (!empty($post__in)) {
|
2825 |
-
|
2826 |
-
|
2827 |
-
}
|
2828 |
-
//echo "where_sql[". $where_sql ."]<br />";
|
2829 |
-
|
2830 |
return $where_sql;
|
2831 |
}
|
2832 |
|
@@ -3075,29 +2827,29 @@ class SimplyExclude
|
|
3075 |
switch ($item) {
|
3076 |
case 'users':
|
3077 |
?>
|
3078 |
-
<p><?php _e("Set the checkbox to exclude the User items from the action",
|
3079 |
-
<p><?php _e("So what is the difference between <strong>Include only</strong> and <strong>Exclude</strong>?",
|
3080 |
-
<p><strong><?php _e("Include only",
|
3081 |
-
<p><strong><?php _e("Exclude",
|
3082 |
|
3083 |
<?php
|
3084 |
break;
|
3085 |
|
3086 |
case 'taxonomy':
|
3087 |
?>
|
3088 |
-
<p><?php _e("Set the checkbox to exclude the Taxonomy items from the action",
|
3089 |
-
<p><?php _e("So what is the difference between <strong>Include only</strong> and <strong>Exclude</strong>?",
|
3090 |
-
<p><strong><?php _e("Include only",
|
3091 |
-
<p><strong><?php _e("Exclude",
|
3092 |
<?php
|
3093 |
break;
|
3094 |
|
3095 |
case 'post_type':
|
3096 |
?>
|
3097 |
-
<p><?php _e("Set the checkbox to exclude the Post Type items from the action",
|
3098 |
-
<p><?php _e("So what is the difference between <strong>Include only</strong> and <strong>Exclude</strong>?",
|
3099 |
-
<p><strong><?php _e("Include only",
|
3100 |
-
<p><strong><?php _e("Exclude",
|
3101 |
<?php
|
3102 |
break;
|
3103 |
|
@@ -3112,7 +2864,7 @@ class SimplyExclude
|
|
3112 |
?>
|
3113 |
<div id="howto-se-manage-settings-metaboxes-general" class="wrap">
|
3114 |
<?php screen_icon('options-general'); ?>
|
3115 |
-
<h2><?php //_ex("Simply Exclude Manage Settings", "Options Page Title",
|
3116 |
foreach( $this->tabs as $tab => $name ){
|
3117 |
|
3118 |
$class = ( $tab == $this->current_tab ) ? ' nav-tab-active' : '';
|
@@ -3131,15 +2883,23 @@ class SimplyExclude
|
|
3131 |
switch ( $this->current_tab ) {
|
3132 |
|
3133 |
case 'post_types':
|
|
|
|
|
|
|
3134 |
$this->se_display_options_post_type_actions_panel();
|
3135 |
break;
|
3136 |
|
3137 |
case 'users':
|
|
|
|
|
3138 |
$this->se_display_options_user_actions_panel();
|
3139 |
break;
|
3140 |
|
3141 |
case 'taxonomies':
|
3142 |
default:
|
|
|
|
|
|
|
3143 |
$this->se_display_options_taxonomy_actions_panel();
|
3144 |
break;
|
3145 |
}
|
@@ -3217,7 +2977,7 @@ class SimplyExclude
|
|
3217 |
$this->display_instructions('users');
|
3218 |
?>
|
3219 |
<div class="postbox">
|
3220 |
-
<h3 class="simplyexclude-section-title"><?php _e('Users',
|
3221 |
<div class="inside">
|
3222 |
<?php
|
3223 |
$this->se_show_se_type_active_panel('users');
|
@@ -3239,18 +2999,18 @@ class SimplyExclude
|
|
3239 |
$this->se_cfg = $local_cfg;
|
3240 |
$this->se_save_config();
|
3241 |
|
3242 |
-
?><p><strong><?php _e('Your Simply Excluded has successfully been reloaded.',
|
3243 |
}
|
3244 |
}
|
3245 |
?><p><?php _e('Version 2.0 and 2.0.1 of the plugins incorrectly converted your previous configuration of excluded items into a new format. You can use this
|
3246 |
-
option to force a reload of your Simply Exclude configuration into the new format.',
|
3247 |
|
3248 |
<form name="" method="post" action"">
|
3249 |
<select id="simple-exclude-configuration-reload" name="simple-exclude-configuration-reload">
|
3250 |
<option value="">No</option>
|
3251 |
<option value="Yes">Yes</option>
|
3252 |
</select><br />
|
3253 |
-
<input type="submit" value="<?php _e('Reload Configuration',
|
3254 |
|
3255 |
</form>
|
3256 |
<?php
|
@@ -3259,16 +3019,16 @@ class SimplyExclude
|
|
3259 |
function se_options_thirdparty_panel()
|
3260 |
{
|
3261 |
?>
|
3262 |
-
<p><?php _e('The Simply Exclude plugin now works with a few other plugins. Check the box for support of the listed third party plugins options below',
|
3263 |
-
<p><?php _e('When you update this section you will then also need to go back into the Simply Exclude Category or Pages section and re-save the settings. This re-save will then update the third-party plugin settings with the update excluded values. On the respective Category or Pages sections of Simply Exclude you can use either include or exclude action.',
|
3264 |
-
<p style="color: #ff0000"><?php _e('Warning: Once enabled it is suggested you make edits to the exclusion/inclusion via Simply Exclude. Any Page or Category exclusion made in the third-party plugins will be over written by changed from Simply Exclude.',
|
3265 |
|
3266 |
<table id="simplyexclude-options-thirdparty-panel" class="widefat simplyexclude-actions-panel" cellpadding="3" cellspacing="3" border="0">
|
3267 |
<thead>
|
3268 |
<tr>
|
3269 |
-
<th class="action"><?php _e('Plugin Name',
|
3270 |
-
<th class="description"><?php _e('Description of Functionality',
|
3271 |
-
<th class="inc-excl"><?php _e('Actions',
|
3272 |
</tr>
|
3273 |
</thead>
|
3274 |
<tbody>
|
@@ -3323,16 +3083,16 @@ class SimplyExclude
|
|
3323 |
function se_settings_about_sidebar()
|
3324 |
{
|
3325 |
?><p><a class="" target="_blank" href="http://www.codehooligans.com/projects/wordpress/simply-exclude/"><?php
|
3326 |
-
_e('Plugin Homepage',
|
3327 |
|
3328 |
}
|
3329 |
function se_settings_donate_sidebar()
|
3330 |
{
|
3331 |
?>
|
3332 |
<p><?php _e('Show your support of this plugin by making a small donation to support future development. No donation amount too small.',
|
3333 |
-
|
3334 |
<p><a class="" target="_blank" href="http://www.codehooligans.com/donations/"><?php
|
3335 |
-
_e('Make a donation today',
|
3336 |
<?php
|
3337 |
}
|
3338 |
|
@@ -3341,7 +3101,7 @@ class SimplyExclude
|
|
3341 |
?>
|
3342 |
<div id="se-manage-help-metaboxes-general" class="wrap">
|
3343 |
<?php screen_icon('options-general'); ?>
|
3344 |
-
<h2><?php _ex("Simply Exclude Help", "Options Page Title",
|
3345 |
|
3346 |
<div id="poststuff" class="metabox-holder has-right-sidebar simplyexclude-metabox-holder-right-sidebar">
|
3347 |
<div id="side-info-column" class="inner-sidebar">
|
6 |
Author: Paul Menard
|
7 |
Version: 2.0.6.4
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
+
Text Domain: simplyexclude
|
10 |
Domain Path: /languages
|
11 |
License: GNU General Public License v2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
14 |
*/
|
15 |
|
16 |
+
define('SIMPLY_EXCLUDE_I18N_DOMAIN', 'simplyexclude');
|
17 |
|
18 |
class SimplyExclude
|
19 |
{
|
35 |
private $tabs = array();
|
36 |
private $current_tab;
|
37 |
|
|
|
|
|
38 |
public function __construct() {
|
39 |
|
40 |
+
$this->se_version = "2.0.6.2";
|
41 |
|
42 |
+
$this->admin_menu_label = __("Simply Exclude", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
43 |
$this->options_key = "simplyexclude_v2";
|
44 |
|
45 |
$plugindir_node = dirname(plugin_basename(__FILE__));
|
50 |
$this->page_hooks = array();
|
51 |
|
52 |
/* Setup the tetdomain for i18n language handling see http://codex.wordpress.org/Function_Reference/load_plugin_textdomain */
|
53 |
+
load_plugin_textdomain( SIMPLY_EXCLUDE_I18N_DOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
54 |
|
55 |
+
add_action( 'init', array(&$this,'init_proc') );
|
56 |
+
add_action( 'admin_init', array(&$this,'admin_init_proc') );
|
57 |
+
add_action( 'admin_menu', array(&$this,'se_add_nav') );
|
58 |
+
add_action( 'admin_footer', array(&$this,'se_admin_footer') );
|
59 |
+
add_action( 'wp_ajax_se_update', array(&$this, 'se_ajax_update') );
|
60 |
|
61 |
// In 2.0.6.4 added a define to allow control of the SE_FILTERS_PRIORITY
|
62 |
//https://wordpress.org/support/topic/first-install-problems-in-wordpress-40?replies=3#post-6579114
|
75 |
{
|
76 |
|
77 |
$this->tabs = array(
|
78 |
+
'taxonomies' => __('Taxonomies', SIMPLY_EXCLUDE_I18N_DOMAIN),
|
79 |
+
'post_types' => __('Post Types', SIMPLY_EXCLUDE_I18N_DOMAIN),
|
80 |
+
'users' => __('Users', SIMPLY_EXCLUDE_I18N_DOMAIN),
|
81 |
);
|
82 |
$this->current_tab = '';
|
83 |
|
84 |
$this->se_load_config();
|
|
|
|
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
if ( ($this->check_url('wp-admin/edit-tags.php'))
|
87 |
|| ($this->check_url('wp-admin/edit.php'))
|
88 |
|| ($this->check_url('wp-admin/users.php')) )
|
89 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
wp_enqueue_style( 'simplyexclude-stylesheet', $this->plugindir_url .'/simplyexclude_style_admin.css', false, $this->se_version);
|
91 |
|
92 |
wp_enqueue_script('jquery');
|
93 |
wp_enqueue_script('jquery-ui-core');
|
94 |
wp_enqueue_script('jquery-ui-dialog');
|
|
|
95 |
|
96 |
wp_enqueue_style( 'simplyexclude-jquery-ui',
|
97 |
+
$this->plugindir_url .'/js/jquery-ui/css/flick/jquery-ui-1.8.17.custom.css',
|
98 |
null, $this->se_version );
|
99 |
|
100 |
wp_enqueue_script('simplyexclude-admin-dialog-js', $this->plugindir_url .'/js/simplyexclude_admin_dialog.js',
|
103 |
wp_enqueue_script('simplyexclude-admin-ajax-js', $this->plugindir_url .'/js/simplyexclude_admin_ajax.js',
|
104 |
array('jquery', 'jquery-ui-core'), $this->se_version);
|
105 |
}
|
106 |
+
|
107 |
+
add_action('edit_category_form_fields', array(&$this,'se_show_taxonomy_term_fields'), 99, 1);
|
108 |
+
add_action('edit_tag_form_fields', array(&$this,'se_show_taxonomy_term_fields'), 99, 1);
|
109 |
+
add_action('edited_term', array(&$this,'se_save_taxonomy_term_fields'), 99, 3);
|
110 |
+
|
111 |
+
add_action( 'show_user_profile', array(&$this,'se_show_user_profile'), 99 );
|
112 |
+
add_action( 'edit_user_profile', array(&$this,'se_show_user_profile'), 99 );
|
113 |
+
|
114 |
+
add_action( 'profile_update', array(&$this,'se_save_user_profile'), 99);
|
115 |
+
|
116 |
+
add_filter( 'plugin_action_links_'. basename( dirname( __FILE__ ) ). '/' .basename( __FILE__ ), array(&$this,'plugin_settings'));
|
117 |
+
|
118 |
}
|
119 |
|
120 |
// Adds a 'Settings' link on the Plugins listing row. Cool!
|
121 |
function plugin_settings( $links ) {
|
122 |
+
$settings_link = '<a href="admin.php?page=se_manage_settings">'.__( 'Settings', SIMPLY_EXCLUDE_I18N_DOMAIN ).'</a>';
|
123 |
array_unshift( $links, $settings_link );
|
124 |
|
125 |
return $links;
|
129 |
{
|
130 |
if (!is_admin())
|
131 |
{
|
132 |
+
add_filter('widget_pages_args', array(&$this, 'se_widget_pages_args_proc'));
|
133 |
|
134 |
// Not needed since wp_list_pages is user managable.
|
135 |
+
//aad_filter('wp_list_pages_excludes', array(&$this, 'se_wp_list_pages_excludes_proc'));
|
136 |
|
137 |
// Suport for the Category list/dropdown widget
|
138 |
+
add_filter('widget_categories_dropdown_args', array(&$this, 'se_widget_categories_dropdown_args_proc'));
|
139 |
+
add_filter('widget_categories_args', array(&$this, 'se_widget_categories_dropdown_args_proc'));
|
|
|
|
|
|
|
|
|
140 |
|
141 |
// Support for the Tag Clod widget. This widget supports both the post_tag and category taxonomies.
|
142 |
+
add_filter('widget_tag_cloud_args', array(&$this, 'se_widget_tag_cloud_args_proc'));
|
|
|
|
|
|
|
143 |
|
144 |
// Support for Archive widget. This widget will output a month or year archive listing/dropdown of posts
|
145 |
+
add_filter('getarchives_where', array($this, 'se_widget_getarchives_where'), 99);
|
146 |
+
|
147 |
}
|
148 |
}
|
149 |
|
151 |
{
|
152 |
// Add the Main Nav item to the WP menu
|
153 |
add_menu_page( 'Simply Exclude', 'Simply Exclude', 'manage_options', 'se_manage_settings',
|
154 |
+
array(&$this, 'se_manage_settings'));
|
155 |
|
156 |
// Add our Options sub menu.
|
157 |
$this->pagehooks['se_manage_settings'] = add_submenu_page( 'se_manage_settings', 'Settings', 'Settings', 'manage_options',
|
158 |
+
'se_manage_settings', array(&$this, 'se_manage_settings'));
|
159 |
+
add_action('load-'. $this->pagehooks['se_manage_settings'], array(&$this, 'on_load_settings_page'));
|
160 |
|
161 |
|
162 |
// Add our Help sub menu.
|
163 |
$this->pagehooks['se_manage_help'] = add_submenu_page( 'se_manage_settings', 'Help', 'Help', 'manage_options',
|
164 |
+
'se_manage_help', array(&$this, 'se_manage_help'));
|
165 |
+
add_action('load-'. $this->pagehooks['se_manage_help'], array(&$this, 'on_load_help_page'));
|
166 |
|
167 |
if ( !current_user_can('manage_options') )
|
168 |
return;
|
178 |
if ((isset($this->se_cfg['data']['taxonomies'][$t_item->name]['options']['showhide']))
|
179 |
&& ($this->se_cfg['data']['taxonomies'][$t_item->name]['options']['showhide'] == 'show'))
|
180 |
{
|
181 |
+
add_filter( "manage_edit-". $t_item->name ."_columns", array( &$this, 'se_manage_taxonomy_columns' ), 99, 1);
|
182 |
+
add_filter( "manage_". $t_item->name. "_custom_column", array(&$this, 'se_display_taxonomy_column_filters'), 99, 3);
|
183 |
}
|
184 |
}
|
185 |
+
//add_action("delete_term", array(&$this, 'se_delete_taxonomy_term'), 99, 3);
|
186 |
}
|
187 |
|
188 |
// Now add a submenu for each registered post_type
|
194 |
if ((isset($this->se_cfg['data']['post_types'][$t_item->name]['options']['showhide']))
|
195 |
&& ($this->se_cfg['data']['post_types'][$t_item->name]['options']['showhide'] == 'show'))
|
196 |
{
|
197 |
+
add_filter( "manage_". $t_item->name ."_posts_columns", array( &$this, 'se_manage_post_type_columns' ), 99 );
|
198 |
+
add_action( "manage_". $t_item->name ."_posts_custom_column", array(&$this, 'se_display_post_type_column_actions'), 99, 2);
|
199 |
|
200 |
+
add_meta_box($this->options_key, $this->admin_menu_label, array(&$this,'show_post_type_exclude_sidebar_dbx'), $t_item->name, 'side');
|
201 |
+
add_action('save_post', array(&$this,'save_post_type_exclude_sidebar_dbx'));
|
202 |
}
|
203 |
}
|
204 |
}
|
207 |
if ((isset($this->se_cfg['data']['se_types']['users']['options']['showhide']))
|
208 |
&& ($this->se_cfg['data']['se_types']['users']['options']['showhide'] == 'show'))
|
209 |
{
|
210 |
+
add_filter( "manage_users_columns", array( &$this, 'se_manage_user_columns' ), 99 );
|
211 |
+
add_filter( 'manage_users_custom_column', array(&$this, 'se_display_user_column_actions'), 99, 3);
|
212 |
}
|
213 |
}
|
214 |
|
249 |
$this->current_tab = 'taxonomies';
|
250 |
}
|
251 |
|
252 |
+
add_meta_box('se_settings_about_sidebar', 'About this Plugin', array(&$this, 'se_settings_about_sidebar'),
|
253 |
$this->pagehooks['se_manage_settings'], 'side', 'core');
|
254 |
+
add_meta_box('se_settings_donate_sidebar', 'Make a Donation', array(&$this, 'se_settings_donate_sidebar'),
|
255 |
$this->pagehooks['se_manage_settings'], 'side', 'core');
|
256 |
|
257 |
}
|
278 |
wp_enqueue_script('jquery-ui-accordion');
|
279 |
}
|
280 |
|
281 |
+
add_meta_box('se_settings_about_sidebar', 'About this Plugin', array(&$this, 'se_settings_about_sidebar'),
|
282 |
$this->pagehooks['se_manage_help'], 'side', 'core');
|
283 |
+
add_meta_box('se_settings_donate_sidebar', 'Make a Donation', array(&$this, 'se_settings_donate_sidebar'),
|
284 |
$this->pagehooks['se_manage_help'], 'side', 'core');
|
285 |
}
|
286 |
|
321 |
<td class="description"><?php echo $this->get_taxonomy_action_label($taxonomy, $action_key, 'description');//$action_val['description'] ?></td>
|
322 |
<td class="inc-excl">
|
323 |
<ul class="se-actions-list">
|
324 |
+
<li><input type="radio" id="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_i" name="se_cfg[<?php echo $taxonomy; ?>][actions][<?php echo $action_key ?>]" value="i" <?php if ($action_val == 'i') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_i"><?php _e('Include only', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li>
|
325 |
+
<li><input type="radio" id="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_e" name="se_cfg[<?php echo $taxonomy; ?>][actions][<?php echo $action_key ?>]" value="e" <?php if ($action_val == 'e') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $taxonomy; ?>_actions_<?php echo $action_key ?>_e"><?php _e('Exclude', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li>
|
326 |
</td>
|
327 |
<tr>
|
328 |
<?php
|
364 |
<td class="inc-excl">
|
365 |
<ul class="se-actions-list">
|
366 |
|
367 |
+
<li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_i" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="i" <?php if ($action_val == 'i') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_i"><?php _e('Include only', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li>
|
368 |
+
<li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_e" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="e" <?php if ($action_val == 'e') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_e"><?php _e('Exclude', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li>
|
369 |
<?php
|
370 |
if (($action_key == "is_home")
|
371 |
&& ((isset($this->current_post_type['options']['capability_type']))
|
372 |
&& ($this->current_post_type['options']['capability_type'] == "post"))) {
|
373 |
+
?><li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="a" <?php if ($action_val == 'a') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a"><?php _e('Include All', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li><?php
|
374 |
} else if (($action_key == "is_feed")
|
375 |
&& ((isset($this->current_post_type['options']['capability_type']))
|
376 |
&& ($this->current_post_type['options']['capability_type'] == "post"))) {
|
377 |
+
?><li><input type="radio" id="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a" name="se_cfg[<?php echo $post_type; ?>][actions][<?php echo $action_key ?>]" value="a" <?php if ($action_val == 'a') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $post_type ?>_actions_<?php echo $action_key ?>_a"><?php _e('Include All', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li><?php
|
378 |
}
|
379 |
?>
|
380 |
</td>
|
417 |
<td class="description"><?php echo $this->get_se_type_action_label($se_type, $action_key, 'description'); ?></td>
|
418 |
<td class="inc-excl">
|
419 |
<ul class="se-actions-list">
|
420 |
+
<li><input type="radio" id="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_i" name="se_cfg[<?php echo $se_type; ?>][actions][<?php echo $action_key ?>]" value="i" <?php if ($action_val == 'i') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_i"><?php _e('Include only', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li>
|
421 |
+
<li><input type="radio" id="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_e" name="se_cfg[<?php echo $se_type; ?>][actions][<?php echo $action_key ?>]" value="e" <?php if ($action_val == 'e') echo "checked='checked'"; ?> /> <label for="se_cfg_<?php echo $se_type; ?>_actions_<?php echo $action_key ?>_e"><?php _e('Exclude', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></label></li>
|
422 |
</td>
|
423 |
<tr>
|
424 |
<?php
|
450 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
451 |
<thead>
|
452 |
<tr>
|
453 |
+
<th class="action" colspan="2"><?php _e('Active', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
454 |
</tr>
|
455 |
</thead>
|
456 |
<tbody>
|
457 |
<tr>
|
458 |
+
<td class="description"><?php _e("Is this Taxonomy active? This is sometimes convenient instead of unsetting all Taxonomy terms.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></td>
|
459 |
<td class="inc-excl">
|
460 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][active]" value="yes"
|
461 |
<?php if ($this->current_taxonomy['options']['active'] == 'yes')
|
462 |
+
echo "checked='checked'"; ?> /> <?php _e('Active', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
463 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][active]" value="no"
|
464 |
<?php if ($this->current_taxonomy['options']['active'] == 'no')
|
465 |
+
echo "checked='checked'"; ?> /> <?php _e('Disabled', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
466 |
</td>
|
467 |
</tr>
|
468 |
</tbody>
|
484 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
485 |
<thead>
|
486 |
<tr>
|
487 |
+
<th class="action" colspan="2"><?php _e('Active', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
488 |
</tr>
|
489 |
</thead>
|
490 |
<tbody>
|
491 |
<tr>
|
492 |
+
<td class="description"><?php _e("Is this Post Type Active? This is sometimes convenient instead of unsetting all Post Type items.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></td>
|
493 |
<td class="inc-excl">
|
494 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][active]" value="yes"
|
495 |
<?php if ($this->current_post_type['options']['active'] == 'yes')
|
496 |
+
echo "checked='checked'"; ?> /> <?php _e('Active', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
497 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][active]" value="no"
|
498 |
<?php if ($this->current_post_type['options']['active'] == 'no')
|
499 |
+
echo "checked='checked'"; ?> /> <?php _e('Disabled', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
500 |
</td>
|
501 |
</tr>
|
502 |
</tbody>
|
518 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
519 |
<thead>
|
520 |
<tr>
|
521 |
+
<th class="action" colspan="2"><?php _e('Active', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
522 |
</tr>
|
523 |
</thead>
|
524 |
<tbody>
|
525 |
<tr>
|
526 |
+
<td class="description"><?php _e("Active?", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></td>
|
527 |
<td class="inc-excl">
|
528 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][active]" value="yes"
|
529 |
<?php if ($this->current_se_type['options']['active'] == 'yes')
|
530 |
+
echo "checked='checked'"; ?> /> <?php _e('Active', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
531 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][active]" value="no"
|
532 |
<?php if ($this->current_se_type['options']['active'] == 'no')
|
533 |
+
echo "checked='checked'"; ?> /> <?php _e('Disabled', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
534 |
</td>
|
535 |
</tr>
|
536 |
</tbody>
|
559 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
560 |
<thead>
|
561 |
<tr>
|
562 |
+
<th class="action" colspan="2"><?php _e('Show/Hide', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
563 |
</tr>
|
564 |
</thead>
|
565 |
<tbody>
|
566 |
<tr>
|
567 |
+
<td class="description"><?php _e("Show the extra columns on the Taxonomy listing and the Taxonomy edit form?", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></td>
|
568 |
<td class="inc-excl">
|
569 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][showhide]" value="show"
|
570 |
<?php if ($this->current_taxonomy['options']['showhide'] == 'show')
|
571 |
+
echo "checked='checked'"; ?> /> <?php _e('Show', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
572 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][showhide]" value="hide"
|
573 |
<?php if ($this->current_taxonomy['options']['showhide'] == 'hide')
|
574 |
+
echo "checked='checked'"; ?> /> <?php _e('Hide', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
575 |
</td>
|
576 |
</tr>
|
577 |
</table>
|
590 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
591 |
<thead>
|
592 |
<tr>
|
593 |
+
<th class="action" colspan="2"><?php _e('Show/Hide', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
594 |
</tr>
|
595 |
</thead>
|
596 |
<tbody>
|
597 |
<tr>
|
598 |
+
<td class="description"><?php _e("Show the extra columns on the Post Type listing and the Post Type edit form?", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></td>
|
599 |
<td class="inc-excl">
|
600 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][showhide]" value="show"
|
601 |
<?php if ($this->current_post_type['options']['showhide'] == 'show')
|
602 |
+
echo "checked='checked'"; ?> /> <?php _e('Show', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
603 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][showhide]" value="hide"
|
604 |
<?php if ($this->current_post_type['options']['showhide'] == 'hide')
|
605 |
+
echo "checked='checked'"; ?> /> <?php _e('Hide', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
606 |
</td>
|
607 |
</tr>
|
608 |
</table>
|
621 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
622 |
<thead>
|
623 |
<tr>
|
624 |
+
<th class="action" colspan="2"><?php _e('Show/Hide', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
625 |
</tr>
|
626 |
</thead>
|
627 |
<tbody>
|
628 |
<tr>
|
629 |
+
<td class="description"><?php _e("Show the extra columns on the listing and the edit form?", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></td>
|
630 |
<td class="inc-excl">
|
631 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][showhide]" value="show"
|
632 |
<?php if ($this->current_se_type['options']['showhide'] == 'show')
|
633 |
+
echo "checked='checked'"; ?> /> <?php _e('Show', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
634 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][showhide]" value="hide"
|
635 |
<?php if ($this->current_se_type['options']['showhide'] == 'hide')
|
636 |
+
echo "checked='checked'"; ?> /> <?php _e('Hide', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
637 |
</td>
|
638 |
</tr>
|
639 |
</table>
|
664 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
665 |
<thead>
|
666 |
<tr>
|
667 |
+
<th class="action" colspan="2"><?php _e('Query Filtering', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
668 |
</tr>
|
669 |
</thead>
|
670 |
<tbody>
|
671 |
<tr>
|
672 |
<td class="description">
|
673 |
+
<p><?php _e("Override query filtering for Main Loop Only or All Loops?", SIMPLY_EXCLUDE_I18N_DOMAIN) ?></p>
|
674 |
+
<p><?php _e("The Simply-Exclude plugin was designed to only work with the main page query. But sometimes other plugins or your theme will effect how the main filtering works. So if you are having trouble attempting to filter categories from your home page you might want to try and set this option to 'All' and see if it corrects your issue.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
675 |
</td>
|
676 |
<td class="inc-excl">
|
677 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][qover]" value="main"
|
678 |
<?php if ($this->current_taxonomy['options']['qover'] == 'main')
|
679 |
+
echo "checked='checked'"; ?> /> <?php _e('Main Loop Only', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
680 |
<input type="radio" name="se_cfg[<?php echo $taxonomy; ?>][options][qover]" value="all"
|
681 |
<?php if ($this->current_taxonomy['options']['qover'] == 'all')
|
682 |
+
echo "checked='checked'"; ?> /> <?php _e('All Loops', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
683 |
</td>
|
684 |
</tr>
|
685 |
</table>
|
699 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
700 |
<thead>
|
701 |
<tr>
|
702 |
+
<th class="action" colspan="2"><?php _e('Query Filtering', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
703 |
</tr>
|
704 |
</thead>
|
705 |
<tbody>
|
706 |
<tr>
|
707 |
<td class="description">
|
708 |
+
<p><?php _e("Override query filtering for Main Loop Only or All Loops?", SIMPLY_EXCLUDE_I18N_DOMAIN) ?></p>
|
709 |
+
<p><?php _e("The Simply-Exclude plugin was designed to only work with the main page query. But sometimes other plugins or your theme will effect how the main filtering works. So if you are having trouble attempting to filter categories from your home page you might want to try and set this option to 'All' and see if it corrects your issue.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
710 |
</td>
|
711 |
<td class="inc-excl">
|
712 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][qover]" value="main"
|
713 |
<?php if ($this->current_post_type['options']['qover'] == 'main')
|
714 |
+
echo "checked='checked'"; ?> /> <?php _e('Main Loop Only', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
715 |
<input type="radio" name="se_cfg[<?php echo $post_type; ?>][options][qover]" value="all"
|
716 |
<?php if ($this->current_post_type['options']['qover'] == 'all')
|
717 |
+
echo "checked='checked'"; ?> /> <?php _e('All Loops', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
718 |
</td>
|
719 |
</tr>
|
720 |
</table>
|
734 |
<table class="widefat simply-exclude-settings-postbox simplyexclude-active-panel" cellpadding="3" cellspacing="3" border="0">
|
735 |
<thead>
|
736 |
<tr>
|
737 |
+
<th class="action" colspan="2"><?php _e('Query Filtering', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
738 |
</tr>
|
739 |
</thead>
|
740 |
<tbody>
|
741 |
<tr>
|
742 |
<td class="description">
|
743 |
+
<p><?php _e("Override query filtering for Main Loop Only or All Loops?", SIMPLY_EXCLUDE_I18N_DOMAIN) ?></p>
|
744 |
+
<p><?php _e("The Simply-Exclude plugin was designed to only work with the main page query. But sometimes other plugins or your theme will effect how the main filtering works. So if you are having trouble attempting to filter categories from your home page you might want to try and set this option to 'All' and see if it corrects your issue.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
745 |
</td>
|
746 |
<td class="inc-excl">
|
747 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][qover]" value="main"
|
748 |
<?php if ($this->current_se_type['options']['qover'] == 'main')
|
749 |
+
echo "checked='checked'"; ?> /> <?php _e('Main Loop Only', SIMPLY_EXCLUDE_I18N_DOMAIN); ?><br />
|
750 |
<input type="radio" name="se_cfg[<?php echo $se_type; ?>][options][qover]" value="all"
|
751 |
<?php if ($this->current_se_type['options']['qover'] == 'all')
|
752 |
+
echo "checked='checked'"; ?> /> <?php _e('All Loops', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>
|
753 |
</td>
|
754 |
</tr>
|
755 |
</table>
|
765 |
function se_manage_taxonomy_columns($columns)
|
766 |
{
|
767 |
if (current_user_can('manage_options')) {
|
768 |
+
if (!isset($columns['se-actions']))
|
769 |
+
$columns['se-actions'] = '<a id="se-show-actions-panel" title="" href="#">'. __('Simply Exclude', SIMPLY_EXCLUDE_I18N_DOMAIN) .'</a>';
|
|
|
770 |
}
|
771 |
return $columns;
|
772 |
}
|
774 |
function se_manage_post_type_columns($columns)
|
775 |
{
|
776 |
if (current_user_can('manage_options')) {
|
777 |
+
if (!isset($columns['se_actions']))
|
778 |
+
$columns['se-actions'] = __('Simply Exclude', SIMPLY_EXCLUDE_I18N_DOMAIN). ' <a id="se-show-actions-panel" href="#">'. __('show', SIMPLY_EXCLUDE_I18N_DOMAIN) .'</a>';
|
|
|
779 |
}
|
780 |
return $columns;
|
781 |
}
|
783 |
function se_manage_user_columns($columns)
|
784 |
{
|
785 |
if (current_user_can('manage_options')) {
|
786 |
+
if (!isset($columns['se_actions']))
|
787 |
+
$columns['se-actions'] = __('Simply Exclude', SIMPLY_EXCLUDE_I18N_DOMAIN). ' <a id="se-show-actions-panel" href="#">'. __('show', SIMPLY_EXCLUDE_I18N_DOMAIN) .'</a>';
|
|
|
788 |
}
|
789 |
return $columns;
|
790 |
}
|
888 |
|
889 |
if ((isset($this->current_taxonomy['actions'])) && (count($this->current_taxonomy['actions'])))
|
890 |
{
|
|
|
|
|
|
|
891 |
?><ul class="se-actions-list"><?php
|
892 |
foreach ($this->current_taxonomy['actions'] as $action_key => $action_val)
|
893 |
{
|
899 |
if ((isset($this->current_taxonomy['terms'][$action_key][$term->term_id]))
|
900 |
&& ($this->current_taxonomy['terms'][$action_key][$term->term_id] == "on"))
|
901 |
echo "checked='checked' ";
|
902 |
+
?> /> <label for="<?php echo $taxonomy; ?>-<?php echo $action_key ?>-<?php echo $term->term_id ?>"
|
903 |
class="se-term-label"><?php echo $this->get_taxonomy_action_label($taxonomy, $action_key, 'name'); ?></label></li>
|
904 |
|
905 |
<?php
|
929 |
if ((isset($this->current_post_type['terms'][$action_key][$p_item->ID]))
|
930 |
&& ($this->current_post_type['terms'][$action_key][$p_item->ID] == "on"))
|
931 |
echo "checked='checked' ";
|
932 |
+
?> /> <label for="<?php echo $post_type; ?>-<?php echo $action_key ?>-<?php echo $p_item->ID ?>">
|
933 |
+
<?php echo $this->get_post_type_action_label($post_type, $action_key, 'name') ?></label></li>
|
934 |
|
935 |
<?php
|
936 |
}
|
959 |
if ((isset($this->current_se_type['terms'][$action_key][$user->ID]))
|
960 |
&& ($this->current_se_type['terms'][$action_key][$user->ID] == "on"))
|
961 |
echo "checked='checked' ";
|
962 |
+
?> /> <label for="<?php echo $se_type; ?>-<?php echo $action_key ?>-<?php echo $user->ID ?>">
|
963 |
+
<?php echo $this->get_se_type_action_label($se_type, $action_key, 'name') ?></label></li>
|
964 |
|
965 |
<?php
|
966 |
}
|
1335 |
$this->se_cfg['options']['plugins'] = array();
|
1336 |
|
1337 |
$this->se_cfg['options']['plugins']['google-sitemap-generator'] = array();
|
1338 |
+
$this->se_cfg['options']['plugins']['google-sitemap-generator']['name'] = __("Google XML Sitemaps", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1339 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['url'] = "http://wordpress.org/extend/plugins/google-sitemap-generator/";
|
1340 |
+
$this->se_cfg['options']['plugins']['google-sitemap-generator']['desc'] = __("Warning: Page ID listed in the Sitemap plugin will be removed and replaced with Page ID from the Simply Exclude plugin. Post ID values will be ignored", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1341 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['version'] = "3.1.6";
|
1342 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['active'] = false;
|
1343 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['plugin_key'] = "google-sitemap-generator/sitemap.php";
|
1344 |
|
1345 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions'] = array();
|
1346 |
+
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['pages']['desc'] = __("Update Excluded Pages", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1347 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['pages']['update'] = false;
|
1348 |
+
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['categories']['desc'] = __("Update Excluded Categories", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1349 |
$this->se_cfg['options']['plugins']['google-sitemap-generator']['actions']['categories']['update'] = false;
|
1350 |
|
1351 |
|
1352 |
$this->se_cfg['options']['plugins']['search-unleashed'] = array();
|
1353 |
+
$this->se_cfg['options']['plugins']['search-unleashed']['name'] = __("Search Unleashed", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1354 |
$this->se_cfg['options']['plugins']['search-unleashed']['url'] = "http://wordpress.org/extend/plugins/search-unleashed/";
|
1355 |
+
$this->se_cfg['options']['plugins']['search-unleashed']['desc'] = __("Warning: Page ID listed in the Search Unleashed plugin will be removed and replaced with Page ID from the Simply Exclude plugin. Post ID values will be ignored", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1356 |
$this->se_cfg['options']['plugins']['search-unleashed']['version'] = "1.0.5";
|
1357 |
$this->se_cfg['options']['plugins']['search-unleashed']['active'] = false;
|
1358 |
$this->se_cfg['options']['plugins']['search-unleashed']['plugin_key'] = "search-unleashed/search-unleashed.php";
|
1359 |
|
1360 |
$this->se_cfg['options']['plugins']['search-unleashed']['actions'] = array();
|
1361 |
+
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['pages']['desc'] = __("Update Excluded Pages", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1362 |
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['pages']['update'] = false;
|
1363 |
+
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['categories']['desc'] = __("Update Excluded Categories", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1364 |
$this->se_cfg['options']['plugins']['search-unleashed']['actions']['categories']['update'] = false;
|
1365 |
+
$this->se_cfg['options']['plugins']['search-unleashed']['desc'] = __("Warning: Page ID listed in the Search Unleashed plugin will be removed and replaced with Page ID from the Simply Exclude plugin. Post ID values will be ignored", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1366 |
|
1367 |
foreach($this->se_cfg['options']['plugins'] as $plugin => $plugin_data)
|
1368 |
{
|
1654 |
|
1655 |
if ($taxonomy == "category")
|
1656 |
{
|
1657 |
+
$taxonomy_actions['widget_category'] = "e";
|
1658 |
+
$taxonomy_actions['widget_tag_cloud'] = "e";
|
|
|
1659 |
}
|
1660 |
|
1661 |
if ($taxonomy == "post_tag")
|
1662 |
{
|
1663 |
+
$taxonomy_actions['widget_tag_cloud'] = "e";
|
|
|
1664 |
}
|
1665 |
|
1666 |
return $taxonomy_actions;
|
1677 |
|
1678 |
if ($post_type_object->capability_type == "post")
|
1679 |
{
|
1680 |
+
$taxonomy_actions['is_home'] = "i";
|
1681 |
+
$taxonomy_actions['is_archive'] = "e";
|
1682 |
+
$taxonomy_actions['is_search'] = "e";
|
1683 |
+
$taxonomy_actions['is_feed'] = "e";
|
1684 |
+
//$taxonomy_actions['widget_archives'] = "e";
|
|
|
|
|
1685 |
}
|
1686 |
else if ($post_type == "page")
|
1687 |
{
|
1727 |
switch($key)
|
1728 |
{
|
1729 |
case 'name':
|
1730 |
+
return __("Front/Home", SIMPLY_EXCLUDE_I18N_DOMAIN);;
|
1731 |
break;
|
1732 |
|
1733 |
case 'description':
|
1734 |
+
return __("Visibility on the front/main page.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1735 |
|
1736 |
default:
|
1737 |
return;
|
1744 |
switch($key)
|
1745 |
{
|
1746 |
case 'name':
|
1747 |
+
return __("Archives", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1748 |
break;
|
1749 |
|
1750 |
case 'description':
|
1751 |
+
return __("Visibility on the archive of categories on the sidebar.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1752 |
|
1753 |
default:
|
1754 |
return;
|
1762 |
switch($key)
|
1763 |
{
|
1764 |
case 'name':
|
1765 |
+
return __("Searches", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1766 |
break;
|
1767 |
|
1768 |
case 'description':
|
1769 |
+
return __("Visibility in search results.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1770 |
|
1771 |
default:
|
1772 |
return;
|
1780 |
switch($key)
|
1781 |
{
|
1782 |
case 'name':
|
1783 |
+
return __("Feeds", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1784 |
break;
|
1785 |
|
1786 |
case 'description':
|
1787 |
+
return __("Visibility in RSS/RSS2/Atom feeds.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1788 |
|
1789 |
default:
|
1790 |
return;
|
1798 |
switch($key)
|
1799 |
{
|
1800 |
case 'name':
|
1801 |
+
return __("Widget: Categories", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1802 |
break;
|
1803 |
|
1804 |
case 'description':
|
1805 |
+
return __("Exclude from WordPress List Category Widget.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1806 |
break;
|
1807 |
|
1808 |
default:
|
1819 |
switch($key)
|
1820 |
{
|
1821 |
case 'name':
|
1822 |
+
return __("Widget: Tag Cloud", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1823 |
break;
|
1824 |
|
1825 |
case 'description':
|
1826 |
+
return __("Exclude from WordPress Tag Cloud Widget.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1827 |
break;
|
1828 |
|
1829 |
default:
|
1834 |
return;
|
1835 |
break;
|
1836 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1837 |
default:
|
1838 |
return;
|
1839 |
break;
|
1849 |
switch($key)
|
1850 |
{
|
1851 |
case 'name':
|
1852 |
+
return __("Front/Home", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1853 |
break;
|
1854 |
|
1855 |
case 'description':
|
1856 |
+
return __("Visibility on the front/main page. Set 'Include All' to have this Post Type displayed in addition to the normal Posts.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1857 |
|
1858 |
default:
|
1859 |
return;
|
1866 |
switch($key)
|
1867 |
{
|
1868 |
case 'name':
|
1869 |
+
return __("Archives", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1870 |
break;
|
1871 |
|
1872 |
case 'description':
|
1873 |
+
return __("Visibility on the Post Type archive.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1874 |
|
1875 |
default:
|
1876 |
return;
|
1883 |
switch($key)
|
1884 |
{
|
1885 |
case 'name':
|
1886 |
+
return __("Feeds", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1887 |
break;
|
1888 |
|
1889 |
case 'description':
|
1890 |
+
return __("Visibility in RSS/RSS2/Atom feeds.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1891 |
|
1892 |
default:
|
1893 |
return;
|
1900 |
switch($key)
|
1901 |
{
|
1902 |
case 'name':
|
1903 |
+
return __("Searches", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1904 |
break;
|
1905 |
|
1906 |
case 'description':
|
1907 |
+
return __("Visibility in search results.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1908 |
|
1909 |
default:
|
1910 |
return;
|
1916 |
switch($key)
|
1917 |
{
|
1918 |
case 'name':
|
1919 |
+
return __("Widget: Pages", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1920 |
break;
|
1921 |
|
1922 |
case 'description':
|
1923 |
+
return __("Exclude from WordPress Pages Widget. Child pages are automatically excluded if the parent is Excluded.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1924 |
|
1925 |
default:
|
1926 |
return;
|
1928 |
return;
|
1929 |
break;
|
1930 |
|
|
|
1931 |
case 'widget_archives':
|
1932 |
|
1933 |
if ($post_type == "post") {
|
1934 |
switch($key)
|
1935 |
{
|
1936 |
case 'name':
|
1937 |
+
return __("Widget: Archives", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1938 |
break;
|
1939 |
|
1940 |
case 'description':
|
1941 |
+
return __("Exclude from Post Archives Widget.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1942 |
|
1943 |
default:
|
1944 |
return;
|
1946 |
}
|
1947 |
return;
|
1948 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1949 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1950 |
default:
|
1951 |
return;
|
1952 |
break;
|
1963 |
switch($key)
|
1964 |
{
|
1965 |
case 'name':
|
1966 |
+
return __("Front/Home", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1967 |
break;
|
1968 |
|
1969 |
case 'description':
|
1970 |
+
return __("Visibility on the front/main page.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1971 |
break;
|
1972 |
|
1973 |
default:
|
1981 |
switch($key)
|
1982 |
{
|
1983 |
case 'name':
|
1984 |
+
return __("Archives", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1985 |
break;
|
1986 |
|
1987 |
case 'description':
|
1988 |
+
return __("Visibility on the archive of categories on the sidebar.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
1989 |
break;
|
1990 |
|
1991 |
default:
|
1999 |
switch($key)
|
2000 |
{
|
2001 |
case 'name':
|
2002 |
+
return __("Searches", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
2003 |
break;
|
2004 |
|
2005 |
case 'description':
|
2006 |
+
return __("Visibility in search results.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
2007 |
break;
|
2008 |
|
2009 |
default:
|
2017 |
switch($key)
|
2018 |
{
|
2019 |
case 'name':
|
2020 |
+
return __("Feeds", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
2021 |
break;
|
2022 |
|
2023 |
case 'description':
|
2024 |
+
return __("Visibility in RSS/RSS2/Atom feeds.", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
2025 |
break;
|
2026 |
|
2027 |
default:
|
2052 |
return $query;
|
2053 |
|
2054 |
// Check our debug
|
2055 |
+
if (( current_user_can('manage_options') ) && (isset($_GET['SE_DEBUG'])))
|
2056 |
$se_debug = true;
|
2057 |
else
|
2058 |
$se_debug = false;
|
2337 |
}
|
2338 |
|
2339 |
|
2340 |
+
|
2341 |
+
|
2342 |
+
|
2343 |
+
|
2344 |
+
|
2345 |
+
|
2346 |
/****************************************************************************************************************************/
|
2347 |
/* */
|
2348 |
/* WIDGET FILTER LOGIC */
|
2389 |
return $args;
|
2390 |
}
|
2391 |
|
2392 |
+
function se_widget_categories_dropdown_args_proc($args)
|
2393 |
{
|
2394 |
+
if ((isset($args['include'])) || (isset($args['exclude'])))
|
2395 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2396 |
|
2397 |
$this->se_load_config();
|
|
|
|
|
|
|
2398 |
|
2399 |
+
//echo "widget_category<pre>"; print_r($this->se_cfg['data']['taxonomies']['category']['terms']['widget_category']); echo "</pre>";
|
2400 |
+
|
2401 |
+
if ( (isset($this->se_cfg['data']['taxonomies']['category']['terms']['widget_category']))
|
2402 |
+
&& (count($this->se_cfg['data']['taxonomies']['category']['terms']['widget_category'])) )
|
2403 |
{
|
2404 |
+
$action = $this->se_cfg['data']['taxonomies']['category']['actions']['widget_category'];
|
2405 |
+
$terms = $this->se_cfg['data']['taxonomies']['category']['terms']['widget_category'];
|
2406 |
|
2407 |
$all_cat_ids = array();
|
2408 |
|
2429 |
$args['exclude'] = implode(',', $all_cat_ids);
|
2430 |
}
|
2431 |
}
|
|
|
|
|
2432 |
return $args;
|
2433 |
}
|
2434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2435 |
// The tag Cloud widget now supports using either taxonomy (post_tag or category).
|
2436 |
function se_widget_tag_cloud_args_proc($args)
|
2437 |
{
|
2532 |
return $args;
|
2533 |
}
|
2534 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2535 |
function se_widget_getarchives_where($where_sql) {
|
2536 |
+
|
2537 |
+
if (is_admin()) return $where_sql;
|
|
|
|
|
2538 |
|
2539 |
$this->se_load_config();
|
2540 |
|
|
|
2541 |
$action_data = $this->se_get_action_data('is_archive');
|
|
|
|
|
|
|
2542 |
|
2543 |
$post__in = array();
|
2544 |
$post__not_in = array();
|
2548 |
if ($key == "post_types") {
|
2549 |
|
2550 |
foreach($key_data as $key_key => $key_key_data) {
|
|
|
|
|
|
|
2551 |
if ($key_key_data['actions'] == 'e') {
|
2552 |
$post__not_in = array_merge($post__not_in, $key_key_data['terms']);
|
2553 |
|
2558 |
} else if ($key == "taxonomies") {
|
2559 |
|
2560 |
foreach($key_data as $key_key => $key_key_data) {
|
|
|
|
|
2561 |
if ((isset($key_key_data['terms'])) && (!empty($key_key_data['terms']))) {
|
2562 |
$posts_ids = get_objects_in_term( $key_key_data['terms'], $key_key );
|
2563 |
if ( !is_wp_error( $posts_ids ) ) {
|
|
|
|
|
2564 |
if ($key_key_data['actions'] == 'e') {
|
2565 |
$post__not_in = array_merge($post__not_in, $posts_ids);
|
2566 |
} else if ($key_key_data['actions'] == 'i') {
|
2574 |
}
|
2575 |
|
2576 |
if (!empty($post__not_in)) {
|
2577 |
+
$where_sql .= " AND ID NOT IN(". implode(',', $post__not_in) .") ";
|
|
|
2578 |
|
2579 |
} else if (!empty($post__in)) {
|
2580 |
+
$where_sql .= " AND ID IN(". implode(',', $post__not_in) .") ";
|
2581 |
+
}
|
|
|
|
|
|
|
2582 |
return $where_sql;
|
2583 |
}
|
2584 |
|
2827 |
switch ($item) {
|
2828 |
case 'users':
|
2829 |
?>
|
2830 |
+
<p><?php _e("Set the checkbox to exclude the User items from the action", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2831 |
+
<p><?php _e("So what is the difference between <strong>Include only</strong> and <strong>Exclude</strong>?", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2832 |
+
<p><strong><?php _e("Include only", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></strong>: <?php _e("For example you have 3 Users but always want to show Posts for only 1 specific User in the Archives. New Users are automatically hidden.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2833 |
+
<p><strong><?php _e("Exclude", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></strong>: <?php _e("For example you have 3 Users but want to hide Posts from one User in the Archives. New Users will by visible.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2834 |
|
2835 |
<?php
|
2836 |
break;
|
2837 |
|
2838 |
case 'taxonomy':
|
2839 |
?>
|
2840 |
+
<p><?php _e("Set the checkbox to exclude the Taxonomy items from the action", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2841 |
+
<p><?php _e("So what is the difference between <strong>Include only</strong> and <strong>Exclude</strong>?", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2842 |
+
<p><strong><?php _e("Include only", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></strong>: <?php _e("For example you have 100 tags but only always want 3 to be used on the home page. New tags added are automatically hidden.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2843 |
+
<p><strong><?php _e("Exclude", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></strong>: <?php _e("For example you have 100 categories but want to hide 3 from being seen. New tags will be visible.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2844 |
<?php
|
2845 |
break;
|
2846 |
|
2847 |
case 'post_type':
|
2848 |
?>
|
2849 |
+
<p><?php _e("Set the checkbox to exclude the Post Type items from the action", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2850 |
+
<p><?php _e("So what is the difference between <strong>Include only</strong> and <strong>Exclude</strong>?", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2851 |
+
<p><strong><?php _e("Include only", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></strong>: <?php _e("For example you have 10 Pages but only always want to include only 4 Pages shown in a Search. New Pages are automatically hidden.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2852 |
+
<p><strong><?php _e("Exclude", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></strong>: <?php _e("For example you have 10 Pages and want to hide 3 specific Pages from Search. New Pages will be visible.", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
2853 |
<?php
|
2854 |
break;
|
2855 |
|
2864 |
?>
|
2865 |
<div id="howto-se-manage-settings-metaboxes-general" class="wrap">
|
2866 |
<?php screen_icon('options-general'); ?>
|
2867 |
+
<h2><?php //_ex("Simply Exclude Manage Settings", "Options Page Title", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
2868 |
foreach( $this->tabs as $tab => $name ){
|
2869 |
|
2870 |
$class = ( $tab == $this->current_tab ) ? ' nav-tab-active' : '';
|
2883 |
switch ( $this->current_tab ) {
|
2884 |
|
2885 |
case 'post_types':
|
2886 |
+
//add_meta_box('se_display_options_post_type_actions_panel', 'Post Types Actions',
|
2887 |
+
// array(&$this, 'se_display_options_post_type_actions_panel'),
|
2888 |
+
// $this->pagehooks['se_manage_settings'], 'normal', 'core');
|
2889 |
$this->se_display_options_post_type_actions_panel();
|
2890 |
break;
|
2891 |
|
2892 |
case 'users':
|
2893 |
+
//add_meta_box('se_display_options_user_actions_panel', 'Users Actions', array(&$this, 'se_display_options_user_actions_panel'),
|
2894 |
+
// $this->pagehooks['se_manage_settings'], 'normal', 'core');
|
2895 |
$this->se_display_options_user_actions_panel();
|
2896 |
break;
|
2897 |
|
2898 |
case 'taxonomies':
|
2899 |
default:
|
2900 |
+
//add_meta_box('se_display_options_taxonomy_actions_panel', 'Taxonomies Actions',
|
2901 |
+
// array(&$this, 'se_display_options_taxonomy_actions_panel'),
|
2902 |
+
// $this->pagehooks['se_manage_settings'], 'normal', 'core');
|
2903 |
$this->se_display_options_taxonomy_actions_panel();
|
2904 |
break;
|
2905 |
}
|
2977 |
$this->display_instructions('users');
|
2978 |
?>
|
2979 |
<div class="postbox">
|
2980 |
+
<h3 class="simplyexclude-section-title"><?php _e('Users', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></h3>
|
2981 |
<div class="inside">
|
2982 |
<?php
|
2983 |
$this->se_show_se_type_active_panel('users');
|
2999 |
$this->se_cfg = $local_cfg;
|
3000 |
$this->se_save_config();
|
3001 |
|
3002 |
+
?><p><strong><?php _e('Your Simply Excluded has successfully been reloaded.', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></strong></p><?php
|
3003 |
}
|
3004 |
}
|
3005 |
?><p><?php _e('Version 2.0 and 2.0.1 of the plugins incorrectly converted your previous configuration of excluded items into a new format. You can use this
|
3006 |
+
option to force a reload of your Simply Exclude configuration into the new format.', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
3007 |
|
3008 |
<form name="" method="post" action"">
|
3009 |
<select id="simple-exclude-configuration-reload" name="simple-exclude-configuration-reload">
|
3010 |
<option value="">No</option>
|
3011 |
<option value="Yes">Yes</option>
|
3012 |
</select><br />
|
3013 |
+
<input type="submit" value="<?php _e('Reload Configuration', SIMPLY_EXCLUDE_I18N_DOMAIN); ?>" />
|
3014 |
|
3015 |
</form>
|
3016 |
<?php
|
3019 |
function se_options_thirdparty_panel()
|
3020 |
{
|
3021 |
?>
|
3022 |
+
<p><?php _e('The Simply Exclude plugin now works with a few other plugins. Check the box for support of the listed third party plugins options below', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
3023 |
+
<p><?php _e('When you update this section you will then also need to go back into the Simply Exclude Category or Pages section and re-save the settings. This re-save will then update the third-party plugin settings with the update excluded values. On the respective Category or Pages sections of Simply Exclude you can use either include or exclude action.', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
3024 |
+
<p style="color: #ff0000"><?php _e('Warning: Once enabled it is suggested you make edits to the exclusion/inclusion via Simply Exclude. Any Page or Category exclusion made in the third-party plugins will be over written by changed from Simply Exclude.', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
3025 |
|
3026 |
<table id="simplyexclude-options-thirdparty-panel" class="widefat simplyexclude-actions-panel" cellpadding="3" cellspacing="3" border="0">
|
3027 |
<thead>
|
3028 |
<tr>
|
3029 |
+
<th class="action"><?php _e('Plugin Name', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
3030 |
+
<th class="description"><?php _e('Description of Functionality', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
3031 |
+
<th class="inc-excl"><?php _e('Actions', SIMPLY_EXCLUDE_I18N_DOMAIN) ?></th>
|
3032 |
</tr>
|
3033 |
</thead>
|
3034 |
<tbody>
|
3083 |
function se_settings_about_sidebar()
|
3084 |
{
|
3085 |
?><p><a class="" target="_blank" href="http://www.codehooligans.com/projects/wordpress/simply-exclude/"><?php
|
3086 |
+
_e('Plugin Homepage', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></a></p><?php
|
3087 |
|
3088 |
}
|
3089 |
function se_settings_donate_sidebar()
|
3090 |
{
|
3091 |
?>
|
3092 |
<p><?php _e('Show your support of this plugin by making a small donation to support future development. No donation amount too small.',
|
3093 |
+
SIMPLY_EXCLUDE_I18N_DOMAIN); ?></p>
|
3094 |
<p><a class="" target="_blank" href="http://www.codehooligans.com/donations/"><?php
|
3095 |
+
_e('Make a donation today', SIMPLY_EXCLUDE_I18N_DOMAIN); ?></a></p>
|
3096 |
<?php
|
3097 |
}
|
3098 |
|
3101 |
?>
|
3102 |
<div id="se-manage-help-metaboxes-general" class="wrap">
|
3103 |
<?php screen_icon('options-general'); ?>
|
3104 |
+
<h2><?php _ex("Simply Exclude Help", "Options Page Title", SIMPLY_EXCLUDE_I18N_DOMAIN); ?></h2>
|
3105 |
|
3106 |
<div id="poststuff" class="metabox-holder has-right-sidebar simplyexclude-metabox-holder-right-sidebar">
|
3107 |
<div id="side-info-column" class="inner-sidebar">
|