Commit ae2308c2 authored by shammash's avatar shammash Committed by lechuck
Browse files

updated extended categories widget to 3.4.2

parent baee8673
......@@ -123,14 +123,13 @@ class AVH_EC_Category_Group
function doSetupOptions ()
{
// Setup the standard groups if the none group does not exists.
$all_categories = $this->getAllCategoriesTermID();
if (false === $this->getTermIDBy('slug', 'none')) {
$none_group_id = wp_insert_term('none', $this->taxonomy_name, array('description'=>__('This group will not show the widget.', 'avh-ec')));
$all_group_id = wp_insert_term('All', $this->taxonomy_name, array('description'=>__('Holds all the categories.', 'avh-ec')));
$home_group_id = wp_insert_term('Home', $this->taxonomy_name, array('description'=>__('This group will be shown on the front page.', 'avh-ec')));
// Fill the standard groups with all categories
$all_categories = $this->getAllCategoriesTermID();
$this->setCategoriesForGroup($all_group_id['term_id'], $all_categories);
$this->setCategoriesForGroup($home_group_id['term_id'], $all_categories);
$this->setWidgetTitleForGroup($all_group_id['term_id'], '');
$this->setWidgetTitleForGroup($home_group_id['term_id'], '');
......@@ -146,6 +145,7 @@ class AVH_EC_Category_Group
update_option($this->db_options_widget_titles, $options);
}
$this->options_widget_titles = $options;
$this->setCategoriesForGroup($this->getTermIDBy('slug', 'all'), $all_categories);
}
/**
......
......@@ -27,7 +27,7 @@ class AVH_EC_Core
*/
$catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
$this->version = '3.4';
$this->version = '3.4.2';
$this->comment = '<!-- AVH Extended Categories version ' . $this->version . ' | http://blog.avirtualhome.com/wordpress-plugins/ -->';
$this->db_options_core = 'avhec';
$this->db_options_tax_meta = 'avhec-tax_meta';
......
......@@ -591,11 +591,14 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
if ('none' == $special_page) {
$terms = wp_get_object_terms($post->ID, $catgrp->taxonomy_name);
if (! empty($terms)) {
$selected_catgroups = unserialize($instance['post_group_category']);
foreach ($terms as $key => $value) {
if (! ($this->getWidgetDoneCatGroup($value->term_id))) {
$row = $value;
$group_found = TRUE;
break;
if ($selected_catgroups === FALSE || array_key_exists($value->term_id, $selected_catgroups)) {
if (! ($this->getWidgetDoneCatGroup($value->term_id))) {
$row = $value;
$group_found = TRUE;
break;
}
}
}
} else {
......@@ -630,7 +633,7 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
$toDisplay = FALSE;
} elseif (! (FALSE == $selected_catgroups || array_key_exists($row->term_id, $selected_catgroups))) {
$toDisplay = FALSE;
} elseif ($this->getWidgetDoneCatGroup($sp_category_group_id)) {
} elseif ($special_page != 'none' && $this->getWidgetDoneCatGroup($sp_category_group_id)) {
$toDisplay = FALSE;
}
}
......
......@@ -3,8 +3,8 @@ Contributors: petervanderdoes
Donate link: http://blog.avirtualhome.com/wordpress-plugins/
Tags: extended, categories, widget, top categories
Requires at least: 2.3
Tested up to: 3.1
Stable tag: 3.4
Tested up to: 3.2.1
Stable tag: 3.4.2
The AVH Extended Categories Widgets gives you three widgets for displaying categories.
== Description ==
......@@ -134,6 +134,14 @@ Whether Widget 2 shows Movie or Music depends on the creation order of groups. I
None
== Changelog ==
= Version 3.4.2 =
* Bugfix: Fails to display the Category Group Widget when the widget is to display any group.
* Foo line
= Version 3.4.1 =
* Bugfix: Problems with multiple category group widgets.
* Bugfix: The category group All sometimes does not contain all categories.
= Version 3.4 =
* 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.
* Bugfix: In combination with WP Supercache an error can occur.
......
......@@ -9,7 +9,7 @@ function widget_extended_categories_init ()
function widget_extended_categories ($args, $number = 1)
{
$version = '3.4';
$version = '3.4.2';
// Check for version
require (ABSPATH . WPINC . '/version.php');
if (version_compare($wp_version, '2.5.1', '<')) {
......
......@@ -3,7 +3,7 @@
Plugin Name: AVH Extended Categories Widgets
Plugin URI: http://blog.avirtualhome.com/wordpress-plugins
Description: Replacement of the category widget to allow for greater customization of the category widget.
Version: 3.4
Version: 3.4.2
Author: Peter van der Does
Author URI: http://blog.avirtualhome.com/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment