All-in-One Video Gallery - Version 1.6.7

Version Description

  • Fix: Subcategories showing when 'hierarchical' disabled.
Download this release

Release Info

Developer plugins360
Plugin Icon 128x128 All-in-One Video Gallery
Version 1.6.7
Comparing to
See all releases

Code changes from version 1.6.6 to 1.6.7

README.txt CHANGED
@@ -6,7 +6,7 @@ Tags: video player, video gallery, youtube gallery, vimeo gallery, livestream
6
  Requires at least: 4.7.0
7
  Tested up to: 5.3
8
  Requires PHP: 5.3.0
9
- Stable tag: 1.6.6
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -110,6 +110,10 @@ Please describe your issue and submit a ticket on our plugin support forum, you
110
 
111
  == Changelog ==
112
 
 
 
 
 
113
  = 1.6.6 =
114
 
115
  * Tweak: Updated Freemius SDK (2.3.1).
@@ -238,6 +242,6 @@ Please describe your issue and submit a ticket on our plugin support forum, you
238
 
239
  == Upgrade Notice ==
240
 
241
- = 1.6.6 =
242
 
243
  Introduces several bug fixes, new features & enhancements. [See changelog](https://wordpress.org/plugins/all-in-one-video-gallery/#developers)
6
  Requires at least: 4.7.0
7
  Tested up to: 5.3
8
  Requires PHP: 5.3.0
9
+ Stable tag: 1.6.7
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
110
 
111
  == Changelog ==
112
 
113
+ = 1.6.7 =
114
+
115
+ * Fix: Subcategories showing when 'hierarchical' disabled.
116
+
117
  = 1.6.6 =
118
 
119
  * Tweak: Updated Freemius SDK (2.3.1).
242
 
243
  == Upgrade Notice ==
244
 
245
+ = 1.6.7 =
246
 
247
  Introduces several bug fixes, new features & enhancements. [See changelog](https://wordpress.org/plugins/all-in-one-video-gallery/#developers)
all-in-one-video-gallery.php CHANGED
@@ -11,7 +11,7 @@
11
  * Plugin Name: All-in-One Video Gallery
12
  * Plugin URI: https://plugins360.com/all-in-one-video-gallery/
13
  * Description: No coding required. A Responsive & Lightweight video gallery plugin. HTML5 Player, Categories, Visual Builder (Gutenberg), Search Form, Comments, Social Sharing and everything you will need to build a YouTube/Vimeo like video sharing website.
14
- * Version: 1.6.6
15
  * Author: Team Plugins360
16
  * Author URI: https://plugins360.com
17
  * License: GPL-2.0+
@@ -76,7 +76,7 @@ if ( !function_exists( 'aiovg_fs' ) ) {
76
 
77
  // The current version of the plugin
78
  if ( !defined( 'AIOVG_PLUGIN_VERSION' ) ) {
79
- define( 'AIOVG_PLUGIN_VERSION', '1.6.6' );
80
  }
81
  // The unique identifier of the plugin
82
  if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
11
  * Plugin Name: All-in-One Video Gallery
12
  * Plugin URI: https://plugins360.com/all-in-one-video-gallery/
13
  * Description: No coding required. A Responsive & Lightweight video gallery plugin. HTML5 Player, Categories, Visual Builder (Gutenberg), Search Form, Comments, Social Sharing and everything you will need to build a YouTube/Vimeo like video sharing website.
14
+ * Version: 1.6.7
15
  * Author: Team Plugins360
16
  * Author URI: https://plugins360.com
17
  * License: GPL-2.0+
76
 
77
  // The current version of the plugin
78
  if ( !defined( 'AIOVG_PLUGIN_VERSION' ) ) {
79
+ define( 'AIOVG_PLUGIN_VERSION', '1.6.7' );
80
  }
81
  // The unique identifier of the plugin
82
  if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
public/categories.php CHANGED
@@ -62,14 +62,13 @@ class AIOVG_Public_Categories {
62
  'orderby' => sanitize_text_field( $attributes['orderby'] ),
63
  'order' => sanitize_text_field( $attributes['order'] ),
64
  'hide_empty' => (int) $attributes['hide_empty'],
65
- 'hierarchical' => true,
66
- 'pad_counts' => true
67
  );
68
 
69
  if ( ! empty( $attributes['include'] ) ) { // Include category IDs
70
  $args['include'] = array_map( 'intval', explode( ',', $attributes['include'] ) );
71
  } else {
72
- $args['child_of'] = (int) $attributes['id'];
73
  }
74
 
75
  $terms = get_terms( 'aiovg_categories', $args );
@@ -97,7 +96,11 @@ class AIOVG_Public_Categories {
97
  if ( ! empty( $attributes['include'] ) ) { // Include category IDs
98
  $args['include'] = array_map( 'intval', explode( ',', $attributes['include'] ) );
99
  } else {
100
- $args['child_of'] = (int) $attributes['id'];
 
 
 
 
101
  }
102
 
103
  $categories_li = wp_list_categories( $args );
62
  'orderby' => sanitize_text_field( $attributes['orderby'] ),
63
  'order' => sanitize_text_field( $attributes['order'] ),
64
  'hide_empty' => (int) $attributes['hide_empty'],
65
+ 'hierarchical' => false
 
66
  );
67
 
68
  if ( ! empty( $attributes['include'] ) ) { // Include category IDs
69
  $args['include'] = array_map( 'intval', explode( ',', $attributes['include'] ) );
70
  } else {
71
+ $args['parent'] = (int) $attributes['id'];
72
  }
73
 
74
  $terms = get_terms( 'aiovg_categories', $args );
96
  if ( ! empty( $attributes['include'] ) ) { // Include category IDs
97
  $args['include'] = array_map( 'intval', explode( ',', $attributes['include'] ) );
98
  } else {
99
+ if ( $args['hierarchical'] ) {
100
+ $args['child_of'] = (int) $attributes['id'];
101
+ } else {
102
+ $args['parent'] = (int) $attributes['id'];
103
+ }
104
  }
105
 
106
  $categories_li = wp_list_categories( $args );
widgets/categories.php CHANGED
@@ -121,7 +121,6 @@ class AIOVG_Widget_Categories extends WP_Widget {
121
  } else {
122
  $query = array(
123
  'taxonomy' => 'aiovg_categories',
124
- 'child_of' => (int) $attributes['id'],
125
  'orderby' => sanitize_text_field( $attributes['orderby'] ),
126
  'order' => sanitize_text_field( $attributes['order'] ),
127
  'hide_empty' => (int) $attributes['hide_empty'],
@@ -131,6 +130,12 @@ class AIOVG_Widget_Categories extends WP_Widget {
131
  'title_li' => '',
132
  'echo' => 0
133
  );
 
 
 
 
 
 
134
 
135
  $categories_li = wp_list_categories( $query );
136
 
121
  } else {
122
  $query = array(
123
  'taxonomy' => 'aiovg_categories',
 
124
  'orderby' => sanitize_text_field( $attributes['orderby'] ),
125
  'order' => sanitize_text_field( $attributes['order'] ),
126
  'hide_empty' => (int) $attributes['hide_empty'],
130
  'title_li' => '',
131
  'echo' => 0
132
  );
133
+
134
+ if ( $query['hierarchical'] ) {
135
+ $query['child_of'] = (int) $attributes['id'];
136
+ } else {
137
+ $query['parent'] = (int) $attributes['id'];
138
+ }
139
 
140
  $categories_li = wp_list_categories( $query );
141