Simply Exclude - Version 1.7.8

Version Description

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 Additions: Added some logic to Categories and Tags to work with Exclude/Include when using the WordPress Category or Tag Cloud Widgets.

Coming Soon: Have been working on a new version of Simply Exclude that will dynamically work with the new Taxonomy system. No longer will we be restricted to excluding just categories and tags. But any registered Taxonomy now can be tweaked. This will be a major code rewrite and will be named SE 2.0. Coming this summer!

Download this release

Release Info

Developer pmenard
Plugin Icon wp plugin Simply Exclude
Version 1.7.8
Comparing to
See all releases

Code changes from version 1.7.7 to 1.7.8

Files changed (2) hide show
  1. readme.txt +9 -3
  2. simplyexclude.php +182 -70
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Simply Exclude ===
2
  Contributors: Paul Menard
3
- Donate link: http://www.codehooligans.com
4
  Tags: admin, posts, pages, categories, tags, exclude, include, is_front, is_archive, is_search, is_feed
5
- Requires at least: 2.6
6
  Tested up to: 2.9.2
7
- Stable tag: 1.7.7
8
 
9
  == Description ==
10
 
@@ -49,6 +49,12 @@ At the time (version 1.6.1) the plugin only effects Pages included in the tradit
49
 
50
  == Changelog ==
51
 
 
 
 
 
 
 
52
  = 1.7.7 =
53
  2010-05-12
54
  Fixes: Mainly bug fixes and code cleanup. Most bugs discovered via using WP_DEBUG for uninitialized variables.
1
  === Simply Exclude ===
2
  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: 2.9.2
7
+ Stable tag: 1.7.8
8
 
9
  == Description ==
10
 
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.
55
+
56
+ Coming Soon: Have been working on a new version of Simply Exclude that will dynamically work with the new Taxonomy system. No longer will we be restricted to excluding just categories and tags. But any registered Taxonomy now can be tweaked. This will be a major code rewrite and will be named SE 2.0. Coming this summer!
57
+
58
  = 1.7.7 =
59
  2010-05-12
60
  Fixes: Mainly bug fixes and code cleanup. Most bugs discovered via using WP_DEBUG for uninitialized variables.
simplyexclude.php CHANGED
@@ -2,23 +2,11 @@
2
  /*
3
  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.
6
  Author: Paul Menard
7
- Version: 1.7.7
8
  Author URI: http://www.codehooligans.com
9
 
10
- Revision history
11
- 1.0 - 2007-11-20: Initial release
12
- 1.1 - 2008-12-15: Added logic to work with WP version greater than 2.2
13
- 1.5 - 20008-04-27 Fixed display issues. Changes 'List' to 'Archive'. Added tags inclusion/exclusion login. Works only with WP 2.3 and greater.
14
- 1.6 - 2008-05-22 Fixed various items. Added format display for Categories and Pages to reveal heirarchy, Disable plugin functions when searching in admin. This also corrected a display exclusion bug when showing categories and pages.
15
- 1.7 - 2008-05-29 Added Author to the Include/Exclude logic. Now you can exclude Author's Posts from Search, Home, RSS, Archive.
16
- 1.7.1 - 2008-07-16 Fixed an issue with WP 2.6 where it automatically decided to unserialize the option data structure.
17
- 1.7.2 - 2009-02-05 Fixed some PHP warning by checking variable is set. Also added style to 2.7 interface.
18
- 1.7.2.1 - 2009-07-01 Fixed some PHP warning by checking variable is set. Also added style for 2.8 interface. Very minor changes.
19
- 1.7.5 - 2009-07015 Fixed some PHP warning by checking variable is set. Also added style for 2.8 interface. Very minor changes.
20
- 1.7.6 - 2009-11-14 Fixes: Issue with the Pages exclusion. Many users reporting a permissions issue. Additions: Added handler logic to interface with two other plugins. One of the often used Google XML Sitemaps. When setting Page or Category exclusions you now have the option to update the Google XML Sitemaps exclude pages and categories automatically. The other plugin is Search Unleashed.
21
-
22
  */
23
 
24
  class SimplyExclude
@@ -43,7 +31,7 @@ class SimplyExclude
43
  $this->in_admin = false;
44
 
45
  $this->admin_menu_label = "Simply Exclude";
46
- $this->options_key = "simplyexclude";
47
 
48
  $this->se_load_config();
