AVH Extended Categories Widgets - Version 3.4.1

Version Description

Download this release

Release Info

Developer petervanderdoes
Plugin Icon wp plugin AVH Extended Categories Widgets
Version 3.4.1
Comparing to
See all releases

Code changes from version 3.4 to 3.4.1

.gitignore DELETED
@@ -1,4 +0,0 @@
1
- .project
2
- /.buildpath
3
- /.settings
4
- /.gitignore
 
 
 
 
2.8/class/avh-ec.category-group.php CHANGED
@@ -123,14 +123,13 @@ class AVH_EC_Category_Group
123
  function doSetupOptions ()
124
  {
125
  // Setup the standard groups if the none group does not exists.
 
126
  if (false === $this->getTermIDBy('slug', 'none')) {
127
  $none_group_id = wp_insert_term('none', $this->taxonomy_name, array('description'=>__('This group will not show the widget.', 'avh-ec')));
128
  $all_group_id = wp_insert_term('All', $this->taxonomy_name, array('description'=>__('Holds all the categories.', 'avh-ec')));
129
  $home_group_id = wp_insert_term('Home', $this->taxonomy_name, array('description'=>__('This group will be shown on the front page.', 'avh-ec')));
130
 
131
  // Fill the standard groups with all categories
132
- $all_categories = $this->getAllCategoriesTermID();
133
- $this->setCategoriesForGroup($all_group_id['term_id'], $all_categories);
134
  $this->setCategoriesForGroup($home_group_id['term_id'], $all_categories);
135
  $this->setWidgetTitleForGroup($all_group_id['term_id'], '');
136
  $this->setWidgetTitleForGroup($home_group_id['term_id'], '');
@@ -146,6 +145,7 @@ class AVH_EC_Category_Group
146
  update_option($this->db_options_widget_titles, $options);
147
  }
148
  $this->options_widget_titles = $options;
 
149
  }
150
 
151
  /**
123
  function doSetupOptions ()
124
  {
125
  // Setup the standard groups if the none group does not exists.
126
+ $all_categories = $this->getAllCategoriesTermID();
127
  if (false === $this->getTermIDBy('slug', 'none')) {
128
  $none_group_id = wp_insert_term('none', $this->taxonomy_name, array('description'=>__('This group will not show the widget.', 'avh-ec')));
129
  $all_group_id = wp_insert_term('All', $this->taxonomy_name, array('description'=>__('Holds all the categories.', 'avh-ec')));
130
  $home_group_id = wp_insert_term('Home', $this->taxonomy_name, array('description'=>__('This group will be shown on the front page.', 'avh-ec')));
131
 
132
  // Fill the standard groups with all categories
 
 
133
  $this->setCategoriesForGroup($home_group_id['term_id'], $all_categories);
134
  $this->setWidgetTitleForGroup($all_group_id['term_id'], '');
135
  $this->setWidgetTitleForGroup($home_group_id['term_id'], '');
145
  update_option($this->db_options_widget_titles, $options);
146
  }
147
  $this->options_widget_titles = $options;
148
+ $this->setCategoriesForGroup($this->getTermIDBy('slug', 'all'), $all_categories);
149
  }
150
 
151
  /**
2.8/class/avh-ec.core.php CHANGED
@@ -27,7 +27,7 @@ class AVH_EC_Core
27
  */
28
  $catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
29
 
30
- $this->version = '3.4';
31
  $this->comment = '<!-- AVH Extended Categories version ' . $this->version . ' | http://blog.avirtualhome.com/wordpress-plugins/ -->';
32
  $this->db_options_core = 'avhec';
33
  $this->db_options_tax_meta = 'avhec-tax_meta';
27
  */
28
  $catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
29
 
30
+ $this->version = '3.4.1';
31
  $this->comment = '<!-- AVH Extended Categories version ' . $this->version . ' | http://blog.avirtualhome.com/wordpress-plugins/ -->';
32
  $this->db_options_core = 'avhec';
33
  $this->db_options_tax_meta = 'avhec-tax_meta';
