All-in-One Video Gallery - Version 2.5.2

Version Description

  • Fix: Ajax Pagination not working when a page contains multiple galleries.
Download this release

Release Info

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

Code changes from version 2.5.1 to 2.5.2

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.9
8
  Requires PHP: 5.6.20
9
- Stable tag: 2.5.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -136,6 +136,10 @@ Yes, it is. However, do not "network-activate" the plugin. Activate it only on t
136
 
137
  == Changelog ==
138
 
 
 
 
 
139
  = 2.5.1 =
140
 
141
  * New: Ajax Pagination.
@@ -248,6 +252,6 @@ For the changelog of earlier versions, please refer to the [changelog on plugins
248
 
249
  == Upgrade Notice ==
250
 
251
- = 2.5.1 =
252
 
253
- 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.9
8
  Requires PHP: 5.6.20
9
+ Stable tag: 2.5.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
136
 
137
  == Changelog ==
138
 
139
+ = 2.5.2 =
140
+
141
+ * Fix: Ajax Pagination not working when a page contains multiple galleries.
142
+
143
  = 2.5.1 =
144
 
145
  * New: Ajax Pagination.
252
 
253
  == Upgrade Notice ==
254
 
255
+ = 2.5.2 =
256
 
257
+ Fix: Ajax Pagination not working when a page contains multiple galleries. [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: 2.5.1
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', '2.5.1' );
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: 2.5.2
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', '2.5.2' );
80
  }
81
  // The unique identifier of the plugin
82
  if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
public/assets/js/public.js CHANGED
@@ -99,7 +99,7 @@
99
  $gallery.html( $( response.data.html ).html() ).trigger( 'AIOVG.onGalleryUpdated' );
100
 
101
  $( 'html, body' ).animate({
102
- scrollTop: $gallery.offset().top - 20
103
  }, 500);
104
  } else {
105
  $pagination.removeClass( 'aiovg-spinner' );
99
  $gallery.html( $( response.data.html ).html() ).trigger( 'AIOVG.onGalleryUpdated' );
100
 
101
  $( 'html, body' ).animate({
102
+ scrollTop: $gallery.offset().top - aiovg_public.pagination_top_offset
103
  }, 500);
104
  } else {
105
  $pagination.removeClass( 'aiovg-spinner' );
public/categories.php CHANGED
@@ -188,14 +188,15 @@ class AIOVG_Public_Categories {
188
  foreach ( $section['fields'] as $field ) {
189
  $this->defaults[ $field['name'] ] = $field['value'];
190
  }
191
- }
192
 
193
- $this->defaults['uid'] = aiovg_get_uniqid();
194
  $this->defaults['source'] = 'categories';
195
  $this->defaults['count'] = 0;
196
  $this->defaults['paged'] = aiovg_get_page_number();
197
  $this->defaults['pagination_ajax'] = isset( $pagination_settings['ajax'] ) && ! empty( $pagination_settings['ajax'] ) ? 1 : 0;
198
  }
 
 
199
 
200
  return $this->defaults;
201
  }
188
  foreach ( $section['fields'] as $field ) {
189
  $this->defaults[ $field['name'] ] = $field['value'];
190
  }
191
+ }
192
 
 
193
  $this->defaults['source'] = 'categories';
194
  $this->defaults['count'] = 0;
195
  $this->defaults['paged'] = aiovg_get_page_number();
196
  $this->defaults['pagination_ajax'] = isset( $pagination_settings['ajax'] ) && ! empty( $pagination_settings['ajax'] ) ? 1 : 0;
197
  }
198
+
199
+ $this->defaults['uid'] = aiovg_get_uniqid();
200
 
201
  return $this->defaults;
202
  }
public/public.php CHANGED
@@ -235,13 +235,16 @@ class AIOVG_Public {
235
  AIOVG_PLUGIN_VERSION,
236
  false
237
  );
 
 
238
 
239
  wp_localize_script(
240
  AIOVG_PLUGIN_SLUG . '-public',
241
  'aiovg_public',
242
  array(
243
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
244
- 'ajax_nonce' => wp_create_nonce( 'aiovg_ajax_nonce' )
 
245
  )
246
  );
247
  }
235
  AIOVG_PLUGIN_VERSION,
236
  false
237
  );
238
+
239
+ $pagination_top_offset = apply_filters( 'aiovg_pagination_top_offset', 20 );
240
 
241
  wp_localize_script(
242
  AIOVG_PLUGIN_SLUG . '-public',
243
  'aiovg_public',
244
  array(
245
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
246
+ 'ajax_nonce' => wp_create_nonce( 'aiovg_ajax_nonce' ),
247
+ 'pagination_top_offset' => $pagination_top_offset
248
  )
249
  );