49
 
@@ -63,14 +51,29 @@ class SimplyExclude
63
  add_action('init', array(&$this,'se_install'));
64
 
65
  // Used to limit the categories displayed on the home page. Simple
66
- add_filter('pre_get_posts', array(&$this,'se_filters'));
 
 
 
67
 
68
- add_action('save_post', array(&$this,'save_page_exclude_answer'));
 
 
 
 
 
 
 
 
69
 
70
- //add_filter('posts_request', array(&$this,'posts_request_proc'));
 
 
 
 
 
71
  }
72
 
73
-
74
  function posts_request_proc($request)
75
  {
76
  //echo "request=[". $request. "]<br />";
@@ -317,21 +320,22 @@ class SimplyExclude
317
  //add_options_page('Simply Exclude', 'Simply Exclude', 8,
318
  // $this->options_key, array(&$this, 'se_manage_page'));
319
 
320
- add_menu_page( 'Simply Exclude', 'Simply Exclude', 7, 'se_manage_categories', array(&$this, 'se_manage_categories'));
 
321
 
322
- add_submenu_page( 'se_manage_categories', 'Exclude Categories', 'Exclude Categories', 7,
323
  'se_manage_categories', array(&$this, 'se_manage_categories'));
324
 
325
- add_submenu_page( 'se_manage_categories', 'Exclude Tags', 'Exclude Tags', 7,
326
  'se_manage_tags', array(&$this, 'se_manage_tags'));
327
 
328
- add_submenu_page( 'se_manage_categories', 'Exclude Authors', 'Exclude Authors', 7,
329
  'se_manage_authors', array(&$this, 'se_manage_authors'));
330
 
331
- add_submenu_page( 'se_manage_categories', 'Exclude Pages', 'Exclude Pages', 7,
332
  'se_manage_pages', array(&$this, 'se_manage_pages'));
333
 
334
- add_submenu_page( 'se_manage_categories', 'Exclude Options', 'Exclude Options', 7,
335
  'se_manage_options', array(&$this, 'se_manage_options'));
336
 
337
  }
@@ -631,10 +635,30 @@ class SimplyExclude
631
  <tr>
632
  <?php
633
  }
 
 
 
 
 
634
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
635
  </tbody>
636
  </table>
637
  <br />
 
638
  <table class="widefat" width="80%" cellpadding="0" cellspacing="2" border="0">
639
  <thead>
640
  <tr>
@@ -791,7 +815,26 @@ class SimplyExclude
791
  <tr>
792
  <?php
793
  }
 
 
 
 
794
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
795
  </tbody>
796
  </table>
797
  <br />
@@ -1397,18 +1440,29 @@ class SimplyExclude
1397
  /////////////////////////////////////////////////////////////////
1398
 
1399
 
1400
-
1401
- function se_filters($query)
1402
  {
1403
- if ($this->in_admin == true)
 
 
1404
  return;
1405
-
 
 
 
 
 
 
 
 
1406
  if (count($this->default_IsActions['cats']) > 0)
1407
  {
 
1408
  foreach ($this->default_IsActions['cats'] as $action_key => $action_val)
1409
  {
1410
  $cats_list = "";
1411
- if ($query->{$action_key})
1412
  {
1413
  if (isset($this->se_cfg['cats'][$action_key]))
1414
  {
@@ -1419,7 +1473,9 @@ class SimplyExclude
1419
  }
1420
  }
1421
  if (strlen($cats_list))
1422
- $query->set('cat', $cats_list);
 
 
1423
  }
1424
  }
1425
  }
@@ -1430,13 +1486,13 @@ class SimplyExclude
1430
  {
1431
  foreach ($this->default_IsActions['tags'] as $action_key => $action_val)
1432
  {
1433
- if ($query->{$action_key})
1434
  {
1435
  if (isset($this->se_cfg['tags'][$action_key]))
1436
  {
1437
  if (isset($tag_array_list))
1438
  unset($tag_array_list);
1439
-
1440
  $tag_array_list = array();
1441
  if (count($this->se_cfg['tags'][$action_key]) > 0)
1442
  {
@@ -1447,37 +1503,37 @@ class SimplyExclude
1447
 
1448
  if ($this->se_cfg['tags']['actions'][$action_key] == "e")
1449
  {
1450
- $query->set('tag__not_in', $tag_array_list);
1451
  }
1452
  else
1453
  {
1454
- $query->set('tag__in', $tag_array_list);
1455
  }
1456
  }
1457
  }
1458
  }
1459
  }
1460
  }
 
