All-in-One Video Gallery - Version 1.5.4

Version Description

  • Fix: Unfortunately, there were some bugs in the 1.5.3 release and this is an immediate release which addresses those issues.
Download this release

Release Info

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

Code changes from version 1.5.3 to 1.5.4

README.txt CHANGED
@@ -6,7 +6,7 @@ Tags: video, player, gallery, logo, watermark, gdpr, mp4, webm, ogv, youtube, vi
6
  Requires at least: 4.4.0
7
  Tested up to: 4.9
8
  Requires PHP: 5.3.0
9
- Stable tag: 1.5.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -84,6 +84,10 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
84
 
85
  == Changelog ==
86
 
 
 
 
 
87
  = 1.5.3 =
88
 
89
  * New: Custom Logo & Branding.
@@ -128,6 +132,10 @@ Most likely rewrite rules were not registered properly for some reason. Go to "W
128
 
129
  == Upgrade Notice ==
130
 
 
 
 
 
131
  = 1.5.3 =
132
 
133
  * New: Custom Logo & Branding.
6
  Requires at least: 4.4.0
7
  Tested up to: 4.9
8
  Requires PHP: 5.3.0
9
+ Stable tag: 1.5.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
84
 
85
  == Changelog ==
86
 
87
+ = 1.5.4 =
88
+
89
+ * Fix: Unfortunately, there were some bugs in the 1.5.3 release and this is an immediate release which addresses those issues.
90
+
91
  = 1.5.3 =
92
 
93
  * New: Custom Logo & Branding.
132
 
133
  == Upgrade Notice ==
134
 
135
+ = 1.5.4 =
136
+
137
+ * Fix: Unfortunately, there were some bugs in the 1.5.3 release and this is an immediate release which addresses those issues.
138
+
139
  = 1.5.3 =
140
 
141
  * New: Custom Logo & Branding.
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: Responsive & Lightweight Video gallery plugin. No coding required. Add/Manage videos through a dedicated custom post interface, group them by categories, customize the front-end display using the shortcode builder as you need, provide the option for users to search videos, plus everything you will need to build a YouTube/Vimeo like video sharing website.
14
- * Version: 1.5.3
15
  * Author: Team Plugins360
16
  * License: GPL-2.0+
17
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
26
 
27
  // The current version of the plugin
28
  if ( ! defined( 'AIOVG_PLUGIN_VERSION' ) ) {
29
- define( 'AIOVG_PLUGIN_VERSION', '1.5.3' );
30
  }
31
 
32
  // The unique identifier of the plugin
11
  * Plugin Name: All-in-One Video Gallery
12
  * Plugin URI: https://plugins360.com/all-in-one-video-gallery/
13
  * Description: Responsive & Lightweight Video gallery plugin. No coding required. Add/Manage videos through a dedicated custom post interface, group them by categories, customize the front-end display using the shortcode builder as you need, provide the option for users to search videos, plus everything you will need to build a YouTube/Vimeo like video sharing website.
14
+ * Version: 1.5.4
15
  * Author: Team Plugins360
16
  * License: GPL-2.0+
17
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
26
 
27
  // The current version of the plugin
28
  if ( ! defined( 'AIOVG_PLUGIN_VERSION' ) ) {
29
+ define( 'AIOVG_PLUGIN_VERSION', '1.5.4' );
30
  }
31
 
32
  // The unique identifier of the plugin
public/class-aiovg-public-video.php CHANGED
@@ -70,16 +70,35 @@ class AIOVG_Public_Video {
70
 
71
  if ( ! empty( $atts['id'] ) ) {
72
  $post_id = (int) $atts['id'];
73
- } elseif ( empty( $atts['id'] ) ) {
74
- $query = array(
75
- 'post_type' => 'aiovg_videos',
76
- 'post_status' => 'publish',
77
- 'posts_per_page' => 1,
78
- 'fields' => 'ids'
79
- );
80
- $ids = get_posts( $query );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
- $post_id = ! empty( $ids ) ? $ids[0] : 0;
83
  }
84
 
85
  // Enqueue dependencies
70
 
71
  if ( ! empty( $atts['id'] ) ) {
72
  $post_id = (int) $atts['id'];
73
+ } else {
74
+
75
+ $supported_formats = array( 'mp4', 'webm', 'ogv', 'youtube', 'vimeo', 'dailymotion', 'facebook', 'dash', 'hls' );
76
+ $is_video_available = 0;
77
+
78
+ foreach ( $supported_formats as $format ) {
79
+
80
+ if ( array_key_exists( $format, $atts ) ) {
81
+ $is_video_available = 1;
82
+ }
83
+
84
+ }
85
+
86
+ if ( 0 == $is_video_available ) {
87
+
88
+ $query = array(
89
+ 'post_type' => 'aiovg_videos',
90
+ 'post_status' => 'publish',
91
+ 'posts_per_page' => 1,
92
+ 'fields' => 'ids'
93
+
94
+ );
95
+
96
+ $ids = get_posts( $query );
97
+
98
+ $post_id = ! empty( $ids ) ? $ids[0] : 0;
99
+
100
+ }
101
 
 
102
  }
103
 
104
  // Enqueue dependencies