AVH Extended Categories Widgets - Version 3.6.4

Version Description

Download this release

Release Info

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

Code changes from version 3.6.3 to 3.6.4

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.6.3';
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.6.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';
3.3/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.6.3';
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';
@@ -324,16 +324,21 @@ class AVH_EC_Core
324
  {
325
  $mywalker = new AVH_Walker_CategoryDropdown();
326
 
327
- $defaults = array ( 'show_option_all' => '', 'show_option_none' => '',
328
- 'orderby' => 'id', 'order' => 'ASC',
329
- 'show_last_update' => 0, 'show_count' => 0,
330
- 'hide_empty' => 1, 'child_of' => 0,
331
- 'exclude' => '', 'echo' => 1,
332
- 'selected' => 0, 'hierarchical' => 0,
333
- 'name' => 'cat', 'class' => 'postform',
334
- 'depth' => 0, 'tab_index' => 0,
335
- 'walker' => $mywalker );
336
-
 
 
 
 
 
337
  $defaults['selected'] = (is_category()) ? get_query_var('cat') : 0;
338
 
339
  $r = wp_parse_args($args, $defaults);
@@ -349,14 +354,21 @@ class AVH_EC_Core
349
  if ((int) $tab_index > 0)
350
  $tab_index_attribute = ' tabindex="' . $tab_index . '"';
351
 
352
- $categories = get_terms( $taxonomy, $r );
353
  $name = esc_attr($name);
354
  $class = esc_attr($class);
355
- $id = $id ? esc_attr( $id ) : $name;
356
 
357
- $output = '';
 
 
 
 
 
 
 
 
358
  if (! empty($categories)) {
359
- $output = '<select name="' . $name . '" id="' . $id . '" class="' . $class . '" ' . $tab_index_attribute . '>' . "\n";
360
 
361
  if ($show_option_all) {
362
  $show_option_all = apply_filters('list_cats', $show_option_all);
@@ -376,8 +388,9 @@ class AVH_EC_Core
376
  $depth = - 1; // Flat
377
  }
378
  $output .= walk_category_dropdown_tree($categories, $depth, $r);
379
- $output .= "</select>\n";
380
  }
 
 
381
 
382
  $output = apply_filters('wp_dropdown_cats', $output);
383
 
27
  */
28
  $catgrp = & AVH_EC_Singleton::getInstance('AVH_EC_Category_Group');
29
 
30
+ $this->version = '3.6.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';
324
  {
325
  $mywalker = new AVH_Walker_CategoryDropdown();
326
 
327
+ // @format_off
328
+ $defaults = array(
329
+ 'show_option_all' => '', 'show_option_none' => '',
330
+ 'orderby' => 'id', 'order' => 'ASC',
331
+ 'show_last_update' => 0, 'show_count' => 0,
332
+ 'hide_empty' => 1, 'child_of' => 0,
333
+ 'exclude' => '', 'echo' => 1,
334
+ 'selected' => 0, 'hierarchical' => 0,
335
+ 'name' => 'cat', 'id' => '',
336
+ 'class' => 'postform', 'depth' => 0,
337
+ 'tab_index' => 0, 'taxonomy' => 'category',
338
+ 'walker' => $mywalker,
339
+ 'hide_if_empty' => false
340
+ );
341
+ // @format_on
342
  $defaults['selected'] = (is_category()) ? get_query_var('cat') : 0;
343
 
344
  $r = wp_parse_args($args, $defaults);
354
  if ((int) $tab_index > 0)
355
  $tab_index_attribute = ' tabindex="' . $tab_index . '"';
356
 
357
+ $categories = get_terms($taxonomy, $r);
358
  $name = esc_attr($name);
359
  $class = esc_attr($class);
360
+ $id = $id ? esc_attr($id) : $name;
361
 
362
+ if (! $r['hide_if_empty'] || ! empty($categories))
363
+ $output = "<select name='$name' id='$id' class='$class' $tab_index_attribute>\n";
364
+ else
365
+ $output = '';
366
+
367
+ if (empty($categories) && ! $r['hide_if_empty'] && ! empty($show_option_none)) {
368
+ $show_option_none = apply_filters('list_cats', $show_option_none);
369
+ $output .= "\t<option value='-1' selected='selected'>$show_option_none</option>\n";
370
+ }
371
  if (! empty($categories)) {
 
372
 
373
  if ($show_option_all) {
374
  $show_option_all = apply_filters('list_cats', $show_option_all);
388
  $depth = - 1; // Flat
389
  }
390
  $output .= walk_category_dropdown_tree($categories, $depth, $r);
 
391
  }
392
+ if (! $r['hide_if_empty'] || ! empty($categories))
393
+ $output .= "</select>\n";
394
 
395
  $output = apply_filters('wp_dropdown_cats', $output);
396
 
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.3
7
- Stable tag: 3.6.3
8
 
9
  The AVH Extended Categories Widgets gives you three widgets for displaying categories.
10
  == Description ==
@@ -134,6 +134,9 @@ Whether Widget 2 shows Movie or Music depends on the creation order of groups. I
134
  None
135
 
136
  == Changelog ==
 
 
 
137
  = Version 3.6.3 =
138
  * Bugfix: Problem with url's on Windows platform.
139
 
4
  Tags: extended, categories, widget, top categories
5
  Requires at least: 2.3
6
  Tested up to: 3.3
7
+ Stable tag: 3.6.4
8
 
9
  The AVH Extended Categories Widgets gives you three widgets for displaying categories.
10
  == Description ==
134
  None
135
 
136
  == Changelog ==
137
+ = Version 3.6.4 =
138
+ * Bugfix: Problem with categories not showing up when showing dropdown categories.
139
+
140
  = Version 3.6.3 =
141
  * Bugfix: Problem with url's on Windows platform.
142
 
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.6.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.6.4';
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.6.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.6.4
7
  Author: Peter van der Does
8
  Author URI: http://blog.avirtualhome.com/
9