1461
 
1462
- if (count($this->default_IsActions['authors']) > 0)
 
 
1463
  {
1464
- foreach ($this->default_IsActions['authors'] as $action_key => $action_val)
 
1465
  {
1466
- $authors_list = "";
1467
- if ($query->{$action_key})
1468
  {
1469
- if (isset($this->se_cfg['authors'][$action_key]))
1470
  {
1471
- if (count($this->se_cfg['authors'][$action_key]))
1472
- {
1473
- $authors_list = $this->se_listify_ids(
1474
- $this->se_cfg['authors']['actions'][$action_key],
1475
- $this->se_cfg['authors'][$action_key]);
1476
- }
1477
  }
1478
- if (strlen($authors_list))
1479
- $query->set('author', $authors_list);
1480
  }
 
 
1481
  }
1482
  }
1483
  }
@@ -1486,29 +1542,13 @@ class SimplyExclude
1486
  {
1487
  foreach ($this->default_IsActions['pages'] as $action_key => $action_val)
1488
  {
1489
- if ($query->{$action_key})
1490
  {
1491
  add_filter('posts_where', array(&$this, 'SE4_search_pages'));
1492
  add_filter('posts_where', array(&$this, 'SE4_exclude_posts'));
1493
-
1494
- /*
1495
- $pages_list;
1496
- if (isset($this->se_cfg['pages'][$action_key]))
1497
- {
1498
- //echo "this->se_cfg['pages'][$action_key]=[". $this->se_cfg['pages'][$action_key]. "]<br />";
1499
-
1500
- $pages_list = $this->se_listify_ids($this->se_cfg['pages']['actions'][$action_key],
1501
- $this->se_cfg['pages'][$action_key]);
1502
- //echo "pages_list=[". $pages_list."]<br />";
1503
- }
1504
- if (strlen($pages_list))
1505
- $query->set('page', $pages_list);
1506
- */
1507
  }
1508
  }
1509
  }
1510
- //echo "query after<pre>"; print_r($query); echo "</pre>";
1511
- return $query;
1512
  }
1513
 
1514
  function se_listify_ids($action, $ids)
@@ -1926,10 +1966,12 @@ class SimplyExclude
1926
  if (!$all_page_ids)
1927
  $all_page_ids = array();
1928
 
1929
- if ($_REQUEST['se_admin']['pages']['actions']['is_search'] == "e") {
 
1930
 
1931
  // Remove all Pages from the Google XML Sitemap exclude array. Then we will add the new ones back.
1932
- foreach($search_unleashed_exclude as $idx => $search_exclude_page_id) {
 
1933
  if (array_search($search_exclude_page_id, $all_page_ids) !== false)
1934
  unset($search_unleashed_exclude[$idx]);
1935
  }
@@ -1940,14 +1982,17 @@ class SimplyExclude
1940
  $search_unleashed_exclude[] = $se_pages_idx;
1941
  }
1942
  }