2.8/class/avh-ec.widgets.php CHANGED
@@ -591,11 +591,14 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
591
  if ('none' == $special_page) {
592
  $terms = wp_get_object_terms($post->ID, $catgrp->taxonomy_name);
593
  if (! empty($terms)) {
 
594
  foreach ($terms as $key => $value) {
595
- if (! ($this->getWidgetDoneCatGroup($value->term_id))) {
596
- $row = $value;
597
- $group_found = TRUE;
598
- break;
 
 
599
  }
600
  }
601
  } else {
@@ -630,7 +633,7 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
630
  $toDisplay = FALSE;
631
  } elseif (! (FALSE == $selected_catgroups || array_key_exists($row->term_id, $selected_catgroups))) {
632
  $toDisplay = FALSE;
633
- } elseif ($this->getWidgetDoneCatGroup($sp_category_group_id)) {
634
  $toDisplay = FALSE;
635
  }
636
  }
591
  if ('none' == $special_page) {
592
  $terms = wp_get_object_terms($post->ID, $catgrp->taxonomy_name);
593
  if (! empty($terms)) {
594
+ $selected_catgroups = unserialize($instance['post_group_category']);
595
  foreach ($terms as $key => $value) {
596
+ if (array_key_exists($value->term_id, $selected_catgroups)) {
597
+ if (! ($this->getWidgetDoneCatGroup($value->term_id))) {
598
+ $row = $value;
599
+ $group_found = TRUE;
600
+ break;
601
+ }
602
  }
603
  }
604
  } else {
633
  $toDisplay = FALSE;
634
  } elseif (! (FALSE == $selected_catgroups || array_key_exists($row->term_id, $selected_catgroups))) {
635
  $toDisplay = FALSE;
636
+ } elseif ($special_page != 'none' && $this->getWidgetDoneCatGroup($sp_category_group_id)) {
637
  $toDisplay = FALSE;
638
  }
639
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: petervanderdoes
3
  Donate link: http://blog.avirtualhome.com/wordpress-plugins/
4
  Tags: extended, categories, widget, top categories
5
  Requires at least: 2.3
6
- Tested up to: 3.1
7
- Stable tag: 3.4
8
 
9
  The AVH Extended Categories Widgets gives you three widgets for displaying categories.
10
  == Description ==
@@ -134,6 +134,10 @@ Whether Widget 2 shows Movie or Music depends on the creation order of groups. I
134
  None
135
 
136
  == Changelog ==
 
 
 
 
137
  = Version 3.4 =
138
  * RFC: Category Groups can be associated with categories. This enables the plugin to display the Category Group Widget for that category group on the category archive page.
139
  * Bugfix: In combination with WP Supercache an error can occur.
3
  Donate link: http://blog.avirtualhome.com/wordpress-plugins/
4
  Tags: extended, categories, widget, top categories
5
  Requires at least: 2.3
6
+ Tested up to: 3.2.1
7
+ Stable tag: 3.4.1
8
 
9
  The AVH Extended Categories Widgets gives you three widgets for displaying categories.
10
  == Description ==
134
  None
135
 
136
  == Changelog ==
137
+ = Version 3.4.1 =
138
+ * Bugfix: Problems with multiple category group widgets.
139
+ * Bugfix: The category group All sometimes does not contain all categories.
140
+
141
  = Version 3.4 =
142
  * RFC: Category Groups can be associated with categories. This enables the plugin to display the Category Group Widget for that category group on the category archive page.
143
  * Bugfix: In combination with WP Supercache an error can occur.
widget-pre2.8.php CHANGED
@@ -9,7 +9,7 @@ function widget_extended_categories_init ()
9
 
10
  function widget_extended_categories ($args, $number = 1)
11
  {
12
- $version = '3.4';
13
  // Check for version
14
  require (ABSPATH . WPINC . '/version.php');
15
  if (version_compare($wp_version, '2.5.1', '<')) {
9
 
10
  function widget_extended_categories ($args, $number = 1)
11
  {
12
+ $version = '3.4.1';
13
  // Check for version
14
  require (ABSPATH . WPINC . '/version.php');
15
  if (version_compare($wp_version, '2.5.1', '<')) {
widget_extended_categories.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: AVH Extended Categories Widgets
4
  Plugin URI: http://blog.avirtualhome.com/wordpress-plugins
5
  Description: Replacement of the category widget to allow for greater customization of the category widget.
6
- Version: 3.4
7
  Author: Peter van der Does
8
  Author URI: http://blog.avirtualhome.com/
9
 
3
  Plugin Name: AVH Extended Categories Widgets
4
  Plugin URI: http://blog.avirtualhome.com/wordpress-plugins
5
  Description: Replacement of the category widget to allow for greater customization of the category widget.
6
+ Version: 3.4.1
7
  Author: Peter van der Does
8
  Author URI: http://blog.avirtualhome.com/
9