All-in-One Video Gallery - Version 2.5.5

Version Description

  • New: Introduces an option to exclude video description when auto-importing videos from YouTube.
  • Tweak: The video select field in the "AIOVG - Video Player" widget has been replaced by a jQuery Autocomplete UI.
Download this release

Release Info

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

Code changes from version 2.5.4 to 2.5.5

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.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -136,6 +136,11 @@ Yes, it is. However, do not "network-activate" the plugin. Activate it only on t
136
 
137
  == Changelog ==
138
 
 
 
 
 
 
139
  = 2.5.4 =
140
 
141
  * Security Fix.
@@ -257,10 +262,4 @@ Fix: Updates to the latest Vimeo Image URLs.
257
 
258
  = EARLIER VERSIONS =
259
 
260
- For the changelog of earlier versions, please refer to the [changelog on plugins360.com](https://plugins360.com/all-in-one-video-gallery/changelog/).
261
-
262
- == Upgrade Notice ==
263
-
264
- = 2.5.4 =
265
-
266
- Security Fix. [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.5
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.5 =
140
+
141
+ * New: Introduces an option to exclude video description when auto-importing videos from YouTube.
142
+ * Tweak: The video select field in the "AIOVG - Video Player" widget has been replaced by a jQuery Autocomplete UI.
143
+
144
  = 2.5.4 =
145
 
146
  * Security Fix.
262
 
263
  = EARLIER VERSIONS =
264
 
265
+ For the changelog of earlier versions, please refer to the [changelog on plugins360.com](https://plugins360.com/all-in-one-video-gallery/changelog/).
 
 
 
 
 
 
admin/admin.php CHANGED
@@ -531,9 +531,11 @@ class AIOVG_Admin {
531
  'ajax_nonce' => wp_create_nonce( 'aiovg_ajax_nonce' ),
532
  'site_url' => esc_url_raw( get_site_url() ),
533
  'i18n' => array(
534
- 'copied' => __( 'Copied', 'all-in-one-video-gallery' ),
535
- 'no_issues_slected' => __( 'Please select at least one issue.', 'all-in-one-video-gallery' ),
536
- 'quality_exists' => __( 'Sorry, there is already a video with this quality level.', 'all-in-one-video-gallery' )
 
 
537
  )
538
  )
539
  );
531
  'ajax_nonce' => wp_create_nonce( 'aiovg_ajax_nonce' ),
532
  'site_url' => esc_url_raw( get_site_url() ),
533
  'i18n' => array(
534
+ 'copied' => __( 'Copied', 'all-in-one-video-gallery' ),
535
+ 'no_issues_selected' => __( 'Please select at least one issue.', 'all-in-one-video-gallery' ),
536
+ 'no_video_selected' => __( 'No video was selected. The last added video will be displayed.', 'all-in-one-video-gallery' ),
537
+ 'quality_exists' => __( 'Sorry, there is already a video with this quality level.', 'all-in-one-video-gallery' ),
538
+ 'remove' => __( 'Remove', 'all-in-one-video-gallery' ),
539
  )
540
  )
541
  );
admin/assets/css/admin.css CHANGED
@@ -638,3 +638,7 @@ table.aiovg-table .aiovg-handle {
638
  .aiovg-widget-form-videos .aiovg-widget-field-show_pagination {
639
  display: none;
640
  }
 
 
 
 
638
  .aiovg-widget-form-videos .aiovg-widget-field-show_pagination {
639
  display: none;
640
  }
641
+
642
+ .aiovg-widget-form-video input[type="text"].ui-autocomplete-loading {
643
+ background-position: 99% center;
644
+ }
admin/assets/js/admin.js CHANGED
@@ -103,8 +103,67 @@
103
  }
104
  }
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  function on_aiovg_widget_update( event, widget ) {
107
  aiovg_widget_color_picker( widget );
 
108
  }
109
 