1943
- else {
 
1944
 
1945
- foreach($search_unleashed_exclude as $idx => $search_exclude_page_id) {
 
1946
  if (array_search($search_exclude_page_id, $all_page_ids) !== false)
1947
  unset($search_unleashed_exclude[$idx]);
1948
  }
1949
 
1950
- foreach($all_page_ids as $page_idx => $page_id) {
 
1951
  if (array_key_exists($page_id, $_REQUEST['se_admin']['pages']['is_search']) === false)
1952
  {
1953
  if (array_search($page_id, $search_unleashed_exclude) === false)
@@ -1963,6 +2008,73 @@ class SimplyExclude
1963
  }
1964
  update_option( 'search_unleashed', $search_unleashed_options );
1965
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1966
  }
1967
  $simplyexclude = new SimplyExclude();
1968
 
2
  /*
3
  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
8
  Author URI: http://www.codehooligans.com
9
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  */
11
 
12
  class SimplyExclude
31
  $this->in_admin = false;
32
 
33
  $this->admin_menu_label = "Simply Exclude";
34
+ $this->options_key = "simplyexclude";
35
 
36
  $this->se_load_config();
37
 
51
  add_action('init', array(&$this,'se_install'));
52
 
53
  // Used to limit the categories displayed on the home page. Simple
54
+ //add_filter('pre_get_posts', array(&$this,'se_filters'), 99, 1);
55
+ add_action('pre_get_posts', array(&$this,'se_filters'));
56
+
57
+ add_action('save_post', array(&$this,'save_page_exclude_answer'));
58
 
59
+ //echo "se_cfg<pre>"; print_r($this->se_cfg); echo "</pre>";
60
+ if ((floatval($this->wp_version) >= "2.8.0") && (!is_admin()))
61
+ {
62
+ if ( (isset($this->se_cfg['cats']['extra']['wp_list_categories']))
63
+ && ($this->se_cfg['cats']['extra']['wp_list_categories'] == 'Yes') )
64
+ {
65
+ add_filter('widget_categories_dropdown_args', array(&$this,'se_categories_dropdown_args_proc'));
66
+ add_filter('widget_categories_args', array(&$this,'se_categories_dropdown_args_proc'));
67
+ }
68
 
69
+ if ( (isset($this->se_cfg['tags']['extra']['wp_tag_cloud']))
70
+ && ($this->se_cfg['tags']['extra']['wp_tag_cloud'] == 'Yes'))
71
+ {
72
+ add_filter('widget_tag_cloud_args', array(&$this,'se_widget_tag_cloud_args_proc'));
73
+ }
74
+ }
75
  }
76
 
 
77
  function posts_request_proc($request)
78
  {
79
  //echo "request=[". $request. "]<br />";
320
  //add_options_page('Simply Exclude', 'Simply Exclude', 8,
321
  // $this->options_key, array(&$this, 'se_manage_page'));
322
 
323
+ add_menu_page( 'Simply Exclude', 'Simply Exclude', 'manage_options',
324
+ 'se_manage_categories', array(&$this, 'se_manage_categories'));
325
 
326
+ add_submenu_page( 'se_manage_categories', 'Exclude Categories', 'Exclude Categories', 'manage_options',
327
  'se_manage_categories', array(&$this, 'se_manage_categories'));
328
 
329
+ add_submenu_page( 'se_manage_categories', 'Exclude Tags', 'Exclude Tags', 'manage_options',
330
  'se_manage_tags', array(&$this, 'se_manage_tags'));
331
 
332
+ add_submenu_page( 'se_manage_categories', 'Exclude Authors', 'Exclude Authors', 'manage_options',
333
  'se_manage_authors', array(&$this, 'se_manage_authors'));
334
 
335
+ add_submenu_page( 'se_manage_categories', 'Exclude Pages', 'Exclude Pages', 'manage_options',
336
  'se_manage_pages', array(&$this, 'se_manage_pages'));
337
 
338
+ add_submenu_page( 'se_manage_categories', 'Exclude Options', 'Exclude Options', 'manage_options',
339
  'se_manage_options', array(&$this, 'se_manage_options'));
340
 
341
  }
635
  <tr>
636
  <?php
637
  }
638
+
639
+ $class = ('alternate' == $class) ? '' : 'alternate';
640
+
641
+ if (!isset($this->se_cfg['cats']['extra']['wp_list_categories']))
642
+ $this->se_cfg['cats']['extra']['wp_list_categories'] == 'No';
643
  ?>
644
+ <tr <?php if (strlen($class)) echo "class='".$class."'" ?>>
645
+ <td class="action">Widget</td>
646
+ <td class="description">Exclude from WordPress List Category Widget<br />Any categories set as part of the 'Archive' acton for Include/Exclude will be Included/Excluded via the WordPress List Categories Widget output</td>
647
+ <td class="inc-excl">
648
+ <input type="radio" name="se_admin[cats][extra][wp_list_categories]" value="Yes"
649
+ <?php if ((isset($this->se_cfg['cats']['extra']['wp_list_categories']))
650
+ && ($this->se_cfg['cats']['extra']['wp_list_categories'] == 'Yes'))
651
+ echo "checked='checked'"; ?> /> Yes<br />
652
+ <input type="radio" name="se_admin[cats][extra][wp_list_categories]" value="No"
653
+ <?php if ((isset($this->se_cfg['cats']['extra']['wp_list_categories']))
654
+ && ($this->se_cfg['cats']['extra']['wp_list_categories'] == 'No'))
655
+ echo "checked='checked'"; ?> /> No
656
+ </td>
657
+ <tr>
658
  </tbody>
