Version Description
Download this release
Release Info
Developer | petervanderdoes |
Plugin | AVH Extended Categories Widgets |
Version | 3.3.5 |
Comparing to | |
See all releases |
Code changes from version 3.3.4 to 3.3.5
- 2.8/class/avh-ec.admin.php +62 -15
- 2.8/class/avh-ec.category-group.php +14 -1
- 2.8/class/avh-ec.core.php +5 -2
- 2.8/class/avh-ec.widgets.php +20 -3
- 2.8/css/avh-ec.admin.css +11 -0
- readme.txt +4 -1
- widget-pre2.8.php +1 -1
- widget_extended_categories.php +1 -1
2.8/class/avh-ec.admin.php
CHANGED
@@ -31,6 +31,7 @@ class AVH_EC_Admin
|
|
31 |
add_action('wp_ajax_delete-group', array(&$this, 'ajaxDeleteGroup'));
|
32 |
|
33 |
// Admin menu
|
|
|
34 |
add_action('admin_menu', array(&$this, 'actionAdminMenu'));
|
35 |
add_filter('plugin_action_links_extended-categories-widget/widget_extended_categories.php', array(&$this, 'filterPluginActions'), 10, 2);
|
36 |
|
@@ -57,6 +58,59 @@ class AVH_EC_Admin
|
|
57 |
$this->__construct();
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
/**
|
61 |
* When a category is created this function is called to add the new category to the group all
|
62 |
* @param $term_id
|
@@ -524,13 +578,13 @@ class AVH_EC_Admin
|
|
524 |
$dropdown_value[] = $group->term_id;
|
525 |
$dropdown_text[] = $temp_cat->name;
|
526 |
}
|
527 |
-
$options_special_pages[] = array('avhec_special_pages[sp][home_group]', __('Home page', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, '');
|
528 |
-
|
529 |
-
$options_special_pages[] = array('avhec_special_pages[sp][day_group]', __('Daily Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, '');
|
530 |
-
$options_special_pages[] = array('avhec_special_pages[sp][month_group]', __('Monthly Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, '');
|
531 |
-
$options_special_pages[] = array('avhec_special_pages[sp][year_group]', __('Yearly Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, '');
|
532 |
-
$options_special_pages[] = array('avhec_special_pages[sp][author_group]', __('Author Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, '');
|
533 |
-
$options_special_pages[] = array('avhec_special_pages[sp][search_group]', __('Search Page', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, '');
|
534 |
|
535 |
$data['sp'] = array('form'=>$options_special_pages, 'data'=>$data_special_pages);
|
536 |
|
@@ -776,7 +830,6 @@ class AVH_EC_Admin
|
|
776 |
*/
|
777 |
function metaboxFAQ ()
|
778 |
{
|
779 |
-
|
780 |
echo '<div class="p">';
|
781 |
echo '<span class="b">' . __('What about support?', 'avh-ec') . '</span><br />';
|
782 |
echo __('I created a support site at http://forums.avirtualhome.com where you can ask questions or request features.', 'avh-ec') . '<br />';
|
@@ -799,36 +852,30 @@ class AVH_EC_Admin
|
|
799 |
echo '<li>' . __('Movie', 'avh-ec') . '</li>';
|
800 |
echo '<li>' . __('Music', 'avh-ec') . '</li>';
|
801 |
echo '</ul>';
|
802 |
-
|
803 |
echo __('Setup several Category Group widgets and associated each widget with one or more groups.', 'avh-ec') . '<br />';
|
804 |
echo __('Widget 1 has association with Free Time', 'avh-ec') . '<br />';
|
805 |
echo __('Widget 2 has association with Theater, Movie and Music', 'avh-ec') . '<br />';
|
806 |
echo __('Widget 3 has association with Theater, Movie and Music', 'avh-ec') . '<br /><br />';
|
807 |
-
|
808 |
echo __('Page has associations the groups Free Time and Theater', 'avh-ec');
|
809 |
echo '<ul>';
|
810 |
echo '<li>' . __('Widget 1: Shows categories of the Free Time group', 'avh-ec') . '</li>';
|
811 |
echo '<li>' . __('Widget 2: Shows categories of the Theater group.', 'avh-ec') . '</li>';
|
812 |
echo '<li>' . __('Widget 3: Not displayed', 'avh-ec') . '</li>';
|
813 |
echo '</ul>';
|
814 |
-
|
815 |
echo __('Page has associations the group Movie.', 'avh-ec');
|
816 |
echo '<ul>';
|
817 |
echo '<li>' . __('Widget 1: Not displayed', 'avh-ec') . '</li>';
|
818 |
echo '<li>' . __('Widget 2: Shows categories of the Movie group.', 'avh-ec') . '</li>';
|
819 |
echo '<li>' . __('Widget 3: Not displayed', 'avh-ec') . '</li>';
|
820 |
echo '</ul>';
|
821 |
-
|
822 |
echo __('Page has associations the groups Free Time, Movie and Music', 'avh-ec');
|
823 |
echo '<ul>';
|
824 |
echo '<li>' . __('Widget 1: Shows categories of the Free Time group', 'avh-ec') . '</li>';
|
825 |
echo '<li>' . __('Widget 2: Shows categories of the Movie or Music group.', 'avh-ec') . '</li>';
|
826 |
echo '<li>' . __('Widget 3: Shows categories of the Music or Movie group.', 'avh-ec') . '</li>';
|
827 |
echo '</ul>';
|
828 |
-
|
829 |
echo __('Whether Widget 2 shows Movie or Music depends on the creation order of groups. If Widget 2 shows Movie, Widget 3 will show Music but if Widget 2 shows Music, Widget 3 will show Movie.', 'avh-ec') . '<br />';
|
830 |
echo '</div>';
|
831 |
-
|
832 |
}
|
833 |
|
834 |
function metaboxAnnouncements ()
|
@@ -1250,4 +1297,4 @@ class AVH_EC_Admin
|
|
1250 |
}
|
1251 |
}
|
1252 |
}
|
1253 |
-
?>
|
31 |
add_action('wp_ajax_delete-group', array(&$this, 'ajaxDeleteGroup'));
|
32 |
|
33 |
// Admin menu
|
34 |
+
add_action('admin_init', array(&$this,'actionAdminInit'));
|
35 |
add_action('admin_menu', array(&$this, 'actionAdminMenu'));
|
36 |
add_filter('plugin_action_links_extended-categories-widget/widget_extended_categories.php', array(&$this, 'filterPluginActions'), 10, 2);
|
37 |
|
58 |
$this->__construct();
|
59 |
}
|
60 |
|
61 |
+
function actionAdminInit() {
|
62 |
+
if (is_admin() && isset($_GET['taxonomy']) && 'category' == $_GET['taxonomy']) {
|
63 |
+
add_action($_GET['taxonomy'] . '_edit_form', array(&$this,'displayCategoryGroupForm'), 10, 2 );
|
64 |
+
add_action('edit_term', array(&$this,'handleEditTerm'), 10, 3 );
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
function displayCategoryGroupForm($term, $taxonomy){
|
69 |
+
|
70 |
+
$current_selection = '';
|
71 |
+
$tax_meta = get_option($this->core->db_options_tax_meta);
|
72 |
+
if ( isset($tax_meta[$taxonomy][$term->term_id]) ) {
|
73 |
+
$tax_meta = $tax_meta[$taxonomy][$term->term_id];
|
74 |
+
$current_selection = $tax_meta['category_group_term_id'];
|
75 |
+
}
|
76 |
+
|
77 |
+
if (empty($current_selection)) {
|
78 |
+
$current_selection=$this->catgrp->getGroupByCategoryID($term->term_id);
|
79 |
+
}
|
80 |
+
|
81 |
+
$cat_groups = get_terms($this->catgrp->taxonomy_name, array('hide_empty'=>FALSE));
|
82 |
+
foreach ($cat_groups as $group) {
|
83 |
+
$temp_cat = get_term($group->term_id, $this->catgrp->taxonomy_name, OBJECT, 'edit');
|
84 |
+
$dropdown_value[] = $group->term_id;
|
85 |
+
$dropdown_text[] = $temp_cat->name;
|
86 |
+
}
|
87 |
+
|
88 |
+
foreach ( $dropdown_value as $key => $sel) {
|
89 |
+
$seldata .= '<option value="' . $sel . '" ' . (($current_selection == $sel) ? 'selected="selected"' : '') . ' >' . ucfirst($dropdown_text[$key]) . '</option>' . "\n";
|
90 |
+
}
|
91 |
+
|
92 |
+
echo '<h3>AVH Extended Categories - Category Group Widget</h3>';
|
93 |
+
echo '<table class="form-table"><tbody>';
|
94 |
+
echo '<tr class="form-field">';
|
95 |
+
echo '<th valign="top" scope="row">';
|
96 |
+
echo '<label for="avhec_categorygroup">Category Group</label></th>';
|
97 |
+
echo '<td>';
|
98 |
+
echo '<select id="avhec_categorygroup" name="avhec_categorygroup">';
|
99 |
+
echo $seldata;
|
100 |
+
echo '</select>';
|
101 |
+
echo '<p class="description">Select the category group to show on the archive page.</p>';
|
102 |
+
echo '</td>';
|
103 |
+
echo '</tr>';
|
104 |
+
echo '</tbody></table>';
|
105 |
+
}
|
106 |
+
|
107 |
+
function handleEditTerm( $term_id, $tt_id, $taxonomy ) {
|
108 |
+
$tax_meta = get_option($this->core->db_options_tax_meta);
|
109 |
+
if ( isset($_POST['avhec_categorygroup']) && $tax_meta[$taxonomy][$term_id]['avhec_categorygroup'] != $_POST['avhec_categorygroup']) {
|
110 |
+
$tax_meta[$taxonomy][$term_id]['categorygroup'] = $_POST['avhec_categorygroup'];
|
111 |
+
update_option($this->core->db_options_tax_meta, $tax_meta);
|
112 |
+
}
|
113 |
+
}
|
114 |
/**
|
115 |
* When a category is created this function is called to add the new category to the group all
|
116 |
* @param $term_id
|
578 |
$dropdown_value[] = $group->term_id;
|
579 |
$dropdown_text[] = $temp_cat->name;
|
580 |
}
|
581 |
+
$options_special_pages[] = array('avhec_special_pages[sp][home_group]', __('Home page', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, sprintf(__('Select which category to show on the %s page.','avh-ec'),__('home','avhec')));
|
582 |
+
//$options_special_pages[] = array('avhec_special_pages[sp][category_group]', __('Category Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, sprintf(__('Select which category to show on the %s page.','avh-ec'),__('category archive','avhec')));
|
583 |
+
$options_special_pages[] = array('avhec_special_pages[sp][day_group]', __('Daily Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, sprintf(__('Select which category to show on the %s page.','avh-ec'),__('daily archive','avhec')));
|
584 |
+
$options_special_pages[] = array('avhec_special_pages[sp][month_group]', __('Monthly Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, sprintf(__('Select which category to show on the %s page.','avh-ec'),__('monthly archive','avhec')));
|
585 |
+
$options_special_pages[] = array('avhec_special_pages[sp][year_group]', __('Yearly Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, sprintf(__('Select which category to show on the %s page.','avh-ec'),__('yearly archive','avhec')));
|
586 |
+
$options_special_pages[] = array('avhec_special_pages[sp][author_group]', __('Author Archive', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, sprintf(__('Select which category to show on the %s page.','avh-ec'),__('author archive','avhec')));
|
587 |
+
$options_special_pages[] = array('avhec_special_pages[sp][search_group]', __('Search Page', 'avh-ec'), 'dropdown', $dropdown_value, $dropdown_text, sprintf(__('Select which category to show on the %s page.','avh-ec'),__('search','avhec')));
|
588 |
|
589 |
$data['sp'] = array('form'=>$options_special_pages, 'data'=>$data_special_pages);
|
590 |
|
830 |
*/
|
831 |
function metaboxFAQ ()
|
832 |
{
|
|
|
833 |
echo '<div class="p">';
|
834 |
echo '<span class="b">' . __('What about support?', 'avh-ec') . '</span><br />';
|
835 |
echo __('I created a support site at http://forums.avirtualhome.com where you can ask questions or request features.', 'avh-ec') . '<br />';
|
852 |
echo '<li>' . __('Movie', 'avh-ec') . '</li>';
|
853 |
echo '<li>' . __('Music', 'avh-ec') . '</li>';
|
854 |
echo '</ul>';
|
|
|
855 |
echo __('Setup several Category Group widgets and associated each widget with one or more groups.', 'avh-ec') . '<br />';
|
856 |
echo __('Widget 1 has association with Free Time', 'avh-ec') . '<br />';
|
857 |
echo __('Widget 2 has association with Theater, Movie and Music', 'avh-ec') . '<br />';
|
858 |
echo __('Widget 3 has association with Theater, Movie and Music', 'avh-ec') . '<br /><br />';
|
|
|
859 |
echo __('Page has associations the groups Free Time and Theater', 'avh-ec');
|
860 |
echo '<ul>';
|
861 |
echo '<li>' . __('Widget 1: Shows categories of the Free Time group', 'avh-ec') . '</li>';
|
862 |
echo '<li>' . __('Widget 2: Shows categories of the Theater group.', 'avh-ec') . '</li>';
|
863 |
echo '<li>' . __('Widget 3: Not displayed', 'avh-ec') . '</li>';
|
864 |
echo '</ul>';
|
|
|
865 |
echo __('Page has associations the group Movie.', 'avh-ec');
|
866 |
echo '<ul>';
|
867 |
echo '<li>' . __('Widget 1: Not displayed', 'avh-ec') . '</li>';
|
868 |
echo '<li>' . __('Widget 2: Shows categories of the Movie group.', 'avh-ec') . '</li>';
|
869 |
echo '<li>' . __('Widget 3: Not displayed', 'avh-ec') . '</li>';
|
870 |
echo '</ul>';
|
|
|
871 |
echo __('Page has associations the groups Free Time, Movie and Music', 'avh-ec');
|
872 |
echo '<ul>';
|
873 |
echo '<li>' . __('Widget 1: Shows categories of the Free Time group', 'avh-ec') . '</li>';
|
874 |
echo '<li>' . __('Widget 2: Shows categories of the Movie or Music group.', 'avh-ec') . '</li>';
|
875 |
echo '<li>' . __('Widget 3: Shows categories of the Music or Movie group.', 'avh-ec') . '</li>';
|
876 |
echo '</ul>';
|
|
|
877 |
echo __('Whether Widget 2 shows Movie or Music depends on the creation order of groups. If Widget 2 shows Movie, Widget 3 will show Music but if Widget 2 shows Music, Widget 3 will show Movie.', 'avh-ec') . '<br />';
|
878 |
echo '</div>';
|
|
|
879 |
}
|
880 |
|
881 |
function metaboxAnnouncements ()
|
1297 |
}
|
1298 |
}
|
1299 |
}
|
1300 |
+
?>
|
2.8/class/avh-ec.category-group.php
CHANGED
@@ -111,7 +111,7 @@ class AVH_EC_Category_Group
|
|
111 |
*/
|
112 |
$labels = array('name'=>__('Category Groups', 'avh-ec'), 'singular_name'=>__('Category Group', 'avh-ec'), 'search_items'=>__('Search Category Groups', 'avh-ec'), 'popular_items'=>__('Popular Category Groups'), 'all_items'=>__('All Category Groups'), 'parent_item'=>__('Parent Category Group'), 'parent_item_colon'=>__('Parent Category Group:'), 'edit_item'=>__('Edit Category Group'), 'update_item'=>__('Update Category Group'), 'add_new_item'=>__('Add New Category Group'), 'new_item_name'=>__('New Category Group Name'));
|
113 |
$caps = array('manage_terms'=>null, 'edit_terms'=>null, 'delete_terms'=>null, 'assign_terms'=>'edit_posts');
|
114 |
-
register_taxonomy($this->taxonomy_name, array('post', 'page'), array('hierarchical'=>
|
115 |
|
116 |
}
|
117 |
|
@@ -321,6 +321,19 @@ class AVH_EC_Category_Group
|
|
321 |
return ($result);
|
322 |
}
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
/**
|
325 |
* Inserts a new group
|
326 |
*
|
111 |
*/
|
112 |
$labels = array('name'=>__('Category Groups', 'avh-ec'), 'singular_name'=>__('Category Group', 'avh-ec'), 'search_items'=>__('Search Category Groups', 'avh-ec'), 'popular_items'=>__('Popular Category Groups'), 'all_items'=>__('All Category Groups'), 'parent_item'=>__('Parent Category Group'), 'parent_item_colon'=>__('Parent Category Group:'), 'edit_item'=>__('Edit Category Group'), 'update_item'=>__('Update Category Group'), 'add_new_item'=>__('Add New Category Group'), 'new_item_name'=>__('New Category Group Name'));
|
113 |
$caps = array('manage_terms'=>null, 'edit_terms'=>null, 'delete_terms'=>null, 'assign_terms'=>'edit_posts');
|
114 |
+
register_taxonomy($this->taxonomy_name, array('post', 'page'), array('hierarchical'=>TRUE, 'labels'=>$labels, 'query_var'=>TRUE, 'rewrite'=>TRUE, 'show_in_nav_menus'=>FALSE, 'public'=>TRUE, 'show_ui'=>FALSE, 'capabilities'=>$caps));
|
115 |
|
116 |
}
|
117 |
|
321 |
return ($result);
|
322 |
}
|
323 |
|
324 |
+
function getGroupByCategoryID($category_id){
|
325 |
+
$return = $this->getTermIDBy('slug', 'none');
|
326 |
+
$cat_groups = get_terms($this->taxonomy_name, array('hide_empty'=>FALSE));
|
327 |
+
|
328 |
+
foreach ($cat_groups as $group) {
|
329 |
+
$cats = $this->getCategoriesFromGroup($group->term_id);
|
330 |
+
if ($group->slug != 'all' && in_array($category_id,$cats)) {
|
331 |
+
$return = $group->term_id;
|
332 |
+
break;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
return $return;
|
336 |
+
}
|
337 |
/**
|
338 |
* Inserts a new group
|
339 |
*
|
2.8/class/avh-ec.core.php
CHANGED
@@ -11,6 +11,8 @@ class AVH_EC_Core
|
|
11 |
var $default_options_category_group;
|
12 |
var $default_options_sp_category_group;
|
13 |
|
|
|
|
|
14 |
var $options;
|
15 |
|
16 |
/**
|
@@ -25,9 +27,10 @@ class AVH_EC_Core
|
|
25 |
*/
|
26 |
$catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
|
27 |
|
28 |
-
$this->version = '3.3.
|
29 |
$this->comment = '<!-- AVH Extended Categories version ' . $this->version . ' | http://blog.avirtualhome.com/wordpress-plugins/ -->';
|
30 |
$this->db_options_core = 'avhec';
|
|
|
31 |
|
32 |
add_action('init', array(&$this, 'handleInitializePlugin'), 10);
|
33 |
}
|
@@ -59,7 +62,7 @@ class AVH_EC_Core
|
|
59 |
$this->default_options_general = array('version'=>$this->version, 'dbversion'=>$db_version, 'alternative_name_select_category'=>'');
|
60 |
|
61 |
// Set the default category group options
|
62 |
-
$no_group_id = $catgrp->getTermIDBy('slug', '
|
63 |
$home_group_id = $catgrp->getTermIDBy('slug', 'home');
|
64 |
$default_group_id = $catgrp->getTermIDBy('slug', 'all');
|
65 |
$this->default_options_category_group = array('no_group'=>$no_group_id, 'home_group'=>$home_group_id, 'default_group'=>$default_group_id);
|
11 |
var $default_options_category_group;
|
12 |
var $default_options_sp_category_group;
|
13 |
|
14 |
+
var $db_options_tax_meta;
|
15 |
+
|
16 |
var $options;
|
17 |
|
18 |
/**
|
27 |
*/
|
28 |
$catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
|
29 |
|
30 |
+
$this->version = '3.3.5';
|
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';
|
34 |
|
35 |
add_action('init', array(&$this, 'handleInitializePlugin'), 10);
|
36 |
}
|
62 |
$this->default_options_general = array('version'=>$this->version, 'dbversion'=>$db_version, 'alternative_name_select_category'=>'');
|
63 |
|
64 |
// Set the default category group options
|
65 |
+
$no_group_id = $catgrp->getTermIDBy('slug', 'none');
|
66 |
$home_group_id = $catgrp->getTermIDBy('slug', 'home');
|
67 |
$default_group_id = $catgrp->getTermIDBy('slug', 'all');
|
68 |
$this->default_options_category_group = array('no_group'=>$no_group_id, 'home_group'=>$home_group_id, 'default_group'=>$default_group_id);
|
2.8/class/avh-ec.widgets.php
CHANGED
@@ -519,7 +519,13 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
|
|
519 |
* @var AVH_EC_Core
|
520 |
*/
|
521 |
var $core;
|
522 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
/**
|
524 |
* PHP 5 Constructor
|
525 |
*
|
@@ -527,6 +533,7 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
|
|
527 |
function __construct ()
|
528 |
{
|
529 |
$this->core = & AVH_EC_Singleton::getInstance('AVH_EC_Core');
|
|
|
530 |
|
531 |
$widget_ops = array('description'=>__("Shows grouped categories.", 'avh-ec'));
|
532 |
WP_Widget::__construct(FALSE, __('AVH Extended Category: Category Group'), $widget_ops);
|
@@ -555,7 +562,7 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
|
|
555 |
*/
|
556 |
function widget ($args, $instance)
|
557 |
{
|
558 |
-
global $post;
|
559 |
|
560 |
$catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
|
561 |
$options = $this->core->getOptions();
|
@@ -582,7 +589,17 @@ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
|
|
582 |
|
583 |
$toDisplay = FALSE;
|
584 |
if ($special_page != 'none') {
|
585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
586 |
if (! ($this->getWidgetDoneCatGroup($sp_category_group))) {
|
587 |
$row = get_term_by('id', $sp_category_group, $catgrp->taxonomy_name); // Returns FALSE when non-existance. (empty(FALSE)=TRUE)
|
588 |
$toDisplay = TRUE;
|
519 |
* @var AVH_EC_Core
|
520 |
*/
|
521 |
var $core;
|
522 |
+
|
523 |
+
/**
|
524 |
+
*
|
525 |
+
* @var AVH_EC_Category_Group
|
526 |
+
*/
|
527 |
+
var $catgrp;
|
528 |
+
|
529 |
/**
|
530 |
* PHP 5 Constructor
|
531 |
*
|
533 |
function __construct ()
|
534 |
{
|
535 |
$this->core = & AVH_EC_Singleton::getInstance('AVH_EC_Core');
|
536 |
+
$this->catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
|
537 |
|
538 |
$widget_ops = array('description'=>__("Shows grouped categories.", 'avh-ec'));
|
539 |
WP_Widget::__construct(FALSE, __('AVH Extended Category: Category Group'), $widget_ops);
|
562 |
*/
|
563 |
function widget ($args, $instance)
|
564 |
{
|
565 |
+
global $post, $wp_query;
|
566 |
|
567 |
$catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
|
568 |
$options = $this->core->getOptions();
|
589 |
|
590 |
$toDisplay = FALSE;
|
591 |
if ($special_page != 'none') {
|
592 |
+
if ('category_group' == $special_page) {
|
593 |
+
$tax_meta = get_option($this->core->db_options_tax_meta);
|
594 |
+
$term = $wp_query->get_queried_object();
|
595 |
+
if (isset($tax_meta[$term->term_id][$term->taxonomy]['categorygroup'])) {
|
596 |
+
$sp_category_group = $tax_meta[$term->term_id][$term->taxonomy]['categorygroup'];
|
597 |
+
} else {
|
598 |
+
$sp_category_group=$this->catgrp->getGroupByCategoryID($term->term_id);
|
599 |
+
}
|
600 |
+
} else {
|
601 |
+
$sp_category_group = $options['sp_cat_group'][$special_page];
|
602 |
+
}
|
603 |
if (! ($this->getWidgetDoneCatGroup($sp_category_group))) {
|
604 |
$row = get_term_by('id', $sp_category_group, $catgrp->taxonomy_name); // Returns FALSE when non-existance. (empty(FALSE)=TRUE)
|
605 |
$toDisplay = TRUE;
|
2.8/css/avh-ec.admin.css
CHANGED
@@ -55,6 +55,17 @@ table.avhec-options {
|
|
55 |
font-size: 11px;
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/* Metabox Donations*/
|
59 |
#avhecBoxDonations .inside {
|
60 |
font-size: 12px;
|
55 |
font-size: 11px;
|
56 |
}
|
57 |
|
58 |
+
/* Metabox FAQ */
|
59 |
+
#avhecBoxFAQ .inside ul {
|
60 |
+
font-size: 11px;
|
61 |
+
margin-bottom: 6px;
|
62 |
+
}
|
63 |
+
#avhecBoxFAQ .inside ul li{
|
64 |
+
line-height: 120%;
|
65 |
+
list-style: disc inside none;
|
66 |
+
margin-bottom: 0;
|
67 |
+
}
|
68 |
+
|
69 |
/* Metabox Donations*/
|
70 |
#avhecBoxDonations .inside {
|
71 |
font-size: 12px;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.3.
|
8 |
|
9 |
The AVH Extended Categories Widgets gives you three widgets for displaying categories.
|
10 |
== Description ==
|
@@ -133,6 +133,9 @@ Whether Widget 2 shows Movie or Music depends on the creation order of groups. I
|
|
133 |
None
|
134 |
|
135 |
== Changelog ==
|
|
|
|
|
|
|
136 |
= Version 3.3.4 =
|
137 |
* Bugfix: Problem with initializing the plugin.
|
138 |
|
4 |
Tags: extended, categories, widget, top categories
|
5 |
Requires at least: 2.3
|
6 |
Tested up to: 3.1
|
7 |
+
Stable tag: 3.3.5
|
8 |
|
9 |
The AVH Extended Categories Widgets gives you three widgets for displaying categories.
|
10 |
== Description ==
|
133 |
None
|
134 |
|
135 |
== Changelog ==
|
136 |
+
= Version 3.3.5 =
|
137 |
+
* Bugfix: Category Groups would be created every time you saved a post.
|
138 |
+
|
139 |
= Version 3.3.4 =
|
140 |
* Bugfix: Problem with initializing the plugin.
|
141 |
|
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.3.
|
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.3.5';
|
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.3.
|
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.3.5
|
7 |
Author: Peter van der Does
|
8 |
Author URI: http://blog.avirtualhome.com/
|
9 |
|