Version Description
Fixes some small issue which prevented this plugin from working under WordPress 3.1.
Download this release
Release Info
Developer | pmenard |
Plugin | Simply Exclude |
Version | 1.7.9 |
Comparing to | |
See all releases |
Code changes from version 1.7.8 to 1.7.9
- readme.txt +6 -2
- simplyexclude.php +19 -38
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Paul Menard
|
|
3 |
Donate link: http://www.codehooligans.com/donations/
|
4 |
Tags: admin, posts, pages, categories, tags, exclude, include, is_front, is_archive, is_search, is_feed
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 1.7.
|
8 |
|
9 |
== Description ==
|
10 |
|
@@ -49,6 +49,10 @@ At the time (version 1.6.1) the plugin only effects Pages included in the tradit
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
52 |
= 1.7.8 =
|
53 |
Fixes: Mainly bug fixes and code cleanup. Patched code based on reported issues with the WP Gallery shortcode and the new WP 3.0 RC1 menus
|
54 |
Additions: Added some logic to Categories and Tags to work with Exclude/Include when using the WordPress Category or Tag Cloud Widgets.
|
3 |
Donate link: http://www.codehooligans.com/donations/
|
4 |
Tags: admin, posts, pages, categories, tags, exclude, include, is_front, is_archive, is_search, is_feed
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 3.1
|
7 |
+
Stable tag: 1.7.9
|
8 |
|
9 |
== Description ==
|
10 |
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 1.7.9 =
|
53 |
+
Fixes some small issue which prevented this plugin from working under WordPress 3.1.
|
54 |
+
|
55 |
+
|
56 |
= 1.7.8 =
|
57 |
Fixes: Mainly bug fixes and code cleanup. Patched code based on reported issues with the WP Gallery shortcode and the new WP 3.0 RC1 menus
|
58 |
Additions: Added some logic to Categories and Tags to work with Exclude/Include when using the WordPress Category or Tag Cloud Widgets.
|
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 categories, tags and page from the 4 actions used by WordPress. is_front, is_archive, is_search, is_feed, is_front.
|
6 |
Author: Paul Menard
|
7 |
-
Version: 1.7.
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
|
10 |
*/
|
@@ -231,6 +231,7 @@ class SimplyExclude
|
|
231 |
else
|
232 |
$this->se_cfg = $tmp_se_cfg;
|
233 |
}
|
|
|
234 |
|
235 |
$plugindir_node = dirname(plugin_basename(__FILE__));
|
236 |
$plugindir_url = get_bloginfo('wpurl') . "/wp-content/plugins/". $plugindir_node;
|
@@ -1441,12 +1442,10 @@ class SimplyExclude
|
|
1441 |
|
1442 |
|
1443 |
|
1444 |
-
function se_filters()
|
1445 |
{
|
1446 |
-
|
1447 |
-
|
1448 |
-
if ((is_admin()) || (is_single()) || (is_page()))
|
1449 |
-
return;
|
1450 |
|
1451 |
// Only filter on our actions.
|
1452 |
// if ((!is_front_page())
|
@@ -1456,25 +1455,22 @@ class SimplyExclude
|
|
1456 |
// && (!is_author()) )
|
1457 |
// return;
|
1458 |
|
|
|
|
|
|
|
1459 |
if (count($this->default_IsActions['cats']) > 0)
|
1460 |
{
|
1461 |
-
//echo "cats<pre>"; print_r($this->default_IsActions['cats']); echo "</pre>";
|
1462 |
foreach ($this->default_IsActions['cats'] as $action_key => $action_val)
|
1463 |
{
|
1464 |
$cats_list = "";
|
1465 |
if ($wp_query->{$action_key})
|
1466 |
{
|
1467 |
-
if (isset($this->se_cfg['cats'][$action_key]))
|
1468 |
{
|
1469 |
-
if (
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
}
|
1474 |
-
}
|
1475 |
-
if (strlen($cats_list))
|
1476 |
-
{
|
1477 |
-
$wp_query->set('cat', $cats_list);
|
1478 |
}
|
1479 |
}
|
1480 |
}
|
@@ -1488,28 +1484,12 @@ class SimplyExclude
|
|
1488 |
{
|
1489 |
if ($wp_query->{$action_key})
|
1490 |
{
|
1491 |
-
if (isset($this->se_cfg['tags'][$action_key]))
|
1492 |
{
|
1493 |
-
if (
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
if (count($this->se_cfg['tags'][$action_key]) > 0)
|
1498 |
-
{
|
1499 |
-
foreach($this->se_cfg['tags'][$action_key] as $key => $val)
|
1500 |
-
{
|
1501 |
-
$tag_array_list[] = $key;
|
1502 |
-
}
|
1503 |
-
|
1504 |
-
if ($this->se_cfg['tags']['actions'][$action_key] == "e")
|
1505 |
-
{
|
1506 |
-
$wp_query->set('tag__not_in', $tag_array_list);
|
1507 |
-
}
|
1508 |
-
else
|
1509 |
-
{
|
1510 |
-
$wp_query->set('tag__in', $tag_array_list);
|
1511 |
-
}
|
1512 |
-
}
|
1513 |
}
|
1514 |
}
|
1515 |
}
|
@@ -1549,6 +1529,7 @@ class SimplyExclude
|
|
1549 |
}
|
1550 |
}
|
1551 |
}
|
|
|
1552 |
}
|
1553 |
|
1554 |
function se_listify_ids($action, $ids)
|
4 |
Plugin URI: http://www.codehooligans.com/projects/wordpress/simply-exclude/
|
5 |
Description: Provides an interface to selectively exclude/include categories, tags and page from the 4 actions used by WordPress. is_front, is_archive, is_search, is_feed, is_front.
|
6 |
Author: Paul Menard
|
7 |
+
Version: 1.7.9
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
|
10 |
*/
|
231 |
else
|
232 |
$this->se_cfg = $tmp_se_cfg;
|
233 |
}
|
234 |
+
// echo "se_cfg<pre>"; print_r($this->se_cfg); echo "</pre>";
|
235 |
|
236 |
$plugindir_node = dirname(plugin_basename(__FILE__));
|
237 |
$plugindir_url = get_bloginfo('wpurl') . "/wp-content/plugins/". $plugindir_node;
|
1442 |
|
1443 |
|
1444 |
|
1445 |
+
function se_filters($wp_query)
|
1446 |
{
|
1447 |
+
if (($wp_query->is_admin) || ($wp_query->is_single) || ($wp_query->is_page))
|
1448 |
+
return $wp_query;
|
|
|
|
|
1449 |
|
1450 |
// Only filter on our actions.
|
1451 |
// if ((!is_front_page())
|
1455 |
// && (!is_author()) )
|
1456 |
// return;
|
1457 |
|
1458 |
+
//echo "se_cfg<pre>"; print_r($this->se_cfg); echo "</pre>";
|
1459 |
+
// echo "default_IsActions<pre>"; print_r($this->default_IsActions); echo "</pre>";
|
1460 |
+
|
1461 |
if (count($this->default_IsActions['cats']) > 0)
|
1462 |
{
|
|
|
1463 |
foreach ($this->default_IsActions['cats'] as $action_key => $action_val)
|
1464 |
{
|
1465 |
$cats_list = "";
|
1466 |
if ($wp_query->{$action_key})
|
1467 |
{
|
1468 |
+
if ((isset($this->se_cfg['cats'][$action_key])) && (count($this->se_cfg['cats'][$action_key])))
|
1469 |
{
|
1470 |
+
if ($this->se_cfg['cats']['actions'][$action_key] == 'e')
|
1471 |
+
$wp_query->set('category__not_in', array_keys($this->se_cfg['cats'][$action_key]));
|
1472 |
+
else
|
1473 |
+
$wp_query->set('category__in', array_keys($this->se_cfg['cats'][$action_key]));
|
|
|
|
|
|
|
|
|
|
|
1474 |
}
|
1475 |
}
|
1476 |
}
|
1484 |
{
|
1485 |
if ($wp_query->{$action_key})
|
1486 |
{
|
1487 |
+
if ((isset($this->se_cfg['tags'][$action_key])) && (count($this->se_cfg['tags'][$action_key]) > 0))
|
1488 |
{
|
1489 |
+
if ($this->se_cfg['tags']['actions'][$action_key] == "e")
|
1490 |
+
$wp_query->set('tag__not_in', array_keys($this->se_cfg['tags'][$action_key]));
|
1491 |
+
else
|
1492 |
+
$wp_query->set('tag__in', array_keys($this->se_cfg['tags'][$action_key]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1493 |
}
|
1494 |
}
|
1495 |
}
|
1529 |
}
|
1530 |
}
|
1531 |
}
|
1532 |
+
return $wp_query;
|
1533 |
}
|
1534 |
|
1535 |
function se_listify_ids($action, $ids)
|