659
  </table>
660
  <br />
661
+
662
  <table class="widefat" width="80%" cellpadding="0" cellspacing="2" border="0">
663
  <thead>
664
  <tr>
815
  <tr>
816
  <?php
817
  }
818
+ $class = ('alternate' == $class) ? '' : 'alternate';
819
+
820
+ if (!isset($this->se_cfg['tags']['extra']['wp_tag_cloud']))
821
+ $this->se_cfg['tags']['extra']['wp_tag_cloud'] = 'No';
822
  ?>
823
+ <tr <?php if (strlen($class)) echo "class='".$class."'" ?>>
824
+ <td class="action">Widget</td>
825
+ <td class="description">Exclude from WordPress Tag Cloud Widget<br />Any tags set as part of the 'Archive' acton for Include/Exclude will be Included/Excluded via the WordPress Tag Cloud Widget output</td>
826
+ <td class="inc-excl">
827
+ <input type="radio" name="se_admin[tags][extra][wp_tag_cloud]" value="Yes"
828
+ <?php if ((isset($this->se_cfg['tags']['extra']['wp_tag_cloud']))
829
+ && ($this->se_cfg['tags']['extra']['wp_tag_cloud'] == 'Yes'))
830
+ echo "checked='checked'"; ?> /> Yes<br />
831
+ <input type="radio" name="se_admin[tags][extra][wp_tag_cloud]" value="No"
832
+ <?php if ((isset($this->se_cfg['tags']['extra']['wp_tag_cloud']))
833
+ && ($this->se_cfg['tags']['extra']['wp_tag_cloud'] == 'No'))
834
+ echo "checked='checked'"; ?> /> No
835
+ </td>
836
+ <tr>
837
+
838
  </tbody>
839
  </table>
840
  <br />
1440
  /////////////////////////////////////////////////////////////////
1441
 
1442
 
1443
+
1444
+ function se_filters()
1445
  {
1446
+ global $wp_query;
1447
+
1448
+ if ((is_admin()) || (is_single()) || (is_page()))
1449
  return;
1450
+
1451
+ // Only filter on our actions.
1452
+ // if ((!is_front_page())
1453
+ // && (!is_search())
1454
+ // && (!is_archive())
1455
+ // && (!is_feed())
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
  {
1473
  }
1474
  }
1475
  if (strlen($cats_list))
1476
+ {
1477
+ $wp_query->set('cat', $cats_list);
1478
+ }
1479
  }
1480
  }
1481
  }