110
  /**
@@ -258,7 +317,7 @@
258
  });
259
 
260
  if ( ! has_input ) {
261
- alert( aiovg_admin.i18n.no_issues_slected );
262
  return false;
263
  }
264
  });
@@ -457,6 +516,11 @@
457
  aiovg_widget_color_picker( $( this ) );
458
  });
459
 
 
 
 
 
 
460
  $( document ).on( 'widget-added widget-updated', on_aiovg_widget_update );
461
 
462
  });
103
  }
104
  }
105
 
106
+ /**
107
+ * Widget: Initiate autocomplete ui to search videos
108
+ *
109
+ * @since 2.5.5
110
+ */
111
+ function aiovg_widget_autocomplete_ui( widget ) {
112
+ if ( $.fn.autocomplete ) {
113
+ widget.find( '.aiovg-autocomplete-input' ).autocomplete({
114
+ source: function( request, response ) {
115
+ $.ajax({
116
+ url: ajaxurl,
117
+ dataType: 'json',
118
+ method: 'post',
119
+ data: {
120
+ action: 'aiovg_autocomplete_get_videos',
121
+ security: aiovg_admin.ajax_nonce,
122
+ term: request.term
123
+ },
124
+ success: function( data ) {
125
+ response( $.map( data, function( item ) {
126
+ return {
127
+ label: item.post_title,
128
+ value: item.post_title,
129
+ data: item
130
+ }
131
+ }));
132
+ }
133
+ });
134
+ },
135
+ autoFocus: true,
136
+ minLength: 0,
137
+ select: function( event, ui ) {
138
+ var $control = $( this ).closest( '.aiovg-widget-field' );
139
+ $control.find( '.aiovg-widget-input-id' ).val( ui.item.data.ID ).trigger( 'change' );
140
+
141
+ if ( ui.item.data.ID != 0 ) {
142
+ $control.find( '.aiovg-autocomplete-result' ).html( '<span class="dashicons dashicons-yes-alt"></span> <span>' + ui.item.data.post_title + '</span> ' + '<a href="javascript:void(0);" class="aiovg-remove-autocomplete-result">' + aiovg_admin.i18n.remove + '</a>' );
143
+ } else {
144
+ $control.find( '.aiovg-autocomplete-result' ).html( '<span class="dashicons dashicons-info"></span> <span>' + aiovg_admin.i18n.no_video_selected + '</span>' );
145
+ }
146
+ },
147
+ open: function() {
148
+ $( this ).removeClass( 'ui-corner-all' ).addClass( 'ui-corner-top' );
149
+ },
150
+ close: function() {
151
+ $( this ).removeClass( 'ui-corner-top' ).addClass( 'ui-corner-all' );
152
+ $( this ).val( '' );
153
+ }
154
+ });
155
+
156
+ $( document ).on( 'click', '.aiovg-remove-autocomplete-result', function() {
157
+ var $control = $( this ).closest( '.aiovg-widget-field' );
158
+ $control.find( '.aiovg-widget-input-id' ).val( 0 ).trigger( 'change' );
159
+ $control.find( '.aiovg-autocomplete-result' ).html( '<span class="dashicons dashicons-info"></span> <span>' + aiovg_admin.i18n.no_video_selected + '</span>' );
160
+ });
161
+ }
162
+ }
163
+
164
  function on_aiovg_widget_update( event, widget ) {
165
  aiovg_widget_color_picker( widget );
166
+ aiovg_widget_autocomplete_ui( widget );
167
  }
168
 
