From ae2308c2c2dc50a6f0f06645d00ec967c463e5ce Mon Sep 17 00:00:00 2001 From: shammash <shammash@autistici.org> Date: Mon, 10 Oct 2011 21:34:59 +0200 Subject: [PATCH] updated extended categories widget to 3.4.2 --- .../2.8/class/avh-ec.category-group.php | 4 ++-- .../2.8/class/avh-ec.core.php | 2 +- .../2.8/class/avh-ec.widgets.php | 13 ++++++++----- .../plugins/extended-categories-widget/readme.txt | 12 ++++++++++-- .../extended-categories-widget/widget-pre2.8.php | 2 +- .../widget_extended_categories.php | 2 +- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.category-group.php b/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.category-group.php index 9f4276217..d8398e9a0 100644 --- a/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.category-group.php +++ b/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.category-group.php @@ -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); } /** diff --git a/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.core.php b/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.core.php index 9aed8ac38..c1b93d1b0 100644 --- a/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.core.php +++ b/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.core.php @@ -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'; diff --git a/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.widgets.php b/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.widgets.php index 968fd1f47..387f524b3 100644 --- a/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.widgets.php +++ b/wp-content/plugins/extended-categories-widget/2.8/class/avh-ec.widgets.php @@ -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; } } diff --git a/wp-content/plugins/extended-categories-widget/readme.txt b/wp-content/plugins/extended-categories-widget/readme.txt index 938fd85c0..2c880e98f 100644 --- a/wp-content/plugins/extended-categories-widget/readme.txt +++ b/wp-content/plugins/extended-categories-widget/readme.txt @@ -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. diff --git a/wp-content/plugins/extended-categories-widget/widget-pre2.8.php b/wp-content/plugins/extended-categories-widget/widget-pre2.8.php index a3e18affe..2c52bf4d1 100644 --- a/wp-content/plugins/extended-categories-widget/widget-pre2.8.php +++ b/wp-content/plugins/extended-categories-widget/widget-pre2.8.php @@ -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', '<')) { diff --git a/wp-content/plugins/extended-categories-widget/widget_extended_categories.php b/wp-content/plugins/extended-categories-widget/widget_extended_categories.php index 977e54dd9..c0fb19d2a 100644 --- a/wp-content/plugins/extended-categories-widget/widget_extended_categories.php +++ b/wp-content/plugins/extended-categories-widget/widget_extended_categories.php @@ -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/ -- GitLab