1486
  {
1487
  foreach ($this->default_IsActions['tags'] as $action_key => $action_val)
1488
  {
1489
+ if ($wp_query->{$action_key})
1490
  {
1491
  if (isset($this->se_cfg['tags'][$action_key]))
1492
  {
1493
  if (isset($tag_array_list))
1494
  unset($tag_array_list);
1495
+
1496
  $tag_array_list = array();
1497
  if (count($this->se_cfg['tags'][$action_key]) > 0)
1498
  {
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
  }
1516
  }
1517
+ }
1518
 
1519
+ if (count($this->default_IsActions['authors']) > 0)
1520
+ {
1521
+ foreach ($this->default_IsActions['authors'] as $action_key => $action_val)
1522
  {
1523
+ $authors_list = "";
1524
+ if ($wp_query->{$action_key})
1525
  {
1526
+ if (isset($this->se_cfg['authors'][$action_key]))
 
1527
  {
1528
+ if (count($this->se_cfg['authors'][$action_key]))
1529
  {
1530
+ $authors_list = $this->se_listify_ids(
1531
+ $this->se_cfg['authors']['actions'][$action_key],
1532
+ $this->se_cfg['authors'][$action_key]);
 
 
 
1533
  }
 
 
1534
  }
1535
+ if (strlen($authors_list))
1536
+ $wp_query->set('author', $authors_list);
1537
  }
1538
  }
1539
  }
1542
  {
1543
  foreach ($this->default_IsActions['pages'] as $action_key => $action_val)
1544
  {
1545
+ if ($wp_query->{$action_key})
1546
  {
1547
  add_filter('posts_where', array(&$this, 'SE4_search_pages'));
1548
  add_filter('posts_where', array(&$this, 'SE4_exclude_posts'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1549
  }
1550
  }
1551
  }
 
 
1552
  }
1553
 
1554
  function se_listify_ids($action, $ids)
1966
  if (!$all_page_ids)
1967
  $all_page_ids = array();
1968
 
1969
+ if ($_REQUEST['se_admin']['pages']['actions']['is_search'] == "e")
1970
+ {
1971
 
1972
  // Remove all Pages from the Google XML Sitemap exclude array. Then we will add the new ones back.
1973
+ foreach($search_unleashed_exclude as $idx => $search_exclude_page_id)
1974
+ {
1975
  if (array_search($search_exclude_page_id, $all_page_ids) !== false)
1976
  unset($search_unleashed_exclude[$idx]);
1977
  }
1982
  $search_unleashed_exclude[] = $se_pages_idx;
1983
  }
1984
  }
1985
+ else
1986
+ {
1987
 
1988
+ foreach($search_unleashed_exclude as $idx => $search_exclude_page_id)
1989
+ {
1990
  if (array_search($search_exclude_page_id, $all_page_ids) !== false)
1991
  unset($search_unleashed_exclude[$idx]);
1992
  }
1993
 
1994
+ foreach($all_page_ids as $page_idx => $page_id)
1995
+ {
1996
  if (array_key_exists($page_id, $_REQUEST['se_admin']['pages']['is_search']) === false)
1997
  {
1998
  if (array_search($page_id, $search_unleashed_exclude) === false)
2008
  }
2009
  update_option( 'search_unleashed', $search_unleashed_options );
2010
  }
2011
+
2012
+ function se_categories_dropdown_args_proc($args)
2013
+ {
2014
+ $all_cat_ids = get_all_category_ids();
2015
+ if (!$all_cat_ids)
2016
+ $all_cat_ids = array();
2017
+
2018
+ if (($this->se_cfg['cats']['actions']['is_archive'] == 'e')
2019
+ && (count($this->se_cfg['cats']['is_archive'])))
2020
+ {
2021
+ $all_cat_ids = array_keys($this->se_cfg['cats']['is_archive']);
2022
+ }
2023
+ else if (($this->se_cfg['cats']['actions']['is_archive'] == 'i')
2024
+ && (count($this->se_cfg['cats']['is_archive'])))
2025
+ {
2026
+ foreach($this->se_cfg['cats']['is_archive'] as $c_idx => $c_item)
2027
+ {
2028
+ $item_idx = array_search($c_idx, $all_cat_ids);
2029
+ if ($item_idx !== false)
2030
+ unset($all_cat_ids[$item_idx]);
2031
+ }
2032
+ }
2033
+
2034
+ if ((isset($all_cat_ids)) && (count($all_cat_ids)))
2035
+ {
2036
+ $args['exclude'] = implode(',', $all_cat_ids);
2037
+ }
2038
+ return $args;
2039
+ }
2040
+
2041
+ function se_widget_tag_cloud_args_proc($args)
2042
+ {
2043
+ $all_tags = get_tags('hide_empty=0&orderby=name&order=ASC');
2044
+
2045
+ $all_tag_ids = array();
2046
+ if ($all_tags)
2047
+ {
2048
+ foreach($all_tags as $t_item)
2049
+ {
2050
+ $all_tag_ids[] = $t_item->term_id;
2051
+ }
2052
+ }
2053
+
2054
+ if (($this->se_cfg['tags']['actions']['is_archive'] == 'e')
2055
+ && (count($this->se_cfg['tags']['is_archive'])))
2056
+ {
2057
+ $all_tag_ids = array_keys($this->se_cfg['tags']['is_archive']);
2058
+ }
2059
+ else if (($this->se_cfg['tags']['actions']['is_archive'] == 'i')
2060
+ && (count($this->se_cfg['tags']['is_archive'])))
2061
+ {
2062
+ foreach($this->se_cfg['tags']['is_archive'] as $c_idx => $c_item)
2063
+ {
2064
+ $item_idx = array_search($c_idx, $all_tag_ids);
2065
+ if ($item_idx !== false)
2066
+ unset($all_tag_ids[$item_idx]);
2067
+ }
2068
+ }
2069
+
2070
+ if ((isset($all_tag_ids)) && (count($all_tag_ids)))
2071
+ {
2072
+ $args['exclude'] = implode(',', $all_tag_ids);
2073
+ }
2074
+
2075
+ return $args;
2076
+ }
2077
+
2078
  }
2079
  $simplyexclude = new SimplyExclude();
2080