169
  /**
317
  });
318
 
319
  if ( ! has_input ) {
320
+ alert( aiovg_admin.i18n.no_issues_selected );
321
  return false;
322
  }
323
  });
516
  aiovg_widget_color_picker( $( this ) );
517
  });
518
 
519
+ // Video Widget: Initiate autocomplete ui
520
+ $( '#widgets-right .widget:has(.aiovg-autocomplete-input)' ).each(function() {
521
+ aiovg_widget_autocomplete_ui( $( this ) );
522
+ });
523
+
524
  $( document ).on( 'widget-added widget-updated', on_aiovg_widget_update );
525
 
526
  });
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.4
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.4' );
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.5
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.5' );
80
  }
81
  // The unique identifier of the plugin
82
  if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
languages/all-in-one-video-gallery.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: All-in-One Video Gallery\n"
4
- "POT-Creation-Date: 2022-02-06 10:46+0530\n"
5
- "PO-Revision-Date: 2022-02-06 10:46+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
@@ -74,11 +74,19 @@ msgstr ""
74
  msgid "Please select at least one issue."
75
  msgstr ""
76
 
77
- #: admin/admin.php:536
 
 
 
 
78
  msgid "Sorry, there is already a video with this quality level."
79
  msgstr ""
80
 
81
- #: admin/admin.php:553 admin/settings.php:60
 
 
 
 
82
  msgid "Settings"
83
  msgstr ""
84
 
@@ -560,7 +568,7 @@ msgstr ""
560
 
561
  #: admin/partials/video-sources.php:282 admin/partials/video-sources.php:286
562
  #: admin/settings.php:308 blocks/blocks.php:123 includes/functions.php:972
563
- #: widgets/forms/video.php:110
564
  msgid "Duration"
565
  msgstr ""
566
 
@@ -714,7 +722,7 @@ msgstr ""
714
 
715
  #: admin/settings.php:238 admin/settings.php:587 blocks/blocks.php:108
716
  #: includes/functions.php:911 premium/widgets/forms/companion.php:16
717
- #: widgets/forms/video.php:54
718
  msgid "Width"
719
  msgstr ""
720
 
@@ -727,7 +735,7 @@ msgstr ""
727
 
728
  #: admin/settings.php:245 admin/settings.php:594 blocks/blocks.php:110
729
  #: includes/functions.php:918 includes/functions.php:1120
730
- #: includes/functions.php:1303 widgets/forms/video.php:59
731
  msgid "Ratio"
732
  msgstr ""
733
 
@@ -766,7 +774,7 @@ msgid "Cinemascope"
766
  msgstr ""
767
 
768
  #: admin/settings.php:262 blocks/blocks.php:112 includes/functions.php:925
769
- #: widgets/forms/video.php:66
770
  msgid "Autoplay"
771
  msgstr ""
772
 
@@ -775,7 +783,7 @@ msgid "Check this to start playing the video as soon as it is ready"
775
  msgstr ""
776
 
777
  #: admin/settings.php:269 blocks/blocks.php:113 includes/functions.php:932
778
- #: widgets/forms/video.php:73
779
  msgid "Loop"
780
  msgstr ""
781
 
@@ -786,7 +794,7 @@ msgid ""
786
  msgstr ""
787
 
788
  #: admin/settings.php:276 blocks/blocks.php:114 includes/functions.php:939
789
- #: widgets/forms/video.php:80
790
  msgid "Muted"
791
  msgstr ""
792
 
@@ -823,47 +831,47 @@ msgid "Metadata"
823
  msgstr ""
824
 
825
  #: admin/settings.php:301 blocks/blocks.php:119 includes/functions.php:947
826
- #: widgets/forms/video.php:84
827
  msgid "Player Controls"
828
  msgstr ""
829
 
830
  #: admin/settings.php:305 blocks/blocks.php:120 includes/functions.php:951
831
- #: widgets/forms/video.php:89
832
  msgid "Play / Pause"
833
  msgstr ""
834
 
835
  #: admin/settings.php:306 blocks/blocks.php:121 includes/functions.php:958
836
- #: widgets/forms/video.php:96
837
  msgid "Current Time"
838
  msgstr ""
839
 
840
  #: admin/settings.php:307 blocks/blocks.php:122 includes/functions.php:965
841
- #: widgets/forms/video.php:103
842
  msgid "Progressbar"
843
  msgstr ""
844
 
845
  #: admin/settings.php:309 admin/videos.php:170 includes/functions.php:979
846
- #: widgets/forms/video.php:117
847
  msgid "Subtitles"
848
  msgstr ""
849
 
850
  #: admin/settings.php:310 blocks/blocks.php:124 includes/functions.php:986
851
- #: widgets/forms/video.php:124
852
  msgid "Quality Selector"
853
  msgstr ""
854
 
855
  #: admin/settings.php:311 blocks/blocks.php:125 includes/functions.php:993
856
- #: widgets/forms/video.php:131
857
  msgid "Speed Control"
858
  msgstr ""
859
 
860
  #: admin/settings.php:312 blocks/blocks.php:126 includes/functions.php:1000
861
- #: widgets/forms/video.php:138
862
  msgid "Volume"
863
  msgstr ""
864
 
865
  #: admin/settings.php:313 blocks/blocks.php:127 includes/functions.php:1007
866
- #: widgets/forms/video.php:145
867
  msgid "Fullscreen"
868
  msgstr ""
869
 
@@ -935,7 +943,7 @@ msgstr ""
935
  #: premium/admin/partials/automations-sources.php:181
936
  #: premium/public/templates/user-dashboard.php:78
937
  #: widgets/forms/categories.php:15 widgets/forms/search.php:15
938
- #: widgets/forms/video.php:15
939
  msgid "Title"
940
  msgstr ""
941
 
@@ -1547,8 +1555,11 @@ msgstr ""
1547
  msgid "Filter videos list"
1548
  msgstr ""
1549
 
1550
- #: admin/videos.php:103 premium/admin/slider.php:70
1551
- #: premium/public/slider.php:99 premium/public/templates/video-form.php:294
 
 
 
1552
  msgid "Video Description"
1553
  msgstr ""
1554
 
@@ -1763,7 +1774,8 @@ msgstr ""
1763
  msgid "Single Video"
1764
  msgstr ""
1765
 
1766
- #: includes/functions.php:854 widgets/forms/video.php:20
 
1767
  msgid "Select Video"
1768
  msgstr ""
1769
 
@@ -2139,7 +2151,7 @@ msgstr ""
2139
  msgid "Stats"
2140
  msgstr ""
2141
 
2142
- #: premium/admin/automations.php:365 premium/admin/automations.php:560
2143
  msgid "Paused"
2144
  msgstr ""
2145
 
@@ -2174,15 +2186,15 @@ msgstr ""
2174
  msgid "Import Stats"
2175
  msgstr ""
2176
 
2177
- #: premium/admin/automations.php:697
2178
  msgid "Test Run"
2179
  msgstr ""
2180
 
2181
- #: premium/admin/automations.php:698
2182
  msgid "Publish & Import"
2183
  msgstr ""
2184
 
2185
- #: premium/admin/automations.php:698
2186
  msgid "Import Next Batch"
2187
  msgstr ""
2188
 
@@ -2357,55 +2369,59 @@ msgstr ""
2357
  msgid "Assign tags to the imported videos."
2358
  msgstr ""
2359
 
2360
- #: premium/admin/partials/automations-video-settings.php:66
2361
- #: premium/admin/partials/automations-video-settings.php:69
 
 
 
 
2362
  msgid "Video Date"
2363
  msgstr ""
2364
 
2365
- #: premium/admin/partials/automations-video-settings.php:73
2366
  msgid "Original date on the video service"
2367
  msgstr ""
2368
 
2369
- #: premium/admin/partials/automations-video-settings.php:74
2370
  msgid "Date when the video is imported"
2371
  msgstr ""
2372
 
2373
- #: premium/admin/partials/automations-video-settings.php:82
2374
  msgid ""
2375
  "Select whether to use the original posting date on the video service, or the "
2376
  "date when the video is imported."
2377
  msgstr ""
2378
 
2379
- #: premium/admin/partials/automations-video-settings.php:88
2380
- #: premium/admin/partials/automations-video-settings.php:91
2381
  msgid "Video Author"
2382
  msgstr ""
2383
 
2384
- #: premium/admin/partials/automations-video-settings.php:100
2385
  msgid "Select the author to whom the video should be assigned."
2386
  msgstr ""
2387
 
2388
- #: premium/admin/partials/automations-video-settings.php:106
2389
- #: premium/admin/partials/automations-video-settings.php:109
2390
  msgid "Video Status"
2391
  msgstr ""
2392
 
2393
- #: premium/admin/partials/automations-video-settings.php:113
2394
  msgid "Draft"
2395
  msgstr ""
2396
 
2397
- #: premium/admin/partials/automations-video-settings.php:114
2398
  #: premium/admin/user.php:143 premium/admin/user.php:154
2399
  msgid "Pending"
2400
  msgstr ""
2401
 
2402
- #: premium/admin/partials/automations-video-settings.php:115
2403
  #: premium/admin/user.php:142 premium/admin/user.php:153
2404
  #: premium/public/templates/video-form.php:388
2405
  msgid "Publish"
2406
  msgstr ""
2407
 
2408
- #: premium/admin/partials/automations-video-settings.php:123
2409
  msgid ""
2410
  "Select the default status of the imported videos. Site admin will be "
2411
  "notified through email when an import occurs with the \"Pending\" status."
@@ -3219,10 +3235,18 @@ msgstr ""
3219
  msgid "Show More Button"
3220
  msgstr ""
3221
 
3222
- #: widgets/forms/video.php:22
 
 
 
 
3223
  msgid "Latest Video"
3224
  msgstr ""
3225
 
 
 
 
 
3226
  #: widgets/videos.php:66
3227
  msgid "Display a video gallery."
3228
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: All-in-One Video Gallery\n"
4
+ "POT-Creation-Date: 2022-03-21 11:36+0530\n"
5
+ "PO-Revision-Date: 2022-03-21 11:36+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
74
  msgid "Please select at least one issue."
75
  msgstr ""
76
 
77
+ #: admin/admin.php:536 widgets/forms/video.php:33
78
+ msgid "No video was selected. The last added video will be displayed."
79
+ msgstr ""
80
+
81
+ #: admin/admin.php:537
82
  msgid "Sorry, there is already a video with this quality level."
83
  msgstr ""
84
 
85
+ #: admin/admin.php:538 widgets/forms/video.php:30
86
+ msgid "Remove"
87
+ msgstr ""
88
+
89
+ #: admin/admin.php:555 admin/settings.php:60
90
  msgid "Settings"
91
  msgstr ""
92
 
568
 
569
  #: admin/partials/video-sources.php:282 admin/partials/video-sources.php:286
570
  #: admin/settings.php:308 blocks/blocks.php:123 includes/functions.php:972
571
+ #: widgets/forms/video.php:130
572
  msgid "Duration"
573
  msgstr ""
574
 
722
 
723
  #: admin/settings.php:238 admin/settings.php:587 blocks/blocks.php:108
724
  #: includes/functions.php:911 premium/widgets/forms/companion.php:16
725
+ #: widgets/forms/video.php:74
726
  msgid "Width"
727
  msgstr ""
728
 
735
 
736
  #: admin/settings.php:245 admin/settings.php:594 blocks/blocks.php:110
737
  #: includes/functions.php:918 includes/functions.php:1120
738
+ #: includes/functions.php:1303 widgets/forms/video.php:79
739
  msgid "Ratio"
740
  msgstr ""
741
 
774
  msgstr ""
775
 
776
  #: admin/settings.php:262 blocks/blocks.php:112 includes/functions.php:925
777
+ #: widgets/forms/video.php:86
778
  msgid "Autoplay"
779
  msgstr ""
780
 
783
  msgstr ""
784
 
785
  #: admin/settings.php:269 blocks/blocks.php:113 includes/functions.php:932
786
+ #: widgets/forms/video.php:93
787
  msgid "Loop"
788
  msgstr ""
789
 
794
  msgstr ""
795
 
796
  #: admin/settings.php:276 blocks/blocks.php:114 includes/functions.php:939
797
+ #: widgets/forms/video.php:100
798
  msgid "Muted"
799
  msgstr ""
800
 
831
  msgstr ""
832
 
833
  #: admin/settings.php:301 blocks/blocks.php:119 includes/functions.php:947
834
+ #: widgets/forms/video.php:104
835
  msgid "Player Controls"
836
  msgstr ""
837
 
838
  #: admin/settings.php:305 blocks/blocks.php:120 includes/functions.php:951
839
+ #: widgets/forms/video.php:109
840
  msgid "Play / Pause"
841
  msgstr ""
842
 
843
  #: admin/settings.php:306 blocks/blocks.php:121 includes/functions.php:958
844
+ #: widgets/forms/video.php:116
845
  msgid "Current Time"
846
  msgstr ""
847
 
848
  #: admin/settings.php:307 blocks/blocks.php:122 includes/functions.php:965
849
+ #: widgets/forms/video.php:123
850
  msgid "Progressbar"
851
  msgstr ""
852
 
853
  #: admin/settings.php:309 admin/videos.php:170 includes/functions.php:979
854
+ #: widgets/forms/video.php:137
855
  msgid "Subtitles"
856
  msgstr ""
857
 
858
  #: admin/settings.php:310 blocks/blocks.php:124 includes/functions.php:986
859
+ #: widgets/forms/video.php:144
860
  msgid "Quality Selector"
861
  msgstr ""
862
 
863
  #: admin/settings.php:311 blocks/blocks.php:125 includes/functions.php:993
864
+ #: widgets/forms/video.php:151
865
  msgid "Speed Control"
866
  msgstr ""
867
 
868
  #: admin/settings.php:312 blocks/blocks.php:126 includes/functions.php:1000
869
+ #: widgets/forms/video.php:158
870
  msgid "Volume"
871
  msgstr ""
872
 
873
  #: admin/settings.php:313 blocks/blocks.php:127 includes/functions.php:1007
874
+ #: widgets/forms/video.php:165
875
  msgid "Fullscreen"
876
  msgstr ""
877
 
943
  #: premium/admin/partials/automations-sources.php:181
944
  #: premium/public/templates/user-dashboard.php:78
945
  #: widgets/forms/categories.php:15 widgets/forms/search.php:15
946
+ #: widgets/forms/video.php:17
947
  msgid "Title"
948
  msgstr ""
949
 
1555
  msgid "Filter videos list"
1556
  msgstr ""
1557
 
1558
+ #: admin/videos.php:103
1559
+ #: premium/admin/partials/automations-video-settings.php:66
1560
+ #: premium/admin/partials/automations-video-settings.php:69
1561
+ #: premium/admin/slider.php:70 premium/public/slider.php:99
1562
+ #: premium/public/templates/video-form.php:294
1563
  msgid "Video Description"
1564
  msgstr ""
1565
 
1774
  msgid "Single Video"
1775
  msgstr ""
1776
 
1777
+ #: includes/functions.php:854 widgets/forms/video.php:23
1778
+ #: widgets/forms/video.php:39
1779
  msgid "Select Video"
1780
  msgstr ""
1781
 
2151
  msgid "Stats"
2152
  msgstr ""
2153
 
2154
+ #: premium/admin/automations.php:365 premium/admin/automations.php:570
2155
  msgid "Paused"
2156
  msgstr ""
2157
 
2186
  msgid "Import Stats"
2187
  msgstr ""
2188
 
2189
+ #: premium/admin/automations.php:710
2190
  msgid "Test Run"
2191
  msgstr ""
2192
 
2193
+ #: premium/admin/automations.php:711
2194
  msgid "Publish & Import"
2195
  msgstr ""
2196
 
2197
+ #: premium/admin/automations.php:711
2198
  msgid "Import Next Batch"
2199
  msgstr ""
2200
 
2369
  msgid "Assign tags to the imported videos."
2370
  msgstr ""
2371
 
2372
+ #: premium/admin/partials/automations-video-settings.php:72
2373
+ msgid "Check this option to import the video description."
2374
+ msgstr ""
2375
+
2376
+ #: premium/admin/partials/automations-video-settings.php:79
2377
+ #: premium/admin/partials/automations-video-settings.php:82
2378
  msgid "Video Date"
2379
  msgstr ""
2380
 
2381
+ #: premium/admin/partials/automations-video-settings.php:86
2382
  msgid "Original date on the video service"
2383
  msgstr ""
2384
 
2385
+ #: premium/admin/partials/automations-video-settings.php:87
2386
  msgid "Date when the video is imported"
2387
  msgstr ""
2388
 
2389
+ #: premium/admin/partials/automations-video-settings.php:95
2390
  msgid ""
2391
  "Select whether to use the original posting date on the video service, or the "
2392
  "date when the video is imported."
2393
  msgstr ""
2394
 
2395
+ #: premium/admin/partials/automations-video-settings.php:101
2396
+ #: premium/admin/partials/automations-video-settings.php:104
2397
  msgid "Video Author"
2398
  msgstr ""
2399
 
2400
+ #: premium/admin/partials/automations-video-settings.php:113
2401
  msgid "Select the author to whom the video should be assigned."
2402
  msgstr ""
2403
 
2404
+ #: premium/admin/partials/automations-video-settings.php:119
2405
+ #: premium/admin/partials/automations-video-settings.php:122
2406
  msgid "Video Status"
2407
  msgstr ""
2408
 
2409
+ #: premium/admin/partials/automations-video-settings.php:126
2410
  msgid "Draft"
2411
  msgstr ""
2412
 
2413
+ #: premium/admin/partials/automations-video-settings.php:127
2414
  #: premium/admin/user.php:143 premium/admin/user.php:154
2415
  msgid "Pending"
2416
  msgstr ""
2417
 
2418
+ #: premium/admin/partials/automations-video-settings.php:128
2419
  #: premium/admin/user.php:142 premium/admin/user.php:153
2420
  #: premium/public/templates/video-form.php:388
2421
  msgid "Publish"
2422
  msgstr ""
2423
 
2424
+ #: premium/admin/partials/automations-video-settings.php:136
2425
  msgid ""
2426
  "Select the default status of the imported videos. Site admin will be "
2427
  "notified through email when an import occurs with the \"Pending\" status."
3235
  msgid "Show More Button"
3236
  msgstr ""
3237
 
3238
+ #: widgets/forms/video.php:24
3239
+ msgid "Start typing for suggestions..."
3240
+ msgstr ""
3241
+
3242
+ #: widgets/forms/video.php:41
3243
  msgid "Latest Video"
3244
  msgstr ""
3245
 
3246
+ #: widgets/video.php:210
3247
+ msgid "No videos were found. Select me to display the last added video."
3248
+ msgstr ""
3249
+
3250
  #: widgets/videos.php:66
3251
  msgid "Display a video gallery."
3252
  msgstr ""
widgets/forms/video.php CHANGED
@@ -8,6 +8,8 @@
8
  *
9
  * @package All_In_One_Video_Gallery
10
  */
 
 
