Version Description
- Corrected bug introduced via 2.0.6.4 and 2.0.6.5
Download this release
Release Info
Developer | pmenard |
Plugin | Simply Exclude |
Version | 2.0.6.6 |
Comparing to | |
See all releases |
Code changes from version 2.0.6.5 to 2.0.6.6
- readme.txt +8 -2
- simplyexclude.php +23 -5
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.opensource.org/licenses/GPL-2.0
|
10 |
|
@@ -50,6 +50,12 @@ At the time (version 1.6.1) the plugin only effects Pages included in the tradit
|
|
50 |
|
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);
|
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.2
|
7 |
+
Stable tag: 2.0.6.6
|
8 |
License: GPLv2
|
9 |
License URI: http://www.opensource.org/licenses/GPL-2.0
|
10 |
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 2.0.6.6 =
|
54 |
+
- Corrected bug introduced via 2.0.6.4 and 2.0.6.5
|
55 |
+
|
56 |
+
= 2.0.6.5 =
|
57 |
+
- DO NOT USE.
|
58 |
+
|
59 |
= 2.0.6.4 =
|
60 |
- Corrected issue reported related to Missing argument 2 for SimplyExclude::se_widget_getarchives_where()
|
61 |
- 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);
|
simplyexclude.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Simply Exclude
|
|
4 |
Plugin URI: http://www.codehooligans.com/projects/wordpress/simply-exclude/
|
5 |
Description: Provides an interface to selectively exclude/include all Taxonomies, Post Types and Users from the 4 actions used by WordPress. is_front, is_archive, is_search, is_feed. Also provides access to some of the common widgets user like tag cloud and categories listings.
|
6 |
Author: Paul Menard
|
7 |
-
Version: 2.0.6.
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
Text Domain: simplyexclude
|
10 |
Domain Path: /languages
|
@@ -37,7 +37,7 @@ class SimplyExclude
|
|
37 |
|
38 |
public function __construct() {
|
39 |
|
40 |
-
$this->se_version = "2.0.6.
|
41 |
|
42 |
$this->admin_menu_label = __("Simply Exclude", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
43 |
$this->options_key = "simplyexclude_v2";
|
@@ -2376,8 +2376,9 @@ class SimplyExclude
|
|
2376 |
&& (count($this->se_cfg['data']['post_types']['page']['terms']['widget_pages'])) )
|
2377 |
{
|
2378 |
//echo "se_cfg<pre>"; print_r($this->se_cfg['data']['post_types']['page']); echo "</pre>";
|
|
|
2379 |
|
2380 |
-
$action = $this->se_cfg['data']['post_types']['page']['actions']['widget_pages']
|
2381 |
$terms = $this->se_listify_ids(array_keys($this->se_cfg['data']['post_types']['page']['terms']['widget_pages']), 'i');
|
2382 |
//echo "terms<pre>"; print_r($terms); echo "</pre>";
|
2383 |
if ($action == "e")
|
@@ -2533,12 +2534,18 @@ class SimplyExclude
|
|
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,6 +2555,9 @@ class SimplyExclude
|
|
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,9 +2568,13 @@ class SimplyExclude
|
|
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,11 +2588,15 @@ class SimplyExclude
|
|
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 |
|
4 |
Plugin URI: http://www.codehooligans.com/projects/wordpress/simply-exclude/
|
5 |
Description: Provides an interface to selectively exclude/include all Taxonomies, Post Types and Users from the 4 actions used by WordPress. is_front, is_archive, is_search, is_feed. Also provides access to some of the common widgets user like tag cloud and categories listings.
|
6 |
Author: Paul Menard
|
7 |
+
Version: 2.0.6.6
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
Text Domain: simplyexclude
|
10 |
Domain Path: /languages
|
37 |
|
38 |
public function __construct() {
|
39 |
|
40 |
+
$this->se_version = "2.0.6.6";
|
41 |
|
42 |
$this->admin_menu_label = __("Simply Exclude", SIMPLY_EXCLUDE_I18N_DOMAIN);
|
43 |
$this->options_key = "simplyexclude_v2";
|
2376 |
&& (count($this->se_cfg['data']['post_types']['page']['terms']['widget_pages'])) )
|
2377 |
{
|
2378 |
//echo "se_cfg<pre>"; print_r($this->se_cfg['data']['post_types']['page']); echo "</pre>";
|
2379 |
+
//die();
|
2380 |
|
2381 |
+
$action = $this->se_cfg['data']['post_types']['page']['actions']['widget_pages'];
|
2382 |
$terms = $this->se_listify_ids(array_keys($this->se_cfg['data']['post_types']['page']['terms']['widget_pages']), 'i');
|
2383 |
//echo "terms<pre>"; print_r($terms); echo "</pre>";
|
2384 |
if ($action == "e")
|
2534 |
}
|
2535 |
|
2536 |
function se_widget_getarchives_where($where_sql) {
|
|
|
2537 |
if (is_admin()) return $where_sql;
|
2538 |
|
2539 |
+
//echo "where_sql[". $where_sql ."]<br />";
|
2540 |
+
//echo "args<pre>"; print_r($args); echo "</pre>";
|
2541 |
+
|
2542 |
$this->se_load_config();
|
2543 |
|
2544 |
+
//echo "se_cfg<pre>"; print_r($this->se_cfg); echo "</pre>";
|
2545 |
$action_data = $this->se_get_action_data('is_archive');
|
2546 |
+
//echo "action_data<pre>"; print_r($action_data); echo "</pre>";
|
2547 |
+
//die();
|
2548 |
+
|
2549 |
|
2550 |
$post__in = array();
|
2551 |
$post__not_in = array();
|
2555 |
if ($key == "post_types") {
|
2556 |
|
2557 |
foreach($key_data as $key_key => $key_key_data) {
|
2558 |
+
//echo "key_key[". $key_key ."]<br />";
|
2559 |
+
//echo "key_key_data<pre>"; print_r($key_key_data); echo "</pre>";
|
2560 |
+
|
2561 |
if ($key_key_data['actions'] == 'e') {
|
2562 |
$post__not_in = array_merge($post__not_in, $key_key_data['terms']);
|
2563 |
|
2568 |
} else if ($key == "taxonomies") {
|
2569 |
|
2570 |
foreach($key_data as $key_key => $key_key_data) {
|
2571 |
+
//echo "key_key[". $key_key ."]<br />";
|
2572 |
+
//echo "key_key_data<pre>"; print_r($key_key_data); echo "</pre>";
|
2573 |
if ((isset($key_key_data['terms'])) && (!empty($key_key_data['terms']))) {
|
2574 |
$posts_ids = get_objects_in_term( $key_key_data['terms'], $key_key );
|
2575 |
if ( !is_wp_error( $posts_ids ) ) {
|
2576 |
+
//echo "posts_ids<pre>"; print_r($posts_ids); echo "</pre>";
|
2577 |
+
|
2578 |
if ($key_key_data['actions'] == 'e') {
|
2579 |
$post__not_in = array_merge($post__not_in, $posts_ids);
|
2580 |
} else if ($key_key_data['actions'] == 'i') {
|
2588 |
}
|
2589 |
|
2590 |
if (!empty($post__not_in)) {
|
2591 |
+
//echo "post__not_in<pre>"; print_r($post__not_in); echo "</pre>";
|
2592 |
$where_sql .= " AND ID NOT IN(". implode(',', $post__not_in) .") ";
|
2593 |
|
2594 |
} else if (!empty($post__in)) {
|
2595 |
+
//echo "post__in<pre>"; print_r($post__in); echo "</pre>";
|
2596 |
$where_sql .= " AND ID IN(". implode(',', $post__not_in) .") ";
|
2597 |
+
}
|
2598 |
+
//echo "where_sql[". $where_sql ."]<br />";
|
2599 |
+
|
2600 |
return $where_sql;
|
2601 |
}
|
2602 |
|