250
  }
public/templates/category-thumbnail.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  $permalink = aiovg_get_category_page_url( $term );
13
  $image_id = get_term_meta( $term->term_id, 'image_id', true );
14
- $image = aiovg_get_image_url( $image_id, 'medium' );
15
  $image_alt = get_post_meta( (int) $image_id, '_wp_attachment_image_alt', true );
16
  if ( empty( $image_alt ) ) {
17
  $image_alt = $term->name;
11
 
12
  $permalink = aiovg_get_category_page_url( $term );
13
  $image_id = get_term_meta( $term->term_id, 'image_id', true );
14
+ $image = aiovg_get_image_url( $image_id, 'large' );
15
  $image_alt = get_post_meta( (int) $image_id, '_wp_attachment_image_alt', true );
16
  if ( empty( $image_alt ) ) {
17
  $image_alt = $term->name;
public/templates/video-thumbnail-image-left.php CHANGED
@@ -10,7 +10,7 @@
10
  */
11
 
12
  $post_meta = get_post_meta( $post->ID );
13
- $image = aiovg_get_image_url( $post_meta['image_id'][0], 'medium', $post_meta['image'][0] );
14
  $image_alt = get_post_meta( (int) $post_meta['image_id'][0], '_wp_attachment_image_alt', true );
15
  if ( empty( $image_alt ) ) {
16
  $image_alt = $post->post_title;
10
  */
11
 
12
  $post_meta = get_post_meta( $post->ID );
13
+ $image = aiovg_get_image_url( $post_meta['image_id'][0], 'large', $post_meta['image'][0] );
14
  $image_alt = get_post_meta( (int) $post_meta['image_id'][0], '_wp_attachment_image_alt', true );
15
  if ( empty( $image_alt ) ) {
16
  $image_alt = $post->post_title;
public/templates/video-thumbnail.php CHANGED
@@ -10,7 +10,7 @@
10
  */
11
 
12
  $post_meta = get_post_meta( $post->ID );
13
- $image = aiovg_get_image_url( $post_meta['image_id'][0], 'medium', $post_meta['image'][0] );
14
  $image_alt = get_post_meta( (int) $post_meta['image_id'][0], '_wp_attachment_image_alt', true );
15
  if ( empty( $image_alt ) ) {
16
  $image_alt = $post->post_title;
10
  */
11
 
12
  $post_meta = get_post_meta( $post->ID );
13
+ $image = aiovg_get_image_url( $post_meta['image_id'][0], 'large', $post_meta['image'][0] );
14
  $image_alt = get_post_meta( (int) $post_meta['image_id'][0], '_wp_attachment_image_alt', true );
15
  if ( empty( $image_alt ) ) {
16
  $image_alt = $post->post_title;
public/videos.php CHANGED
@@ -28,7 +28,7 @@ class AIOVG_Public_Videos {
28
  * @access protected
29
  * @var array $defaults An associative array of defaults.
30
  */
31
- protected $defaults;
32
 
33
  /**
34
  * Get things started.
@@ -431,14 +431,15 @@ class AIOVG_Public_Videos {
431
  if ( 'orderby' == $field['name'] || 'order' == $field['name'] ) {
432
  $this->defaults[ 'categories_' . $field['name'] ] = $field['value'];
433
  }
434
- }
435
 
436
- $this->defaults['uid'] = aiovg_get_uniqid();
437
  $this->defaults['source'] = 'videos';
438
  $this->defaults['count'] = 0;
439
  $this->defaults['paged'] = aiovg_get_page_number();
440
  $this->defaults['pagination_ajax'] = isset( $pagination_settings['ajax'] ) && ! empty( $pagination_settings['ajax'] ) ? 1 : 0;
441
  }
 
 
442
 
443
  return $this->defaults;
444
  }
28
  * @access protected
29
  * @var array $defaults An associative array of defaults.
30
  */
31
+ protected $defaults = array();
32
 
33
  /**
34
  * Get things started.
431
  if ( 'orderby' == $field['name'] || 'order' == $field['name'] ) {
432
  $this->defaults[ 'categories_' . $field['name'] ] = $field['value'];
433
  }
434
+ }
435
 
 
436
  $this->defaults['source'] = 'videos';
437
  $this->defaults['count'] = 0;
438
  $this->defaults['paged'] = aiovg_get_page_number();
439
  $this->defaults['pagination_ajax'] = isset( $pagination_settings['ajax'] ) && ! empty( $pagination_settings['ajax'] ) ? 1 : 0;
440
  }
441
+
442
+ $this->defaults['uid'] = aiovg_get_uniqid();
443
 
444
  return $this->defaults;
445
  }