11
  ?>
12
 
13
  <div class="aiovg aiovg-widget-form aiovg-widget-form-video">
@@ -16,39 +18,57 @@
16
  <input type="text" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" class="widefat aiovg-widget-input-title" value="<?php echo esc_attr( $instance['title'] ); ?>" />
17
  </div>
18
 
19
- <div class="aiovg-widget-field aiovg-widget-field-id">
20
- <label class="aiovg-widget-label" for="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>"><?php esc_html_e( 'Select Video', 'all-in-one-video-gallery' ); ?></label>
21
- <select name="<?php echo esc_attr( $this->get_field_name( 'id' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>" class="widefat aiovg-widget-input-id">
22
- <option value="0">-- <?php esc_html_e( 'Latest Video', 'all-in-one-video-gallery' ); ?> --</option>
23
- <?php
24
- $args = array(
25
- 'post_type' => 'aiovg_videos',
26
- 'post_status' => 'publish',
27
- 'posts_per_page' => 500,
28
- 'orderby' => 'title',
29
- 'order' => 'ASC',
30
- 'no_found_rows' => true,
31
- 'update_post_term_cache' => false,
32
- 'update_post_meta_cache' => false
33
- );
34
-
35
- $aiovg_query = new WP_Query( $args );
36
-
37
- if ( $aiovg_query->have_posts() ) {
38
- $posts = $aiovg_query->posts;
39
-
40
- foreach ( $posts as $post ) {
41
- printf(
42
- '<option value="%d"%s>%s</option>',
43
- $post->ID,
44
- selected( $post->ID, (int) $instance['id'], false ),
45
- esc_html( $post->post_title )
46
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
- }
49
- ?>
50
- </select>
51
- </div>
52
 
53
  <div class="aiovg-widget-field aiovg-widget-field-width">
54
  <label class="aiovg-widget-label" for="<?php echo esc_attr( $this->get_field_id( 'width' ) ); ?>"><?php esc_html_e( 'Width', 'all-in-one-video-gallery' ); ?></label>
8
  *
9
  * @package All_In_One_Video_Gallery
10
  */
11
+
12
+ global $pagenow;
13
  ?>
14
 
15
  <div class="aiovg aiovg-widget-form aiovg-widget-form-video">
18
  <input type="text" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" class="widefat aiovg-widget-input-title" value="<?php echo esc_attr( $instance['title'] ); ?>" />
19
  </div>
20
 
21
+ <?php if ( 'widgets.php' === $pagenow || ! is_admin() ) : ?>
22
+ <div class="aiovg-widget-field aiovg-widget-field-id">
23
+ <label class="aiovg-widget-label" for="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>"><?php esc_html_e( 'Select Video', 'all-in-one-video-gallery' ); ?></label>
24
+ <input type="text" class="widefat aiovg-autocomplete-input" placeholder="<?php esc_attr_e( 'Start typing for suggestions...', 'all-in-one-video-gallery' ); ?>" />
25
+ <input type="hidden" name="<?php echo esc_attr( $this->get_field_name( 'id' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>" class="widefat aiovg-widget-input-id" value="<?php echo esc_attr( $instance['id'] ); ?>" />
26
+ <p class="description aiovg-autocomplete-result">
27
+ <?php if ( ! empty( $instance['id'] ) ) : ?>
28
+ <span class="dashicons dashicons-yes-alt"></span>
29
+ <span><?php echo esc_html( get_the_title( (int) $instance['id'] ) ); ?></span>
30
+ <a href="javascript:void(0);" class="aiovg-remove-autocomplete-result"><?php esc_html_e( 'Remove', 'all-in-one-video-gallery' ); ?></a>
31
+ <?php else : ?>
32
+ <span class="dashicons dashicons-info"></span>
33
+ <span><?php esc_html_e( 'No video was selected. The last added video will be displayed.', 'all-in-one-video-gallery' ); ?></span>
34
+ <?php endif; ?>
35
+ </p>
36
+ </div>
37
+ <?php else: ?>
38
+ <div class="aiovg-widget-field aiovg-widget-field-id">
39
+ <label class="aiovg-widget-label" for="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>"><?php esc_html_e( 'Select Video', 'all-in-one-video-gallery' ); ?></label>
40
+ <select name="<?php echo esc_attr( $this->get_field_name( 'id' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>" class="widefat aiovg-widget-input-id">
41
+ <option value="0">-- <?php esc_html_e( 'Latest Video', 'all-in-one-video-gallery' ); ?> --</option>
42
+ <?php
43
+ $args = array(
44
+ 'post_type' => 'aiovg_videos',
45
+ 'post_status' => 'publish',
46
+ 'posts_per_page' => 500,
47
+ 'orderby' => 'title',
48
+ 'order' => 'ASC',
49
+ 'no_found_rows' => true,
50
+ 'update_post_term_cache' => false,
51
+ 'update_post_meta_cache' => false
52
+ );
53
+
54
+ $aiovg_query = new WP_Query( $args );
55
+
56
+ if ( $aiovg_query->have_posts() ) {
57
+ $posts = $aiovg_query->posts;
58
+
59
+ foreach ( $posts as $post ) {
60
+ printf(
61
+ '<option value="%d"%s>%s</option>',
62
+ $post->ID,
63
+ selected( $post->ID, (int) $instance['id'], false ),
64
+ esc_html( $post->post_title )
65
+ );
66
+ }
67
  }
68
+ ?>
69
+ </select>
70
+ </div>
71
+ <?php endif; ?>
72
 
73
  <div class="aiovg-widget-field aiovg-widget-field-width">
74
  <label class="aiovg-widget-label" for="<?php echo esc_attr( $this->get_field_id( 'width' ) ); ?>"><?php esc_html_e( 'Width', 'all-in-one-video-gallery' ); ?></label>
widgets/video.php CHANGED
@@ -45,7 +45,8 @@ class AIOVG_Widget_Video extends WP_Widget {
45
 
46
  parent::__construct( $this->widget_slug, __( 'AIOVG - Video Player', 'all-in-one-video-gallery' ), $options );
47
 
48
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ), 11 );
 
49
  }
50
 
51
  /**
@@ -169,5 +170,68 @@ class AIOVG_Widget_Video extends WP_Widget {
169
  public function enqueue_styles_scripts() {
170
  wp_enqueue_style( AIOVG_PLUGIN_SLUG . '-public' );
171
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
 
173
  }
45
 
46
  parent::__construct( $this->widget_slug, __( 'AIOVG - Video Player', 'all-in-one-video-gallery' ), $options );
47
 
48
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ), 11 );
49
+ add_action( 'wp_ajax_aiovg_autocomplete_get_videos', array( $this, 'ajax_callback_autocomplete_get_videos' ) );
50
  }
51
 
52
  /**
170
  public function enqueue_styles_scripts() {
171
  wp_enqueue_style( AIOVG_PLUGIN_SLUG . '-public' );
172
  }
173
+
174
+ /**
175
+ * Autocomplete UI: Get videos.
176
+ *
177
+ * @since 2.5.5
178
+ */
179
+ public function ajax_callback_autocomplete_get_videos() {
180
+ // Security check
181
+ check_ajax_referer( 'aiovg_ajax_nonce', 'security' );
182
+
183
+ // Proceed safe
184
+ $args = array(
185
+ 'post_type' => 'aiovg_videos',
186
+ 'post_status' => 'publish',
187
+ 'numberposts' => 100,
188
+ 'cache_results' => false,
189
+ 'update_post_meta_cache' => false,
190
+ 'update_post_term_cache' => false,
191
+ 'suppress_filters' => false
192
+ );
193
+
194
+ if ( isset( $_POST['term'] ) && ! empty( $_POST['term'] ) ) {
195
+ $args['search_video_title'] = sanitize_text_field( $_POST['term'] );
196
+ } else {
197
+ $args['orderby'] = 'title';
198
+ $args['order'] = 'ASC';
199
+ $args['numberposts'] = 10;
200
+ }
201
+
202
+ add_filter( 'posts_where', array( $this, 'posts_where' ), 10, 2 );
203
+ $posts = get_posts( $args );
204
+ remove_filter( 'posts_where', array( $this, 'posts_where' ), 10, 2 );
205
+
206
+ if ( empty( $posts ) ) {
207
+ $posts = array(
208
+ array(
209
+ 'ID' => 0,
210
+ 'post_title' => __( 'No videos were found. Select me to display the last added video.', 'all-in-one-video-gallery' )
211
+ )
212
+ );
213
+ }
214
+
215
+ echo wp_json_encode( $posts );
216
+ wp_die();
217
+ }
218
+
219
+ /**
220
+ * Filters the WHERE clause of the query to only search by video title.
221
+ *
222
+ * @since 2.5.5
223
+ * @param string $where The WHERE clause of the query.
224
+ * @param WP_Query $query The WP_Query instance (passed by reference).
225
+ * @return string $where The filtered WHERE clause of the query.
226
+ */
227
+ public function posts_where( $where, $query ) {
228
+ global $wpdb;
229
+
230
+ if ( $title = $query->get( 'search_video_title' ) ) {
231
+ $where .= ' AND ' . $wpdb->posts . '.post_title LIKE \'%' . esc_sql( like_escape( $title ) ) . '%\'';
232
+ }
233
+
234
+ return $where;
235
+ }
236
 
237
  }