YouTube Channel - Version 2.4.0

Version Description

(2014-10-01) = * Fix: false options set in shortcode had no effect to output box and default settings always used [20140924] * Fix: enabled checkbox in global settings could not be unticked (disabled) [20140924] * Fix: prevent array_slice notice if channel have no uploaded videos [20141001] * Add: fitVids for responsive videos [20140924] * Add: option for additional YTC box class in widget and shortcode [20140924] * Change: global settings page re-implemented with Redux Framework and requires Redux Framework Plugin [20140924] * Change: rewrite plugin to be more OOP [20140924] * Change: removed obsolete methods [20140924] * Change: default box width changed from 220 to 306px [20140924] * Change: YTC block and video pieces now floated left to enable horizontal stack [20140924] * Change: update localization support [20140926] * Change: updated Serbian localization [20140926] * Change: removed PayPal donation button from widget and moved to plugin Settings page [20141001]

Download this release

Release Info

Developer urkekg
Plugin Icon YouTube Channel
Version 2.4.0
Comparing to
See all releases

Code changes from version 2.2.3 to 2.4.0

assets/css/youtube-channel.css CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  .ytc_thumb {
2
  display: block;
3
  overflow: hidden;
1
+ .youtube_channel {
2
+ float: left;
3
+ clear: both;
4
+ }
5
+ .youtube_channel .ytc_video_container {
6
+ float: left;
7
+ }
8
  .ytc_thumb {
9
  display: block;
10
  overflow: hidden;
assets/css/youtube-channel.min.css CHANGED
@@ -1 +1,3 @@
1
- .ytc_thumb{display:block;overflow:hidden;position:relative;height:0;width:100%;top:0;right:0;bottom:0;left:0}.ytc_thumb>span{height:0;width:100%;display:block;-webkit-background-size:cover;background-size:cover;background-position:center center;background-repeat:no-repeat}.ytc_thumb>span:before{content:"";display:block;width:100%;height:0;background-image:url(../img/play.png);background-position:center center;background-repeat:no-repeat;background-color:transparent;opacity:.6;transition:.4s}.ytc_thumb:hover>span:before{opacity:1}.ytc_thumb.ar16_9,.ytc_thumb.ar16_9>span,.ytc_thumb.ar16_9>span:before{padding-bottom:56.26%}.ytc_thumb.ar16_10,.ytc_thumb.ar16_10>span,.ytc_thumb.ar16_10>span:before{padding-bottom:62.5%}.ytc_thumb.ar4_3,.ytc_thumb.ar4_3>span,.ytc_thumb.ar4_3>span:before{padding-bottom:75%}
 
 
1
+ .youtube_channel{float:left;clear:both}.youtube_channel .ytc_video_container{float:left}.ytc_thumb{display:block;overflow:hidden;position:relative;height:0;width:100%;top:0;right:0;bottom:0;left:0}.ytc_thumb>span{height:0;width:100%;display:block;-webkit-background-size:cover;background-size:cover;background-position:center center;background-repeat:no-repeat}
2
+ .ytc_thumb>span:before{content:"";display:block;width:100%;height:0;background-image:url(../img/play.png);background-position:center center;background-repeat:no-repeat;background-color:transparent;opacity:.6;transition:.4s}
3
+ .ytc_thumb:hover>span:before{opacity:1}.ytc_thumb.ar16_9,.ytc_thumb.ar16_9>span,.ytc_thumb.ar16_9>span:before{padding-bottom:56.26%}.ytc_thumb.ar16_10,.ytc_thumb.ar16_10>span,.ytc_thumb.ar16_10>span:before{padding-bottom:62.5%}.ytc_thumb.ar4_3,.ytc_thumb.ar4_3>span,.ytc_thumb.ar4_3>span:before{padding-bottom:75%}
assets/js/jquery.fitvids.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global jQuery */
2
+ /*jshint browser:true */
3
+ /*!
4
+ * FitVids 1.1
5
+ *
6
+ * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
7
+ * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
8
+ * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
9
+ *
10
+ */
11
+
12
+ (function( $ ){
13
+
14
+ "use strict";
15
+
16
+ $.fn.fitVids = function( options ) {
17
+ var settings = {
18
+ customSelector: null,
19
+ ignore: null
20
+ };
21
+
22
+ if(!document.getElementById('fit-vids-style')) {
23
+ // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
24
+ var head = document.head || document.getElementsByTagName('head')[0];
25
+ var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
26
+ var div = document.createElement('div');
27
+ div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
28
+ head.appendChild(div.childNodes[1]);
29
+ }
30
+
31
+ if ( options ) {
32
+ $.extend( settings, options );
33
+ }
34
+
35
+ return this.each(function(){
36
+ var selectors = [
37
+ "iframe[src*='player.vimeo.com']",
38
+ "iframe[src*='youtube.com']",
39
+ "iframe[src*='youtube-nocookie.com']",
40
+ "iframe[src*='kickstarter.com'][src*='video.html']",
41
+ "object",
42
+ "embed"
43
+ ];
44
+
45
+ if (settings.customSelector) {
46
+ selectors.push(settings.customSelector);
47
+ }
48
+
49
+ var ignoreList = '.fitvidsignore';
50
+
51
+ if(settings.ignore) {
52
+ ignoreList = ignoreList + ', ' + settings.ignore;
53
+ }
54
+
55
+ var $allVideos = $(this).find(selectors.join(','));
56
+ $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
57
+ $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
58
+
59
+ $allVideos.each(function(){
60
+ var $this = $(this);
61
+ if($this.parents(ignoreList).length > 0) {
62
+ return; // Disable FitVids on this video.
63
+ }
64
+ if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
65
+ if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
66
+ {
67
+ $this.attr('height', 9);
68
+ $this.attr('width', 16);
69
+ }
70
+ var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
71
+ width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
72
+ aspectRatio = height / width;
73
+ if(!$this.attr('id')){
74
+ var videoID = 'fitvid' + Math.floor(Math.random()*999999);
75
+ $this.attr('id', videoID);
76
+ }
77
+ $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
78
+ $this.removeAttr('height').removeAttr('width');
79
+ });
80
+ });
81
+ };
82
+ // Works with either jQuery or Zepto
83
+ })( window.jQuery || window.Zepto );
assets/js/jquery.fitvids.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],a=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",d=document.createElement("div");d.innerHTML='<p>x</p><style id="fit-vids-style">'+a+"</style>",r.appendChild(d.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var a=t(this).find(e.join(","));a=a.not("object object"),a=a.not(r),a.each(function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var i="object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height(),a=isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10),d=i/a;if(!e.attr("id")){var o="fitvid"+Math.floor(999999*Math.random());e.attr("id",o)}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*d+"%"),e.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto);
assets/settings.php DELETED
@@ -1,691 +0,0 @@
1
- <?php
2
- if(class_exists('WPAU_YOUTUBE_CHANNEL') && !class_exists('WPAU_YOUTUBE_CHANNEL_SETTINGS'))
3
- {
4
-
5
- class WPAU_YOUTUBE_CHANNEL_SETTINGS extends WPAU_YOUTUBE_CHANNEL
6
- {
7
- private $general_settings_key = 'ytc_general';
8
- private $video_settings_key = 'ytc_video';
9
- private $content_settings_key = 'ytc_content';
10
- private $link_settings_key = 'ytc_link';
11
- private $tools_settings_key = 'ytc_tools';
12
- private $help_settings_key = 'ytc_help';
13
- private $plugin_options_key = 'youtube_channel_defaults';
14
- private $plugin_settings_page = YTCTDOM;
15
- private $plugin_settings_tabs = array();
16
-
17
- /**
18
- * Construct the plugin object
19
- */
20
- public function __construct()
21
- {
22
- // register actions
23
- add_action('init', array( &$this, 'load_settings' ) );
24
-
25
- add_action('admin_init', array( &$this, 'register_general_settings' ) );
26
- add_action('admin_init', array( &$this, 'register_video_settings' ) );
27
- add_action('admin_init', array( &$this, 'register_content_settings' ) );
28
- add_action('admin_init', array( &$this, 'register_link_settings' ) );
29
- add_action('admin_init', array( &$this, 'register_tools_settings' ) );
30
- add_action('admin_init', array( &$this, 'register_help_settings' ) );
31
-
32
- add_action('admin_menu', array( &$this, 'add_menu' ) );
33
- } // END public function __construct
34
-
35
- function load_settings() {
36
- $this->defaults = $this->defaults();
37
- }
38
-
39
- // validate our options
40
- function plugin_options_validate($options) {
41
- $options = wp_parse_args($options, get_option('youtube_channel_defaults'));
42
- return wp_parse_args($options, $this->defaults);
43
- }
44
- function register_general_settings()
45
- {
46
- $this->plugin_settings_tabs[$this->general_settings_key] = 'General';
47
- register_setting(
48
- $this->general_settings_key, // option_group
49
- $this->plugin_options_key, // option_name
50
- array(&$this, 'plugin_options_validate') // callback
51
- );
52
-
53
- // add general settings section
54
- add_settings_section(
55
- 'general_settings', // id
56
- __('General Settings',YTCTDOM), // title
57
- array(&$this, 'general_settings_section_description'), // callback
58
- $this->general_settings_key // page
59
- );
60
-
61
- // add setting's fields
62
- add_settings_field(
63
- 'wpau_youtube_channel-channel', // id
64
- __('YouTube Channel ID',YTCTDOM), // title
65
- array(&$this, 'settings_field_input_text'), // callback
66
- $this->general_settings_key, // page
67
- 'general_settings', // section
68
- array(
69
- 'field' => "youtube_channel_defaults[channel]",
70
- 'description' => __('Enter your YouTube channel ID (channel name, not full URL to channel)',YTCTDOM),
71
- 'class' => 'regular-text',
72
- 'value' => $this->defaults['channel'],
73
- )
74
- );
75
- add_settings_field(
76
- 'wpau_youtube_channel-playlist',
77
- __('Default Playlist ID',YTCTDOM),
78
- array(&$this, 'settings_field_input_text'),
79
- $this->general_settings_key,
80
- 'general_settings',
81
- array(
82
- 'field' => "youtube_channel_defaults[playlist]",
83
- 'description' => __('Enter default playlist ID (not playlist name)',YTCTDOM),
84
- 'class' => 'regular-text',
85
- 'value' => $this->defaults['playlist'],
86
- )
87
- );
88
- add_settings_field(
89
- 'wpau_youtube_channel-use_res',
90
- __('Resource to use',YTCTDOM),
91
- array(&$this, 'settings_field_select'),
92
- $this->general_settings_key,
93
- 'general_settings',
94
- array(
95
- 'field' => "youtube_channel_defaults[use_res]",
96
- 'description' => __('What to use as resource for feeds',YTCTDOM),
97
- 'class' => 'regular-text',
98
- 'items' => array(
99
- "0" => __("Channel",YTCTDOM),
100
- "1" => __("Favorites",YTCTDOM),
101
- "2" => __("Playlist",YTCTDOM)
102
- ),
103
- 'value' => $this->defaults['use_res'],
104
- )
105
- );
106
- add_settings_field(
107
- 'wpau_youtube_channel-only_pl',
108
- __('Embed standard playlist',YTCTDOM),
109
- array(&$this, 'settings_field_checkbox'),
110
- $this->general_settings_key,
111
- 'general_settings',
112
- array(
113
- 'field' => "youtube_channel_defaults[only_pl]",
114
- 'description' => __('Enable this option to embed whole playlist instead single video from playlist when you chose playlist as resource',YTCTDOM),
115
- 'class' => 'checkbox',
116
- 'value' => $this->defaults['only_pl'],
117
- )
118
- );
119
- // caching timeout field
120
- add_settings_field(
121
- 'wpau_youtube_channel-cache_time',
122
- __('Cache Timeout',YTCTDOM),
123
- array(&$this, 'settings_field_input_number'),
124
- $this->general_settings_key,
125
- 'general_settings',
126
- array(
127
- 'field' => "youtube_channel_defaults[cache_time]",
128
- 'description' => __('Define caching timeout for YouTube feeds, in seconds',YTCTDOM),
129
- 'class' => 'number',
130
- 'value' => $this->defaults['cache_time'],
131
- 'min' => 0,
132
- 'max' => 2419200,
133
- 'step' => 60
134
- )
135
- );
136
- add_settings_field(
137
- 'wpau_youtube_channel-maxrnd',
138
- __('Fetch',YTCTDOM),
139
- array(&$this, 'settings_field_input_number'),
140
- $this->general_settings_key,
141
- 'general_settings',
142
- array(
143
- 'field' => "youtube_channel_defaults[maxrnd]",
144
- 'description' => __('Number of videos that will be used for random pick (min 2, max 50, default 25)',YTCTDOM),
145
- 'class' => 'num',
146
- 'value' => $this->defaults['maxrnd'],
147
- 'min' => 2,
148
- 'max' => 50,
149
- 'step' => 1
150
- )
151
- );
152
- add_settings_field(
153
- 'wpau_youtube_channel-vidqty',
154
- __('Show',YTCTDOM),
155
- array(&$this, 'settings_field_input_number'),
156
- $this->general_settings_key,
157
- 'general_settings',
158
- array(
159
- 'field' => "youtube_channel_defaults[vidqty]",
160
- 'description' => __('Number of videos to display',YTCTDOM),
161
- 'class' => 'number',
162
- 'value' => $this->defaults['vidqty'],
163
- 'min' => 1,
164
- 'max' => 50,
165
- 'step' => 1
166
- )
167
- );
168
- add_settings_field(
169
- 'wpau_youtube_channel-enhprivacy',
170
- __('Use Enhanced privacy',YTCTDOM),
171
- array(&$this, 'settings_field_checkbox'),
172
- $this->general_settings_key,
173
- 'general_settings',
174
- array(
175
- 'field' => "youtube_channel_defaults[enhprivacy]",
176
- 'description' => __(sprintf('Enable this option to protect your visitors <a href="%s" target="_blank">privacy</a>.','http://support.google.com/youtube/bin/answer.py?hl=en-GB&answer=171780'),YTCTDOM),
177
- 'class' => 'number',
178
- 'value' => $this->defaults['enhprivacy'],
179
- )
180
- );
181
- add_settings_field(
182
- 'wpau_youtube_channel-fixnoitem',
183
- __('Fix <em>No items</em> error/Respect playlist order',YTCTDOM),
184
- array(&$this, 'settings_field_checkbox'),
185
- $this->general_settings_key,
186
- 'general_settings',
187
- array(
188
- 'field' => "youtube_channel_defaults[fixnoitem]",
189
- 'description' => __('Enable this option if you get error No Item',YTCTDOM),
190
- 'class' => 'widefat',
191
- 'value' => $this->defaults['fixnoitem'],
192
- )
193
- );
194
- add_settings_field(
195
- 'wpau_youtube_channel-getrnd',
196
- __('Show random video',YTCTDOM),
197
- array(&$this, 'settings_field_checkbox'),
198
- $this->general_settings_key,
199
- 'general_settings',
200
- array(
201
- 'field' => "youtube_channel_defaults[getrnd]",
202
- 'description' => __('Get random videos of all fetched from channel or playlist',YTCTDOM),
203
- 'class' => 'widefat',
204
- 'value' => $this->defaults['getrnd'],
205
- )
206
- );
207
- } // END register_general_settings()
208
-
209
- function register_video_settings()
210
- {
211
- $this->plugin_settings_tabs[$this->video_settings_key] = 'Video';
212
- register_setting(
213
- $this->video_settings_key,
214
- $this->plugin_options_key,
215
- array(&$this, 'plugin_options_validate')
216
- );
217
-
218
- // add video settings section
219
- add_settings_section(
220
- 'video_settings',
221
- __('Video Settings',YTCTDOM),
222
- array(&$this, 'video_settings_section_description'),
223
- $this->video_settings_key
224
- );
225
- add_settings_field(
226
- 'wpau_youtube_channel-ratio',
227
- __('Aspect Ratio',YTCTDOM),
228
- array(&$this, 'settings_field_select'),
229
- $this->video_settings_key,
230
- 'video_settings',
231
- array(
232
- 'field' => "youtube_channel_defaults[ratio]",
233
- 'description' => __('Select aspect ratio for displayed video',YTCTDOM),
234
- 'class' => 'regular-text',
235
- 'items' => array(
236
- "3" => __("16:9",YTCTDOM),
237
- "2" => __("16:10",YTCTDOM),
238
- "1" => __("4:3",YTCTDOM)
239
- ),
240
- 'value' => $this->defaults['ratio'],
241
- )
242
- );
243
- add_settings_field(
244
- 'wpau_youtube_channel-width',
245
- __('Video Width','wpaust'),
246
- array(&$this, 'settings_field_input_number'),
247
- $this->video_settings_key,
248
- 'video_settings',
249
- array(
250
- 'field' => "youtube_channel_defaults[width]",
251
- 'description' => __('Set default width for displayed video, in pixels',YTCTDOM),
252
- 'class' => 'number',
253
- 'value' => $this->defaults['width'],
254
- 'min' => 160,
255
- 'max' => 1920,
256
- 'step' => 1
257
- )
258
- );
259
- add_settings_field(
260
- 'wpau_youtube_channel-to_show',
261
- __('What to show?',YTCTDOM),
262
- array(&$this, 'settings_field_select'),
263
- $this->video_settings_key,
264
- 'video_settings',
265
- array(
266
- 'field' => "youtube_channel_defaults[to_show]",
267
- 'description' => __('Set what will be shown by default',YTCTDOM),
268
- 'class' => 'regular-text',
269
- 'items' => array(
270
- "thumbnail" => __("Thumbnail",YTCTDOM),
271
- "object" => __("Flash (object)",YTCTDOM),
272
- "iframe" => __("HTML5 (iframe)",YTCTDOM),
273
- "iframe2" => __("HTML5 (iframe) Async",YTCTDOM),
274
- "chromeless" => __("Chromeless",YTCTDOM)
275
- ),
276
- 'value' => $this->defaults['to_show'],
277
- )
278
- );
279
- add_settings_field(
280
- 'wpau_youtube_channel-themelight',
281
- __('Use light theme',YTCTDOM),
282
- array(&$this, 'settings_field_checkbox'),
283
- $this->video_settings_key,
284
- 'video_settings',
285
- array(
286
- 'field' => "youtube_channel_defaults[themelight]",
287
- 'description' => __('Enable this option to use light theme for playback controls instead dark',YTCTDOM),
288
- 'class' => 'checkbox',
289
- 'value' => $this->defaults['themelight'],
290
- )
291
- );
292
- add_settings_field(
293
- 'wpau_youtube_channel-controls',
294
- __('Hide player controls',YTCTDOM),
295
- array(&$this, 'settings_field_checkbox'),
296
- $this->video_settings_key,
297
- 'video_settings',
298
- array(
299
- 'field' => "youtube_channel_defaults[controls]",
300
- 'description' => __('Enable this option to hide playback controls',YTCTDOM),
301
- 'class' => 'checkbox',
302
- 'value' => $this->defaults['controls'],
303
- )
304
- );
305
- add_settings_field(
306
- 'wpau_youtube_channel-fixyt',
307
- __('Fix video height',YTCTDOM),
308
- array(&$this, 'settings_field_checkbox'),
309
- $this->video_settings_key,
310
- 'video_settings',
311
- array(
312
- 'field' => "youtube_channel_defaults[fixyt]",
313
- 'description' => __('Enable this option to fix video height when playback controls are not hidden',YTCTDOM),
314
- 'class' => 'checkbox',
315
- 'value' => $this->defaults['fixyt'],
316
- )
317
- );
318
- add_settings_field(
319
- 'wpau_youtube_channel-autoplay',
320
- __('Autoplay video or playlist',YTCTDOM),
321
- array(&$this, 'settings_field_checkbox'),
322
- $this->video_settings_key,
323
- 'video_settings',
324
- array(
325
- 'field' => "youtube_channel_defaults[autoplay]",
326
- 'description' => __('Enable this option to start video playback right after block is rendered',YTCTDOM),
327
- 'class' => 'checkbox',
328
- 'value' => $this->defaults['autoplay'],
329
- )
330
- );
331
- add_settings_field(
332
- 'wpau_youtube_channel-autoplay_mute',
333
- __('Mute video on autoplay',YTCTDOM),
334
- array(&$this, 'settings_field_checkbox'),
335
- $this->video_settings_key,
336
- 'video_settings',
337
- array(
338
- 'field' => "youtube_channel_defaults[autoplay_mute]",
339
- 'description' => __('Enable this option to mute video when start autoplay',YTCTDOM),
340
- 'class' => 'checkbox',
341
- 'value' => $this->defaults['autoplay_mute'],
342
- )
343
- );
344
- add_settings_field(
345
- 'wpau_youtube_channel-norel',
346
- __('Hide related videos',YTCTDOM),
347
- array(&$this, 'settings_field_checkbox'),
348
- $this->video_settings_key,
349
- 'video_settings',
350
- array(
351
- 'field' => "youtube_channel_defaults[norel]",
352
- 'description' => __('Enable this option to hide related videos after finished playback',YTCTDOM),
353
- 'class' => 'checkbox',
354
- 'value' => $this->defaults['norel'],
355
- )
356
- );
357
- } // END register_video_settings()
358
-
359
- function register_content_settings()
360
- {
361
- $this->plugin_settings_tabs[$this->content_settings_key] = 'Content';
362
- register_setting(
363
- $this->content_settings_key,
364
- $this->plugin_options_key,
365
- array(&$this, 'plugin_options_validate')
366
- );
367
-
368
- // add content settings section
369
- add_settings_section(
370
- 'content_settings',
371
- __('Content Layout',YTCTDOM),
372
- array(&$this, 'content_settings_section_description'),
373
- $this->content_settings_key
374
- );
375
- add_settings_field(
376
- 'wpau_youtube_channel-showtitle',
377
- __('Show video title',YTCTDOM),
378
- array(&$this, 'settings_field_checkbox'),
379
- $this->content_settings_key,
380
- 'content_settings',
381
- array(
382
- 'field' => "youtube_channel_defaults[showtitle]",
383
- 'description' => __('Enable this option to display title of video',YTCTDOM),
384
- 'class' => 'checkbox',
385
- 'value' => $this->defaults['showtitle']
386
- )
387
- );
388
- add_settings_field(
389
- 'wpau_youtube_channel-showvidesc',
390
- __('Show video description',YTCTDOM),
391
- array(&$this, 'settings_field_checkbox'),
392
- $this->content_settings_key,
393
- 'content_settings',
394
- array(
395
- 'field' => "youtube_channel_defaults[showvidesc]",
396
- 'description' => __('Enable this option to display description for video',YTCTDOM),
397
- 'class' => 'checkbox',
398
- 'value' => $this->defaults['showvidesc']
399
- )
400
- );
401
- add_settings_field(
402
- 'wpau_youtube_channel-videsclen',
403
- __('Description length',YTCTDOM),
404
- array(&$this, 'settings_field_input_number'),
405
- $this->content_settings_key,
406
- 'content_settings',
407
- array(
408
- 'field' => "youtube_channel_defaults[videsclen]",
409
- 'description' => __('Enter length for video description in characters (0 for full length)',YTCTDOM),
410
- 'class' => 'number',
411
- 'value' => $this->defaults['videsclen'],
412
- 'min' => 0,
413
- 'max' => 2000,
414
- 'step' => 1,
415
- )
416
- );
417
- add_settings_field(
418
- 'wpau_youtube_channel-descappend',
419
- __('Et cetera string',YTCTDOM),
420
- array(&$this, 'settings_field_input_text'),
421
- $this->content_settings_key,
422
- 'content_settings',
423
- array(
424
- 'field' => "youtube_channel_defaults[descappend]",
425
- 'description' => __(sprintf('Indicator for shortened video description (default: %s)',$this->defaults['descappend']),YTCTDOM),
426
- 'class' => 'small-text',
427
- 'value' => $this->defaults['descappend'],
428
- )
429
- );
430
- add_settings_field(
431
- 'wpau_youtube_channel-hideanno',
432
- __('Hide annotations from video',YTCTDOM),
433
- array(&$this, 'settings_field_checkbox'),
434
- $this->content_settings_key,
435
- 'content_settings',
436
- array(
437
- 'field' => "youtube_channel_defaults[hideanno]",
438
- 'description' => __('Enable this option to hide video annotations (custom text set by uploader over video during playback)',YTCTDOM),
439
- 'class' => 'checkbox',
440
- 'value' => $this->defaults['hideanno']
441
- )
442
- );
443
- add_settings_field(
444
- 'wpau_youtube_channel-hideinfo',
445
- __('Hide video info',YTCTDOM),
446
- array(&$this, 'settings_field_checkbox'),
447
- $this->content_settings_key,
448
- 'content_settings',
449
- array(
450
- 'field' => "youtube_channel_defaults[hideinfo]",
451
- 'description' => __('Enable this option to hide informations about video before play start (video title and uploader in overlay)',YTCTDOM),
452
- 'class' => 'checkbox',
453
- 'value' => $this->defaults['hideinfo']
454
- )
455
- );
456
- } // END register_content_settings
457
-
458
- function register_link_settings()
459
- {
460
- $this->plugin_settings_tabs[$this->link_settings_key] = 'Link to Channel';
461
- register_setting(
462
- $this->link_settings_key,
463
- $this->plugin_options_key,
464
- array(&$this, 'plugin_options_validate')
465
- );
466
-
467
- // add content settings section
468
- add_settings_section(
469
- 'link_settings',
470
- __('Link to Channel',YTCTDOM),
471
- array(&$this, 'link_settings_section_description'),
472
- $this->link_settings_key
473
- );
474
- add_settings_field(
475
- 'wpau_youtube_channel-goto_txt',
476
- __('Visit YouTube Channel text',YTCTDOM),
477
- array(&$this, 'settings_field_input_text'),
478
- $this->link_settings_key,
479
- 'link_settings',
480
- array(
481
- 'field' => "youtube_channel_defaults[goto_txt]",
482
- 'description' => __('Use placeholder %channel% to insert channel name',YTCTDOM),
483
- 'class' => 'regular-text',
484
- 'value' => $this->defaults['goto_txt'],
485
- )
486
- );
487
- add_settings_field(
488
- 'wpau_youtube_channel-showgoto',
489
- __('Show link to channel',YTCTDOM),
490
- array(&$this, 'settings_field_checkbox'),
491
- $this->link_settings_key,
492
- 'link_settings',
493
- array(
494
- 'field' => "youtube_channel_defaults[showgoto]",
495
- 'description' => __('Enable this option to show customized link to channel at the bottom of YTC block',YTCTDOM),
496
- 'class' => 'checkbox',
497
- 'value' => $this->defaults['showgoto']
498
- )
499
- );
500
- add_settings_field(
501
- 'wpau_youtube_channel-popup_goto',
502
- __('Open YouTube channel page',YTCTDOM),
503
- array(&$this, 'settings_field_select'),
504
- $this->link_settings_key,
505
- 'link_settings',
506
- array(
507
- 'field' => "youtube_channel_defaults[popup_goto]",
508
- 'description' => __('Set what will be shown by default',YTCTDOM),
509
- 'class' => 'regular-text',
510
- 'items' => array(
511
- "0" => __("in same window",YTCTDOM),
512
- "1" => __("in new window (JavaScript)",YTCTDOM),
513
- "2" => __("in new window (Target)",YTCTDOM),
514
- ),
515
- 'value' => $this->defaults['popup_goto'],
516
- )
517
- );
518
- add_settings_field(
519
- 'wpau_youtube_channel-userchan',
520
- __('Link to channel instead to user',YTCTDOM),
521
- array(&$this, 'settings_field_checkbox'),
522
- $this->link_settings_key,
523
- 'link_settings',
524
- array(
525
- 'field' => "youtube_channel_defaults[userchan]",
526
- 'description' => __('Enable this option if link to your channel have <code>/channel/</code> instead <code>/user/</code> part in URL',YTCTDOM),
527
- 'class' => 'checkbox',
528
- 'value' => $this->defaults['userchan']
529
- )
530
- );
531
- } // END register_link_settings()
532
-
533
- function register_tools_settings()
534
- {
535
- $this->plugin_settings_tabs[$this->tools_settings_key] = 'Tools';
536
- register_setting($this->help_settings_key, $this->help_settings_key);
537
-
538
- add_settings_section(
539
- 'tools_settings',
540
- __('Tools',YTCTDOM),
541
- array(&$this, 'tools_settings_section'),
542
- $this->tools_settings_key
543
- );
544
-
545
- } // END register_help_settings()
546
-
547
- function register_help_settings()
548
- {
549
- $this->plugin_settings_tabs[$this->help_settings_key] = 'Help';
550
- register_setting($this->help_settings_key, $this->help_settings_key);
551
-
552
- add_settings_section(
553
- 'help_settings',
554
- __('Help',YTCTDOM),
555
- array(&$this, 'help_settings_section'),
556
- $this->help_settings_key
557
- );
558
-
559
- } // END register_help_settings()
560
-
561
- function options_tabs() {
562
- $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_settings_key;
563
- echo '<h2 class="nav-tab-wrapper">';
564
- foreach ( $this->plugin_settings_tabs as $tab_key => $tab_caption ) {
565
- $active = $current_tab == $tab_key ? 'nav-tab-active' : '';
566
- echo '<a class="nav-tab ' . $active . '" href="?page=' . $this->plugin_settings_page . '&tab=' . $tab_key . '">' . $tab_caption . '</a>';
567
- }
568
- echo '</h2>';
569
- }
570
-
571
- public function general_settings_section_description()
572
- {
573
- // Think of this as help text for the section.
574
- _e('<p>Default settings for YouTuber Channel. This will be used as default values for shortcode.</p>',YTCTDOM);
575
- }
576
- public function video_settings_section_description()
577
- {
578
- // Think of this as help text for the section.
579
- _e('<p>Default settings for video section. This will be used as default values for shortcode.</p>',YTCTDOM);
580
- }
581
- public function content_settings_section_description()
582
- {
583
- // Think of this as help text for the section.
584
- _e('<p>Default settings for content layout section. This will be used as default values for shortcode.</p>',YTCTDOM);
585
- }
586
- public function link_settings_section_description()
587
- {
588
- // Think of this as help text for the section.
589
- _e('<p>Default settings for channel link at the bottom of video block. This will be used as default values for shortcode.</p>',YTCTDOM);
590
- }
591
- public function tools_settings_section()
592
- {
593
- include('settings_tools.php');
594
- }
595
- public function help_settings_section()
596
- {
597
- include('settings_help.php');
598
- }
599
-
600
- /**
601
- * This function provides text inputs for settings fields
602
- */
603
- public function settings_field_input_text($args)
604
- {
605
- extract( $args );
606
- echo sprintf('<input type="text" name="%s" id="%s" value="%s" class="%s" /><p class="description">%s</p>', $field, $field, $value, $class, $description);
607
- } // END public function settings_field_input_text($args)
608
-
609
- /**
610
- * This function provides number inputs for settings fields
611
- */
612
- public function settings_field_input_number($args)
613
- {
614
- extract( $args );
615
- echo sprintf('<input type="number" name="%s" id="%s" value="%s" class="%s" min="%s" max="%s" step="%s" /><p class="description">%s</p>', $field, $field, $value, $class, $min, $max, $step, $description);
616
- } // END public function settings_field_input_number($args)
617
-
618
- /**
619
- * This function provides checkbox for settings fields
620
- */
621
- public function settings_field_checkbox($args)
622
- {
623
- extract( $args );
624
- $checked = ( !empty($args['value']) ) ? 'checked="checked"' : '';
625
- echo sprintf('<label for="%s"><input type="checkbox" name="%s" id="%s" value="1" class="%s" %s />%s</label>', $field, $field, $field, $class, $checked, $description);
626
- } // END public function settings_field_checkbox($args)
627
-
628
- /**
629
- * This function provides textarea for settings fields
630
- */
631
- public function settings_field_textarea($args)
632
- {
633
- extract( $args );
634
- if (empty($rows)) $rows = 7;
635
- echo sprintf('<textarea name="%s" id="%s" rows="%s" class="%s">%s</textarea><p class="description">%s</p>', $field, $field, $rows, $class, $value, $description);
636
- } // END public function settings_field_textarea($args)
637
-
638
- /**
639
- * This function provides select for settings fields
640
- */
641
- public function settings_field_select($args)
642
- {
643
- extract( $args );
644
- $html = sprintf('<select id="%s" name="%s">',$field,$field);
645
- foreach ($items as $key=>$val)
646
- {
647
- $selected = ($value==$key) ? 'selected="selected"' : '';
648
- $html .= sprintf('<option %s value="%s">%s</option>',$selected,$key,$val);
649
- }
650
- $html .= sprintf('</select><p class="description">%s</p>',$description);
651
- echo $html;
652
- } // END public function settings_field_select($args)
653
-
654
- public function settings_field_colour_picker($args)
655
- {
656
- extract( $args );
657
- $html = sprintf('<input type="text" name="%s" id="%s" value="%s" class="wpau-color-field" />',$field, $field, $value);
658
- $html .= (!empty($description)) ? ' <p class="description">'.$description.'</p>' : '';
659
- echo $html;
660
- } // END public function settings_field_colour_picker($args)
661
-
662
- /**
663
- * add a menu
664
- */
665
- function add_menu()
666
- {
667
- // Add a page to manage this plugin's settings
668
- add_options_page(
669
- __(sprintf('%s Settings',YTCNAME),YTCTDOM),
670
- __(YTCNAME,YTCTDOM),
671
- 'manage_options',
672
- $this->plugin_settings_page,
673
- array(&$this, 'plugin_settings_page')
674
- );
675
- } // END function add_menu()
676
-
677
- /**
678
- * Menu Callback
679
- */
680
- public function plugin_settings_page()
681
- {
682
- if(!current_user_can('manage_options'))
683
- wp_die(__('You do not have sufficient permissions to access this page.'));
684
-
685
- // Render the settings template
686
- include(sprintf("%s/settings_template.php", dirname(__FILE__)));
687
- } // END public function plugin_settings_page()
688
- } // END class WPAU_YOUTUBE_CHANNEL_SETTINGS
689
- } // END if(!class_exists('WPAU_YOUTUBE_CHANNEL_SETTINGS'))
690
-
691
- add_action( 'plugins_loaded', create_function( '', '$ytc_settings = new WPAU_YOUTUBE_CHANNEL_SETTINGS;' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/settings_template.php DELETED
@@ -1,19 +0,0 @@
1
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" style="float:right">
2
- <input type="hidden" name="cmd" value="_s-xclick">
3
- <input type="hidden" name="hosted_button_id" value="YPUHSQ2G3YHQQ">
4
- <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
5
- <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
6
- </form>
7
- <?php
8
- $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_settings_key;
9
- ?>
10
- <div class="wrap" id="youtube_channel_settings">
11
- <h2><?php _e(sprintf('%s Settings',YTCNAME),YTCTDOM); ?></h2>
12
- <?php $this->options_tabs(); ?>
13
- <form method="post" action="options.php">
14
- <?php wp_nonce_field( 'update-options' ); ?>
15
- <?php settings_fields( $tab ); ?>
16
- <?php do_settings_sections( $tab ); ?>
17
- <?php submit_button(); ?>
18
- </form>
19
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/config.php ADDED
@@ -0,0 +1,505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ ReduxFramework YouTube Channel File
4
+ **/
5
+
6
+ if ( !class_exists( "ReduxFramework" ) ) {
7
+ return;
8
+ }
9
+
10
+ if ( !class_exists( "Redux_Framework_YouTube_Channel" ) ) {
11
+ class Redux_Framework_YouTube_Channel {
12
+
13
+ public $args = array();
14
+ public $sections = array();
15
+ public $ReduxFramework;
16
+
17
+ public function __construct( ) {
18
+
19
+ // Set the default arguments
20
+ $this->setArguments();
21
+
22
+ // Create the sections and fields
23
+ $this->setSections();
24
+
25
+ if ( !isset( $this->args['opt_name'] ) ) { // No errors please
26
+ return;
27
+ }
28
+
29
+ // If Redux is running as a plugin, this will remove the demo notice and links
30
+ add_action( 'redux/plugin/hooks', array( $this, 'remove_demo' ) );
31
+
32
+ $this->ReduxFramework = new ReduxFramework($this->sections, $this->args);
33
+
34
+ }
35
+
36
+ // Remove the demo link and the notice of integrated demo from the redux-framework plugin
37
+ function remove_demo() {
38
+
39
+ // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.
40
+ if ( class_exists('ReduxFrameworkPlugin') ) {
41
+ remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_meta_demo_mode_link'), null, 2 );
42
+ }
43
+
44
+ // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.
45
+ remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) );
46
+
47
+ }
48
+
49
+ public function setSections() {
50
+ global $WPAU_YOUTUBE_CHANNEL;
51
+ // ACTUAL DECLARATION OF SECTIONS
52
+
53
+ $this->sections[] = array(
54
+ 'title' => __('General', 'youtube-channel'),
55
+ 'icon' => 'el-icon-home',
56
+ 'fields' => array(
57
+ array(
58
+ 'id' => 'channel',
59
+ 'type' => 'text',
60
+ 'title' => __('YouTube Channel ID', 'youtube-channel'),
61
+ 'desc' => __('Enter your YouTube channel ID (channel name, not full URL to channel)', 'youtube-channel'),
62
+ 'default' => $WPAU_YOUTUBE_CHANNEL->channel_id
63
+ ),
64
+ array(
65
+ 'id' => 'playlist',
66
+ 'type' => 'text',
67
+ 'title' => __('Default Playlist ID', 'youtube-channel'),
68
+ 'desc' => __('Enter default playlist ID (not playlist name)', 'youtube-channel'),
69
+ 'default' => $WPAU_YOUTUBE_CHANNEL->playlist_id
70
+ ),
71
+ array(
72
+ 'id' => 'use_res',
73
+ 'type' => 'select',
74
+ 'title' => __('Resource to use', 'youtube-channel'),
75
+ 'desc' => __('What to use as resource for feeds', 'youtube-channel'),
76
+ 'options' => array(
77
+ '0' => __('Channel', 'youtube-channel'),
78
+ '1' => __('Favorites', 'youtube-channel'),
79
+ '2' => __('Playlist', 'youtube-channel'),
80
+ ),
81
+ 'default' => '0'
82
+ ),
83
+ array(
84
+ 'id' => 'only_pl',
85
+ 'type' => 'checkbox',
86
+ 'title' => __('Embed standard playlist', 'youtube-channel'),
87
+ 'desc' => __('Enable this option to embed whole playlist instead single video from playlist when you chose playlist as resource', 'youtube-channel'),
88
+ 'default' => '0'// 1 = on | 0 = off
89
+ ),
90
+ array(
91
+ 'id' => 'cache_time',
92
+ 'type' => 'select',
93
+ 'title' => __('Cache Timeout', 'youtube-channel'),
94
+ 'desc' => __('Define caching timeout for YouTube feeds, in seconds', 'youtube-channel'),
95
+
96
+ 'options' => array(
97
+ '0' => __('Do not chache', 'youtube-channel'),
98
+ '60' => __('1 minute', 'youtube-channel'),
99
+ '300' => __('5 minutes', 'youtube-channel'),
100
+ '900' => __('15 minutes', 'youtube-channel'),
101
+ '1800' => __('30 minutes', 'youtube-channel'),
102
+ '3600' => __('1 hour', 'youtube-channel'),
103
+ '7200' => __('2 hours', 'youtube-channel'),
104
+ '18000' => __('5 hours', 'youtube-channel'),
105
+ '36000' => __('10 hours', 'youtube-channel'),
106
+ '43200' => __('12 hours', 'youtube-channel'),
107
+ '64800' => __('18 hours', 'youtube-channel'),
108
+ '86400' => __('1 day', 'youtube-channel'),
109
+ '172800' => __('2 days', 'youtube-channel'),
110
+ '259200' => __('3 days', 'youtube-channel'),
111
+ '345600' => __('4 days', 'youtube-channel'),
112
+ '432000' => __('5 days', 'youtube-channel'),
113
+ '518400' => __('6 days', 'youtube-channel'),
114
+ '604800' => __('1 week', 'youtube-channel'),
115
+ '1209600' => __('2 weeks', 'youtube-channel'),
116
+ '1814400' => __('3 weeks', 'youtube-channel'),
117
+ '2419200' => __('1 month', 'youtube-channel')
118
+ ),
119
+ 'default' => '0'
120
+ ),
121
+ array(
122
+ 'id' =>'maxrnd',
123
+ 'type' => 'spinner',
124
+ 'title' => __('Fetch', 'youtube-channel'),
125
+ 'desc' => __('Number of videos that will be used for random pick (min 2, max 50, default 25)', 'youtube-channel'),
126
+ 'default' => 25,
127
+ 'min' => 2,
128
+ 'max' => 50,
129
+ 'step' => 1
130
+ ),
131
+ array(
132
+ 'id' =>'vidqty',
133
+ 'type' => 'spinner',
134
+ 'title' => __('Show', 'youtube-channel'),
135
+ 'desc' => __('Number of videos to display', 'youtube-channel'),
136
+ 'default' => 1,
137
+ 'min' => 1,
138
+ 'max' => 50,
139
+ 'step' => 1
140
+ ),
141
+ array(
142
+ 'id' => 'enhprivacy',
143
+ 'type' => 'checkbox',
144
+ 'title' => __('Use Enhanced privacy', 'youtube-channel'),
145
+ 'desc' => sprintf(__('Enable this option to protect your visitors <a href="%s" target="_blank">privacy</a>.', 'youtube-channel'), 'http://support.google.com/youtube/bin/answer.py?hl=en-GB&answer=171780'),
146
+ 'default' => 0
147
+ ),
148
+ array(
149
+ 'id' => 'fixnoitem',
150
+ 'type' => 'checkbox',
151
+ 'title' => __('Fix <em>No items</em> error/Respect playlist order', 'youtube-channel'),
152
+ 'desc' => __('Enable this option if you get error No Item', 'youtube-channel'),
153
+ 'default' => 0
154
+ ),
155
+ array(
156
+ 'id' => 'getrnd',
157
+ 'type' => 'checkbox',
158
+ 'title' => __('Show random video', 'youtube-channel'),
159
+ 'desc' => __('Get random videos of all fetched from channel or playlist', 'youtube-channel'),
160
+ 'default' => 0
161
+ ),
162
+
163
+ )
164
+ );
165
+
166
+ $this->sections[] = array(
167
+ 'icon' => 'el-icon-youtube',
168
+ 'title' => __('Video', 'youtube-channel'),
169
+ 'fields' => array(
170
+
171
+ array(
172
+ 'id' => 'ratio',
173
+ 'type' => 'select',
174
+ 'title' => __('Aspect Ratio', 'youtube-channel'),
175
+ 'desc' => __('Select aspect ratio for displayed video', 'youtube-channel'),
176
+
177
+ 'options' => array(
178
+ '3' => __('16:9', 'youtube-channel'),
179
+ '2' => __('16:10', 'youtube-channel'),
180
+ '1' => __('4:3', 'youtube-channel')
181
+ ),
182
+ 'default' => '3'
183
+ ),
184
+ array(
185
+ 'id' => 'width',
186
+ 'type' => 'spinner',
187
+ 'title' => __('Video Width', 'youtube-channel'),
188
+ 'desc' => __('Set default width for displayed video, in pixels', 'youtube-channel'),
189
+ 'default' => 306,
190
+ 'min' => 50,
191
+ 'max' => 1980,
192
+ 'step' => 1
193
+ ),
194
+ array(
195
+ 'id' => 'to_show',
196
+ 'type' => 'select',
197
+ 'title' => __('What to show?', 'youtube-channel'),
198
+ 'desc' => __('Set what will be shown by default', 'youtube-channel'),
199
+
200
+ 'options' => array(
201
+ 'thumbnail' => __('Thumbnail', 'youtube-channel'),
202
+ 'object' => __('Flash (object)', 'youtube-channel'),
203
+ 'iframe' => __('HTML5 (iframe)', 'youtube-channel'),
204
+ 'iframe2' => __('HTML5 (iframe) Async', 'youtube-channel'),
205
+ 'chromeless' => __('Chromeless', 'youtube-channel')
206
+ ),
207
+ 'default' => 'thumbnail'
208
+ ),
209
+ array(
210
+ 'id' => 'themelight',
211
+ 'type' => 'checkbox',
212
+ 'title' => __('Use light theme', 'youtube-channel'),
213
+ 'desc' => __('Enable this option to use light theme for playback controls instead dark', 'youtube-channel'),
214
+ 'default' => 0
215
+ ),
216
+ array(
217
+ 'id' => 'controls',
218
+ 'type' => 'checkbox',
219
+ 'title' => __('Hide player controls', 'youtube-channel'),
220
+ 'desc' => __('Enable this option to hide playback controls', 'youtube-channel'),
221
+ 'default' => 0
222
+ ),
223
+ array(
224
+ 'id' => 'fixyt',
225
+ 'type' => 'checkbox',
226
+ 'title' => __('Fix video height', 'youtube-channel'),
227
+ 'desc' => __('Enable this option to fix video height when playback controls are not hidden', 'youtube-channel'),
228
+ 'default' => 0
229
+ ),
230
+ array(
231
+ 'id' => 'autoplay',
232
+ 'type' => 'checkbox',
233
+ 'title' => __('Autoplay video or playlist', 'youtube-channel'),
234
+ 'desc' => __('Enable this option to start video playback right after block is rendered', 'youtube-channel'),
235
+ 'default' => 0
236
+ ),
237
+ array(
238
+ 'id' => 'autoplay_mute',
239
+ 'type' => 'checkbox',
240
+ 'title' => __('Mute video on autoplay', 'youtube-channel'),
241
+ 'desc' => __('Enable this option to mute video when start autoplay', 'youtube-channel'),
242
+ 'default' => 0
243
+ ),
244
+ array(
245
+ 'id' => 'norel',
246
+ 'type' => 'checkbox',
247
+ 'title' => __('Hide related videos', 'youtube-channel'),
248
+ 'desc' => __('Enable this option to hide related videos after finished playback', 'youtube-channel'),
249
+ 'default' => 0
250
+ ),
251
+
252
+ )
253
+ );
254
+
255
+ $this->sections[] = array(
256
+ 'icon' => 'el-icon-view-mode',
257
+ 'title' => __('Content', 'youtube-channel'),
258
+ 'fields' => array(
259
+
260
+ array(
261
+ 'id' => 'showtitle',
262
+ 'type' => 'checkbox',
263
+ 'title' => __('Show video title', 'youtube-channel'),
264
+ 'desc' => __('Enable this option to display title of video', 'youtube-channel'),
265
+ 'default' => 0
266
+ ),
267
+ array(
268
+ 'id' => 'showvidesc',
269
+ 'type' => 'checkbox',
270
+ 'title' => __('Show video description', 'youtube-channel'),
271
+ 'desc' => __('Enable this option to display description for video', 'youtube-channel'),
272
+ 'default' => 0
273
+ ),
274
+ array(
275
+ 'id' =>'videsclen',
276
+ 'type' => 'spinner',
277
+ 'title' => __('Description length', 'youtube-channel'),
278
+ 'desc' => __('Enter length for video description in characters (0 for full length)', 'youtube-channel'),
279
+ 'default' => 0,
280
+ 'min' => 0,
281
+ 'max' => 2500,
282
+ 'step' => 1
283
+ ),
284
+ array(
285
+ 'id' => 'descappend',
286
+ 'type' => 'text',
287
+ 'title' => __('Et cetera string', 'youtube-channel'),
288
+ 'desc' => __('Indicator for shortened video description (default: …)', 'youtube-channel'),
289
+ 'default' => __('...', 'youtube-channel')
290
+ ),
291
+ array(
292
+ 'id' => 'hideanno',
293
+ 'type' => 'checkbox',
294
+ 'title' => __('Hide annotations from video', 'youtube-channel'),
295
+ 'desc' => __('Enable this option to hide video annotations (custom text set by uploader over video during playback)', 'youtube-channel'),
296
+ 'default' => 0
297
+ ),
298
+ array(
299
+ 'id' => 'hideinfo',
300
+ 'type' => 'checkbox',
301
+ 'title' => __('Hide video info', 'youtube-channel'),
302
+ 'desc' => __('Enable this option to hide informations about video before play start (video title and uploader in overlay)', 'youtube-channel'),
303
+ 'default' => 0
304
+ ),
305
+
306
+ )
307
+ );
308
+
309
+ $this->sections[] = array(
310
+ 'icon' => 'el-icon-link',
311
+ 'title' => __('Link to Channel', 'youtube-channel'),
312
+ 'fields' => array(
313
+
314
+ array(
315
+ 'id' => 'goto_txt',
316
+ 'type' => 'text',
317
+ 'title' => __('Visit YouTube Channel text', 'youtube-channel'),
318
+ 'desc' => __('Use placeholder %channel% to insert channel name', 'youtube-channel'),
319
+ 'default' => __('Visit my channel %channel%', 'youtube-channel')
320
+ ),
321
+ array(
322
+ 'id' => 'showgoto',
323
+ 'type' => 'checkbox',
324
+ 'title' => __('Show link to channel', 'youtube-channel'),
325
+ 'desc' => __('Enable this option to show customized link to channel at the bottom of YTC block', 'youtube-channel'),
326
+ 'default' => 0
327
+ ),
328
+ array(
329
+ 'id' => 'popup_goto',
330
+ 'type' => 'select',
331
+ 'title' => __('Open YouTube channel page', 'youtube-channel'),
332
+ 'desc' => __('Set what will be shown by default', 'youtube-channel'),
333
+
334
+ 'options' => array(
335
+ '0' => __('in same window', 'youtube-channel'),
336
+ '1' => __('in new window (JavaScript)', 'youtube-channel'),
337
+ '2' => __('in new window (Target)', 'youtube-channel')
338
+ ),
339
+ 'default' => '0'
340
+ ),
341
+ array(
342
+ 'id' => 'userchan',
343
+ 'type' => 'checkbox',
344
+ 'title' => __('Link to channel instead to user', 'youtube-channel'),
345
+ 'desc' => __('Enable this option if link to your channel have <code>/channel/</code> instead <code>/user/</code> part in URL', 'youtube-channel'),
346
+ 'default' => 0
347
+ ),
348
+
349
+ )
350
+ );
351
+
352
+ $this->sections[] = array(
353
+ 'icon' => 'el-icon-magic',
354
+ 'title' => __('Tools', 'youtube-channel'),
355
+ 'fields' => array(
356
+ array(
357
+ 'id' => 'recache',
358
+ 'type' => 'raw',
359
+ 'markdown' => false,
360
+ 'content' => file_get_contents(dirname(__FILE__) . '/settings_tools.php')
361
+ ),
362
+ )
363
+ );
364
+
365
+ $this->sections[] = array(
366
+ 'type' => 'divide',
367
+ );
368
+
369
+ $this->sections[] = array(
370
+ 'icon' => 'el-icon-question-sign',
371
+ 'title' => __('Usage', 'youtube-channel'),
372
+ 'fields' => array(
373
+ array(
374
+ 'id' => 'implementation',
375
+ 'title' => 'How to use '.$WPAU_YOUTUBE_CHANNEL->plugin_name,
376
+ 'type' => 'raw',
377
+ 'content' => file_get_contents(dirname(__FILE__) . '/settings_usage.php')
378
+ ),
379
+ array(
380
+ 'id' => 'shortcode',
381
+ 'title' => 'How to use shortcode',
382
+ 'subtitle' => 'Shortcode parameters with default values',
383
+ 'type' => 'raw',
384
+ // 'raw_html' => true,
385
+ 'content' => file_get_contents(dirname(__FILE__) . '/settings_usage_shortcode.php')
386
+ )
387
+ )
388
+ );
389
+
390
+ $this->sections[] = array(
391
+ 'icon' => 'el-icon-group',
392
+ 'title' => __('Support', 'youtube-channel'),
393
+ 'fields' => array(
394
+ array(
395
+ 'id' => 'support',
396
+ 'type' => 'raw',
397
+ // 'raw_html' => true,
398
+ 'content' => file_get_contents(dirname(__FILE__) . '/settings_support.php')
399
+ ),
400
+ )
401
+ );
402
+
403
+ }
404
+
405
+ /**
406
+ All the possible arguments for Redux.
407
+ For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
408
+
409
+ **/
410
+ public function setArguments() {
411
+ global $WPAU_YOUTUBE_CHANNEL;
412
+ $theme = wp_get_theme(); // For use with some settings. Not necessary.
413
+
414
+ $this->args = array(
415
+
416
+ // TYPICAL -> Change these values as you need/desire
417
+ 'opt_name' => $WPAU_YOUTUBE_CHANNEL->plugin_option, // This is where your data is stored in the database and also becomes your global variable name.
418
+ 'display_name' => $WPAU_YOUTUBE_CHANNEL->plugin_name, // Name that appears at the top of your panel
419
+ 'display_version' => $WPAU_YOUTUBE_CHANNEL->plugin_version, // Version that appears at the top of your panel
420
+ 'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
421
+ 'allow_sub_menu' => true, // Show the sections below the admin menu item or not
422
+ 'menu_title' => __( $WPAU_YOUTUBE_CHANNEL->plugin_name, $WPAU_YOUTUBE_CHANNEL->plugin_slug ),
423
+ 'page' => __( $WPAU_YOUTUBE_CHANNEL->plugin_name.' Options', $WPAU_YOUTUBE_CHANNEL->plugin_slug ),
424
+ 'google_api_key' => '', // Must be defined to add google fonts to the typography module
425
+ 'global_variable' => '', // Set a different name for your global variable other than the opt_name
426
+ 'dev_mode' => false, // Show the time the page took to load, etc
427
+ 'customizer' => true, // Enable basic customizer support
428
+
429
+ // OPTIONAL -> Give you extra features
430
+ 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
431
+ 'page_parent' => 'options-general.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
432
+ 'page_permissions' => 'manage_options', // Permissions needed to access the options panel.
433
+ 'menu_icon' => '', // Specify a custom URL to an icon
434
+ 'last_tab' => '', // Force your panel to always open to a specific tab (by id)
435
+ 'page_icon' => 'icon-settings', // Icon displayed in the admin panel next to your menu_title
436
+ 'page_slug' => $WPAU_YOUTUBE_CHANNEL->plugin_slug, // Page slug used to denote the panel
437
+ 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not
438
+ 'default_show' => false, // If true, shows the default value next to each field that is not the default value.
439
+ 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: *
440
+
441
+
442
+ // CAREFUL -> These options are for advanced use only
443
+ 'transient_time' => 60 * MINUTE_IN_SECONDS,
444
+ 'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output
445
+ 'output_tag' => true, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
446
+ //'domain' => 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.
447
+ //'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it.
448
+
449
+
450
+ // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.
451
+ 'database' => '', // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!
452
+
453
+
454
+ 'show_import_export' => true, // REMOVE
455
+ 'system_info' => false, // REMOVE
456
+
457
+ 'help_tabs' => array(),
458
+ 'help_sidebar' => '', // __( '', $this->args['domain'] );
459
+ );
460
+
461
+
462
+ // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
463
+ $this->args['share_icons'][] = array(
464
+ 'url' => 'https://www.facebook.com/urosevic',
465
+ 'title' => 'Author on Facebook',
466
+ 'icon' => 'el-icon-facebook'
467
+ );
468
+ $this->args['share_icons'][] = array(
469
+ 'url' => 'http://twitter.com/urosevic',
470
+ 'title' => 'Add me on Twitter',
471
+ 'icon' => 'el-icon-twitter'
472
+ );
473
+ $this->args['share_icons'][] = array(
474
+ 'url' => 'http://rs.linkedin.com/in/aurosevic',
475
+ 'title' => 'Find me on LinkedIn',
476
+ 'icon' => 'el-icon-linkedin'
477
+ );
478
+ $this->args['share_icons'][] = array(
479
+ 'url' => 'http://youtube.com/user/urkekg',
480
+ 'title' => 'Subscribe to my YouTube',
481
+ 'icon' => 'el-icon-youtube'
482
+ );
483
+ $this->args['share_icons'][] = array(
484
+ 'url' => 'http://urosevic.net/wordpress/plugins/youtube-channel/',
485
+ 'title' => 'Visit official plugin site',
486
+ 'icon' => 'el-icon-home-alt'
487
+ );
488
+
489
+ // Panel Intro text -> before the form
490
+ if (!isset($this->args['global_variable']) || $this->args['global_variable'] !== false ) {
491
+ if (!empty($this->args['global_variable'])) {
492
+ $v = $this->args['global_variable'];
493
+ } else {
494
+ $v = str_replace("-", "_", $this->args['opt_name']);
495
+ }
496
+ $this->args['intro_text'] = '<p style="float:right;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6Q762MQ97XJ6" target="_blank" title="Donate via PayPal - The safer, easier way to pay online!"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" style="width:147px;height:47px;border:0" alt="PayPal - The safer, easier way to pay online!"></a></p>';
497
+ $this->args['intro_text'] .= __('<p>Easy embed playable videos from YouTube.</p><p>Here you can set default options that will be used as defaults for new widgets, and for shortcode.</p>', 'youtube-channel' );
498
+ $this->args['intro_text'] .='<p>&nbsp;</p>';
499
+ }
500
+
501
+ }
502
+ }
503
+ global $reduxConfig;
504
+ $reduxConfig = new Redux_Framework_YouTube_Channel();
505
+ }
inc/settings_support.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <p>For all questions, feature request and communication with author and users of this plugin, use our <a href="http://wordpress.org/support/plugin/youtube-channel">support forum</a>.</p>
2
+
3
+ <p>If you like <a href="http://wordpress.org/plugins/youtube-channel/">Posts per Cat</a> and my other <a href="http://urosevic.net/wordpress/plugins/">WordPress extensions</a>, feel free to support my work with <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6Q762MQ97XJ6">donation</a>.</p>
{assets → inc}/settings_tools.php RENAMED
File without changes
inc/settings_usage.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <p>You can insert YouTube Channel in couple different ways.</p>
2
+ <ol>
3
+ <li>Insert <a href="widget.php">YouTube Channel Widget</a> in preferred Widget Area, and configure it there.</li>
4
+ <li>Insert shortcode <code>[youtube_channel]</code> to your page or text widget, and even modify default settings by shortcode parameters listed in section below.</li>
5
+ </ol>
assets/settings_help.php → inc/settings_usage_shortcode.php RENAMED
@@ -1,8 +1,8 @@
1
  <p>You also can use shortcode <code>[youtube_channel]</code> with options listed below (all options are optional):</p>
2
  <h3>General Settings</h3>
3
  <ul>
4
- <li><code>channel</code> <em>(string)</em> ID of preferred YouTube channel. Do not set full URL to channel, but just last part from URL - ID (name)</li>
5
- <li><code>playlist</code> <em>(string)</em> ID of preferred YouTube playlist.</li>
6
  <li><code>res</code> <em>(int)</em> Resource to use for feed:
7
  <ul>
8
  <li>&bullet; <code>0</code> Channel</li>
@@ -60,4 +60,4 @@
60
  </ul>
61
 
62
  <p>Please note, you can exclude all options listed above, and then we'll use default options from Settings page.</p>
63
- <p>YTC blocks inserted through widget have own settings.</p>
1
  <p>You also can use shortcode <code>[youtube_channel]</code> with options listed below (all options are optional):</p>
2
  <h3>General Settings</h3>
3
  <ul>
4
+ <li><code>channel</code> <em>(string)</em> ID of preferred YouTube channel. Do not set full URL to channel, but just last part from URL - ID (name)</li>
5
+ <li><code>playlist</code> <em>(string)</em> ID of preferred YouTube playlist.</li>
6
  <li><code>res</code> <em>(int)</em> Resource to use for feed:
7
  <ul>
8
  <li>&bullet; <code>0</code> Channel</li>
60
  </ul>
61
 
62
  <p>Please note, you can exclude all options listed above, and then we'll use default options from Settings page.</p>
63
+ <p>YTC blocks inserted through widget have own settings.</p>
inc/tools.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+
inc/widget.php ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* youtube widget */
4
+ class WPAU_YOUTUBE_CHANNEL_Widget extends WP_Widget {
5
+
6
+ public function __construct() {
7
+ global $WPAU_YOUTUBE_CHANNEL;
8
+ // Initialize Widget
9
+ parent::__construct(
10
+ $WPAU_YOUTUBE_CHANNEL->plugin_slug,
11
+ __( 'Youtube Channel' , 'youtube-channel' ),
12
+ array( 'description' => __( 'Serve YouTube videos from channel or playlist right to widget area', 'youtube-channel' ) )
13
+ );
14
+ }
15
+
16
+ public function widget($args, $instance) {
17
+ global $WPAU_YOUTUBE_CHANNEL;
18
+ // outputs the content of the widget
19
+ extract( $args );
20
+
21
+ $title = apply_filters('widget_title', $instance['title']);
22
+
23
+ $output = array();
24
+ $output[] = $before_widget;
25
+ if ( $title ) $output[] = $before_title . $title . $after_title;
26
+ $output[] = implode($WPAU_YOUTUBE_CHANNEL->output($instance));
27
+ $output[] = $after_widget;
28
+
29
+ echo implode('',array_values($output));
30
+ }
31
+
32
+ public function form($instance) {
33
+ global $WPAU_YOUTUBE_CHANNEL;
34
+ // outputs the options form for widget settings
35
+ // General Options
36
+ $title = (!empty($instance['title'])) ? esc_attr($instance['title']) : '';
37
+ $class = (!empty($instance['class'])) ? esc_attr($instance['class']) : '';
38
+ $channel = (!empty($instance['channel'])) ? esc_attr($instance['channel']) : '';
39
+ $playlist = (!empty($instance['playlist'])) ? esc_attr($instance['playlist']) : '';
40
+
41
+ $use_res = (!empty($instance['use_res'])) ? esc_attr($instance['use_res']) : 0; // resource to use: channel, favorites, playlist
42
+ $only_pl = (!empty($instance['only_pl'])) ? esc_attr($instance['only_pl']) : '';
43
+
44
+ $cache_time = (!empty($instance['cache_time'])) ? esc_attr($instance['cache_time']) : '';
45
+
46
+ $maxrnd = (!empty($instance['maxrnd'])) ? esc_attr($instance['maxrnd']) : 25; // items to fetch
47
+ $vidqty = (!empty($instance['vidqty'])) ? esc_attr($instance['vidqty']) : 1; // number of items to show
48
+
49
+ $enhprivacy = (!empty($instance['enhprivacy'])) ? esc_attr($instance['enhprivacy']) : '';
50
+ $fixnoitem = (!empty($instance['fixnoitem'])) ? esc_attr($instance['fixnoitem']) : '';
51
+ $getrnd = (!empty($instance['getrnd'])) ? esc_attr($instance['getrnd']) : '';
52
+
53
+ // Video Settings
54
+ $ratio = (!empty($instance['ratio'])) ? esc_attr($instance['ratio']) : 3;
55
+ $width = (!empty($instance['width'])) ? esc_attr($instance['width']) : 306;
56
+
57
+ $to_show = (!empty($instance['to_show'])) ? esc_attr($instance['to_show']) : '';
58
+ $themelight = (!empty($instance['themelight'])) ? esc_attr($instance['themelight']) : '';
59
+ $controls = (!empty($instance['controls'])) ? esc_attr($instance['controls']) : '';
60
+ $fixyt = (!empty($instance['fixyt'])) ? esc_attr($instance['fixyt']) : '';
61
+ $autoplay = (!empty($instance['autoplay'])) ? esc_attr($instance['autoplay']) : '';
62
+ $autoplay_mute = (!empty($instance['autoplay_mute'])) ? esc_attr($instance['autoplay_mute']) : '';
63
+ $norel = (!empty($instance['norel'])) ? esc_attr($instance['norel']) : '';
64
+
65
+ // Content Layout
66
+ $showtitle = (!empty($instance['showtitle'])) ? esc_attr($instance['showtitle']) : '';
67
+ $showvidesc = (!empty($instance['showvidesc'])) ? esc_attr($instance['showvidesc']) : '';
68
+ $videsclen = (!empty($instance['videsclen'])) ? esc_attr($instance['videsclen']) : 0;
69
+ $descappend = (!empty($instance['descappend'])) ? esc_attr($instance['descappend']) : '&hellip;';
70
+
71
+ $hideanno = (!empty($instance['hideanno'])) ? esc_attr($instance['hideanno']) : '';
72
+ $hideinfo = (!empty($instance['hideinfo'])) ? esc_attr($instance['hideinfo']) : '';
73
+
74
+ // Link to Channel
75
+ $goto_txt = (!empty($instance['goto_txt'])) ? esc_attr($instance['goto_txt']) : '';
76
+ $showgoto = (!empty($instance['showgoto'])) ? esc_attr($instance['showgoto']) : '';
77
+ $popup_goto = (!empty($instance['popup_goto'])) ? esc_attr($instance['popup_goto']) : '';
78
+ $userchan = (!empty($instance['userchan'])) ? esc_attr($instance['userchan']) : '';
79
+
80
+ // Debug YTC
81
+ $debugon = (!empty($instance['debugon'])) ? esc_attr($instance['debugon']) : '';
82
+ ?>
83
+
84
+ <p>
85
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title', 'youtube-channel'); ?>:<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" title="<?php _e('Title for widget', 'youtube-channel'); ?>" /></label>
86
+ </p>
87
+ <p>
88
+ <label for="<?php echo $this->get_field_id('class'); ?>"><?php _e('Custom CSS Class', 'youtube-channel'); ?>:<input type="text" class="widefat" id="<?php echo $this->get_field_id('class'); ?>" name="<?php echo $this->get_field_name('class'); ?>" value="<?php echo $class; ?>" title="<?php _e('Enter custom class for YTC block, if you wish to target block styling', 'youtube-channel'); ?>" /></label>
89
+ </p>
90
+ <p>
91
+ <label for="<?php echo $this->get_field_id('channel'); ?>"><?php _e('Channel ID', 'youtube-channel'); ?>:<input type="text" class="widefat" id="<?php echo $this->get_field_id('channel'); ?>" name="<?php echo $this->get_field_name('channel'); ?>" value="<?php echo $channel; ?>" title="<?php _e('YouTube Channel name (not URL to channel)', 'youtube-channel'); ?>" /></label>
92
+ </p>
93
+ <p>
94
+ <label for="<?php echo $this->get_field_id('playlist'); ?>"><?php _e('Playlist ID', 'youtube-channel'); ?>:<input type="text" class="widefat" id="<?php echo $this->get_field_id('playlist'); ?>" name="<?php echo $this->get_field_name('playlist'); ?>" value="<?php echo $playlist; ?>" title="<?php _e('YouTube Playlist ID (not playlist name)', 'youtube-channel'); ?>" /></label>
95
+ </p>
96
+ <p>
97
+ <label for="<?php echo $this->get_field_id('use_res'); ?>"><?php _e('Resource to use', 'youtube-channel'); ?>:</label>
98
+ <select class="widefat" id="<?php echo $this->get_field_id( 'use_res' ); ?>" name="<?php echo $this->get_field_name( 'use_res' ); ?>">
99
+ <option value="0"<?php selected( $use_res, 0 ); ?>><?php _e('Channel', 'youtube-channel'); ?></option>
100
+ <option value="1"<?php selected( $use_res, 1 ); ?>><?php _e('Favorites', 'youtube-channel'); ?></option>
101
+ <option value="2"<?php selected( $use_res, 2 ); ?>><?php _e('Playlist', 'youtube-channel'); ?></option>
102
+ </select>
103
+ <br />
104
+ <label style="display: none" for="<?php echo $this->get_field_id( 'only_pl' ); ?>" id="<?php echo $this->get_field_id( 'only_pl' ); ?>_label"><input class="checkbox" type="checkbox" <?php checked( (bool) $only_pl, true ); ?> id="<?php echo $this->get_field_id( 'only_pl' ); ?>" name="<?php echo $this->get_field_name( 'only_pl' ); ?>" title="<?php _e('Enable this option to embed YouTube playlist widget instead single video from playlist', 'youtube-channel'); ?>" /> <?php _e('Embed standard playlist', 'youtube-channel'); ?></label>
105
+ </p>
106
+ <?php $onlypl_js_fn = str_replace('-','_',$this->get_field_id( 'only_pl' )); ?>
107
+ <script type="text/javascript">
108
+ jQuery(document).ready(function($){
109
+ toggle_<?php echo $onlypl_js_fn; ?>($('#<?php echo $this->get_field_id( 'use_res' ); ?>'));
110
+ $('#<?php echo $this->get_field_id( 'use_res' ); ?>').change(function(){
111
+ toggle_<?php echo $onlypl_js_fn; ?>($(this));
112
+ });
113
+ function toggle_<?php echo $onlypl_js_fn; ?>(d) {
114
+ if ( d.find(':selected')[0].value == 2 ) {
115
+ $('#<?php echo $this->get_field_id( 'only_pl' ); ?>_label').fadeIn();
116
+ } else {
117
+ $('#<?php echo $this->get_field_id( 'only_pl' ); ?>_label').fadeOut();
118
+ }
119
+ }
120
+ });
121
+ </script>
122
+ <p>
123
+ <label for="<?php echo $this->get_field_id('cache_time'); ?>"><?php _e('Cache feed', 'youtube-channel'); ?>:</label>
124
+ <select class="widefat" id="<?php echo $this->get_field_id( 'cache_time' ); ?>" name="<?php echo $this->get_field_name( 'cache_time' ); ?>">
125
+ <option value="0"<?php selected( $cache_time, 0 ); ?>><?php _e('Do not chache', 'youtube-channel'); ?></option>
126
+ <?php echo $WPAU_YOUTUBE_CHANNEL->cache_time($cache_time); ?>
127
+ </select>
128
+ </p>
129
+ <p>
130
+ <label for="<?php echo $this->get_field_id('maxrnd'); ?>"><?php _e('Fetch', 'youtube-channel'); ?>: <input class="small-text" id="<?php echo $this->get_field_id('maxrnd'); ?>" name="<?php echo $this->get_field_name('maxrnd'); ?>" type="number" min="2" value="<?php echo $maxrnd; ?>" title="<?php _e('Number of videos that will be used for random pick (min 2, max 50, default 25)', 'youtube-channel'); ?>" /> <?php _e('video(s)', 'youtube-channel'); ?></label>
131
+ <br />
132
+ <label for="<?php echo $this->get_field_id('vidqty'); ?>"><?php _e('Show', 'youtube-channel'); ?>:</label> <input class="small-text" id="<?php echo $this->get_field_id('vidqty'); ?>" name="<?php echo $this->get_field_name('vidqty'); ?>" type="number" min="1" value="<?php echo ( $vidqty ) ? $vidqty : '1'; ?>" title="<?php _e('Number of videos to display', 'youtube-channel'); ?>" /> <?php _e('video(s)', 'youtube-channel'); ?>
133
+ </p>
134
+ <p>
135
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $enhprivacy, true ); ?> id="<?php echo $this->get_field_id( 'enhprivacy' ); ?>" name="<?php echo $this->get_field_name( 'enhprivacy' ); ?>" title="<?php _e('Enable this option to protect your visitors privacy', 'youtube-channel'); ?>" /> <label for="<?php echo $this->get_field_id( 'enhprivacy' ); ?>"><?php printf(__('Use <a href="%s" target="_blank">Enhanced Privacy</a>', 'youtube-channel'), 'http://support.google.com/youtube/bin/answer.py?hl=en-GB&answer=171780'); ?></label>
136
+ <br />
137
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $fixnoitem, true ); ?> id="<?php echo $this->get_field_id( 'fixnoitem' ); ?>" name="<?php echo $this->get_field_name( 'fixnoitem' ); ?>" title="<?php _e('Enable this option if you get error No Item', 'youtube-channel'); ?>" /> <label for="<?php echo $this->get_field_id( 'fixnoitem' ); ?>"><?php _e('Fix <em>No items</em> error/Respect playlist order', 'youtube-channel'); ?></label>
138
+ <br />
139
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $getrnd, true ); ?> id="<?php echo $this->get_field_id( 'getrnd' ); ?>" name="<?php echo $this->get_field_name( 'getrnd' ); ?>" title="<?php _e('Get random videos of all fetched from channel or playlist', 'youtube-channel'); ?>" /> <label for="<?php echo $this->get_field_id( 'getrnd' ); ?>"><?php _e('Show random video', 'youtube-channel'); ?></label>
140
+ </p>
141
+
142
+ <h4><?php _e('Video Settings', 'youtube-channel'); ?></h4>
143
+ <p><label for="<?php echo $this->get_field_id('ratio'); ?>"><?php _e('Aspect ratio', 'youtube-channel'); ?>:</label>
144
+ <select class="widefat" id="<?php echo $this->get_field_id( 'ratio' ); ?>" name="<?php echo $this->get_field_name( 'ratio' ); ?>">
145
+ <option value="3"<?php selected( $ratio, 3 ); ?>>16:9</option>
146
+ <option value="2"<?php selected( $ratio, 2 ); ?>>16:10</option>
147
+ <option value="1"<?php selected( $ratio, 1 ); ?>>4:3</option>
148
+ </select>
149
+ </p>
150
+ <p>
151
+ <label for="<?php echo $this->get_field_id('width'); ?>"><?php _e('Width', 'youtube-channel'); ?>:</label> <input class="small-text" id="<?php echo $this->get_field_id('width'); ?>" name="<?php echo $this->get_field_name('width'); ?>" type="number" min="32" value="<?php echo $width; ?>" title="<?php _e('Set video width in pixels', 'youtube-channel'); ?>" /> px (<?php _e('default', 'youtube-channel'); ?> 306)
152
+ </p>
153
+ <p>
154
+ <label for="<?php echo $this->get_field_id('to_show'); ?>"><?php _e('What to show?', 'youtube-channel'); ?></label>
155
+ <select class="widefat" id="<?php echo $this->get_field_id( 'to_show' ); ?>" name="<?php echo $this->get_field_name( 'to_show' ); ?>">
156
+ <option value="thumbnail"<?php selected( $to_show, 'thumbnail' ); ?>><?php _e('Thumbnail', 'youtube-channel'); ?></option>
157
+ <option value="object"<?php selected( $to_show, 'object' ); ?>><?php _e('Flash (object)', 'youtube-channel'); ?></option>
158
+ <option value="iframe"<?php selected( $to_show, 'iframe' ); ?>><?php _e('HTML5 (iframe)', 'youtube-channel'); ?></option>
159
+ <option value="iframe2"<?php selected( $to_show, 'iframe2' ); ?>><?php _e('HTML5 (iframe) Async', 'youtube-channel'); ?></option>
160
+ <option value="chromeless"<?php selected( $to_show, 'chromeless' ); ?>><?php _e('Chromeless', 'youtube-channel'); ?></option>
161
+ </select>
162
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $themelight, true ); ?> id="<?php echo $this->get_field_id( 'themelight' ); ?>" name="<?php echo $this->get_field_name( 'themelight' ); ?>" /> <label for="<?php echo $this->get_field_id( 'themelight' ); ?>"><?php _e('Use light theme (default is dark)', 'youtube-channel'); ?></label><br />
163
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $controls, true ); ?> id="<?php echo $this->get_field_id( 'controls' ); ?>" name="<?php echo $this->get_field_name( 'controls' ); ?>" /> <label for="<?php echo $this->get_field_id( 'controls' ); ?>"><?php _e('Hide player controls', 'youtube-channel'); ?></label><br />
164
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $fixyt, true ); ?> id="<?php echo $this->get_field_id( 'fixyt' ); ?>" name="<?php echo $this->get_field_name( 'fixyt' ); ?>" /> <label for="<?php echo $this->get_field_id( 'fixyt' ); ?>"><?php _e('Fix height taken by controls', 'youtube-channel'); ?></label><br />
165
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $autoplay, true ); ?> id="<?php echo $this->get_field_id( 'autoplay' ); ?>" name="<?php echo $this->get_field_name( 'autoplay' ); ?>" /> <label for="<?php echo $this->get_field_id( 'autoplay' ); ?>"><?php _e('Autoplay video or playlist', 'youtube-channel'); ?></label><br />
166
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $autoplay_mute, true ); ?> id="<?php echo $this->get_field_id( 'autoplay_mute' ); ?>" name="<?php echo $this->get_field_name( 'autoplay_mute' ); ?>" /> <label for="<?php echo $this->get_field_id( 'autoplay_mute' ); ?>"><?php _e('Mute video on autoplay', 'youtube-channel'); ?></label><br />
167
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $norel, true ); ?> id="<?php echo $this->get_field_id( 'norel' ); ?>" name="<?php echo $this->get_field_name( 'norel' ); ?>" /> <label for="<?php echo $this->get_field_id( 'norel' ); ?>"><?php _e('Hide related videos', 'youtube-channel'); ?></label>
168
+ </p>
169
+
170
+ <h4><?php _e('Content Layout', 'youtube-channel'); ?></h4>
171
+ <p>
172
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $showtitle, true ); ?> id="<?php echo $this->get_field_id( 'showtitle' ); ?>" name="<?php echo $this->get_field_name( 'showtitle' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showtitle' ); ?>"><?php _e('Show video title', 'youtube-channel'); ?></label><br />
173
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $showvidesc, true ); ?> id="<?php echo $this->get_field_id( 'showvidesc' ); ?>" name="<?php echo $this->get_field_name( 'showvidesc' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showvidesc' ); ?>"><?php _e('Show video description', 'youtube-channel'); ?></label><br />
174
+ <label for="<?php echo $this->get_field_id('videsclen'); ?>"><?php _e('Description length', 'youtube-channel'); ?>: <input class="small-text" id="<?php echo $this->get_field_id('videsclen'); ?>" name="<?php echo $this->get_field_name('videsclen'); ?>" type="number" value="<?php echo $videsclen; ?>" title="<?php _e('Set number of characters to cut down video description to (0 means full length)', 'youtube-channel');?>" /> (0 = full)</label><br />
175
+ <label for="<?php echo $this->get_field_id('descappend'); ?>"><?php _e('Et cetera string', 'youtube-channel'); ?> <input class="small-text" id="<?php echo $this->get_field_id('descappend'); ?>" name="<?php echo $this->get_field_name('descappend'); ?>" type="text" value="<?php echo $descappend; ?>" title="<?php _e('Default: &amp;hellip;', 'youtube-channel'); ?>"/></label><br />
176
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $hideanno, true ); ?> id="<?php echo $this->get_field_id( 'hideanno' ); ?>" name="<?php echo $this->get_field_name( 'hideanno' ); ?>" /> <label for="<?php echo $this->get_field_id( 'hideanno' ); ?>"><?php _e('Hide annotations from video', 'youtube-channel'); ?></label><br />
177
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $hideinfo, true ); ?> id="<?php echo $this->get_field_id( 'hideinfo' ); ?>" name="<?php echo $this->get_field_name( 'hideinfo' ); ?>" /> <label for="<?php echo $this->get_field_id( 'hideinfo' ); ?>"><?php _e('Hide video info', 'youtube-channel'); ?></label>
178
+ </p>
179
+
180
+ <h4><?php _e('Link to Channel', 'youtube-channel'); ?></h4>
181
+ <p>
182
+ <label for="<?php echo $this->get_field_id('goto_txt'); ?>"><?php _e('Visit YouTube Channel text', 'youtube-channel'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('goto_txt'); ?>" name="<?php echo $this->get_field_name('goto_txt'); ?>" type="text" value="<?php echo $goto_txt; ?>" title="<?php _e('Default: Visit channel %channel%. Use placeholder %channel% to insert channel name.', 'youtube-channel'); ?>" /></label>
183
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $showgoto, true ); ?> id="<?php echo $this->get_field_id( 'showgoto' ); ?>" name="<?php echo $this->get_field_name( 'showgoto' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showgoto' ); ?>"><?php _e('Show link to channel', 'youtube-channel'); ?></label><br />
184
+
185
+ <select class="widefat" id="<?php echo $this->get_field_id( 'popup_goto' ); ?>" name="<?php echo $this->get_field_name( 'popup_goto' ); ?>">
186
+ <option value="0"<?php selected( $popup_goto, 0 ); ?>><?php _e('in same window', 'youtube-channel'); ?></option>
187
+ <option value="1"<?php selected( $popup_goto, 1 ); ?>><?php _e('in new window (JavaScript)', 'youtube-channel'); ?></option>
188
+ <option value="2"<?php selected( $popup_goto, 2 ); ?>><?php _e('in new window (Target)', 'youtube-channel'); ?></option>
189
+ </select>
190
+
191
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $userchan, true ); ?> id="<?php echo $this->get_field_id( 'userchan' ); ?>" name="<?php echo $this->get_field_name( 'userchan' ); ?>" /> <label for="<?php echo $this->get_field_id( 'userchan' ); ?>"><?php _e('Link to channel instead to user', 'youtube-channel'); ?></label><br />
192
+ </p>
193
+
194
+ <h4><?php _e('Debug YTC', 'youtube-channel'); ?></h4>
195
+ <p>
196
+ <input class="checkbox" type="checkbox" <?php checked( (bool) $debugon, true ); ?> id="<?php echo $this->get_field_id( 'debugon' ); ?>" name="<?php echo $this->get_field_name( 'debugon' ); ?>" /> <label for="<?php echo $this->get_field_id( 'debugon' ); ?>"><?php _e('Enable debugging', 'youtube-channel'); ?></label><br />
197
+
198
+ <?php
199
+ if ( $debugon == 'on' ) {
200
+ global $wp_version;
201
+ $debug_arr = array_merge(
202
+ array(
203
+ 'server' => $_SERVER["SERVER_SOFTWARE"],
204
+ 'php' => PHP_VERSION,
205
+ 'wp' => $wp_version,
206
+ 'ytc' => $WPAU_YOUTUBE_CHANNEL->plugin_version,
207
+ 'url' => get_site_url()
208
+ ),
209
+ $instance);
210
+ ?>
211
+ <textarea name="debug" class="widefat" style="height: 100px;"><?php echo $this->debug_string($debug_arr); ?></textarea><br />
212
+ <small><?php printf(__('Insert debug data to <a href="%s" target="_support">support forum</a>.<br />Please do not remove channel and playlist ID`s. If you are concerned about privacy, send this debug log to email %s', 'youtube-channel'), 'http://wordpress.org/support/plugin/youtube-channel', '<a href="mailto:urke.kg@gmail.com?subject=YTC%20debug%20log">urke.kg@gmail.com</a>'); ?></small>
213
+ <?php } ?>
214
+ </p>
215
+
216
+ <?php
217
+ }
218
+
219
+ public function update($new_instance, $old_instance) {
220
+ // processes widget options to be saved
221
+ $instance = $old_instance;
222
+ $instance['title'] = strip_tags($new_instance['title']);
223
+ $instance['class'] = strip_tags($new_instance['class']);
224
+ $instance['channel'] = strip_tags($new_instance['channel']);
225
+ $instance['vidqty'] = $new_instance['vidqty'];
226
+ $instance['playlist'] = strip_tags($new_instance['playlist']);
227
+ $instance['use_res'] = $new_instance['use_res'];
228
+ $instance['cache_time'] = $new_instance['cache_time'];
229
+ $instance['only_pl'] = (isset($new_instance['only_pl'])) ? $new_instance['only_pl'] : false;
230
+ $instance['getrnd'] = (isset($new_instance['getrnd'])) ? $new_instance['getrnd'] : false;
231
+ $instance['maxrnd'] = $new_instance['maxrnd'];
232
+
233
+ $instance['goto_txt'] = strip_tags($new_instance['goto_txt']);
234
+ $instance['showgoto'] = (isset($new_instance['showgoto'])) ? $new_instance['showgoto'] : false;
235
+ $instance['popup_goto'] = $new_instance['popup_goto'];
236
+
237
+ $instance['showtitle'] = (isset($new_instance['showtitle'])) ? $new_instance['showtitle'] : false;
238
+ $instance['showvidesc'] = (isset($new_instance['showvidesc'])) ? $new_instance['showvidesc'] : false;
239
+ $instance['descappend'] = strip_tags($new_instance['descappend']);
240
+ $instance['videsclen'] = strip_tags($new_instance['videsclen']);
241
+ $instance['width'] = strip_tags($new_instance['width']);
242
+
243
+ $instance['to_show'] = strip_tags($new_instance['to_show']);
244
+ $instance['autoplay'] = (isset($new_instance['autoplay'])) ? $new_instance['autoplay'] : false;
245
+ $instance['autoplay_mute'] = (isset($new_instance['autoplay_mute'])) ? $new_instance['autoplay_mute'] : false;
246
+ $instance['norel'] = (isset($new_instance['norel'])) ? $new_instance['norel'] : false;
247
+
248
+ $instance['controls'] = (isset($new_instance['controls'])) ? $new_instance['controls'] : false;
249
+ $instance['fixnoitem'] = (isset($new_instance['fixnoitem'])) ? $new_instance['fixnoitem'] : false;
250
+ $instance['ratio'] = strip_tags($new_instance['ratio']);
251
+ $instance['fixyt'] = (isset($new_instance['fixyt'])) ? $new_instance['fixyt'] : '';
252
+ $instance['hideinfo'] = (isset($new_instance['hideinfo'])) ? $new_instance['hideinfo'] : '';
253
+ $instance['hideanno'] = (isset($new_instance['hideanno'])) ? $new_instance['hideanno'] : '';
254
+ $instance['themelight'] = (isset($new_instance['themelight'])) ? $new_instance['themelight'] : '';
255
+ $instance['debugon'] = (isset($new_instance['debugon'])) ? $new_instance['debugon'] : '';
256
+ $instance['userchan'] = (isset($new_instance['userchan'])) ? $new_instance['userchan'] : '';
257
+ $instance['enhprivacy'] = (isset($new_instance['enhprivacy'])) ? $new_instance['enhprivacy'] : '';
258
+
259
+ return $instance;
260
+ }
261
+
262
+ function debug_string($arr) {
263
+ $out = '';
264
+ foreach ( $arr as $key => $val ) {
265
+ if ( empty($val) ) { $val = 'null'; }
266
+ $out .= $key . ': ' . $val . chr(13);
267
+ }
268
+ return $out;
269
+ }
270
+
271
+ } // end class WPAU_YOUTUBE_CHANNEL_Widget()
272
+
273
+
274
+ // register Foo_Widget widget
275
+ function wpau_register_youtube_channel_widget() {
276
+ register_widget( 'WPAU_YOUTUBE_CHANNEL_Widget' );
277
+ }
278
+ add_action( 'widgets_init', 'wpau_register_youtube_channel_widget' );
languages/youtube-channel-cs_CZ.mo CHANGED
Binary file
languages/youtube-channel-cs_CZ.po CHANGED
@@ -7,188 +7,713 @@ msgid ""
7
  msgstr ""
8
  "Project-Id-Version: Youtube Channel 1.3.2\n"
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2011-09-28 21:16+0200\n"
11
- "PO-Revision-Date: 2012-03-02 11:45+0100\n"
12
  "Last-Translator: Ladislav Drábek <ladislav.drabek@zholesova.cz>\n"
13
- "Language-Team: zholesova.cz <Ladislav Drábek <ladislav.drabek@zholesova.cz>>\n"
14
- "Language: \n"
 
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
- "X-Poedit-Language: Czech\n"
19
- "X-Poedit-Country: CZECH REPUBLIC\n"
20
  "X-Poedit-SourceCharset: utf-8\n"
 
21
 
22
- #: ../youtube-channel.php:56
23
- msgid "Aspect ratio (relative to width):"
24
- msgstr "Poměr stran (relativně k šířce):"
25
 
26
- #: ../youtube-channel.php:72
27
- msgid "Autoplay video"
28
- msgstr "Automaticky přehrát video"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
- #: ../youtube-channel.php:49
31
- msgid "Channel:"
 
 
 
 
 
32
  msgstr "Kanál:"
33
 
34
- #: ../youtube-channel.php:71
35
- msgid "Fix height taken by controls"
36
- msgstr "Oprava výšky zabrané ovládáním"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- #: ../youtube-channel.php:53
39
- msgid "Get random video from channel"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  msgstr "Získej náhodné video z kanálu"
41
 
42
- #: ../youtube-channel.php:55
43
- msgid "Height"
44
- msgstr "Výška"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- #: ../youtube-channel.php:73
47
  msgid "Hide player controls"
48
  msgstr "Skryj ovládání přehrávače"
49
 
50
- #: ../youtube-channel.php:74
51
- msgid "Hide video info"
52
- msgstr "Skryj info o videu"
53
 
54
- #: ../youtube-channel.php:52
55
- msgid "Items to fetch (min 1, max 50):"
56
- msgstr "Videí k načtení (min 1, max 50):"
57
 
58
- #: ../youtube-channel.php:187
59
- msgid "No items"
60
- msgstr "Žádné video"
 
61
 
62
- #: ../youtube-channel.php:79
63
- msgid "Open channel in new window/tab"
64
- msgstr "Otevírej kanál v novém okně / záložce"
 
65
 
66
- #: ../youtube-channel.php:50
67
- msgid "Playlist:"
68
- msgstr "Playlist:"
 
69
 
70
- #: ../youtube-channel.php:78
71
- msgid "Show link to channel"
72
- msgstr "Ukaž odkaz na kanál"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
- #: ../youtube-channel.php:75
75
  msgid "Show video title"
76
  msgstr "Ukaž název videa"
77
 
78
- #: ../youtube-channel.php:80
79
- msgid "Use target=\"_blank\" (invalid XHTML)"
80
- msgstr "Použij target=\"_blank\" (nevalidní XHTML) - slouží pro otevírání v novém okně"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
- #: ../youtube-channel.php:51
83
- msgid "Use the playlist instead of channel"
84
- msgstr "Použij playlist místo kanálu"
85
 
86
- #: ../youtube-channel.php:77
87
- msgid "Visit YouTube Channel text:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  msgstr "Text pro odkaz na kanál:"
89
 
90
- #: ../youtube-channel.php:256
91
- #, php-format
92
- msgid "Visit channel %1$s"
 
 
 
 
93
  msgstr "Navštiv kanál %1$s"
94
 
95
- #: ../youtube-channel.php:219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  #, php-format
97
- msgid "Watch video %1$s published on %2$s"
98
- msgstr "Podívej se na video %1$s z %2$s"
 
 
99
 
100
- #: ../youtube-channel.php:64
101
- msgid "What to show?"
102
- msgstr "Jak zobrazit?"
 
 
 
 
 
103
 
104
- #: ../youtube-channel.php:48
105
- msgid "Widget Title:"
 
106
  msgstr "Název Widgetu"
107
 
108
- #: ../youtube-channel.php:54
109
- msgid "Width"
110
- msgstr "Šířka"
111
 
112
- #: ../youtube-channel.php:23
113
- msgid "YouTube Channel"
114
- msgstr "YouTube Channel"
115
 
116
- #: ../youtube-channel.php:69
117
- msgid "chromeless video"
118
- msgstr "\"chromeless\" video"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
- #: ../youtube-channel.php:58
121
- msgid "custom"
122
- msgstr "vlastní"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
- #: ../youtube-channel.php:54
125
- #: ../youtube-channel.php:55
126
  msgid "default"
127
  msgstr "standard"
128
 
129
- #: ../youtube-channel.php:68
130
- msgid "iframe (HTML5 player)"
131
- msgstr "iframe (HTML5 přehrávač)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
- #: ../youtube-channel.php:259
134
  msgid "in new window/tab"
135
  msgstr "v novém okně / záložce"
136
 
137
- #: ../youtube-channel.php:67
138
- msgid "object (flash player)"
139
- msgstr "objekt (flash player)"
 
140
 
141
- #: ../youtube-channel.php:66
142
- msgid "thumbnail"
143
- msgstr "náhled"
144
 
145
- #@ youtube-channel
146
- #: youtube-channel.php:59
147
- msgid "Try to fix `No items` error"
148
- msgstr "Pokus se opravit problém s „Žádné video“"
149
 
150
- #@ youtube-channel
151
- #: youtube-channel.php:78
152
- msgid "Use light theme (default is dark)"
153
- msgstr "Použij světlé téma (stabdard je tmavé)"
154
 
155
- #@ youtube-channel
156
- #: youtube-channel.php:84
157
- msgid "Show video description"
158
- msgstr "Ukaž popisek videa"
159
 
160
- #@ youtube-channel
161
- #: youtube-channel.php:85
162
- msgid "Hide annotations from video"
163
- msgstr "Skryj poznámky z videa"
164
 
165
- #@ youtube-channel
166
- #: youtube-channel.php:88
167
- msgid "Description length"
168
- msgstr "Délka popisu videa"
169
 
170
- #@ youtube-channel
171
- #: youtube-channel.php:57
172
- msgid "Get one random video of latest N videos from channel (min 1, max 50):"
173
- msgstr "Vyber náhodně jedno video z posledních N videí kanálu (min 1, max. 50):"
174
 
175
- #@ youtube-channel
176
- #: youtube-channel.php:58
177
- msgid "Show random video from channel"
178
- msgstr "Ukaž náhodné video z kanálu"
179
 
180
- #@ youtube-channel
181
- #: youtube-channel.php:60
182
- msgid "Video property"
183
- msgstr "Nastavení videa"
184
 
185
- #@ youtube-channel
186
- #: youtube-channel.php:82
187
- msgid "Layout behaviour"
188
- msgstr "Rozvržení"
189
 
190
- #@ youtube-channel
191
- #: youtube-channel.php:89
192
- msgid "Link to channel"
193
- msgstr "Odkaz na kanál"
 
 
 
 
 
194
 
 
 
 
7
  msgstr ""
8
  "Project-Id-Version: Youtube Channel 1.3.2\n"
9
  "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2014-09-26 23:02+0100\n"
11
+ "PO-Revision-Date: 2014-09-26 23:12+0100\n"
12
  "Last-Translator: Ladislav Drábek <ladislav.drabek@zholesova.cz>\n"
13
+ "Language-Team: zholesova.cz <Ladislav Drábek <ladislav.drabek@zholesova."
14
+ "cz>>\n"
15
+ "Language: cs_CZ\n"
16
  "MIME-Version: 1.0\n"
17
  "Content-Type: text/plain; charset=UTF-8\n"
18
  "Content-Transfer-Encoding: 8bit\n"
 
 
19
  "X-Poedit-SourceCharset: utf-8\n"
20
+ "X-Generator: Poedit 1.6.9\n"
21
 
22
+ #: inc/config.20140926.php:58 inc/config.php:54
23
+ msgid "General"
24
+ msgstr ""
25
 
26
+ #: inc/config.20140926.php:64 inc/config.php:60
27
+ #, fuzzy
28
+ msgid "YouTube Channel ID"
29
+ msgstr "YouTube Channel"
30
+
31
+ #: inc/config.20140926.php:65 inc/config.php:61
32
+ msgid "Enter your YouTube channel ID (channel name, not full URL to channel)"
33
+ msgstr ""
34
+
35
+ #: inc/config.20140926.php:71 inc/config.php:67
36
+ msgid "Default Playlist ID"
37
+ msgstr ""
38
+
39
+ #: inc/config.20140926.php:72 inc/config.php:68
40
+ msgid "Enter default playlist ID (not playlist name)"
41
+ msgstr ""
42
+
43
+ #: inc/config.20140926.php:78 inc/config.php:74 inc/widget.php:97
44
+ msgid "Resource to use"
45
+ msgstr ""
46
 
47
+ #: inc/config.20140926.php:79 inc/config.php:75
48
+ msgid "What to use as resource for feeds"
49
+ msgstr ""
50
+
51
+ #: inc/config.20140926.php:81 inc/config.php:77 inc/widget.php:99
52
+ #, fuzzy
53
+ msgid "Channel"
54
  msgstr "Kanál:"
55
 
56
+ #: inc/config.20140926.php:82 inc/config.php:78 inc/widget.php:100
57
+ msgid "Favorites"
58
+ msgstr ""
59
+
60
+ #: inc/config.20140926.php:83 inc/config.php:79 inc/widget.php:101
61
+ #, fuzzy
62
+ msgid "Playlist"
63
+ msgstr "Playlist:"
64
+
65
+ #: inc/config.20140926.php:90 inc/config.php:86 inc/widget.php:104
66
+ msgid "Embed standard playlist"
67
+ msgstr ""
68
+
69
+ #: inc/config.20140926.php:91 inc/config.php:87
70
+ msgid ""
71
+ "Enable this option to embed whole playlist instead single video from "
72
+ "playlist when you chose playlist as resource"
73
+ msgstr ""
74
+
75
+ #: inc/config.20140926.php:97 inc/config.php:93
76
+ msgid "Cache Timeout"
77
+ msgstr ""
78
+
79
+ #: inc/config.20140926.php:98 inc/config.php:94
80
+ msgid "Define caching timeout for YouTube feeds, in seconds"
81
+ msgstr ""
82
+
83
+ #: inc/config.20140926.php:101 inc/config.php:97 inc/widget.php:125
84
+ msgid "Do not chache"
85
+ msgstr ""
86
+
87
+ #: inc/config.20140926.php:102 inc/config.php:98 youtube-channel.php:809
88
+ msgid "1 minute"
89
+ msgstr ""
90
+
91
+ #: inc/config.20140926.php:103 inc/config.php:99 youtube-channel.php:810
92
+ msgid "5 minutes"
93
+ msgstr ""
94
+
95
+ #: inc/config.20140926.php:104 inc/config.php:100 youtube-channel.php:811
96
+ msgid "15 minutes"
97
+ msgstr ""
98
+
99
+ #: inc/config.20140926.php:105 inc/config.php:101 youtube-channel.php:812
100
+ msgid "30 minutes"
101
+ msgstr ""
102
+
103
+ #: inc/config.20140926.php:106 inc/config.php:102 youtube-channel.php:815
104
+ msgid "1 hour"
105
+ msgstr ""
106
+
107
+ #: inc/config.20140926.php:107 inc/config.php:103 youtube-channel.php:816
108
+ msgid "2 hours"
109
+ msgstr ""
110
 
111
+ #: inc/config.20140926.php:108 inc/config.php:104 youtube-channel.php:817
112
+ msgid "5 hours"
113
+ msgstr ""
114
+
115
+ #: inc/config.20140926.php:109 inc/config.php:105 youtube-channel.php:818
116
+ msgid "10 hours"
117
+ msgstr ""
118
+
119
+ #: inc/config.20140926.php:110 inc/config.php:106 youtube-channel.php:819
120
+ msgid "12 hours"
121
+ msgstr ""
122
+
123
+ #: inc/config.20140926.php:111 inc/config.php:107 youtube-channel.php:820
124
+ msgid "18 hours"
125
+ msgstr ""
126
+
127
+ #: inc/config.20140926.php:112 inc/config.php:108 youtube-channel.php:823
128
+ msgid "1 day"
129
+ msgstr ""
130
+
131
+ #: inc/config.20140926.php:113 inc/config.php:109 youtube-channel.php:824
132
+ msgid "2 days"
133
+ msgstr ""
134
+
135
+ #: inc/config.20140926.php:114 inc/config.php:110 youtube-channel.php:825
136
+ msgid "3 days"
137
+ msgstr ""
138
+
139
+ #: inc/config.20140926.php:115 inc/config.php:111 youtube-channel.php:826
140
+ msgid "4 days"
141
+ msgstr ""
142
+
143
+ #: inc/config.20140926.php:116 inc/config.php:112 youtube-channel.php:827
144
+ msgid "5 days"
145
+ msgstr ""
146
+
147
+ #: inc/config.20140926.php:117 inc/config.php:113 youtube-channel.php:828
148
+ msgid "6 days"
149
+ msgstr ""
150
+
151
+ #: inc/config.20140926.php:118 inc/config.php:114 youtube-channel.php:831
152
+ msgid "1 week"
153
+ msgstr ""
154
+
155
+ #: inc/config.20140926.php:119 inc/config.php:115 youtube-channel.php:832
156
+ msgid "2 weeks"
157
+ msgstr ""
158
+
159
+ #: inc/config.20140926.php:120 inc/config.php:116 youtube-channel.php:833
160
+ msgid "3 weeks"
161
+ msgstr ""
162
+
163
+ #: inc/config.20140926.php:121 inc/config.php:117 youtube-channel.php:834
164
+ msgid "1 month"
165
+ msgstr ""
166
+
167
+ #: inc/config.20140926.php:128 inc/config.php:124 inc/widget.php:130
168
+ msgid "Fetch"
169
+ msgstr ""
170
+
171
+ #: inc/config.20140926.php:129 inc/config.php:125 inc/widget.php:130
172
+ msgid ""
173
+ "Number of videos that will be used for random pick (min 2, max 50, default "
174
+ "25)"
175
+ msgstr ""
176
+
177
+ #: inc/config.20140926.php:138 inc/config.php:134 inc/widget.php:132
178
+ msgid "Show"
179
+ msgstr ""
180
+
181
+ #: inc/config.20140926.php:139 inc/config.php:135 inc/widget.php:132
182
+ msgid "Number of videos to display"
183
+ msgstr ""
184
+
185
+ #: inc/config.20140926.php:148 inc/config.php:144
186
+ msgid "Use Enhanced privacy"
187
+ msgstr ""
188
+
189
+ #: inc/config.20140926.php:155 inc/config.php:151 inc/widget.php:137
190
+ msgid "Fix <em>No items</em> error/Respect playlist order"
191
+ msgstr ""
192
+
193
+ #: inc/config.20140926.php:156 inc/config.php:152 inc/widget.php:137
194
+ msgid "Enable this option if you get error No Item"
195
+ msgstr ""
196
+
197
+ # @ youtube-channel
198
+ #: inc/config.20140926.php:162 inc/config.php:158 inc/widget.php:139
199
+ #, fuzzy
200
+ msgid "Show random video"
201
+ msgstr "Ukaž náhodné video z kanálu"
202
+
203
+ #: inc/config.20140926.php:163 inc/config.php:159 inc/widget.php:139
204
+ #, fuzzy
205
+ msgid "Get random videos of all fetched from channel or playlist"
206
  msgstr "Získej náhodné video z kanálu"
207
 
208
+ #: inc/config.20140926.php:172 inc/config.php:168
209
+ msgid "Video"
210
+ msgstr ""
211
+
212
+ #: inc/config.20140926.php:178 inc/config.php:174
213
+ msgid "Aspect Ratio"
214
+ msgstr ""
215
+
216
+ #: inc/config.20140926.php:179 inc/config.php:175
217
+ msgid "Select aspect ratio for displayed video"
218
+ msgstr ""
219
+
220
+ #: inc/config.20140926.php:182 inc/config.php:178
221
+ msgid "16:9"
222
+ msgstr ""
223
+
224
+ #: inc/config.20140926.php:183 inc/config.php:179
225
+ msgid "16:10"
226
+ msgstr ""
227
+
228
+ #: inc/config.20140926.php:184 inc/config.php:180
229
+ msgid "4:3"
230
+ msgstr ""
231
+
232
+ #: inc/config.20140926.php:191 inc/config.php:187
233
+ #, fuzzy
234
+ msgid "Video Width"
235
+ msgstr "Šířka"
236
+
237
+ #: inc/config.20140926.php:192 inc/config.php:188
238
+ msgid "Set default width for displayed video, in pixels"
239
+ msgstr ""
240
+
241
+ #: inc/config.20140926.php:201 inc/config.php:197 inc/widget.php:154
242
+ msgid "What to show?"
243
+ msgstr "Jak zobrazit?"
244
+
245
+ #: inc/config.20140926.php:202 inc/config.20140926.php:336 inc/config.php:198
246
+ #: inc/config.php:332
247
+ msgid "Set what will be shown by default"
248
+ msgstr ""
249
+
250
+ #: inc/config.20140926.php:205 inc/config.php:201 inc/widget.php:156
251
+ #, fuzzy
252
+ msgid "Thumbnail"
253
+ msgstr "náhled"
254
+
255
+ #: inc/config.20140926.php:206 inc/config.php:202 inc/widget.php:157
256
+ msgid "Flash (object)"
257
+ msgstr ""
258
+
259
+ #: inc/config.20140926.php:207 inc/config.php:203 inc/widget.php:158
260
+ msgid "HTML5 (iframe)"
261
+ msgstr ""
262
+
263
+ #: inc/config.20140926.php:208 inc/config.php:204 inc/widget.php:159
264
+ msgid "HTML5 (iframe) Async"
265
+ msgstr ""
266
+
267
+ #: inc/config.20140926.php:209 inc/config.php:205 inc/widget.php:160
268
+ #, fuzzy
269
+ msgid "Chromeless"
270
+ msgstr "\"chromeless\" video"
271
+
272
+ # @ youtube-channel
273
+ #: inc/config.20140926.php:216 inc/config.php:212
274
+ #, fuzzy
275
+ msgid "Use light theme"
276
+ msgstr "Použij světlé téma (stabdard je tmavé)"
277
+
278
+ #: inc/config.20140926.php:217 inc/config.php:213
279
+ msgid ""
280
+ "Enable this option to use light theme for playback controls instead dark"
281
+ msgstr ""
282
 
283
+ #: inc/config.20140926.php:223 inc/config.php:219 inc/widget.php:163
284
  msgid "Hide player controls"
285
  msgstr "Skryj ovládání přehrávače"
286
 
287
+ #: inc/config.20140926.php:224 inc/config.php:220
288
+ msgid "Enable this option to hide playback controls"
289
+ msgstr ""
290
 
291
+ #: inc/config.20140926.php:230 inc/config.php:226
292
+ msgid "Fix video height"
293
+ msgstr ""
294
 
295
+ #: inc/config.20140926.php:231 inc/config.php:227
296
+ msgid ""
297
+ "Enable this option to fix video height when playback controls are not hidden"
298
+ msgstr ""
299
 
300
+ #: inc/config.20140926.php:237 inc/config.php:233 inc/widget.php:165
301
+ #, fuzzy
302
+ msgid "Autoplay video or playlist"
303
+ msgstr "Automaticky přehrát video"
304
 
305
+ #: inc/config.20140926.php:238 inc/config.php:234
306
+ msgid ""
307
+ "Enable this option to start video playback right after block is rendered"
308
+ msgstr ""
309
 
310
+ #: inc/config.20140926.php:244 inc/config.php:240 inc/widget.php:166
311
+ msgid "Mute video on autoplay"
312
+ msgstr ""
313
+
314
+ #: inc/config.20140926.php:245 inc/config.php:241
315
+ msgid "Enable this option to mute video when start autoplay"
316
+ msgstr ""
317
+
318
+ #: inc/config.20140926.php:251 inc/config.php:247 inc/widget.php:167
319
+ msgid "Hide related videos"
320
+ msgstr ""
321
+
322
+ #: inc/config.20140926.php:252 inc/config.php:248
323
+ msgid "Enable this option to hide related videos after finished playback"
324
+ msgstr ""
325
+
326
+ #: inc/config.20140926.php:261 inc/config.php:257
327
+ msgid "Content"
328
+ msgstr ""
329
 
330
+ #: inc/config.20140926.php:267 inc/config.php:263 inc/widget.php:172
331
  msgid "Show video title"
332
  msgstr "Ukaž název videa"
333
 
334
+ #: inc/config.20140926.php:268 inc/config.php:264
335
+ msgid "Enable this option to display title of video"
336
+ msgstr ""
337
+
338
+ # @ youtube-channel
339
+ #: inc/config.20140926.php:274 inc/config.php:270 inc/widget.php:173
340
+ msgid "Show video description"
341
+ msgstr "Ukaž popisek videa"
342
+
343
+ #: inc/config.20140926.php:275 inc/config.php:271
344
+ msgid "Enable this option to display description for video"
345
+ msgstr ""
346
+
347
+ # @ youtube-channel
348
+ #: inc/config.20140926.php:281 inc/config.php:277 inc/widget.php:174
349
+ msgid "Description length"
350
+ msgstr "Délka popisu videa"
351
+
352
+ #: inc/config.20140926.php:282 inc/config.php:278
353
+ msgid "Enter length for video description in characters (0 for full length)"
354
+ msgstr ""
355
+
356
+ #: inc/config.20140926.php:291 inc/config.php:287 inc/widget.php:175
357
+ msgid "Et cetera string"
358
+ msgstr ""
359
 
360
+ #: inc/config.20140926.php:292 inc/config.php:288
361
+ msgid "Indicator for shortened video description (default: …)"
362
+ msgstr ""
363
 
364
+ #: inc/config.20140926.php:293 inc/config.php:289
365
+ msgid "..."
366
+ msgstr ""
367
+
368
+ # @ youtube-channel
369
+ #: inc/config.20140926.php:298 inc/config.php:294 inc/widget.php:176
370
+ msgid "Hide annotations from video"
371
+ msgstr "Skryj poznámky z videa"
372
+
373
+ #: inc/config.20140926.php:299 inc/config.php:295
374
+ msgid ""
375
+ "Enable this option to hide video annotations (custom text set by uploader "
376
+ "over video during playback)"
377
+ msgstr ""
378
+
379
+ #: inc/config.20140926.php:305 inc/config.php:301 inc/widget.php:177
380
+ msgid "Hide video info"
381
+ msgstr "Skryj info o videu"
382
+
383
+ #: inc/config.20140926.php:306 inc/config.php:302
384
+ msgid ""
385
+ "Enable this option to hide informations about video before play start (video "
386
+ "title and uploader in overlay)"
387
+ msgstr ""
388
+
389
+ # @ youtube-channel
390
+ #: inc/config.20140926.php:315 inc/config.php:311 inc/widget.php:180
391
+ #, fuzzy
392
+ msgid "Link to Channel"
393
+ msgstr "Odkaz na kanál"
394
+
395
+ #: inc/config.20140926.php:321 inc/config.php:317 inc/widget.php:182
396
+ #, fuzzy
397
+ msgid "Visit YouTube Channel text"
398
  msgstr "Text pro odkaz na kanál:"
399
 
400
+ #: inc/config.20140926.php:322 inc/config.php:318
401
+ msgid "Use placeholder %channel% to insert channel name"
402
+ msgstr ""
403
+
404
+ #: inc/config.20140926.php:323 inc/config.php:319
405
+ #, fuzzy
406
+ msgid "Visit my channel %channel%"
407
  msgstr "Navštiv kanál %1$s"
408
 
409
+ #: inc/config.20140926.php:328 inc/config.php:324 inc/widget.php:183
410
+ msgid "Show link to channel"
411
+ msgstr "Ukaž odkaz na kanál"
412
+
413
+ #: inc/config.20140926.php:329 inc/config.php:325
414
+ msgid ""
415
+ "Enable this option to show customized link to channel at the bottom of YTC "
416
+ "block"
417
+ msgstr ""
418
+
419
+ #: inc/config.20140926.php:335 inc/config.php:331
420
+ #, fuzzy
421
+ msgid "Open YouTube channel page"
422
+ msgstr "YouTube Channel"
423
+
424
+ #: inc/config.20140926.php:339 inc/config.php:335 inc/widget.php:186
425
+ #, fuzzy
426
+ msgid "in same window"
427
+ msgstr "v novém okně / záložce"
428
+
429
+ #: inc/config.20140926.php:340 inc/config.php:336 inc/widget.php:187
430
+ #, fuzzy
431
+ msgid "in new window (JavaScript)"
432
+ msgstr "v novém okně / záložce"
433
+
434
+ #: inc/config.20140926.php:341 inc/config.php:337 inc/widget.php:188
435
+ #, fuzzy
436
+ msgid "in new window (Target)"
437
+ msgstr "v novém okně / záložce"
438
+
439
+ # @ youtube-channel
440
+ #: inc/config.20140926.php:348 inc/config.php:344 inc/widget.php:191
441
+ #, fuzzy
442
+ msgid "Link to channel instead to user"
443
+ msgstr "Odkaz na kanál"
444
+
445
+ #: inc/config.20140926.php:349 inc/config.php:345
446
+ msgid ""
447
+ "Enable this option if link to your channel have <code>/channel/</code> "
448
+ "instead <code>/user/</code> part in URL"
449
+ msgstr ""
450
+
451
+ #: inc/config.20140926.php:358 inc/config.php:354
452
+ msgid "Tools"
453
+ msgstr ""
454
+
455
+ #: inc/config.20140926.php:375 inc/config.php:371
456
+ msgid "Usage"
457
+ msgstr ""
458
+
459
+ #: inc/config.20140926.php:396 inc/config.php:392
460
+ msgid "Support"
461
+ msgstr ""
462
+
463
+ #: inc/config.20140926.php:427 inc/config.php:423
464
+ msgid " Options"
465
+ msgstr ""
466
+
467
+ #: inc/config.20140926.php:500 inc/config.php:496
468
+ msgid ""
469
+ "<p>Easy embed playable videos from YouTube.</p><p>Here you can set default "
470
+ "options that will be used as defaults for new widgets, and for shortcode.</p>"
471
+ msgstr ""
472
+
473
+ #: inc/config.php:145
474
  #, php-format
475
+ msgid ""
476
+ "Enable this option to protect your visitors <a href=\"%s\" target=\"_blank"
477
+ "\">privacy</a>."
478
+ msgstr ""
479
 
480
+ #: inc/widget.php:11
481
+ #, fuzzy
482
+ msgid "Youtube Channel"
483
+ msgstr "YouTube Channel"
484
+
485
+ #: inc/widget.php:12
486
+ msgid "Serve YouTube videos from channel or playlist right to widget area"
487
+ msgstr ""
488
 
489
+ #: inc/widget.php:85
490
+ #, fuzzy
491
+ msgid "Widget Title"
492
  msgstr "Název Widgetu"
493
 
494
+ #: inc/widget.php:85
495
+ msgid "Title for widget"
496
+ msgstr ""
497
 
498
+ #: inc/widget.php:88
499
+ msgid "Custom CSS Class"
500
+ msgstr ""
501
 
502
+ #: inc/widget.php:88
503
+ msgid "Enter custom class for YTC block, if you wish to target block styling"
504
+ msgstr ""
505
+
506
+ #: inc/widget.php:91
507
+ #, fuzzy
508
+ msgid "Channel ID"
509
+ msgstr "Kanál:"
510
+
511
+ #: inc/widget.php:91
512
+ msgid "YouTube Channel name (not URL to channel)"
513
+ msgstr ""
514
+
515
+ #: inc/widget.php:94
516
+ #, fuzzy
517
+ msgid "Playlist ID"
518
+ msgstr "Playlist:"
519
+
520
+ #: inc/widget.php:94
521
+ msgid "YouTube Playlist ID (not playlist name)"
522
+ msgstr ""
523
+
524
+ #: inc/widget.php:104
525
+ msgid ""
526
+ "Enable this option to embed YouTube playlist widget instead single video "
527
+ "from playlist"
528
+ msgstr ""
529
+
530
+ #: inc/widget.php:123
531
+ msgid "Cache feed"
532
+ msgstr ""
533
+
534
+ #: inc/widget.php:130 inc/widget.php:132
535
+ msgid "video(s)"
536
+ msgstr ""
537
+
538
+ #: inc/widget.php:135
539
+ msgid "Enable this option to protect your visitors privacy"
540
+ msgstr ""
541
 
542
+ #: inc/widget.php:135
543
+ #, php-format
544
+ msgid "Use <a href=\"%s\" target=\"_blank\">Enhanced Privacy</a>"
545
+ msgstr ""
546
+
547
+ #: inc/widget.php:142
548
+ msgid "Video Settings"
549
+ msgstr ""
550
+
551
+ #: inc/widget.php:143
552
+ msgid "Aspect ratio"
553
+ msgstr ""
554
+
555
+ #: inc/widget.php:151
556
+ msgid "Width"
557
+ msgstr "Šířka"
558
+
559
+ #: inc/widget.php:151
560
+ msgid "Set video width in pixels"
561
+ msgstr ""
562
 
563
+ #: inc/widget.php:151
 
564
  msgid "default"
565
  msgstr "standard"
566
 
567
+ # @ youtube-channel
568
+ #: inc/widget.php:162
569
+ msgid "Use light theme (default is dark)"
570
+ msgstr "Použij světlé téma (stabdard je tmavé)"
571
+
572
+ #: inc/widget.php:164
573
+ msgid "Fix height taken by controls"
574
+ msgstr "Oprava výšky zabrané ovládáním"
575
+
576
+ #: inc/widget.php:170
577
+ msgid "Content Layout"
578
+ msgstr ""
579
+
580
+ #: inc/widget.php:174
581
+ msgid ""
582
+ "Set number of characters to cut down video description to (0 means full "
583
+ "length)"
584
+ msgstr ""
585
+
586
+ #: inc/widget.php:175
587
+ msgid "Default: &amp;hellip;"
588
+ msgstr ""
589
+
590
+ #: inc/widget.php:182
591
+ msgid ""
592
+ "Default: Visit channel %channel%. Use placeholder %channel% to insert "
593
+ "channel name."
594
+ msgstr ""
595
+
596
+ #: inc/widget.php:194
597
+ msgid "Debug YTC"
598
+ msgstr ""
599
+
600
+ #: inc/widget.php:196
601
+ msgid "Enable debugging"
602
+ msgstr ""
603
+
604
+ #: inc/widget.php:212
605
+ #, php-format
606
+ msgid ""
607
+ "Insert debug data to <a href=\"%s\" target=\"_support\">support forum</a>."
608
+ "<br />Please do not remove channel and playlist ID`s. If you are concerned "
609
+ "about privacy, send this debug log to email %s"
610
+ msgstr ""
611
+
612
+ #: youtube-channel.php:90
613
+ #, php-format
614
+ msgid ""
615
+ "Please review <a href=\"%s\">global settings</a>, YTC widgets and shortcodes."
616
+ msgstr ""
617
+
618
+ #: youtube-channel.php:93
619
+ #, php-format
620
+ msgid ""
621
+ "If you use caching for any YTC widget or shortcode, please <strong>ReCache</"
622
+ "strong> feeds in <strong>Tools</strong> section of <a href=\"%s\">plugin "
623
+ "settings</a> page."
624
+ msgstr ""
625
+
626
+ #: youtube-channel.php:96
627
+ #, php-format
628
+ msgid ""
629
+ "We switched to <em>Redux Framework</em> so please review global plugin <a "
630
+ "href=\"%s\">settings page</a>."
631
+ msgstr ""
632
+
633
+ #: youtube-channel.php:101
634
+ msgid "updated to version"
635
+ msgstr ""
636
+
637
+ #: youtube-channel.php:101
638
+ msgid "I did this already, dismiss notice!"
639
+ msgstr ""
640
+
641
+ #: youtube-channel.php:108
642
+ #, php-format
643
+ msgid ""
644
+ "To configure global <strong>%s</strong> options, you need to install and "
645
+ "activate <strong>%s</strong>."
646
+ msgstr ""
647
+
648
+ #: youtube-channel.php:113
649
+ msgid "Settings"
650
+ msgstr ""
651
+
652
+ #: youtube-channel.php:486
653
+ msgid "No items"
654
+ msgstr "Žádné video"
655
+
656
+ #: youtube-channel.php:486
657
+ msgid "Check here why"
658
+ msgstr ""
659
+
660
+ #: youtube-channel.php:547
661
+ #, php-format
662
+ msgid "Visit channel %1$s"
663
+ msgstr "Navštiv kanál %1$s"
664
 
665
+ #: youtube-channel.php:554
666
  msgid "in new window/tab"
667
  msgstr "v novém okně / záložce"
668
 
669
+ #: youtube-channel.php:651
670
+ #, php-format
671
+ msgid "Watch video %1$s published on %2$s"
672
+ msgstr "Podívej se na video %1$s z %2$s"
673
 
674
+ #~ msgid "Aspect ratio (relative to width):"
675
+ #~ msgstr "Poměr stran (relativně k šířce):"
 
676
 
677
+ #~ msgid "Height"
678
+ #~ msgstr "Výška"
 
 
679
 
680
+ #~ msgid "Items to fetch (min 1, max 50):"
681
+ #~ msgstr "Videí k načtení (min 1, max 50):"
 
 
682
 
683
+ #~ msgid "Open channel in new window/tab"
684
+ #~ msgstr "Otevírej kanál v novém okně / záložce"
 
 
685
 
686
+ #~ msgid "Use target=\"_blank\" (invalid XHTML)"
687
+ #~ msgstr ""
688
+ #~ "Použij target=\"_blank\" (nevalidní XHTML) - slouží pro otevírání v novém "
689
+ #~ "okně"
690
 
691
+ #~ msgid "Use the playlist instead of channel"
692
+ #~ msgstr "Použij playlist místo kanálu"
 
 
693
 
694
+ #~ msgid "custom"
695
+ #~ msgstr "vlastní"
 
 
696
 
697
+ #~ msgid "iframe (HTML5 player)"
698
+ #~ msgstr "iframe (HTML5 přehrávač)"
 
 
699
 
700
+ #~ msgid "object (flash player)"
701
+ #~ msgstr "objekt (flash player)"
 
 
702
 
703
+ # @ youtube-channel
704
+ #~ msgid "Try to fix `No items` error"
705
+ #~ msgstr "Pokus se opravit problém s „Žádné video“"
 
706
 
707
+ # @ youtube-channel
708
+ #~ msgid ""
709
+ #~ "Get one random video of latest N videos from channel (min 1, max 50):"
710
+ #~ msgstr ""
711
+ #~ "Vyber náhodně jedno video z posledních N videí kanálu (min 1, max. 50):"
712
+
713
+ # @ youtube-channel
714
+ #~ msgid "Video property"
715
+ #~ msgstr "Nastavení videa"
716
 
717
+ # @ youtube-channel
718
+ #~ msgid "Layout behaviour"
719
+ #~ msgstr "Rozvržení"
languages/youtube-channel-es_ES.mo CHANGED
Binary file
languages/youtube-channel-es_ES.po CHANGED
@@ -1,215 +1,856 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: \n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-09-28 21:16+0200\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Aleksandar Urošević <urke@users.sourceforge.net>\n"
8
- "Language-Team: \n"
 
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: \n"
14
- "X-Poedit-Country: \n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
- "X-Poedit-Basepath: \n"
18
- "X-Poedit-Bookmarks: \n"
19
  "X-Poedit-SearchPath-0: .\n"
20
- "X-Textdomain-Support: yes"
21
 
22
- #: youtube-channel.php:63
23
- #@ youtube-channel
24
- msgid "Aspect ratio (relative to width):"
25
- msgstr "Aspecto de ratio (relativo al ancho):"
26
 
27
- #: youtube-channel.php:81
28
- #@ youtube-channel
29
- msgid "Autoplay video"
30
- msgstr "Reproducción automática"
31
 
32
- #: youtube-channel.php:54
33
- #@ youtube-channel
34
- msgid "Channel:"
35
- msgstr "Canal:"
 
 
36
 
37
- #: youtube-channel.php:80
38
- #@ youtube-channel
39
- msgid "Fix height taken by controls"
40
- msgstr "Fijar la altura tomada por los controles"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- #: youtube-channel.php:62
43
- #@ youtube-channel
44
- msgid "Height"
45
- msgstr "Alto"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- #: youtube-channel.php:79
48
- #@ youtube-channel
49
  msgid "Hide player controls"
50
  msgstr "Esconder controles de reproducción"
51
 
52
- #: youtube-channel.php:86
53
- #@ youtube-channel
54
- msgid "Hide video info"
55
- msgstr "Esconder info de vídeo"
56
 
57
- #: youtube-channel.php:218
58
- #@ youtube-channel
59
- msgid "No items"
60
- msgstr "No hay elementos"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
- #: youtube-channel.php:92
63
- #@ youtube-channel
64
- msgid "Open channel in new window/tab"
65
- msgstr "Abrir canal en nueva ventana"
66
 
67
- #: youtube-channel.php:55
68
- #@ youtube-channel
69
- msgid "Playlist:"
70
- msgstr "Lista de reproducción:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
- #: youtube-channel.php:91
73
- #@ youtube-channel
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  msgid "Show link to channel"
75
  msgstr "Mostrar enlace a canal"
76
 
77
- #: youtube-channel.php:83
78
- #@ youtube-channel
79
- msgid "Show video title"
80
- msgstr "Mostrar título"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
- #: youtube-channel.php:93
83
- #@ youtube-channel
84
- msgid "Use target=\"_blank\" (invalid XHTML)"
85
- msgstr "Utilice objetivo = \"blank\" (XHTML no válido)"
86
 
87
- #: youtube-channel.php:56
88
- #@ youtube-channel
89
- msgid "Use the playlist instead of channel"
90
- msgstr "Use la lista de reproducción en lugar de canal"
91
 
92
- #: youtube-channel.php:90
93
- #@ youtube-channel
94
- msgid "Visit YouTube Channel text:"
95
- msgstr "Visitar canal de YouTube"
96
 
97
- #: youtube-channel.php:307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  #, php-format
99
- #@ youtube-channel
100
- msgid "Visit channel %1$s"
101
- msgstr "Visitar canal %1$s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
- #: youtube-channel.php:257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  #, php-format
105
- #@ youtube-channel
106
- msgid "Watch video %1$s published on %2$s"
107
- msgstr "Ver vídeo %1$s publicado en %2$s"
108
 
109
- #: youtube-channel.php:71
110
- #@ youtube-channel
111
- msgid "What to show?"
112
- msgstr "¿Qué mostrar?"
113
 
114
- #: youtube-channel.php:53
115
- #@ youtube-channel
116
- msgid "Widget Title:"
117
- msgstr "Título de widget"
118
 
119
- #: youtube-channel.php:61
120
- #@ youtube-channel
121
  msgid "Width"
122
  msgstr "Ancho"
123
 
124
- #: youtube-channel.php:23
125
- #@ youtube-channel
126
- msgid "YouTube Channel"
127
- msgstr "Canal de YouTube"
128
-
129
- #: youtube-channel.php:76
130
- #@ youtube-channel
131
- msgid "chromeless video"
132
- msgstr "vídeo sin marco"
133
 
134
- #: youtube-channel.php:65
135
- #@ youtube-channel
136
- msgid "custom"
137
- msgstr "Personalizado"
138
-
139
- #: youtube-channel.php:61
140
- #: youtube-channel.php:62
141
- #: youtube-channel.php:88
142
- #@ youtube-channel
143
  msgid "default"
144
  msgstr "por defecto"
145
 
146
- #: youtube-channel.php:75
147
- #@ youtube-channel
148
- msgid "iframe (HTML5 player)"
149
- msgstr "iframe (html5) - el bueno"
150
-
151
- #: youtube-channel.php:310
152
- #@ youtube-channel
153
- msgid "in new window/tab"
154
- msgstr "en nueva ventana/pestaña"
155
 
156
- #: youtube-channel.php:74
157
- #@ youtube-channel
158
- msgid "object (flash player)"
159
- msgstr "objeto (flash)"
160
 
161
- #: youtube-channel.php:73
162
- #@ youtube-channel
163
- msgid "thumbnail"
164
- msgstr "miniatura"
165
 
166
- #: youtube-channel.php:59
167
- #@ youtube-channel
168
- msgid "Try to fix `No items` error"
 
 
169
  msgstr ""
 
 
170
 
171
- #: youtube-channel.php:78
172
- #@ youtube-channel
173
- msgid "Use light theme (default is dark)"
174
- msgstr ""
175
 
176
- #: youtube-channel.php:84
177
- #@ youtube-channel
178
- msgid "Show video description"
 
 
179
  msgstr ""
 
 
180
 
181
- #: youtube-channel.php:85
182
- #@ youtube-channel
183
- msgid "Hide annotations from video"
184
- msgstr ""
185
 
186
- #: youtube-channel.php:88
187
- #@ youtube-channel
188
- msgid "Description length"
189
- msgstr ""
190
 
191
- #: youtube-channel.php:57
192
- #@ youtube-channel
193
- msgid "Get one random video of latest N videos from channel (min 1, max 50):"
 
 
 
194
  msgstr ""
 
 
 
 
195
 
196
- #: youtube-channel.php:58
197
- #@ youtube-channel
198
- msgid "Show random video from channel"
 
199
  msgstr ""
 
 
200
 
201
- #: youtube-channel.php:60
202
- #@ youtube-channel
203
- msgid "Video property"
 
 
 
204
  msgstr ""
 
 
 
 
205
 
206
- #: youtube-channel.php:82
207
- #@ youtube-channel
208
- msgid "Layout behaviour"
 
 
209
  msgstr ""
 
 
 
 
 
 
210
 
211
- #: youtube-channel.php:89
212
- #@ youtube-channel
213
- msgid "Link to channel"
 
 
 
 
 
 
214
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: YouTube Channel v2.2.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2014-09-26 23:02+0100\n"
6
+ "PO-Revision-Date: 2014-09-26 23:44+0100\n"
7
+ "Last-Translator: Digital03.net <info@digital03.net>\n"
8
+ "Language-Team: Digital03.net <info@digital03.net>\n"
9
+ "Language: es_ES\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
+ "X-Generator: Poedit 1.6.9\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
17
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
18
+ "X-Poedit-Basepath: .\n"
19
+ "X-Textdomain-Support: yes\n"
20
  "X-Poedit-SearchPath-0: .\n"
 
21
 
22
+ # @ youtube-channel
23
+ #: inc/config.20140926.php:58 inc/config.php:54
24
+ msgid "General"
25
+ msgstr "General"
26
 
27
+ # @ youtube-channel
28
+ #: inc/config.20140926.php:64 inc/config.php:60
29
+ msgid "YouTube Channel ID"
30
+ msgstr "ID Canal Youtube"
31
 
32
+ # @ youtube-channel
33
+ #: inc/config.20140926.php:65 inc/config.php:61
34
+ msgid "Enter your YouTube channel ID (channel name, not full URL to channel)"
35
+ msgstr ""
36
+ "Introduce la ID del canal de Youtube (nombre del canal, no la URL completa "
37
+ "del canal)"
38
 
39
+ # @ youtube-channel
40
+ #: inc/config.20140926.php:71 inc/config.php:67
41
+ msgid "Default Playlist ID"
42
+ msgstr "Lista de reproducción por defecto"
43
+
44
+ # @ youtube-channel
45
+ #: inc/config.20140926.php:72 inc/config.php:68
46
+ msgid "Enter default playlist ID (not playlist name)"
47
+ msgstr ""
48
+ "Introduce la ID de la lista de reproducción por defecto (no el nombre de la "
49
+ "lista)"
50
+
51
+ # @ youtube-channel
52
+ #: inc/config.20140926.php:78 inc/config.php:74 inc/widget.php:97
53
+ msgid "Resource to use"
54
+ msgstr "Recurso a usar"
55
+
56
+ # @ youtube-channel
57
+ #: inc/config.20140926.php:79 inc/config.php:75
58
+ msgid "What to use as resource for feeds"
59
+ msgstr "Qué usar como recursos de los feeds"
60
+
61
+ # @ youtube-channel
62
+ #: inc/config.20140926.php:81 inc/config.php:77 inc/widget.php:99
63
+ msgid "Channel"
64
+ msgstr "Canal"
65
+
66
+ # @ youtube-channel
67
+ #: inc/config.20140926.php:82 inc/config.php:78 inc/widget.php:100
68
+ msgid "Favorites"
69
+ msgstr "Favoritos"
70
+
71
+ # @ youtube-channel
72
+ #: inc/config.20140926.php:83 inc/config.php:79 inc/widget.php:101
73
+ msgid "Playlist"
74
+ msgstr "Lista de reproducción"
75
+
76
+ # @ youtube-channel
77
+ #: inc/config.20140926.php:90 inc/config.php:86 inc/widget.php:104
78
+ msgid "Embed standard playlist"
79
+ msgstr "Embeder lista estándar"
80
+
81
+ # @ youtube-channel
82
+ #: inc/config.20140926.php:91 inc/config.php:87
83
+ msgid ""
84
+ "Enable this option to embed whole playlist instead single video from "
85
+ "playlist when you chose playlist as resource"
86
+ msgstr ""
87
+ "Activa esta opción para embeder la lista de reproducción entera en vez de un "
88
+ "vídeo individual cuando elijas lista de reproducción como recurso"
89
+
90
+ # @ youtube-channel
91
+ #: inc/config.20140926.php:97 inc/config.php:93
92
+ msgid "Cache Timeout"
93
+ msgstr "Timeout caché"
94
+
95
+ # @ youtube-channel
96
+ #: inc/config.20140926.php:98 inc/config.php:94
97
+ msgid "Define caching timeout for YouTube feeds, in seconds"
98
+ msgstr ""
99
+ "Define el tiempo para descartar la caché de los feeds de Youtube, en segundos"
100
+
101
+ # @ youtube-channel
102
+ #: inc/config.20140926.php:101 inc/config.php:97 inc/widget.php:125
103
+ msgid "Do not chache"
104
+ msgstr "No chachear"
105
+
106
+ #: inc/config.20140926.php:102 inc/config.php:98 youtube-channel.php:809
107
+ msgid "1 minute"
108
+ msgstr "1 minuto"
109
+
110
+ #: inc/config.20140926.php:103 inc/config.php:99 youtube-channel.php:810
111
+ msgid "5 minutes"
112
+ msgstr "5 minutos"
113
+
114
+ #: inc/config.20140926.php:104 inc/config.php:100 youtube-channel.php:811
115
+ msgid "15 minutes"
116
+ msgstr "15 minutos"
117
+
118
+ #: inc/config.20140926.php:105 inc/config.php:101 youtube-channel.php:812
119
+ msgid "30 minutes"
120
+ msgstr "30 minutos"
121
+
122
+ #: inc/config.20140926.php:106 inc/config.php:102 youtube-channel.php:815
123
+ msgid "1 hour"
124
+ msgstr "1 hora"
125
+
126
+ #: inc/config.20140926.php:107 inc/config.php:103 youtube-channel.php:816
127
+ msgid "2 hours"
128
+ msgstr "2 horas"
129
+
130
+ #: inc/config.20140926.php:108 inc/config.php:104 youtube-channel.php:817
131
+ msgid "5 hours"
132
+ msgstr "5 horas"
133
+
134
+ #: inc/config.20140926.php:109 inc/config.php:105 youtube-channel.php:818
135
+ msgid "10 hours"
136
+ msgstr "10 horas"
137
+
138
+ #: inc/config.20140926.php:110 inc/config.php:106 youtube-channel.php:819
139
+ msgid "12 hours"
140
+ msgstr "12 horas"
141
 
142
+ #: inc/config.20140926.php:111 inc/config.php:107 youtube-channel.php:820
143
+ msgid "18 hours"
144
+ msgstr "18 horas"
145
+
146
+ #: inc/config.20140926.php:112 inc/config.php:108 youtube-channel.php:823
147
+ msgid "1 day"
148
+ msgstr "1 día"
149
+
150
+ #: inc/config.20140926.php:113 inc/config.php:109 youtube-channel.php:824
151
+ msgid "2 days"
152
+ msgstr "2 días"
153
+
154
+ #: inc/config.20140926.php:114 inc/config.php:110 youtube-channel.php:825
155
+ msgid "3 days"
156
+ msgstr "3 días"
157
+
158
+ #: inc/config.20140926.php:115 inc/config.php:111 youtube-channel.php:826
159
+ msgid "4 days"
160
+ msgstr "4 días"
161
+
162
+ #: inc/config.20140926.php:116 inc/config.php:112 youtube-channel.php:827
163
+ msgid "5 days"
164
+ msgstr "5 días"
165
+
166
+ #: inc/config.20140926.php:117 inc/config.php:113 youtube-channel.php:828
167
+ msgid "6 days"
168
+ msgstr "6 días"
169
+
170
+ #: inc/config.20140926.php:118 inc/config.php:114 youtube-channel.php:831
171
+ msgid "1 week"
172
+ msgstr "1 semana"
173
+
174
+ #: inc/config.20140926.php:119 inc/config.php:115 youtube-channel.php:832
175
+ msgid "2 weeks"
176
+ msgstr "2 semanas"
177
+
178
+ #: inc/config.20140926.php:120 inc/config.php:116 youtube-channel.php:833
179
+ msgid "3 weeks"
180
+ msgstr "3 semanas"
181
+
182
+ #: inc/config.20140926.php:121 inc/config.php:117 youtube-channel.php:834
183
+ msgid "1 month"
184
+ msgstr "1 mes"
185
+
186
+ # @ youtube-channel
187
+ #: inc/config.20140926.php:128 inc/config.php:124 inc/widget.php:130
188
+ msgid "Fetch"
189
+ msgstr "Obtener"
190
+
191
+ # @ youtube-channel
192
+ #: inc/config.20140926.php:129 inc/config.php:125 inc/widget.php:130
193
+ msgid ""
194
+ "Number of videos that will be used for random pick (min 2, max 50, default "
195
+ "25)"
196
+ msgstr ""
197
+ "Número de vídeos que se usarán para coger aleatoriamente (mínimo 2, máximo "
198
+ "50, por defecto 25)"
199
+
200
+ # @ youtube-channel
201
+ #: inc/config.20140926.php:138 inc/config.php:134 inc/widget.php:132
202
+ msgid "Show"
203
+ msgstr "Mostrar"
204
+
205
+ # @ youtube-channel
206
+ #: inc/config.20140926.php:139 inc/config.php:135 inc/widget.php:132
207
+ msgid "Number of videos to display"
208
+ msgstr "Número de vídeos a mostrar"
209
+
210
+ # @ youtube-channel
211
+ #: inc/config.20140926.php:148 inc/config.php:144
212
+ msgid "Use Enhanced privacy"
213
+ msgstr "Usar Privacidad Extendida"
214
+
215
+ # @ youtube-channel
216
+ #: inc/config.20140926.php:155 inc/config.php:151 inc/widget.php:137
217
+ msgid "Fix <em>No items</em> error/Respect playlist order"
218
+ msgstr "Corregir <em>No hay vídeos</em> error / Respetar orden de lista"
219
+
220
+ # @ youtube-channel
221
+ #: inc/config.20140926.php:156 inc/config.php:152 inc/widget.php:137
222
+ msgid "Enable this option if you get error No Item"
223
+ msgstr "Activa esta opción si obtienes un error No hay vídeo"
224
+
225
+ # @ youtube-channel
226
+ #: inc/config.20140926.php:162 inc/config.php:158 inc/widget.php:139
227
+ msgid "Show random video"
228
+ msgstr "Mostrar vídeo aleatorio"
229
+
230
+ # @ youtube-channel
231
+ #: inc/config.20140926.php:163 inc/config.php:159 inc/widget.php:139
232
+ msgid "Get random videos of all fetched from channel or playlist"
233
+ msgstr ""
234
+ "Elige vídeos aleatoriamente de todos los obtenidos del canal o la lista de "
235
+ "reproducción"
236
+
237
+ # @ wpaust
238
+ #: inc/config.20140926.php:172 inc/config.php:168
239
+ msgid "Video"
240
+ msgstr "Vídeo"
241
+
242
+ # @ youtube-channel
243
+ #: inc/config.20140926.php:178 inc/config.php:174
244
+ msgid "Aspect Ratio"
245
+ msgstr "Ratio de aspecto"
246
+
247
+ # @ youtube-channel
248
+ #: inc/config.20140926.php:179 inc/config.php:175
249
+ msgid "Select aspect ratio for displayed video"
250
+ msgstr "Selecciona relación de aspecto para mostrar los vídeos"
251
+
252
+ # @ youtube-channel
253
+ #: inc/config.20140926.php:182 inc/config.php:178
254
+ msgid "16:9"
255
+ msgstr "16:9"
256
+
257
+ # @ youtube-channel
258
+ #: inc/config.20140926.php:183 inc/config.php:179
259
+ msgid "16:10"
260
+ msgstr "16:10"
261
+
262
+ # @ youtube-channel
263
+ #: inc/config.20140926.php:184 inc/config.php:180
264
+ msgid "4:3"
265
+ msgstr "4:3"
266
+
267
+ # @ wpaust
268
+ #: inc/config.20140926.php:191 inc/config.php:187
269
+ msgid "Video Width"
270
+ msgstr "Anchura del vídeo"
271
+
272
+ # @ youtube-channel
273
+ #: inc/config.20140926.php:192 inc/config.php:188
274
+ msgid "Set default width for displayed video, in pixels"
275
+ msgstr "Fijar anchura por defecto para mostrar vídeos, en pixeles"
276
+
277
+ # @ youtube-channel
278
+ #: inc/config.20140926.php:201 inc/config.php:197 inc/widget.php:154
279
+ msgid "What to show?"
280
+ msgstr "¿Qué mostrar?"
281
+
282
+ # @ youtube-channel
283
+ #: inc/config.20140926.php:202 inc/config.20140926.php:336 inc/config.php:198
284
+ #: inc/config.php:332
285
+ msgid "Set what will be shown by default"
286
+ msgstr "Fijar qué se mostrará por defecto"
287
+
288
+ # @ youtube-channel
289
+ #: inc/config.20140926.php:205 inc/config.php:201 inc/widget.php:156
290
+ msgid "Thumbnail"
291
+ msgstr "Miniatura"
292
+
293
+ # @ youtube-channel
294
+ #: inc/config.20140926.php:206 inc/config.php:202 inc/widget.php:157
295
+ msgid "Flash (object)"
296
+ msgstr "Objeto Flash"
297
+
298
+ # @ youtube-channel
299
+ #: inc/config.20140926.php:207 inc/config.php:203 inc/widget.php:158
300
+ msgid "HTML5 (iframe)"
301
+ msgstr "HTML5 (iframe)"
302
+
303
+ # @ youtube-channel
304
+ #: inc/config.20140926.php:208 inc/config.php:204 inc/widget.php:159
305
+ msgid "HTML5 (iframe) Async"
306
+ msgstr "HTML5 (iframe) asíncrono"
307
+
308
+ # @ youtube-channel
309
+ #: inc/config.20140926.php:209 inc/config.php:205 inc/widget.php:160
310
+ msgid "Chromeless"
311
+ msgstr "Sin marco"
312
+
313
+ # @ youtube-channel
314
+ #: inc/config.20140926.php:216 inc/config.php:212
315
+ msgid "Use light theme"
316
+ msgstr "Usar plantilla clara"
317
+
318
+ # @ youtube-channel
319
+ #: inc/config.20140926.php:217 inc/config.php:213
320
+ msgid ""
321
+ "Enable this option to use light theme for playback controls instead dark"
322
+ msgstr ""
323
+ "Activa esta opción para usar la plantilla clara para los controles de "
324
+ "reproducción en lugar de la oscura"
325
 
326
+ # @ youtube-channel
327
+ #: inc/config.20140926.php:223 inc/config.php:219 inc/widget.php:163
328
  msgid "Hide player controls"
329
  msgstr "Esconder controles de reproducción"
330
 
331
+ # @ youtube-channel
332
+ #: inc/config.20140926.php:224 inc/config.php:220
333
+ msgid "Enable this option to hide playback controls"
334
+ msgstr "Activa esta opción para ocultar los controles de reproducción"
335
 
336
+ # @ youtube-channel
337
+ #: inc/config.20140926.php:230 inc/config.php:226
338
+ msgid "Fix video height"
339
+ msgstr "Ajustar altura de vídeo"
340
+
341
+ # @ youtube-channel
342
+ #: inc/config.20140926.php:231 inc/config.php:227
343
+ msgid ""
344
+ "Enable this option to fix video height when playback controls are not hidden"
345
+ msgstr ""
346
+ "Activa esta opción para ajustar la altura del vídeo cuando los controles de "
347
+ "reproducción no están ocultos"
348
+
349
+ # @ youtube-channel
350
+ #: inc/config.20140926.php:237 inc/config.php:233 inc/widget.php:165
351
+ msgid "Autoplay video or playlist"
352
+ msgstr "Auto reproducir vídeo o lista de reproducción"
353
+
354
+ # @ youtube-channel
355
+ #: inc/config.20140926.php:238 inc/config.php:234
356
+ msgid ""
357
+ "Enable this option to start video playback right after block is rendered"
358
+ msgstr ""
359
+ "Activa esta opción para auto iniciar la reproducción tras renderizar el "
360
+ "bloque"
361
 
362
+ # @ youtube-channel
363
+ #: inc/config.20140926.php:244 inc/config.php:240 inc/widget.php:166
364
+ msgid "Mute video on autoplay"
365
+ msgstr "Desactivar sonido en autoplay"
366
 
367
+ # @ youtube-channel
368
+ #: inc/config.20140926.php:245 inc/config.php:241
369
+ msgid "Enable this option to mute video when start autoplay"
370
+ msgstr ""
371
+ "Activa esta opción para desactivar el sonido al comenzar el vídeo con "
372
+ "autoplay"
373
+
374
+ # @ youtube-channel
375
+ #: inc/config.20140926.php:251 inc/config.php:247 inc/widget.php:167
376
+ msgid "Hide related videos"
377
+ msgstr "Ocultar vídeos relacionados"
378
+
379
+ # @ youtube-channel
380
+ #: inc/config.20140926.php:252 inc/config.php:248
381
+ msgid "Enable this option to hide related videos after finished playback"
382
+ msgstr ""
383
+ "Activa esta opción para ocultar los vídeos relacionados tras la reproducción"
384
+
385
+ # @ youtube-channel
386
+ #: inc/config.20140926.php:261 inc/config.php:257
387
+ msgid "Content"
388
+ msgstr "Contenido"
389
+
390
+ # @ youtube-channel
391
+ #: inc/config.20140926.php:267 inc/config.php:263 inc/widget.php:172
392
+ msgid "Show video title"
393
+ msgstr "Mostrar título del vídeo"
394
+
395
+ # @ youtube-channel
396
+ #: inc/config.20140926.php:268 inc/config.php:264
397
+ msgid "Enable this option to display title of video"
398
+ msgstr "Activa esta opción para mostrar el título del vídeo"
399
+
400
+ # @ youtube-channel
401
+ #: inc/config.20140926.php:274 inc/config.php:270 inc/widget.php:173
402
+ msgid "Show video description"
403
+ msgstr "Mostrar descripción del vídeo"
404
 
405
+ # @ youtube-channel
406
+ #: inc/config.20140926.php:275 inc/config.php:271
407
+ msgid "Enable this option to display description for video"
408
+ msgstr "Activa esta opción para mostrar la descripción del vídeo"
409
+
410
+ # @ youtube-channel
411
+ #: inc/config.20140926.php:281 inc/config.php:277 inc/widget.php:174
412
+ msgid "Description length"
413
+ msgstr "Tamaño descripción"
414
+
415
+ # @ youtube-channel
416
+ #: inc/config.20140926.php:282 inc/config.php:278
417
+ msgid "Enter length for video description in characters (0 for full length)"
418
+ msgstr ""
419
+ "Introduce el tamaño de la descripción del vídeo en caracteres (0 para "
420
+ "mostrarlo completo)"
421
+
422
+ # @ youtube-channel
423
+ #: inc/config.20140926.php:291 inc/config.php:287 inc/widget.php:175
424
+ msgid "Et cetera string"
425
+ msgstr "Cadena para etcétera"
426
+
427
+ #: inc/config.20140926.php:292 inc/config.php:288
428
+ msgid "Indicator for shortened video description (default: …)"
429
+ msgstr "Indicador para acortar las descripciones del vídeo (por defecto: ...)"
430
+
431
+ #: inc/config.20140926.php:293 inc/config.php:289
432
+ msgid "..."
433
+ msgstr "..."
434
+
435
+ # @ youtube-channel
436
+ #: inc/config.20140926.php:298 inc/config.php:294 inc/widget.php:176
437
+ msgid "Hide annotations from video"
438
+ msgstr "Ocultar anotaciones del vídeo"
439
+
440
+ # @ youtube-channel
441
+ #: inc/config.20140926.php:299 inc/config.php:295
442
+ msgid ""
443
+ "Enable this option to hide video annotations (custom text set by uploader "
444
+ "over video during playback)"
445
+ msgstr ""
446
+ "Activa esta opción para ocultar las anotaciones del vídeo (texto "
447
+ "personalizado creado por el uploader)"
448
+
449
+ # @ youtube-channel
450
+ #: inc/config.20140926.php:305 inc/config.php:301 inc/widget.php:177
451
+ msgid "Hide video info"
452
+ msgstr "Esconder info del vídeo"
453
+
454
+ # @ youtube-channel
455
+ #: inc/config.20140926.php:306 inc/config.php:302
456
+ msgid ""
457
+ "Enable this option to hide informations about video before play start (video "
458
+ "title and uploader in overlay)"
459
+ msgstr ""
460
+ "Activa esta opción para ocultar la información sobre el vídeo antes de "
461
+ "reproducirlo (título del vídeo y uploader)"
462
+
463
+ # @ youtube-channel
464
+ #: inc/config.20140926.php:315 inc/config.php:311 inc/widget.php:180
465
+ msgid "Link to Channel"
466
+ msgstr "Enlace al canal"
467
+
468
+ # @ youtube-channel
469
+ #: inc/config.20140926.php:321 inc/config.php:317 inc/widget.php:182
470
+ msgid "Visit YouTube Channel text"
471
+ msgstr "Texto para Visitar canal de YouTube"
472
+
473
+ # @ youtube-channel
474
+ #: inc/config.20140926.php:322 inc/config.php:318
475
+ msgid "Use placeholder %channel% to insert channel name"
476
+ msgstr "Usa el código %channel% para insertar el nombre del canal"
477
+
478
+ # @ youtube-channel
479
+ #: inc/config.20140926.php:323 inc/config.php:319
480
+ msgid "Visit my channel %channel%"
481
+ msgstr "Visita mi canal %channel%"
482
+
483
+ # @ youtube-channel
484
+ #: inc/config.20140926.php:328 inc/config.php:324 inc/widget.php:183
485
  msgid "Show link to channel"
486
  msgstr "Mostrar enlace a canal"
487
 
488
+ # @ youtube-channel
489
+ #: inc/config.20140926.php:329 inc/config.php:325
490
+ msgid ""
491
+ "Enable this option to show customized link to channel at the bottom of YTC "
492
+ "block"
493
+ msgstr ""
494
+ "Activa esta opción para mostrar un enlace personalizado al canal al final "
495
+ "del bloque YTC"
496
+
497
+ # @ youtube-channel
498
+ #: inc/config.20140926.php:335 inc/config.php:331
499
+ msgid "Open YouTube channel page"
500
+ msgstr "Abrir página del canal de YouTube"
501
+
502
+ # @ youtube-channel
503
+ #: inc/config.20140926.php:339 inc/config.php:335 inc/widget.php:186
504
+ msgid "in same window"
505
+ msgstr "en la misma ventana"
506
+
507
+ # @ youtube-channel
508
+ #: inc/config.20140926.php:340 inc/config.php:336 inc/widget.php:187
509
+ msgid "in new window (JavaScript)"
510
+ msgstr "en nueva ventana (JavaScript)"
511
+
512
+ # @ youtube-channel
513
+ #: inc/config.20140926.php:341 inc/config.php:337 inc/widget.php:188
514
+ msgid "in new window (Target)"
515
+ msgstr "en nueva ventana (Target)"
516
+
517
+ # @ youtube-channel
518
+ #: inc/config.20140926.php:348 inc/config.php:344 inc/widget.php:191
519
+ msgid "Link to channel instead to user"
520
+ msgstr "Enlaza al canal en vez del al usuario"
521
+
522
+ # @ youtube-channel
523
+ #: inc/config.20140926.php:349 inc/config.php:345
524
+ msgid ""
525
+ "Enable this option if link to your channel have <code>/channel/</code> "
526
+ "instead <code>/user/</code> part in URL"
527
+ msgstr ""
528
+ "Activa esta opción si la URL de enlace a tu canal tiene <code>/channel/</"
529
+ "code> en vez de <code>/user/</code>"
530
 
531
+ # @ youtube-channel
532
+ #: inc/config.20140926.php:358 inc/config.php:354
533
+ msgid "Tools"
534
+ msgstr "Herramientas"
535
 
536
+ #: inc/config.20140926.php:375 inc/config.php:371
537
+ msgid "Usage"
538
+ msgstr "Usar"
 
539
 
540
+ #: inc/config.20140926.php:396 inc/config.php:392
541
+ msgid "Support"
542
+ msgstr "Soporte"
 
543
 
544
+ #: inc/config.20140926.php:427 inc/config.php:423
545
+ msgid " Options"
546
+ msgstr " Opciones"
547
+
548
+ # @ youtube-channel
549
+ #: inc/config.20140926.php:500 inc/config.php:496
550
+ msgid ""
551
+ "<p>Easy embed playable videos from YouTube.</p><p>Here you can set default "
552
+ "options that will be used as defaults for new widgets, and for shortcode.</p>"
553
+ msgstr ""
554
+ "<p>Incrusta fácilmente vídeos de Youtube</p><p>Aquí puedes cambiar las "
555
+ "configuraciones por defecto que serán usadas en widgets y shortcodes.</p>"
556
+
557
+ # @ youtube-channel
558
+ #: inc/config.php:145
559
  #, php-format
560
+ msgid ""
561
+ "Enable this option to protect your visitors <a href=\"%s\" target=\"_blank"
562
+ "\">privacy</a>."
563
+ msgstr ""
564
+ "Activa esta opción para proteger la <a href=\"%s\" target=\"_blank"
565
+ "\">privacidad</a> de tus visitantes"
566
+
567
+ # @ youtube-channel
568
+ #: inc/widget.php:11
569
+ msgid "Youtube Channel"
570
+ msgstr "Canal de YouTube"
571
+
572
+ # @ youtube-channel
573
+ #: inc/widget.php:12
574
+ msgid "Serve YouTube videos from channel or playlist right to widget area"
575
+ msgstr ""
576
+ "Muestra vídeos de Youtube de un canal o lista de reproducción en un área de "
577
+ "widgets"
578
+
579
+ # @ youtube-channel
580
+ #: inc/widget.php:85
581
+ msgid "Widget Title"
582
+ msgstr "Título del widget"
583
+
584
+ # @ youtube-channel
585
+ #: inc/widget.php:85
586
+ msgid "Title for widget"
587
+ msgstr "Título del widget"
588
+
589
+ #: inc/widget.php:88
590
+ msgid "Custom CSS Class"
591
+ msgstr "Clases CSS personalizadas"
592
 
593
+ #: inc/widget.php:88
594
+ msgid "Enter custom class for YTC block, if you wish to target block styling"
595
+ msgstr ""
596
+ "Introduce las clases personalizadas para el bloque YTC si quieres "
597
+ "personalizarlo"
598
+
599
+ # @ youtube-channel
600
+ #: inc/widget.php:91
601
+ msgid "Channel ID"
602
+ msgstr "ID del canal"
603
+
604
+ # @ youtube-channel
605
+ #: inc/widget.php:91
606
+ msgid "YouTube Channel name (not URL to channel)"
607
+ msgstr "Nombre del Canal de Youtube (no la URL del canal)"
608
+
609
+ # @ youtube-channel
610
+ #: inc/widget.php:94
611
+ msgid "Playlist ID"
612
+ msgstr "ID lista de reproducción"
613
+
614
+ # @ youtube-channel
615
+ #: inc/widget.php:94
616
+ msgid "YouTube Playlist ID (not playlist name)"
617
+ msgstr "ID Playlist Youtube (no el nombre de la lista)"
618
+
619
+ # @ youtube-channel
620
+ #: inc/widget.php:104
621
+ msgid ""
622
+ "Enable this option to embed YouTube playlist widget instead single video "
623
+ "from playlist"
624
+ msgstr ""
625
+ "Activa esta opción para embeder una lista de reproducción de Youtube en vez "
626
+ "de un vídeo individual de la lista"
627
+
628
+ # @ youtube-channel
629
+ #: inc/widget.php:123
630
+ msgid "Cache feed"
631
+ msgstr "Caché feed"
632
+
633
+ #: inc/widget.php:130 inc/widget.php:132
634
+ msgid "video(s)"
635
+ msgstr "vídeo(s)"
636
+
637
+ # @ youtube-channel
638
+ #: inc/widget.php:135
639
+ msgid "Enable this option to protect your visitors privacy"
640
+ msgstr "Activa esta opción para proteger la privacidad de tus visitantes"
641
+
642
+ # @ youtube-channel
643
+ #: inc/widget.php:135
644
  #, php-format
645
+ msgid "Use <a href=\"%s\" target=\"_blank\">Enhanced Privacy</a>"
646
+ msgstr "Usar <a href=\"%s\" target=\"_blank\">Privacidad extendida</a>"
 
647
 
648
+ # @ youtube-channel
649
+ #: inc/widget.php:142
650
+ msgid "Video Settings"
651
+ msgstr "Configuración del vídeo"
652
 
653
+ # @ youtube-channel
654
+ #: inc/widget.php:143
655
+ msgid "Aspect ratio"
656
+ msgstr "Ratio de aspecto"
657
 
658
+ # @ youtube-channel
659
+ #: inc/widget.php:151
660
  msgid "Width"
661
  msgstr "Ancho"
662
 
663
+ # @ youtube-channel
664
+ #: inc/widget.php:151
665
+ msgid "Set video width in pixels"
666
+ msgstr "Anchura del vídeo en pixeles"
 
 
 
 
 
667
 
668
+ # @ youtube-channel
669
+ #: inc/widget.php:151
 
 
 
 
 
 
 
670
  msgid "default"
671
  msgstr "por defecto"
672
 
673
+ # @ youtube-channel
674
+ #: inc/widget.php:162
675
+ msgid "Use light theme (default is dark)"
676
+ msgstr "Usa plantilla clara (por defecto es oscura)"
 
 
 
 
 
677
 
678
+ # @ youtube-channel
679
+ #: inc/widget.php:164
680
+ msgid "Fix height taken by controls"
681
+ msgstr "Fijar la altura tomada por los controles"
682
 
683
+ # @ youtube-channel
684
+ #: inc/widget.php:170
685
+ msgid "Content Layout"
686
+ msgstr "Diseño de contenido"
687
 
688
+ # @ youtube-channel
689
+ #: inc/widget.php:174
690
+ msgid ""
691
+ "Set number of characters to cut down video description to (0 means full "
692
+ "length)"
693
  msgstr ""
694
+ "Número de caracteres para cortar la descripción del vídeo (0 para mostrarla "
695
+ "completa)"
696
 
697
+ # @ youtube-channel
698
+ #: inc/widget.php:175
699
+ msgid "Default: &amp;hellip;"
700
+ msgstr "Defecto &amp;hellip;"
701
 
702
+ # @ youtube-channel
703
+ #: inc/widget.php:182
704
+ msgid ""
705
+ "Default: Visit channel %channel%. Use placeholder %channel% to insert "
706
+ "channel name."
707
  msgstr ""
708
+ "Defecto: Visitar el canal %channel%. Usa el código %channel% para insertar "
709
+ "el nombre del canal."
710
 
711
+ # @ youtube-channel
712
+ #: inc/widget.php:194
713
+ msgid "Debug YTC"
714
+ msgstr "YTC modo Debug"
715
 
716
+ #: inc/widget.php:196
717
+ msgid "Enable debugging"
718
+ msgstr "Activar modo debug"
 
719
 
720
+ #: inc/widget.php:212
721
+ #, php-format
722
+ msgid ""
723
+ "Insert debug data to <a href=\"%s\" target=\"_support\">support forum</a>."
724
+ "<br />Please do not remove channel and playlist ID`s. If you are concerned "
725
+ "about privacy, send this debug log to email %s"
726
  msgstr ""
727
+ "Envía los datos de debug a través del <a href=\"%s\" target=\"_support"
728
+ "\">foro de soporte</a>.<br /> Por favor, no borres el canal y los ID de "
729
+ "lista de reproducción. Si tienes algún problema con la privacidad, envía "
730
+ "esta info de debug al email %s"
731
 
732
+ #: youtube-channel.php:90
733
+ #, php-format
734
+ msgid ""
735
+ "Please review <a href=\"%s\">global settings</a>, YTC widgets and shortcodes."
736
  msgstr ""
737
+ "Por favor, revisa las <a href=\"%s\">opciones generales</a>, widgets YTC y "
738
+ "shortcodes"
739
 
740
+ #: youtube-channel.php:93
741
+ #, php-format
742
+ msgid ""
743
+ "If you use caching for any YTC widget or shortcode, please <strong>ReCache</"
744
+ "strong> feeds in <strong>Tools</strong> section of <a href=\"%s\">plugin "
745
+ "settings</a> page."
746
  msgstr ""
747
+ "Si estás usando el cacheo para cualquier widget o shortcode de YTC, por "
748
+ "favor <strong>actualiza el caché</strong> de los feeds en la sección "
749
+ "<strong>Herramientas</strong>, en la página de las <a href=\"%s\">opciones "
750
+ "del plugin</a>. "
751
 
752
+ #: youtube-channel.php:96
753
+ #, php-format
754
+ msgid ""
755
+ "We switched to <em>Redux Framework</em> so please review global plugin <a "
756
+ "href=\"%s\">settings page</a>."
757
  msgstr ""
758
+ "Hemos actualizado al <em>Framework Redux</em> asi que por favor revisa la "
759
+ "configuración global del plugin en la <a href=\"%s\">página de opciones</a>."
760
+
761
+ #: youtube-channel.php:101
762
+ msgid "updated to version"
763
+ msgstr "actualizar a la versión"
764
 
765
+ #: youtube-channel.php:101
766
+ msgid "I did this already, dismiss notice!"
767
+ msgstr "Ya lo he hecho, desactiva la notificación!"
768
+
769
+ #: youtube-channel.php:108
770
+ #, php-format
771
+ msgid ""
772
+ "To configure global <strong>%s</strong> options, you need to install and "
773
+ "activate <strong>%s</strong>."
774
  msgstr ""
775
+ "Para configurar la opción global <strong>%s</strong>, necesitas instalar y "
776
+ "activar <strong>%s</strong>."
777
+
778
+ # @ youtube-channel
779
+ #: youtube-channel.php:113
780
+ msgid "Settings"
781
+ msgstr "Configuración"
782
+
783
+ # @ youtube-channel
784
+ #: youtube-channel.php:486
785
+ msgid "No items"
786
+ msgstr "No hay elementos"
787
+
788
+ # @ youtube-channel
789
+ #: youtube-channel.php:486
790
+ msgid "Check here why"
791
+ msgstr "Informate aquí del porqué"
792
+
793
+ # @ youtube-channel
794
+ #: youtube-channel.php:547
795
+ #, php-format
796
+ msgid "Visit channel %1$s"
797
+ msgstr "Visitar canal %1$s"
798
+
799
+ # @ youtube-channel
800
+ #: youtube-channel.php:554
801
+ msgid "in new window/tab"
802
+ msgstr "en nueva ventana/pestaña"
803
+
804
+ # @ youtube-channel
805
+ #: youtube-channel.php:651
806
+ #, php-format
807
+ msgid "Watch video %1$s published on %2$s"
808
+ msgstr "Ver vídeo %1$s publicado en %2$s"
809
 
810
+ # @ youtube-channel
811
+ #~ msgid "Visit YouTube Channel text:"
812
+ #~ msgstr "Texto Visitar canal de YouTube:"
813
+
814
+ # @ youtube-channel
815
+ #~ msgid "Help"
816
+ #~ msgstr "Ayuda"
817
+
818
+ # @ youtube-channel
819
+ #~ msgid ""
820
+ #~ "<p>Default settings for video section. This will be used as default "
821
+ #~ "values for shortcode.</p>"
822
+ #~ msgstr ""
823
+ #~ "<p>Opciones por defecto para la sección vídeos. Serán usados como valores "
824
+ #~ "por defecto para los shortcode.</p>"
825
+
826
+ # @ youtube-channel
827
+ #~ msgid ""
828
+ #~ "<p>Default settings for content layout section. This will be used as "
829
+ #~ "default values for shortcode.</p>"
830
+ #~ msgstr ""
831
+ #~ "<p>Opciones por defecto para la sección diseño de contenidos. Serán "
832
+ #~ "usados como valores por defecto para los shortcode.</p>"
833
+
834
+ # @ youtube-channel
835
+ #~ msgid ""
836
+ #~ "<p>Default settings for channel link at the bottom of video block. This "
837
+ #~ "will be used as default values for shortcode.</p>"
838
+ #~ msgstr ""
839
+ #~ "<p>Opciones por defecto para el enlace al canal en el pie del bloque de "
840
+ #~ "vídeo. Serán usados como valores por defecto para los shortcode.</p>"
841
+
842
+ # @ default
843
+ #~ msgid "You do not have sufficient permissions to access this page."
844
+ #~ msgstr "No tienes suficientes permisos para acceder a esta página."
845
+
846
+ # @ youtube-channel
847
+ #~ msgid "Resource to use:"
848
+ #~ msgstr "Recurso a usar:"
849
+
850
+ # @ youtube-channel
851
+ #~ msgid "Fetch:"
852
+ #~ msgstr "Obtener:"
853
+
854
+ # @ youtube-channel
855
+ #~ msgid "Show:"
856
+ #~ msgstr "Mostrar:"
languages/youtube-channel-sr_RS.mo CHANGED
Binary file
languages/youtube-channel-sr_RS.po CHANGED
@@ -1,215 +1,682 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: \n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-09-28 21:16+0200\n"
6
  "PO-Revision-Date: \n"
7
- "Last-Translator: Aleksandar Urošević <urke@users.sourceforge.net>\n"
8
- "Language-Team: \n"
 
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: \n"
14
- "X-Poedit-Country: \n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
- "X-Poedit-Basepath: \n"
18
- "X-Poedit-Bookmarks: \n"
19
  "X-Poedit-SearchPath-0: .\n"
20
- "X-Textdomain-Support: yes"
21
 
22
- #: youtube-channel.php:63
23
- #@ youtube-channel
24
- msgid "Aspect ratio (relative to width):"
25
- msgstr "Однос страница (база је ширина):"
26
 
27
- #: youtube-channel.php:81
28
- #@ youtube-channel
29
- msgid "Autoplay video"
30
- msgstr "Аутоматска репродукција"
31
 
32
- #: youtube-channel.php:54
33
- #@ youtube-channel
34
- msgid "Channel:"
35
- msgstr "Канал:"
36
 
37
- #: youtube-channel.php:80
38
- #@ youtube-channel
39
- msgid "Fix height taken by controls"
40
- msgstr "Поправи висину контрола"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- #: youtube-channel.php:62
43
- #@ youtube-channel
44
- msgid "Height"
45
- msgstr "Висина"
46
 
47
- #: youtube-channel.php:79
48
- #@ youtube-channel
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  msgid "Hide player controls"
50
- msgstr "Сакривање контрола"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
- #: youtube-channel.php:86
53
- #@ youtube-channel
54
  msgid "Hide video info"
55
- msgstr "Сакривање информација о видеу"
56
 
57
- #: youtube-channel.php:218
58
- #@ youtube-channel
59
- msgid "No items"
60
- msgstr "Нема видео снимака"
 
 
 
 
 
 
 
61
 
62
- #: youtube-channel.php:92
63
- #@ youtube-channel
64
- msgid "Open channel in new window/tab"
65
- msgstr "Отвори канал у новом прозору"
66
 
67
- #: youtube-channel.php:55
68
- #@ youtube-channel
69
- msgid "Playlist:"
70
- msgstr "Плејлиста:"
71
 
72
- #: youtube-channel.php:91
73
- #@ youtube-channel
 
 
 
74
  msgid "Show link to channel"
75
  msgstr "Прикажи везу до канала"
76
 
77
- #: youtube-channel.php:83
78
- #@ youtube-channel
79
- msgid "Show video title"
80
- msgstr "Прикажи наслов видеа"
 
81
 
82
- #: youtube-channel.php:93
83
- #@ youtube-channel
84
- msgid "Use target=\"_blank\" (invalid XHTML)"
85
- msgstr "Користи target=\"_blank\"<br />(даје невалидан XHTML)"
86
 
87
- #: youtube-channel.php:56
88
- #@ youtube-channel
89
- msgid "Use the playlist instead of channel"
90
- msgstr "Користи плејлисту уместо канала"
91
 
92
- #: youtube-channel.php:90
93
- #@ youtube-channel
94
- msgid "Visit YouTube Channel text:"
95
- msgstr "Текст за везу „посети Јутјуб канал“:"
 
 
 
96
 
97
- #: youtube-channel.php:307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  #, php-format
99
- #@ youtube-channel
100
- msgid "Visit channel %1$s"
101
- msgstr "Посети канал %1$s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
- #: youtube-channel.php:257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  #, php-format
105
- #@ youtube-channel
106
- msgid "Watch video %1$s published on %2$s"
107
- msgstr "Погледај видео %1$s објављен дана %2$s"
108
 
109
- #: youtube-channel.php:71
110
- #@ youtube-channel
111
- msgid "What to show?"
112
- msgstr "Шта да прикажем?"
113
 
114
- #: youtube-channel.php:53
115
- #@ youtube-channel
116
- msgid "Widget Title:"
117
- msgstr "Наслов виџета:"
118
 
119
- #: youtube-channel.php:61
120
- #@ youtube-channel
121
  msgid "Width"
122
  msgstr "Ширина"
123
 
124
- #: youtube-channel.php:23
125
- #@ youtube-channel
126
- msgid "YouTube Channel"
127
- msgstr "YouTube Channel"
128
-
129
- #: youtube-channel.php:76
130
- #@ youtube-channel
131
- msgid "chromeless video"
132
- msgstr "„chromeless“ видео"
133
-
134
- #: youtube-channel.php:65
135
- #@ youtube-channel
136
- msgid "custom"
137
- msgstr "прилагођено"
138
-
139
- #: youtube-channel.php:61
140
- #: youtube-channel.php:62
141
- #: youtube-channel.php:88
142
- #@ youtube-channel
143
  msgid "default"
144
  msgstr "подразумевано"
145
 
146
- #: youtube-channel.php:75
147
- #@ youtube-channel
148
- msgid "iframe (HTML5 player)"
149
- msgstr "уграђени фрејм (HTML5 плејер)"
150
 
151
- #: youtube-channel.php:310
152
- #@ youtube-channel
153
- msgid "in new window/tab"
154
- msgstr "у новом прозору/језичку"
155
 
156
- #: youtube-channel.php:74
157
- #@ youtube-channel
158
- msgid "object (flash player)"
159
- msgstr "објекат (флеш плејер)"
160
 
161
- #: youtube-channel.php:73
162
- #@ youtube-channel
163
- msgid "thumbnail"
164
- msgstr "умањену слику"
 
165
 
166
- #: youtube-channel.php:59
167
- #@ youtube-channel
168
- msgid "Try to fix `No items` error"
169
- msgstr "Покушај да поправиш гершку „No items“"
170
 
171
- #: youtube-channel.php:78
172
- #@ youtube-channel
173
- msgid "Use light theme (default is dark)"
174
- msgstr "Користи светлу тему"
 
 
 
175
 
176
- #: youtube-channel.php:84
177
- #@ youtube-channel
178
- msgid "Show video description"
179
- msgstr "Прикажи опис видеа"
180
 
181
- #: youtube-channel.php:85
182
- #@ youtube-channel
183
- msgid "Hide annotations from video"
184
- msgstr "Сакриј белешке са видеа"
185
 
186
- #: youtube-channel.php:88
187
- #@ youtube-channel
188
- msgid "Description length"
189
- msgstr "Дужина описа"
 
 
 
 
 
 
 
190
 
191
- #: youtube-channel.php:57
192
- #@ youtube-channel
193
- msgid "Get one random video of latest N videos from channel (min 1, max 50):"
194
- msgstr "Узми један насумични видео од последњих Н видеа са канала (мин. 1, макс. 50):"
195
-
196
- #: youtube-channel.php:58
197
- #@ youtube-channel
198
- msgid "Show random video from channel"
199
- msgstr "Прикажи насумични видео са канала"
200
-
201
- #: youtube-channel.php:60
202
- #@ youtube-channel
203
- msgid "Video property"
204
- msgstr "Поставке видеа"
205
-
206
- #: youtube-channel.php:82
207
- #@ youtube-channel
208
- msgid "Layout behaviour"
209
- msgstr "Изглед"
210
-
211
- #: youtube-channel.php:89
212
- #@ youtube-channel
213
- msgid "Link to channel"
214
- msgstr "Веза до канала"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: YouTube Channel\n"
4
+ "POT-Creation-Date: 2014-09-26 23:02+0100\n"
 
5
  "PO-Revision-Date: \n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: Aleksandar Urosevic <urke.kg@gmail.com>\n"
8
+ "Language: sr_RS\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
13
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
14
+ "X-Poedit-KeywordsList: __;_e\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Generator: Poedit 1.6.9\n"
17
+ "X-Poedit-Basepath: .\n"
 
18
  "X-Poedit-SearchPath-0: .\n"
 
19
 
20
+ #: inc/config.20140926.php:58 inc/config.php:54
21
+ msgid "General"
22
+ msgstr "Опште"
 
23
 
24
+ #: inc/config.20140926.php:64 inc/config.php:60
25
+ msgid "YouTube Channel ID"
26
+ msgstr "ИД Јутјуб канала"
 
27
 
28
+ #: inc/config.20140926.php:65 inc/config.php:61
29
+ msgid "Enter your YouTube channel ID (channel name, not full URL to channel)"
30
+ msgstr "Унесите ИД Вашег Јутјуб канала (само назив канала, не целу путању)"
 
31
 
32
+ #: inc/config.20140926.php:71 inc/config.php:67
33
+ msgid "Default Playlist ID"
34
+ msgstr "ИД подразумеване плејлисте"
35
+
36
+ #: inc/config.20140926.php:72 inc/config.php:68
37
+ msgid "Enter default playlist ID (not playlist name)"
38
+ msgstr "Унесите подразумевани ИД плеј листе (не назив)"
39
+
40
+ #: inc/config.20140926.php:78 inc/config.php:74 inc/widget.php:97
41
+ msgid "Resource to use"
42
+ msgstr "Користи ресурс"
43
+
44
+ #: inc/config.20140926.php:79 inc/config.php:75
45
+ msgid "What to use as resource for feeds"
46
+ msgstr "Шта користити као извор довода"
47
+
48
+ #: inc/config.20140926.php:81 inc/config.php:77 inc/widget.php:99
49
+ msgid "Channel"
50
+ msgstr "Канал"
51
+
52
+ #: inc/config.20140926.php:82 inc/config.php:78 inc/widget.php:100
53
+ msgid "Favorites"
54
+ msgstr "Омиљени"
55
+
56
+ #: inc/config.20140926.php:83 inc/config.php:79 inc/widget.php:101
57
+ msgid "Playlist"
58
+ msgstr "Плеј листа"
59
+
60
+ #: inc/config.20140926.php:90 inc/config.php:86 inc/widget.php:104
61
+ msgid "Embed standard playlist"
62
+ msgstr "Угради стандардну листу"
63
+
64
+ #: inc/config.20140926.php:91 inc/config.php:87
65
+ msgid ""
66
+ "Enable this option to embed whole playlist instead single video from "
67
+ "playlist when you chose playlist as resource"
68
+ msgstr ""
69
+ "Омогућите ову опцију за уградњу комплетне плејлисте када одаберете плејлисту "
70
+ "као ресурс"
71
+
72
+ #: inc/config.20140926.php:97 inc/config.php:93
73
+ msgid "Cache Timeout"
74
+ msgstr "Трајање кеша"
75
+
76
+ #: inc/config.20140926.php:98 inc/config.php:94
77
+ msgid "Define caching timeout for YouTube feeds, in seconds"
78
+ msgstr "Одредите трајање кеша Јутјуб довода у секундама"
79
+
80
+ #: inc/config.20140926.php:101 inc/config.php:97 inc/widget.php:125
81
+ msgid "Do not chache"
82
+ msgstr "Без кеширања"
83
+
84
+ #: inc/config.20140926.php:102 inc/config.php:98 youtube-channel.php:809
85
+ msgid "1 minute"
86
+ msgstr "1 минут"
87
+
88
+ #: inc/config.20140926.php:103 inc/config.php:99 youtube-channel.php:810
89
+ msgid "5 minutes"
90
+ msgstr "5 минута"
91
+
92
+ #: inc/config.20140926.php:104 inc/config.php:100 youtube-channel.php:811
93
+ msgid "15 minutes"
94
+ msgstr "15 минута"
95
+
96
+ #: inc/config.20140926.php:105 inc/config.php:101 youtube-channel.php:812
97
+ msgid "30 minutes"
98
+ msgstr "30 минута"
99
+
100
+ #: inc/config.20140926.php:106 inc/config.php:102 youtube-channel.php:815
101
+ msgid "1 hour"
102
+ msgstr "1 сат"
103
+
104
+ #: inc/config.20140926.php:107 inc/config.php:103 youtube-channel.php:816
105
+ msgid "2 hours"
106
+ msgstr "2 сата"
107
+
108
+ #: inc/config.20140926.php:108 inc/config.php:104 youtube-channel.php:817
109
+ msgid "5 hours"
110
+ msgstr "5 сати"
111
+
112
+ #: inc/config.20140926.php:109 inc/config.php:105 youtube-channel.php:818
113
+ msgid "10 hours"
114
+ msgstr "10 сати"
115
+
116
+ #: inc/config.20140926.php:110 inc/config.php:106 youtube-channel.php:819
117
+ msgid "12 hours"
118
+ msgstr "12 сати"
119
+
120
+ #: inc/config.20140926.php:111 inc/config.php:107 youtube-channel.php:820
121
+ msgid "18 hours"
122
+ msgstr "18 сати"
123
+
124
+ #: inc/config.20140926.php:112 inc/config.php:108 youtube-channel.php:823
125
+ msgid "1 day"
126
+ msgstr "1 дан"
127
+
128
+ #: inc/config.20140926.php:113 inc/config.php:109 youtube-channel.php:824
129
+ msgid "2 days"
130
+ msgstr "2 дана"
131
+
132
+ #: inc/config.20140926.php:114 inc/config.php:110 youtube-channel.php:825
133
+ msgid "3 days"
134
+ msgstr "3 дана"
135
+
136
+ #: inc/config.20140926.php:115 inc/config.php:111 youtube-channel.php:826
137
+ msgid "4 days"
138
+ msgstr "4 дана"
139
+
140
+ #: inc/config.20140926.php:116 inc/config.php:112 youtube-channel.php:827
141
+ msgid "5 days"
142
+ msgstr "5 дана"
143
+
144
+ #: inc/config.20140926.php:117 inc/config.php:113 youtube-channel.php:828
145
+ msgid "6 days"
146
+ msgstr "6 дана"
147
+
148
+ #: inc/config.20140926.php:118 inc/config.php:114 youtube-channel.php:831
149
+ msgid "1 week"
150
+ msgstr "1 недеља"
151
+
152
+ #: inc/config.20140926.php:119 inc/config.php:115 youtube-channel.php:832
153
+ msgid "2 weeks"
154
+ msgstr "2 недеље"
155
+
156
+ #: inc/config.20140926.php:120 inc/config.php:116 youtube-channel.php:833
157
+ msgid "3 weeks"
158
+ msgstr "3 недеље"
159
+
160
+ #: inc/config.20140926.php:121 inc/config.php:117 youtube-channel.php:834
161
+ msgid "1 month"
162
+ msgstr "1 месец"
163
+
164
+ #: inc/config.20140926.php:128 inc/config.php:124 inc/widget.php:130
165
+ msgid "Fetch"
166
+ msgstr "Добави"
167
+
168
+ #: inc/config.20140926.php:129 inc/config.php:125 inc/widget.php:130
169
+ msgid ""
170
+ "Number of videos that will be used for random pick (min 2, max 50, default "
171
+ "25)"
172
+ msgstr ""
173
+ "Број видеа од којих ће бити одабран насумични (најмање 2, највише 50, "
174
+ "подразумевано 25)"
175
+
176
+ #: inc/config.20140926.php:138 inc/config.php:134 inc/widget.php:132
177
+ msgid "Show"
178
+ msgstr "Прикажи"
179
+
180
+ #: inc/config.20140926.php:139 inc/config.php:135 inc/widget.php:132
181
+ msgid "Number of videos to display"
182
+ msgstr "Број видеа за приказ"
183
+
184
+ #: inc/config.20140926.php:148 inc/config.php:144
185
+ msgid "Use Enhanced privacy"
186
+ msgstr "Користи унапређену приватност"
187
+
188
+ #: inc/config.20140926.php:155 inc/config.php:151 inc/widget.php:137
189
+ msgid "Fix <em>No items</em> error/Respect playlist order"
190
+ msgstr "Поправи <em>No items</em> гешку (поштуј поредак плејлисте)"
191
+
192
+ #: inc/config.20140926.php:156 inc/config.php:152 inc/widget.php:137
193
+ msgid "Enable this option if you get error No Item"
194
+ msgstr "Омогућите ову опцију ако добијете грешку <em>No items</em>"
195
+
196
+ #: inc/config.20140926.php:162 inc/config.php:158 inc/widget.php:139
197
+ msgid "Show random video"
198
+ msgstr "Прикажи насумични видео"
199
+
200
+ #: inc/config.20140926.php:163 inc/config.php:159 inc/widget.php:139
201
+ msgid "Get random videos of all fetched from channel or playlist"
202
+ msgstr ""
203
+ "Насумично одабери видео записе из свите добијене са канала или из плеј листе"
204
+
205
+ #: inc/config.20140926.php:172 inc/config.php:168
206
+ msgid "Video"
207
+ msgstr "Видео"
208
+
209
+ #: inc/config.20140926.php:178 inc/config.php:174
210
+ msgid "Aspect Ratio"
211
+ msgstr "Размера"
212
+
213
+ #: inc/config.20140926.php:179 inc/config.php:175
214
+ msgid "Select aspect ratio for displayed video"
215
+ msgstr "Одаберите размеру приказаног видеа"
216
 
217
+ #: inc/config.20140926.php:182 inc/config.php:178
218
+ msgid "16:9"
219
+ msgstr "16:9"
 
220
 
221
+ #: inc/config.20140926.php:183 inc/config.php:179
222
+ msgid "16:10"
223
+ msgstr "16:10"
224
+
225
+ #: inc/config.20140926.php:184 inc/config.php:180
226
+ msgid "4:3"
227
+ msgstr "4:3"
228
+
229
+ #: inc/config.20140926.php:191 inc/config.php:187
230
+ msgid "Video Width"
231
+ msgstr "Ширина видеа"
232
+
233
+ #: inc/config.20140926.php:192 inc/config.php:188
234
+ msgid "Set default width for displayed video, in pixels"
235
+ msgstr "Одредите подразумевану ширину видеа у пикселима"
236
+
237
+ #: inc/config.20140926.php:201 inc/config.php:197 inc/widget.php:154
238
+ msgid "What to show?"
239
+ msgstr "Шта приказати?"
240
+
241
+ #: inc/config.20140926.php:202 inc/config.20140926.php:336 inc/config.php:198
242
+ #: inc/config.php:332
243
+ msgid "Set what will be shown by default"
244
+ msgstr "Одредите шта ће подразумевано бити приказано"
245
+
246
+ #: inc/config.20140926.php:205 inc/config.php:201 inc/widget.php:156
247
+ msgid "Thumbnail"
248
+ msgstr "Сличица"
249
+
250
+ #: inc/config.20140926.php:206 inc/config.php:202 inc/widget.php:157
251
+ msgid "Flash (object)"
252
+ msgstr "Флеш објекат"
253
+
254
+ #: inc/config.20140926.php:207 inc/config.php:203 inc/widget.php:158
255
+ msgid "HTML5 (iframe)"
256
+ msgstr "HTML5 (iframe)"
257
+
258
+ #: inc/config.20140926.php:208 inc/config.php:204 inc/widget.php:159
259
+ msgid "HTML5 (iframe) Async"
260
+ msgstr "Асинхрони HTML5 (iframe)"
261
+
262
+ #: inc/config.20140926.php:209 inc/config.php:205 inc/widget.php:160
263
+ msgid "Chromeless"
264
+ msgstr "Chromeless"
265
+
266
+ #: inc/config.20140926.php:216 inc/config.php:212
267
+ msgid "Use light theme"
268
+ msgstr "Користи светлу тему"
269
+
270
+ #: inc/config.20140926.php:217 inc/config.php:213
271
+ msgid ""
272
+ "Enable this option to use light theme for playback controls instead dark"
273
+ msgstr "Омогућите ову опцију да би се користила светла тема у Јутрјуб плејеру"
274
+
275
+ #: inc/config.20140926.php:223 inc/config.php:219 inc/widget.php:163
276
  msgid "Hide player controls"
277
+ msgstr "Сакриј контроле плејера"
278
+
279
+ #: inc/config.20140926.php:224 inc/config.php:220
280
+ msgid "Enable this option to hide playback controls"
281
+ msgstr "Омогућите ову опцију да би сакрили контроле за репродукцију"
282
+
283
+ #: inc/config.20140926.php:230 inc/config.php:226
284
+ msgid "Fix video height"
285
+ msgstr "Поправи висину видеа"
286
+
287
+ #: inc/config.20140926.php:231 inc/config.php:227
288
+ msgid ""
289
+ "Enable this option to fix video height when playback controls are not hidden"
290
+ msgstr ""
291
+ "Омогућите ову опцију да би поправили висину када контроле за репродукцију "
292
+ "нису сакривене"
293
+
294
+ #: inc/config.20140926.php:237 inc/config.php:233 inc/widget.php:165
295
+ msgid "Autoplay video or playlist"
296
+ msgstr "Аутоматски репродукуј видео или плеј листу"
297
+
298
+ #: inc/config.20140926.php:238 inc/config.php:234
299
+ msgid ""
300
+ "Enable this option to start video playback right after block is rendered"
301
+ msgstr ""
302
+
303
+ #: inc/config.20140926.php:244 inc/config.php:240 inc/widget.php:166
304
+ msgid "Mute video on autoplay"
305
+ msgstr "Искључи звук при аутоматској репродукцији"
306
+
307
+ #: inc/config.20140926.php:245 inc/config.php:241
308
+ msgid "Enable this option to mute video when start autoplay"
309
+ msgstr ""
310
+ "Омогућите ову опцију да би искључити звук када започне аутоматска "
311
+ "репродукција"
312
+
313
+ #: inc/config.20140926.php:251 inc/config.php:247 inc/widget.php:167
314
+ msgid "Hide related videos"
315
+ msgstr "Сакриј повезане видео записе"
316
+
317
+ #: inc/config.20140926.php:252 inc/config.php:248
318
+ msgid "Enable this option to hide related videos after finished playback"
319
+ msgstr ""
320
+ "Омогућите ову опцију да би сакрили релевантне видео записе након завршетка "
321
+ "репродукције"
322
+
323
+ #: inc/config.20140926.php:261 inc/config.php:257
324
+ msgid "Content"
325
+ msgstr "Садржај"
326
+
327
+ #: inc/config.20140926.php:267 inc/config.php:263 inc/widget.php:172
328
+ msgid "Show video title"
329
+ msgstr "Прикажи наслов видео записа"
330
+
331
+ #: inc/config.20140926.php:268 inc/config.php:264
332
+ msgid "Enable this option to display title of video"
333
+ msgstr "Омогућите ову опцију да би приказали наслов видео записа"
334
+
335
+ #: inc/config.20140926.php:274 inc/config.php:270 inc/widget.php:173
336
+ msgid "Show video description"
337
+ msgstr "Прикажи опис видео записа"
338
+
339
+ #: inc/config.20140926.php:275 inc/config.php:271
340
+ msgid "Enable this option to display description for video"
341
+ msgstr "Омогућите ову опцију да би приказали опис видео записа"
342
+
343
+ #: inc/config.20140926.php:281 inc/config.php:277 inc/widget.php:174
344
+ msgid "Description length"
345
+ msgstr "Дужина описа"
346
+
347
+ #: inc/config.20140926.php:282 inc/config.php:278
348
+ msgid "Enter length for video description in characters (0 for full length)"
349
+ msgstr "Унесите дужину описа видео записа у знаковима (0 за цео опис)"
350
+
351
+ #: inc/config.20140926.php:291 inc/config.php:287 inc/widget.php:175
352
+ msgid "Et cetera string"
353
+ msgstr "Знак за скраћени текст"
354
+
355
+ #: inc/config.20140926.php:292 inc/config.php:288
356
+ msgid "Indicator for shortened video description (default: …)"
357
+ msgstr "Индикатор за скраћени опис видео записа (подразумевано: ...)"
358
+
359
+ #: inc/config.20140926.php:293 inc/config.php:289
360
+ msgid "..."
361
+ msgstr "..."
362
+
363
+ #: inc/config.20140926.php:298 inc/config.php:294 inc/widget.php:176
364
+ msgid "Hide annotations from video"
365
+ msgstr "Сакриј прибелешке са видео записа"
366
+
367
+ #: inc/config.20140926.php:299 inc/config.php:295
368
+ msgid ""
369
+ "Enable this option to hide video annotations (custom text set by uploader "
370
+ "over video during playback)"
371
+ msgstr ""
372
+ "Омогућите ову опцију да би сакрили видео прибелешке (текст постављен преко "
373
+ "слике видеа током репродукције)"
374
 
375
+ #: inc/config.20140926.php:305 inc/config.php:301 inc/widget.php:177
 
376
  msgid "Hide video info"
377
+ msgstr "Сакриј информације о видео запису"
378
 
379
+ #: inc/config.20140926.php:306 inc/config.php:302
380
+ msgid ""
381
+ "Enable this option to hide informations about video before play start (video "
382
+ "title and uploader in overlay)"
383
+ msgstr ""
384
+ "Омогућите ову опцију да би сакрили информације о видео запису пре него што "
385
+ "започен репродукција (наслов видео записа и аутора)"
386
+
387
+ #: inc/config.20140926.php:315 inc/config.php:311 inc/widget.php:180
388
+ msgid "Link to Channel"
389
+ msgstr "Веза до канала"
390
 
391
+ #: inc/config.20140926.php:321 inc/config.php:317 inc/widget.php:182
392
+ msgid "Visit YouTube Channel text"
393
+ msgstr "Текст за везу до канала"
 
394
 
395
+ #: inc/config.20140926.php:322 inc/config.php:318
396
+ msgid "Use placeholder %channel% to insert channel name"
397
+ msgstr "Користи резервисану ниску %channel% да уметнете назив канала"
 
398
 
399
+ #: inc/config.20140926.php:323 inc/config.php:319
400
+ msgid "Visit my channel %channel%"
401
+ msgstr "Посетите мој канал %channel%"
402
+
403
+ #: inc/config.20140926.php:328 inc/config.php:324 inc/widget.php:183
404
  msgid "Show link to channel"
405
  msgstr "Прикажи везу до канала"
406
 
407
+ #: inc/config.20140926.php:329 inc/config.php:325
408
+ msgid ""
409
+ "Enable this option to show customized link to channel at the bottom of YTC "
410
+ "block"
411
+ msgstr "Омогућите ову опцију да би приказали веу до канала на дну YTC блока"
412
 
413
+ #: inc/config.20140926.php:335 inc/config.php:331
414
+ msgid "Open YouTube channel page"
415
+ msgstr "Отвори страницу Јутрјуб канала"
 
416
 
417
+ #: inc/config.20140926.php:339 inc/config.php:335 inc/widget.php:186
418
+ msgid "in same window"
419
+ msgstr "у истом прозору"
 
420
 
421
+ #: inc/config.20140926.php:340 inc/config.php:336 inc/widget.php:187
422
+ msgid "in new window (JavaScript)"
423
+ msgstr "у новом прозору (јаваскрипт)"
424
+
425
+ #: inc/config.20140926.php:341 inc/config.php:337 inc/widget.php:188
426
+ msgid "in new window (Target)"
427
+ msgstr "у новом прозору (циљано)"
428
 
429
+ #: inc/config.20140926.php:348 inc/config.php:344 inc/widget.php:191
430
+ msgid "Link to channel instead to user"
431
+ msgstr "Усмери као каналу уместо кориснику"
432
+
433
+ #: inc/config.20140926.php:349 inc/config.php:345
434
+ msgid ""
435
+ "Enable this option if link to your channel have <code>/channel/</code> "
436
+ "instead <code>/user/</code> part in URL"
437
+ msgstr ""
438
+ "Омогућите ову опцију ако веза до Вашег канала садржи <code>/channel/</code> "
439
+ "уместо <code>/user/</code>"
440
+
441
+ #: inc/config.20140926.php:358 inc/config.php:354
442
+ msgid "Tools"
443
+ msgstr "Алатке"
444
+
445
+ #: inc/config.20140926.php:375 inc/config.php:371
446
+ msgid "Usage"
447
+ msgstr "Употреба"
448
+
449
+ #: inc/config.20140926.php:396 inc/config.php:392
450
+ msgid "Support"
451
+ msgstr "Подршка"
452
+
453
+ #: inc/config.20140926.php:427 inc/config.php:423
454
+ msgid " Options"
455
+ msgstr "Опције"
456
+
457
+ #: inc/config.20140926.php:500 inc/config.php:496
458
+ msgid ""
459
+ "<p>Easy embed playable videos from YouTube.</p><p>Here you can set default "
460
+ "options that will be used as defaults for new widgets, and for shortcode.</p>"
461
+ msgstr ""
462
+ "<p>Лако уградите видео запис са Јутјуба.</p><p>Овде можете поставити "
463
+ "подразумеване опције које ће бити коришћене приликом прављења новог виџета "
464
+ "или у шорткоду.</p>"
465
+
466
+ #: inc/config.php:145
467
  #, php-format
468
+ msgid ""
469
+ "Enable this option to protect your visitors <a href=\"%s\" target=\"_blank"
470
+ "\">privacy</a>."
471
+ msgstr ""
472
+ "Омогућите ову опцију како би заштитили <a href=\"%s\" target=\"_blank"
473
+ "\">приватност</a> посетилаца."
474
+
475
+ #: inc/widget.php:11
476
+ msgid "Youtube Channel"
477
+ msgstr ""
478
+
479
+ #: inc/widget.php:12
480
+ msgid "Serve YouTube videos from channel or playlist right to widget area"
481
+ msgstr "Приказ видео записа са Јутјуб канала или плеј листе"
482
+
483
+ #: inc/widget.php:85
484
+ msgid "Widget Title"
485
+ msgstr "Наслов виџета"
486
+
487
+ #: inc/widget.php:85
488
+ msgid "Title for widget"
489
+ msgstr "Наслов за виџет"
490
+
491
+ #: inc/widget.php:88
492
+ msgid "Custom CSS Class"
493
+ msgstr "Прилагођена CSS класа"
494
+
495
+ #: inc/widget.php:88
496
+ msgid "Enter custom class for YTC block, if you wish to target block styling"
497
+ msgstr ""
498
+ "Унесите прилагођену класу за YTC блок, ако желите да обликујете одређени блок"
499
+
500
+ #: inc/widget.php:91
501
+ msgid "Channel ID"
502
+ msgstr "ИД канала"
503
+
504
+ #: inc/widget.php:91
505
+ msgid "YouTube Channel name (not URL to channel)"
506
+ msgstr "Назив Јутјуб канала (не адреса до канала)"
507
 
508
+ #: inc/widget.php:94
509
+ msgid "Playlist ID"
510
+ msgstr "ИД плеј листе"
511
+
512
+ #: inc/widget.php:94
513
+ msgid "YouTube Playlist ID (not playlist name)"
514
+ msgstr "ИД плеј листе (не назив)"
515
+
516
+ #: inc/widget.php:104
517
+ msgid ""
518
+ "Enable this option to embed YouTube playlist widget instead single video "
519
+ "from playlist"
520
+ msgstr ""
521
+ "Омогућите ову опцију да би уградили плеј листу са Јутјуба уместо "
522
+ "појдеиначног видеа из плеј листе"
523
+
524
+ #: inc/widget.php:123
525
+ msgid "Cache feed"
526
+ msgstr "Кеширај довод"
527
+
528
+ #: inc/widget.php:130 inc/widget.php:132
529
+ msgid "video(s)"
530
+ msgstr "видео запис(а)"
531
+
532
+ #: inc/widget.php:135
533
+ msgid "Enable this option to protect your visitors privacy"
534
+ msgstr "Омогућите ову опцију да би заштитили приватност посетилаца"
535
+
536
+ #: inc/widget.php:135
537
  #, php-format
538
+ msgid "Use <a href=\"%s\" target=\"_blank\">Enhanced Privacy</a>"
539
+ msgstr "Користи <a href=\"%s\" target=\"_blank\">Унапређену приватност</a>"
 
540
 
541
+ #: inc/widget.php:142
542
+ msgid "Video Settings"
543
+ msgstr "Поставке видео записа"
 
544
 
545
+ #: inc/widget.php:143
546
+ msgid "Aspect ratio"
547
+ msgstr "Размера"
 
548
 
549
+ #: inc/widget.php:151
 
550
  msgid "Width"
551
  msgstr "Ширина"
552
 
553
+ #: inc/widget.php:151
554
+ msgid "Set video width in pixels"
555
+ msgstr "Поставите ширину видео записа у пикселима"
556
+
557
+ #: inc/widget.php:151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
558
  msgid "default"
559
  msgstr "подразумевано"
560
 
561
+ #: inc/widget.php:162
562
+ msgid "Use light theme (default is dark)"
563
+ msgstr "Користи светлу тему (тамна је подразумевана)"
 
564
 
565
+ #: inc/widget.php:164
566
+ msgid "Fix height taken by controls"
567
+ msgstr "Поправи висину коју заузимају контроле"
 
568
 
569
+ #: inc/widget.php:170
570
+ msgid "Content Layout"
571
+ msgstr "Садржај"
 
572
 
573
+ #: inc/widget.php:174
574
+ msgid ""
575
+ "Set number of characters to cut down video description to (0 means full "
576
+ "length)"
577
+ msgstr "Одредите колико ће знакова имати опис видео записа (0 за цео опис)"
578
 
579
+ #: inc/widget.php:175
580
+ msgid "Default: &amp;hellip;"
581
+ msgstr "Подразумевано: &amp;hellip;"
 
582
 
583
+ #: inc/widget.php:182
584
+ msgid ""
585
+ "Default: Visit channel %channel%. Use placeholder %channel% to insert "
586
+ "channel name."
587
+ msgstr ""
588
+ "Подразумевано: Посетите канал %channel%. Користите резервисану ниску %channel"
589
+ "% за уметање назива канала."
590
 
591
+ #: inc/widget.php:194
592
+ msgid "Debug YTC"
593
+ msgstr "Одклањање неправилности"
 
594
 
595
+ #: inc/widget.php:196
596
+ msgid "Enable debugging"
597
+ msgstr "Омогући одклањање неправилности"
 
598
 
599
+ #: inc/widget.php:212
600
+ #, php-format
601
+ msgid ""
602
+ "Insert debug data to <a href=\"%s\" target=\"_support\">support forum</a>."
603
+ "<br />Please do not remove channel and playlist ID`s. If you are concerned "
604
+ "about privacy, send this debug log to email %s"
605
+ msgstr ""
606
+ "Пошаљите податке за отклањање неисправности на <a href=\"%s\" target="
607
+ "\"_support\">форум за подршку</a>.<br />Молим Вас да не укљањате ИД канала и "
608
+ "плеј листе. Ако сте забринути за своју приватност, пошаљите запис за "
609
+ "озклањање неисправности електронском поштом на %s"
610
 
611
+ #: youtube-channel.php:90
612
+ #, php-format
613
+ msgid ""
614
+ "Please review <a href=\"%s\">global settings</a>, YTC widgets and shortcodes."
615
+ msgstr ""
616
+
617
+ #: youtube-channel.php:93
618
+ #, php-format
619
+ msgid ""
620
+ "If you use caching for any YTC widget or shortcode, please <strong>ReCache</"
621
+ "strong> feeds in <strong>Tools</strong> section of <a href=\"%s\">plugin "
622
+ "settings</a> page."
623
+ msgstr ""
624
+
625
+ #: youtube-channel.php:96
626
+ #, php-format
627
+ msgid ""
628
+ "We switched to <em>Redux Framework</em> so please review global plugin <a "
629
+ "href=\"%s\">settings page</a>."
630
+ msgstr ""
631
+
632
+ #: youtube-channel.php:101
633
+ msgid "updated to version"
634
+ msgstr "ажуриран на верзију"
635
+
636
+ #: youtube-channel.php:101
637
+ msgid "I did this already, dismiss notice!"
638
+ msgstr "Већ сам уради, исклјучи упозорење"
639
+
640
+ #: youtube-channel.php:108
641
+ #, php-format
642
+ msgid ""
643
+ "To configure global <strong>%s</strong> options, you need to install and "
644
+ "activate <strong>%s</strong>."
645
+ msgstr ""
646
+ "За подешавање општих поставки <strong>%s</strong>, треба да додате и "
647
+ "активирате додатак <strong>%s</strong>."
648
+
649
+ #: youtube-channel.php:113
650
+ msgid "Settings"
651
+ msgstr "Поставке"
652
+
653
+ #: youtube-channel.php:486
654
+ msgid "No items"
655
+ msgstr "Нема видеа"
656
+
657
+ #: youtube-channel.php:486
658
+ msgid "Check here why"
659
+ msgstr "проверите овде зашто"
660
+
661
+ #: youtube-channel.php:547
662
+ #, php-format
663
+ msgid "Visit channel %1$s"
664
+ msgstr "Посетите канал %1$s"
665
+
666
+ #: youtube-channel.php:554
667
+ msgid "in new window/tab"
668
+ msgstr "у новом прозору"
669
+
670
+ #: youtube-channel.php:651
671
+ #, php-format
672
+ msgid "Watch video %1$s published on %2$s"
673
+ msgstr "Гледај видео %1$s објављен на %2$s"
674
+
675
+ #~ msgid "Resource to use:"
676
+ #~ msgstr "Користи ресурс"
677
+
678
+ #~ msgid "Fetch:"
679
+ #~ msgstr "Добави"
680
 
681
+ #~ msgid "Show:"
682
+ #~ msgstr "Прикажи"
languages/youtube-channel-xx_XX.pot CHANGED
@@ -1,139 +1,639 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- #, fuzzy
7
- msgid ""
8
- msgstr "Project-Id-Version: PACKAGE VERSION\n"
9
- "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2011-09-28 21:16+0200\n"
11
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
- "Language: \n"
15
- "MIME-Version: 1.0\n"
16
- "Content-Type: text/plain; charset=CHARSET\n"
17
- "Content-Transfer-Encoding: 8bit\n"
18
-
19
- #: ../youtube-channel.php:56
20
- msgid "Aspect ratio (relative to width):"
21
- msgstr ""
22
-
23
- #: ../youtube-channel.php:72
24
- msgid "Autoplay video"
25
- msgstr ""
26
-
27
- #: ../youtube-channel.php:49
28
- msgid "Channel:"
29
- msgstr ""
30
-
31
- #: ../youtube-channel.php:71
32
- msgid "Fix height taken by controls"
33
- msgstr ""
34
-
35
- #: ../youtube-channel.php:53
36
- msgid "Get random video from channel"
37
- msgstr ""
38
-
39
- #: ../youtube-channel.php:55
40
- msgid "Height"
41
- msgstr ""
42
-
43
- #: ../youtube-channel.php:73
44
- msgid "Hide player controls"
45
- msgstr ""
46
-
47
- #: ../youtube-channel.php:74
48
- msgid "Hide video info"
49
- msgstr ""
50
-
51
- #: ../youtube-channel.php:52
52
- msgid "Items to fetch (min 1, max 50):"
53
- msgstr ""
54
-
55
- #: ../youtube-channel.php:187
56
- msgid "No items"
57
- msgstr ""
58
-
59
- #: ../youtube-channel.php:79
60
- msgid "Open channel in new window/tab"
61
- msgstr ""
62
-
63
- #: ../youtube-channel.php:50
64
- msgid "Playlist:"
65
- msgstr ""
66
-
67
- #: ../youtube-channel.php:78
68
- msgid "Show link to channel"
69
- msgstr ""
70
-
71
- #: ../youtube-channel.php:75
72
- msgid "Show video title"
73
- msgstr ""
74
-
75
- #: ../youtube-channel.php:80
76
- msgid "Use target=\"_blank\" (invalid XHTML)"
77
- msgstr ""
78
-
79
- #: ../youtube-channel.php:51
80
- msgid "Use the playlist instead of channel"
81
- msgstr ""
82
-
83
- #: ../youtube-channel.php:77
84
- msgid "Visit YouTube Channel text:"
85
- msgstr ""
86
-
87
- #: ../youtube-channel.php:256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  #, php-format
89
- msgid "Visit channel %1$s"
90
- msgstr ""
 
 
 
 
 
 
 
 
 
 
91
 
92
- #: ../youtube-channel.php:219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  #, php-format
94
- msgid "Watch video %1$s published on %2$s"
95
- msgstr ""
 
96
 
97
- #: ../youtube-channel.php:64
98
- msgid "What to show?"
99
- msgstr ""
 
 
 
 
100
 
101
- #: ../youtube-channel.php:48
102
- msgid "Widget Title:"
103
- msgstr ""
 
 
 
104
 
105
- #: ../youtube-channel.php:54
106
- msgid "Width"
107
- msgstr ""
108
 
109
- #: ../youtube-channel.php:23
110
- msgid "YouTube Channel"
111
- msgstr ""
112
 
113
- #: ../youtube-channel.php:69
114
- msgid "chromeless video"
115
- msgstr ""
 
 
 
116
 
117
- #: ../youtube-channel.php:58
118
- msgid "custom"
119
- msgstr ""
120
 
121
- #: ../youtube-channel.php:54 ../youtube-channel.php:55
122
- msgid "default"
123
- msgstr ""
124
 
125
- #: ../youtube-channel.php:68
126
- msgid "iframe (HTML5 player)"
127
- msgstr ""
128
 
129
- #: ../youtube-channel.php:259
130
- msgid "in new window/tab"
131
- msgstr ""
 
132
 
133
- #: ../youtube-channel.php:67
134
- msgid "object (flash player)"
135
- msgstr ""
136
 
137
- #: ../youtube-channel.php:66
138
- msgid "thumbnail"
139
- msgstr ""
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: YouTube Channel\n"
4
+ "POT-Creation-Date: 2014-09-26 23:02+0100\n"
5
+ "PO-Revision-Date: \n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.6.9\n"
12
+ "X-Poedit-Basepath: x:\\devel\\wamp\\www\\wp40\\wp-content\\plugins\\youtube-"
13
+ "channel\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-KeywordsList: __;_e\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: inc/config.20140926.php:58 inc/config.php:54
20
+ msgid "General"
21
+ msgstr ""
22
+
23
+ #: inc/config.20140926.php:64 inc/config.php:60
24
+ msgid "YouTube Channel ID"
25
+ msgstr ""
26
+
27
+ #: inc/config.20140926.php:65 inc/config.php:61
28
+ msgid "Enter your YouTube channel ID (channel name, not full URL to channel)"
29
+ msgstr ""
30
+
31
+ #: inc/config.20140926.php:71 inc/config.php:67
32
+ msgid "Default Playlist ID"
33
+ msgstr ""
34
+
35
+ #: inc/config.20140926.php:72 inc/config.php:68
36
+ msgid "Enter default playlist ID (not playlist name)"
37
+ msgstr ""
38
+
39
+ #: inc/config.20140926.php:78 inc/config.php:74 inc/widget.php:97
40
+ msgid "Resource to use"
41
+ msgstr ""
42
+
43
+ #: inc/config.20140926.php:79 inc/config.php:75
44
+ msgid "What to use as resource for feeds"
45
+ msgstr ""
46
+
47
+ #: inc/config.20140926.php:81 inc/config.php:77 inc/widget.php:99
48
+ msgid "Channel"
49
+ msgstr ""
50
+
51
+ #: inc/config.20140926.php:82 inc/config.php:78 inc/widget.php:100
52
+ msgid "Favorites"
53
+ msgstr ""
54
+
55
+ #: inc/config.20140926.php:83 inc/config.php:79 inc/widget.php:101
56
+ msgid "Playlist"
57
+ msgstr ""
58
+
59
+ #: inc/config.20140926.php:90 inc/config.php:86 inc/widget.php:104
60
+ msgid "Embed standard playlist"
61
+ msgstr ""
62
+
63
+ #: inc/config.20140926.php:91 inc/config.php:87
64
+ msgid ""
65
+ "Enable this option to embed whole playlist instead single video from "
66
+ "playlist when you chose playlist as resource"
67
+ msgstr ""
68
+
69
+ #: inc/config.20140926.php:97 inc/config.php:93
70
+ msgid "Cache Timeout"
71
+ msgstr ""
72
+
73
+ #: inc/config.20140926.php:98 inc/config.php:94
74
+ msgid "Define caching timeout for YouTube feeds, in seconds"
75
+ msgstr ""
76
+
77
+ #: inc/config.20140926.php:101 inc/config.php:97 inc/widget.php:125
78
+ msgid "Do not chache"
79
+ msgstr ""
80
+
81
+ #: inc/config.20140926.php:102 inc/config.php:98 youtube-channel.php:809
82
+ msgid "1 minute"
83
+ msgstr ""
84
+
85
+ #: inc/config.20140926.php:103 inc/config.php:99 youtube-channel.php:810
86
+ msgid "5 minutes"
87
+ msgstr ""
88
+
89
+ #: inc/config.20140926.php:104 inc/config.php:100 youtube-channel.php:811
90
+ msgid "15 minutes"
91
+ msgstr ""
92
+
93
+ #: inc/config.20140926.php:105 inc/config.php:101 youtube-channel.php:812
94
+ msgid "30 minutes"
95
+ msgstr ""
96
+
97
+ #: inc/config.20140926.php:106 inc/config.php:102 youtube-channel.php:815
98
+ msgid "1 hour"
99
+ msgstr ""
100
+
101
+ #: inc/config.20140926.php:107 inc/config.php:103 youtube-channel.php:816
102
+ msgid "2 hours"
103
+ msgstr ""
104
+
105
+ #: inc/config.20140926.php:108 inc/config.php:104 youtube-channel.php:817
106
+ msgid "5 hours"
107
+ msgstr ""
108
+
109
+ #: inc/config.20140926.php:109 inc/config.php:105 youtube-channel.php:818
110
+ msgid "10 hours"
111
+ msgstr ""
112
+
113
+ #: inc/config.20140926.php:110 inc/config.php:106 youtube-channel.php:819
114
+ msgid "12 hours"
115
+ msgstr ""
116
+
117
+ #: inc/config.20140926.php:111 inc/config.php:107 youtube-channel.php:820
118
+ msgid "18 hours"
119
+ msgstr ""
120
+
121
+ #: inc/config.20140926.php:112 inc/config.php:108 youtube-channel.php:823
122
+ msgid "1 day"
123
+ msgstr ""
124
+
125
+ #: inc/config.20140926.php:113 inc/config.php:109 youtube-channel.php:824
126
+ msgid "2 days"
127
+ msgstr ""
128
+
129
+ #: inc/config.20140926.php:114 inc/config.php:110 youtube-channel.php:825
130
+ msgid "3 days"
131
+ msgstr ""
132
+
133
+ #: inc/config.20140926.php:115 inc/config.php:111 youtube-channel.php:826
134
+ msgid "4 days"
135
+ msgstr ""
136
+
137
+ #: inc/config.20140926.php:116 inc/config.php:112 youtube-channel.php:827
138
+ msgid "5 days"
139
+ msgstr ""
140
+
141
+ #: inc/config.20140926.php:117 inc/config.php:113 youtube-channel.php:828
142
+ msgid "6 days"
143
+ msgstr ""
144
+
145
+ #: inc/config.20140926.php:118 inc/config.php:114 youtube-channel.php:831
146
+ msgid "1 week"
147
+ msgstr ""
148
+
149
+ #: inc/config.20140926.php:119 inc/config.php:115 youtube-channel.php:832
150
+ msgid "2 weeks"
151
+ msgstr ""
152
+
153
+ #: inc/config.20140926.php:120 inc/config.php:116 youtube-channel.php:833
154
+ msgid "3 weeks"
155
+ msgstr ""
156
+
157
+ #: inc/config.20140926.php:121 inc/config.php:117 youtube-channel.php:834
158
+ msgid "1 month"
159
+ msgstr ""
160
+
161
+ #: inc/config.20140926.php:128 inc/config.php:124 inc/widget.php:130
162
+ msgid "Fetch"
163
+ msgstr ""
164
+
165
+ #: inc/config.20140926.php:129 inc/config.php:125 inc/widget.php:130
166
+ msgid ""
167
+ "Number of videos that will be used for random pick (min 2, max 50, default "
168
+ "25)"
169
+ msgstr ""
170
+
171
+ #: inc/config.20140926.php:138 inc/config.php:134 inc/widget.php:132
172
+ msgid "Show"
173
+ msgstr ""
174
+
175
+ #: inc/config.20140926.php:139 inc/config.php:135 inc/widget.php:132
176
+ msgid "Number of videos to display"
177
+ msgstr ""
178
+
179
+ #: inc/config.20140926.php:148 inc/config.php:144
180
+ msgid "Use Enhanced privacy"
181
+ msgstr ""
182
+
183
+ #: inc/config.20140926.php:155 inc/config.php:151 inc/widget.php:137
184
+ msgid "Fix <em>No items</em> error/Respect playlist order"
185
+ msgstr ""
186
+
187
+ #: inc/config.20140926.php:156 inc/config.php:152 inc/widget.php:137
188
+ msgid "Enable this option if you get error No Item"
189
+ msgstr ""
190
+
191
+ #: inc/config.20140926.php:162 inc/config.php:158 inc/widget.php:139
192
+ msgid "Show random video"
193
+ msgstr ""
194
+
195
+ #: inc/config.20140926.php:163 inc/config.php:159 inc/widget.php:139
196
+ msgid "Get random videos of all fetched from channel or playlist"
197
+ msgstr ""
198
+
199
+ #: inc/config.20140926.php:172 inc/config.php:168
200
+ msgid "Video"
201
+ msgstr ""
202
+
203
+ #: inc/config.20140926.php:178 inc/config.php:174
204
+ msgid "Aspect Ratio"
205
+ msgstr ""
206
+
207
+ #: inc/config.20140926.php:179 inc/config.php:175
208
+ msgid "Select aspect ratio for displayed video"
209
+ msgstr ""
210
+
211
+ #: inc/config.20140926.php:182 inc/config.php:178
212
+ msgid "16:9"
213
+ msgstr ""
214
+
215
+ #: inc/config.20140926.php:183 inc/config.php:179
216
+ msgid "16:10"
217
+ msgstr ""
218
+
219
+ #: inc/config.20140926.php:184 inc/config.php:180
220
+ msgid "4:3"
221
+ msgstr ""
222
+
223
+ #: inc/config.20140926.php:191 inc/config.php:187
224
+ msgid "Video Width"
225
+ msgstr ""
226
+
227
+ #: inc/config.20140926.php:192 inc/config.php:188
228
+ msgid "Set default width for displayed video, in pixels"
229
+ msgstr ""
230
+
231
+ #: inc/config.20140926.php:201 inc/config.php:197 inc/widget.php:154
232
+ msgid "What to show?"
233
+ msgstr ""
234
+
235
+ #: inc/config.20140926.php:202 inc/config.20140926.php:336 inc/config.php:198
236
+ #: inc/config.php:332
237
+ msgid "Set what will be shown by default"
238
+ msgstr ""
239
+
240
+ #: inc/config.20140926.php:205 inc/config.php:201 inc/widget.php:156
241
+ msgid "Thumbnail"
242
+ msgstr ""
243
+
244
+ #: inc/config.20140926.php:206 inc/config.php:202 inc/widget.php:157
245
+ msgid "Flash (object)"
246
+ msgstr ""
247
+
248
+ #: inc/config.20140926.php:207 inc/config.php:203 inc/widget.php:158
249
+ msgid "HTML5 (iframe)"
250
+ msgstr ""
251
+
252
+ #: inc/config.20140926.php:208 inc/config.php:204 inc/widget.php:159
253
+ msgid "HTML5 (iframe) Async"
254
+ msgstr ""
255
+
256
+ #: inc/config.20140926.php:209 inc/config.php:205 inc/widget.php:160
257
+ msgid "Chromeless"
258
+ msgstr ""
259
+
260
+ #: inc/config.20140926.php:216 inc/config.php:212
261
+ msgid "Use light theme"
262
+ msgstr ""
263
+
264
+ #: inc/config.20140926.php:217 inc/config.php:213
265
+ msgid ""
266
+ "Enable this option to use light theme for playback controls instead dark"
267
+ msgstr ""
268
+
269
+ #: inc/config.20140926.php:223 inc/config.php:219 inc/widget.php:163
270
+ msgid "Hide player controls"
271
+ msgstr ""
272
+
273
+ #: inc/config.20140926.php:224 inc/config.php:220
274
+ msgid "Enable this option to hide playback controls"
275
+ msgstr ""
276
+
277
+ #: inc/config.20140926.php:230 inc/config.php:226
278
+ msgid "Fix video height"
279
+ msgstr ""
280
+
281
+ #: inc/config.20140926.php:231 inc/config.php:227
282
+ msgid ""
283
+ "Enable this option to fix video height when playback controls are not hidden"
284
+ msgstr ""
285
+
286
+ #: inc/config.20140926.php:237 inc/config.php:233 inc/widget.php:165
287
+ msgid "Autoplay video or playlist"
288
+ msgstr ""
289
+
290
+ #: inc/config.20140926.php:238 inc/config.php:234
291
+ msgid ""
292
+ "Enable this option to start video playback right after block is rendered"
293
+ msgstr ""
294
+
295
+ #: inc/config.20140926.php:244 inc/config.php:240 inc/widget.php:166
296
+ msgid "Mute video on autoplay"
297
+ msgstr ""
298
+
299
+ #: inc/config.20140926.php:245 inc/config.php:241
300
+ msgid "Enable this option to mute video when start autoplay"
301
+ msgstr ""
302
+
303
+ #: inc/config.20140926.php:251 inc/config.php:247 inc/widget.php:167
304
+ msgid "Hide related videos"
305
+ msgstr ""
306
+
307
+ #: inc/config.20140926.php:252 inc/config.php:248
308
+ msgid "Enable this option to hide related videos after finished playback"
309
+ msgstr ""
310
+
311
+ #: inc/config.20140926.php:261 inc/config.php:257
312
+ msgid "Content"
313
+ msgstr ""
314
+
315
+ #: inc/config.20140926.php:267 inc/config.php:263 inc/widget.php:172
316
+ msgid "Show video title"
317
+ msgstr ""
318
+
319
+ #: inc/config.20140926.php:268 inc/config.php:264
320
+ msgid "Enable this option to display title of video"
321
+ msgstr ""
322
+
323
+ #: inc/config.20140926.php:274 inc/config.php:270 inc/widget.php:173
324
+ msgid "Show video description"
325
+ msgstr ""
326
+
327
+ #: inc/config.20140926.php:275 inc/config.php:271
328
+ msgid "Enable this option to display description for video"
329
+ msgstr ""
330
+
331
+ #: inc/config.20140926.php:281 inc/config.php:277 inc/widget.php:174
332
+ msgid "Description length"
333
+ msgstr ""
334
+
335
+ #: inc/config.20140926.php:282 inc/config.php:278
336
+ msgid "Enter length for video description in characters (0 for full length)"
337
+ msgstr ""
338
+
339
+ #: inc/config.20140926.php:291 inc/config.php:287 inc/widget.php:175
340
+ msgid "Et cetera string"
341
+ msgstr ""
342
+
343
+ #: inc/config.20140926.php:292 inc/config.php:288
344
+ msgid "Indicator for shortened video description (default: …)"
345
+ msgstr ""
346
+
347
+ #: inc/config.20140926.php:293 inc/config.php:289
348
+ msgid "..."
349
+ msgstr ""
350
+
351
+ #: inc/config.20140926.php:298 inc/config.php:294 inc/widget.php:176
352
+ msgid "Hide annotations from video"
353
+ msgstr ""
354
+
355
+ #: inc/config.20140926.php:299 inc/config.php:295
356
+ msgid ""
357
+ "Enable this option to hide video annotations (custom text set by uploader "
358
+ "over video during playback)"
359
+ msgstr ""
360
+
361
+ #: inc/config.20140926.php:305 inc/config.php:301 inc/widget.php:177
362
+ msgid "Hide video info"
363
+ msgstr ""
364
+
365
+ #: inc/config.20140926.php:306 inc/config.php:302
366
+ msgid ""
367
+ "Enable this option to hide informations about video before play start (video "
368
+ "title and uploader in overlay)"
369
+ msgstr ""
370
+
371
+ #: inc/config.20140926.php:315 inc/config.php:311 inc/widget.php:180
372
+ msgid "Link to Channel"
373
+ msgstr ""
374
+
375
+ #: inc/config.20140926.php:321 inc/config.php:317 inc/widget.php:182
376
+ msgid "Visit YouTube Channel text"
377
+ msgstr ""
378
+
379
+ #: inc/config.20140926.php:322 inc/config.php:318
380
+ msgid "Use placeholder %channel% to insert channel name"
381
+ msgstr ""
382
+
383
+ #: inc/config.20140926.php:323 inc/config.php:319
384
+ msgid "Visit my channel %channel%"
385
+ msgstr ""
386
+
387
+ #: inc/config.20140926.php:328 inc/config.php:324 inc/widget.php:183
388
+ msgid "Show link to channel"
389
+ msgstr ""
390
+
391
+ #: inc/config.20140926.php:329 inc/config.php:325
392
+ msgid ""
393
+ "Enable this option to show customized link to channel at the bottom of YTC "
394
+ "block"
395
+ msgstr ""
396
+
397
+ #: inc/config.20140926.php:335 inc/config.php:331
398
+ msgid "Open YouTube channel page"
399
+ msgstr ""
400
+
401
+ #: inc/config.20140926.php:339 inc/config.php:335 inc/widget.php:186
402
+ msgid "in same window"
403
+ msgstr ""
404
+
405
+ #: inc/config.20140926.php:340 inc/config.php:336 inc/widget.php:187
406
+ msgid "in new window (JavaScript)"
407
+ msgstr ""
408
+
409
+ #: inc/config.20140926.php:341 inc/config.php:337 inc/widget.php:188
410
+ msgid "in new window (Target)"
411
+ msgstr ""
412
+
413
+ #: inc/config.20140926.php:348 inc/config.php:344 inc/widget.php:191
414
+ msgid "Link to channel instead to user"
415
+ msgstr ""
416
+
417
+ #: inc/config.20140926.php:349 inc/config.php:345
418
+ msgid ""
419
+ "Enable this option if link to your channel have <code>/channel/</code> "
420
+ "instead <code>/user/</code> part in URL"
421
+ msgstr ""
422
+
423
+ #: inc/config.20140926.php:358 inc/config.php:354
424
+ msgid "Tools"
425
+ msgstr ""
426
+
427
+ #: inc/config.20140926.php:375 inc/config.php:371
428
+ msgid "Usage"
429
+ msgstr ""
430
+
431
+ #: inc/config.20140926.php:396 inc/config.php:392
432
+ msgid "Support"
433
+ msgstr ""
434
+
435
+ #: inc/config.20140926.php:427 inc/config.php:423
436
+ msgid " Options"
437
+ msgstr ""
438
+
439
+ #: inc/config.20140926.php:500 inc/config.php:496
440
+ msgid ""
441
+ "<p>Easy embed playable videos from YouTube.</p><p>Here you can set default "
442
+ "options that will be used as defaults for new widgets, and for shortcode.</p>"
443
+ msgstr ""
444
+
445
+ #: inc/config.php:145
446
  #, php-format
447
+ msgid ""
448
+ "Enable this option to protect your visitors <a href=\"%s\" target=\"_blank"
449
+ "\">privacy</a>."
450
+ msgstr ""
451
+
452
+ #: inc/widget.php:11
453
+ msgid "Youtube Channel"
454
+ msgstr ""
455
+
456
+ #: inc/widget.php:12
457
+ msgid "Serve YouTube videos from channel or playlist right to widget area"
458
+ msgstr ""
459
 
460
+ #: inc/widget.php:85
461
+ msgid "Widget Title"
462
+ msgstr ""
463
+
464
+ #: inc/widget.php:85
465
+ msgid "Title for widget"
466
+ msgstr ""
467
+
468
+ #: inc/widget.php:88
469
+ msgid "Custom CSS Class"
470
+ msgstr ""
471
+
472
+ #: inc/widget.php:88
473
+ msgid "Enter custom class for YTC block, if you wish to target block styling"
474
+ msgstr ""
475
+
476
+ #: inc/widget.php:91
477
+ msgid "Channel ID"
478
+ msgstr ""
479
+
480
+ #: inc/widget.php:91
481
+ msgid "YouTube Channel name (not URL to channel)"
482
+ msgstr ""
483
+
484
+ #: inc/widget.php:94
485
+ msgid "Playlist ID"
486
+ msgstr ""
487
+
488
+ #: inc/widget.php:94
489
+ msgid "YouTube Playlist ID (not playlist name)"
490
+ msgstr ""
491
+
492
+ #: inc/widget.php:104
493
+ msgid ""
494
+ "Enable this option to embed YouTube playlist widget instead single video "
495
+ "from playlist"
496
+ msgstr ""
497
+
498
+ #: inc/widget.php:123
499
+ msgid "Cache feed"
500
+ msgstr ""
501
+
502
+ #: inc/widget.php:130 inc/widget.php:132
503
+ msgid "video(s)"
504
+ msgstr ""
505
+
506
+ #: inc/widget.php:135
507
+ msgid "Enable this option to protect your visitors privacy"
508
+ msgstr ""
509
+
510
+ #: inc/widget.php:135
511
+ #, php-format
512
+ msgid "Use <a href=\"%s\" target=\"_blank\">Enhanced Privacy</a>"
513
+ msgstr ""
514
+
515
+ #: inc/widget.php:142
516
+ msgid "Video Settings"
517
+ msgstr ""
518
+
519
+ #: inc/widget.php:143
520
+ msgid "Aspect ratio"
521
+ msgstr ""
522
+
523
+ #: inc/widget.php:151
524
+ msgid "Width"
525
+ msgstr ""
526
+
527
+ #: inc/widget.php:151
528
+ msgid "Set video width in pixels"
529
+ msgstr ""
530
+
531
+ #: inc/widget.php:151
532
+ msgid "default"
533
+ msgstr ""
534
+
535
+ #: inc/widget.php:162
536
+ msgid "Use light theme (default is dark)"
537
+ msgstr ""
538
+
539
+ #: inc/widget.php:164
540
+ msgid "Fix height taken by controls"
541
+ msgstr ""
542
+
543
+ #: inc/widget.php:170
544
+ msgid "Content Layout"
545
+ msgstr ""
546
+
547
+ #: inc/widget.php:174
548
+ msgid ""
549
+ "Set number of characters to cut down video description to (0 means full "
550
+ "length)"
551
+ msgstr ""
552
+
553
+ #: inc/widget.php:175
554
+ msgid "Default: &amp;hellip;"
555
+ msgstr ""
556
+
557
+ #: inc/widget.php:182
558
+ msgid ""
559
+ "Default: Visit channel %channel%. Use placeholder %channel% to insert "
560
+ "channel name."
561
+ msgstr ""
562
+
563
+ #: inc/widget.php:194
564
+ msgid "Debug YTC"
565
+ msgstr ""
566
+
567
+ #: inc/widget.php:196
568
+ msgid "Enable debugging"
569
+ msgstr ""
570
+
571
+ #: inc/widget.php:212
572
+ #, php-format
573
+ msgid ""
574
+ "Insert debug data to <a href=\"%s\" target=\"_support\">support forum</a>."
575
+ "<br />Please do not remove channel and playlist ID`s. If you are concerned "
576
+ "about privacy, send this debug log to email %s"
577
+ msgstr ""
578
+
579
+ #: youtube-channel.php:90
580
  #, php-format
581
+ msgid ""
582
+ "Please review <a href=\"%s\">global settings</a>, YTC widgets and shortcodes."
583
+ msgstr ""
584
 
585
+ #: youtube-channel.php:93
586
+ #, php-format
587
+ msgid ""
588
+ "If you use caching for any YTC widget or shortcode, please <strong>ReCache</"
589
+ "strong> feeds in <strong>Tools</strong> section of <a href=\"%s\">plugin "
590
+ "settings</a> page."
591
+ msgstr ""
592
 
593
+ #: youtube-channel.php:96
594
+ #, php-format
595
+ msgid ""
596
+ "We switched to <em>Redux Framework</em> so please review global plugin <a "
597
+ "href=\"%s\">settings page</a>."
598
+ msgstr ""
599
 
600
+ #: youtube-channel.php:101
601
+ msgid "updated to version"
602
+ msgstr ""
603
 
604
+ #: youtube-channel.php:101
605
+ msgid "I did this already, dismiss notice!"
606
+ msgstr ""
607
 
608
+ #: youtube-channel.php:108
609
+ #, php-format
610
+ msgid ""
611
+ "To configure global <strong>%s</strong> options, you need to install and "
612
+ "activate <strong>%s</strong>."
613
+ msgstr ""
614
 
615
+ #: youtube-channel.php:113
616
+ msgid "Settings"
617
+ msgstr ""
618
 
619
+ #: youtube-channel.php:486
620
+ msgid "No items"
621
+ msgstr ""
622
 
623
+ #: youtube-channel.php:486
624
+ msgid "Check here why"
625
+ msgstr ""
626
 
627
+ #: youtube-channel.php:547
628
+ #, php-format
629
+ msgid "Visit channel %1$s"
630
+ msgstr ""
631
 
632
+ #: youtube-channel.php:554
633
+ msgid "in new window/tab"
634
+ msgstr ""
635
 
636
+ #: youtube-channel.php:651
637
+ #, php-format
638
+ msgid "Watch video %1$s published on %2$s"
639
+ msgstr ""
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: urkekg
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6Q762MQ97XJ6
4
  Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5
5
- Requires at least: 3.8.0
6
  Tested up to: 4.0
7
- Stable tag: 2.2.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -60,10 +60,13 @@ Video description for videos from playlist does nt work.
60
  If WordFence or other malware scan tool detect YouTube Channel fule youtube-channel.php as potential risk because `base64_encode()` and `base64_decode()` functions, remember that we use this two functions to store and restore JSON feeds to transient cache, so potential detection is false positive.
61
 
62
  = Credits =
63
- Chromeless option borrowed from [Chromeless YouTube](http://wordpress.org/extend/plugins/chromeless-youtube/) extension.
64
- For playing videos in lightbox we use [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/).
65
- Code improvements and textdomain adds done by [dimadin](http://wordpress.org/extend/plugins/profile/dimadin).
66
- [Federico Bozo](http://corchoweb.com/) reminded me to fix z-index problem
 
 
 
67
 
68
  = How To Use =
69
  **Add New Widget**
@@ -120,6 +123,21 @@ Video feed for YTC has been retreived with standard youtube feed [uploads by spe
120
  If you does not see your latest video in your uplaods feed (which you can access at https://gdata.youtube.com/feeds/api/users/YOUR_YT_USERID/uploads by replacing YOUR_YT_USERID with your real youtube user ID), then YTC will not see it too.
121
 
122
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  = 2.2.3 (2014-09-14) =
124
  * Add: option to disable related videos (not supported by chromeless player)
125
  * Enhance: added support for YouTube `rel` parameter in Magnific PopUp IFRAME module
2
  Contributors: urkekg
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6Q762MQ97XJ6
4
  Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5
5
+ Requires at least: 3.9.0
6
  Tested up to: 4.0
7
+ Stable tag: 2.4.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
60
  If WordFence or other malware scan tool detect YouTube Channel fule youtube-channel.php as potential risk because `base64_encode()` and `base64_decode()` functions, remember that we use this two functions to store and restore JSON feeds to transient cache, so potential detection is false positive.
61
 
62
  = Credits =
63
+
64
+ * Chromeless option borrowed from [Chromeless YouTube](http://wordpress.org/extend/plugins/chromeless-youtube/) extension.
65
+ * For playing videos in lightbox we use [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/).
66
+ * Code improvements and textdomain adds done by [dimadin](http://wordpress.org/extend/plugins/profile/dimadin).
67
+ * [Federico Bozo](http://corchoweb.com/) reminded me to fix z-index problem
68
+ * Czech localization by [Ladislav Drábek](http://zholesova.cz)
69
+ * Spanish localization by [Diego Riaño](http://Digital03.net)
70
 
71
  = How To Use =
72
  **Add New Widget**
123
  If you does not see your latest video in your uplaods feed (which you can access at https://gdata.youtube.com/feeds/api/users/YOUR_YT_USERID/uploads by replacing YOUR_YT_USERID with your real youtube user ID), then YTC will not see it too.
124
 
125
  == Changelog ==
126
+ = 2.4.0 (2014-10-01) =
127
+ * Fix: false options set in shortcode had no effect to output box and default settings always used [20140924]
128
+ * Fix: enabled checkbox in global settings could not be unticked (disabled) [20140924]
129
+ * Fix: prevent array_slice notice if channel have no uploaded videos [20141001]
130
+ * Add: fitVids for responsive videos [20140924]
131
+ * Add: option for additional YTC box class in widget and shortcode [20140924]
132
+ * Change: global settings page re-implemented with Redux Framework and requires Redux Framework Plugin [20140924]
133
+ * Change: rewrite plugin to be more OOP [20140924]
134
+ * Change: removed obsolete methods [20140924]
135
+ * Change: default box width changed from 220 to 306px [20140924]
136
+ * Change: YTC block and video pieces now floated left to enable horizontal stack [20140924]
137
+ * Change: update localization support [20140926]
138
+ * Change: updated Serbian localization [20140926]
139
+ * Change: removed PayPal donation button from widget and moved to plugin Settings page [20141001]
140
+
141
  = 2.2.3 (2014-09-14) =
142
  * Add: option to disable related videos (not supported by chromeless player)
143
  * Enhance: added support for YouTube `rel` parameter in Magnific PopUp IFRAME module
youtube-channel.php CHANGED
@@ -4,1045 +4,883 @@ Plugin Name: YouTube Channel
4
  Plugin URI: http://urosevic.net/wordpress/plugins/youtube-channel/
5
  Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
6
  Author: Aleksandar Urošević
7
- Version: 2.2.3
8
  Author URI: http://urosevic.net/
9
  */
10
- define( 'YTCVER', '2.2.3' );
11
- define( 'YOUTUBE_CHANNEL_URL', plugin_dir_url(__FILE__) );
12
- define( 'YTCPLID', 'PLEC850BE962234400' );
13
- define( 'YTCUID', 'urkekg' );
14
- define( 'YTCTDOM', 'youtube-channel' );
15
- define( 'YTCNAME', 'YouTube Channel' );
16
 
17
- /* youtube widget */
18
- class WPAU_YOUTUBE_CHANNEL extends WP_Widget {
19
 
20
- function __construct() {
 
 
 
21
 
22
- add_shortcode( 'youtube_channel', array($this, 'youtube_channel_shortcode') );
23
- // Initialize Widget
24
- parent::__construct(
25
- YTCTDOM,
26
- __( 'Youtube Channel' , YTCTDOM ),
27
- array( 'description' => __( 'Serve YouTube videos from channel or playlist right to widget area', YTCTDOM ) )
28
- );
29
 
30
- // update YTC version in database on request
31
- if ( !empty($_GET['ytc_dismiss_update_notice']) )
32
- update_option( 'ytc_version', YTCVER );
 
33
 
34
- // add dashboard notice if version changed
35
- $version = get_option('ytc_version','0');
36
- if ( version_compare($version, YTCVER, "<") )
37
- add_action( 'admin_notices', array($this, 'admin_notices') );
38
 
39
- // Initialize Settings
40
- require_once(sprintf("%s/assets/settings.php", dirname(__FILE__)));
 
41
 
42
- $WPAU_YOUTUBE_CHANNEL_SETTINGS = new WPAU_YOUTUBE_CHANNEL_SETTINGS();
 
43
 
44
- }
 
 
45
 
46
- function admin_notices()
47
- {
48
- ?>
49
- <div class="update-nag">
50
- <p>
51
- <strong><?php echo YTCNAME; ?></strong> is updated to version <strong><?php echo YTCVER; ?></strong>.
52
- If you enabled caching for any YTC widget or shortcode, please <strong>ReCache</strong> feeds at <a href="options-general.php?page=youtube-channel&tab=ytc_tools">Tools</a> tab of settings page.
53
- &nbsp;&nbsp;<a href="?ytc_dismiss_update_notice=1" class="button button-secondary">I did this already, dismiss notice!</a>
54
- </p>
55
- </div>
56
- <?php
57
- }
58
- public static function defaults()
59
- {
60
- $defaults = array(
61
- 'channel' => YTCUID,
62
- 'playlist' => YTCPLID,
63
- 'use_res' => false,
64
- 'only_pl' => false,
65
- 'cache_time' => 300, // 5 minutes
66
- 'maxrnd' => 25,
67
- 'vidqty' => 1,
68
- 'enhprivacy' => false,
69
- 'fixnoitem' => false,
70
- 'getrnd' => false,
71
- 'ratio' => 3, // 3 - 16:9, 2 - 16:10, 1 - 4:3
72
- 'width' => 220,
73
- 'to_show' => 'thumbnail', // thumbnail, iframe, iframe2, chromeless, object
74
- 'themelight' => false,
75
- 'controls' => false,
76
- 'fixyt' => false,
77
- 'autoplay' => false,
78
- 'autoplay_mute' => false,
79
- 'norel' => false,
80
-
81
- 'showtitle' => false,
82
- 'showvidesc' => false,
83
- 'videsclen' => 0,
84
- 'descappend' => '&hellip;',
85
- 'hideanno' => false,
86
- 'hideinfo' => false,
87
-
88
- 'goto_txt' => 'Visit our channel',
89
- 'showgoto' => false,
90
- 'popup_goto' => 3, // 3 same window, 2 new window JS, 1 new window target
91
- 'userchan' => false
92
- );
93
 
94
- $options = wp_parse_args(get_option('youtube_channel_defaults'), $defaults);
 
 
 
95
 
96
- return $options;
97
- }
98
 
99
- /**
100
- * Activate the plugin
101
- */
102
- public static function activate()
103
- {
104
- // Transit old settings to new format
105
- // get pre-2.0.0 YTC widgets, and if exist, convert to 2.0.0+ version
106
- if ( $old = get_option('widget_youtube_channel_widget') ) {
107
- // if we have pre-2.0.0 YTC widgets, merge them to new version
108
-
109
- // get new YTC widgets
110
- $new = get_option('widget_youtube-channel');
111
-
112
- // get all widget areas
113
- $widget_areas = get_option('sidebars_widgets');
114
-
115
- // update options to 2.0.0+ version
116
- foreach ($old as $k=>$v) {
117
-
118
- if ( $k !== "_multiwidget" ){
119
- // option for resource
120
- $v['use_res'] = 0;
121
- if ( $v['usepl'] == "on" ) {
122
- $v['use_res'] = 2;
123
- }
124
 
125
- $v['popup_goto'] = 0;
126
- if ( $v['popupgoto'] == "on" ) {
127
- $v['popup_goto'] = 1;
128
- } else if ($v['target'] == "on") {
129
- $v['popup_goto'] = 2;
130
- }
131
- unset($v['usepl'], $v['popupgoto'], $v['target']);
132
-
133
- $v['cache_time'] = 0;
134
- $v['userchan'] = 0;
135
- $v['enhprivacy'] = 0;
136
- $v['autoplay_mute'] = 0;
137
-
138
- // add old YTC widget to new set
139
- // but append at the end if YTC widget with same ID already exist
140
- // in new set (created in version 2.0.0)
141
- if ( is_array($new[$k]) ) {
142
- // populate at the end
143
- array_push($new, $v);
144
- $ytc_widget_id = "youtube-channel-".end(array_keys($new));
145
- } else {
146
- // set as current widget ID
147
- $new[$k] = $v;
148
- $ytc_widget_id = "youtube-channel-$k";
149
- }
150
 
151
- $ytc_widget_added = 0;
152
- foreach ( $widget_areas as $wak => $wav ) {
153
- // check if here we have this widget
154
- if ( is_array($wav) && in_array($ytc_widget_id,$wav) )
155
- $ytc_widget_added++;
156
- }
157
- // if YTC widget has not present in any widget area, add it to inactive widgets ;)
158
- if ( $ytc_widget_added == 0 )
159
- array_push($widget_areas['wp_inactive_widgets'], $ytc_widget_id);
160
 
 
 
 
161
  }
162
- // add to inactive widgets if don't belong to any widget area
163
-
164
- } // foreach widget option
165
-
166
- // update widget areas set
167
- update_option('sidebars_widgets',$widget_areas);
168
-
169
- // update new YTC widgets
170
- update_option('widget_youtube-channel',$new);
171
-
172
- // remove old YTC widgets entry
173
- delete_option('widget_youtube_channel_widget');
174
-
175
- // clear temporary vars
176
- unset ($old,$new);
177
-
178
- } // if we have old YTC widgets
179
 
180
- } // END public static function activate
181
 
182
- // Helper function cache_time()
183
- function cache_time($cache_time)
184
- {
185
- $times = array(
186
- 'minute' => array(
187
- 1 => "1 minute",
188
- 5 => "5 minutes",
189
- 15 => "15 minutes",
190
- 30 => "30 minutes"
191
- ),
192
- 'hour' => array(
193
- 1 => "1 hour",
194
- 2 => "2 hours",
195
- 5 => "5 hours",
196
- 10 => "10 hours",
197
- 12 => "12 hours",
198
- 18 => "18 hours"
199
- ),
200
- 'day' => array(
201
- 1 => "1 day",
202
- 2 => "2 days",
203
- 3 => "3 days",
204
- 4 => "4 days",
205
- 5 => "5 days",
206
- 6 => "6 days"
207
- ),
208
- 'week' => array(
209
- 1 => "1 week",
210
- 2 => "2 weeks",
211
- 3 => "3 weeks",
212
- 4 => "1 month"
213
- )
214
- );
215
-
216
- $out = "";
217
- foreach ($times as $period => $timeset)
218
  {
219
- switch ($period)
 
 
 
 
220
  {
221
- case 'minute':
222
- $sc = MINUTE_IN_SECONDS;
223
- break;
224
- case 'hour':
225
- $sc = HOUR_IN_SECONDS;
226
  break;
227
- case 'day':
228
- $sc = DAY_IN_SECONDS;
229
  break;
230
- case 'week':
231
- $sc = WEEK_IN_SECONDS;
232
  break;
233
  }
234
-
235
- foreach ($timeset as $n => $s)
236
- {
237
- $sec = $sc * $n;
238
- $out .='<option value="'.$sec.'" '. selected( $cache_time, $sec, 0 ).'>'.__($s, YTCTDOM).'</option>';
239
- unset($sec);
240
- }
241
- }
242
- return $out;
243
- }
244
-
245
- // TODO: Form code
246
- public function form($instance) {
247
- // outputs the options form for widget settings
248
- // General Options
249
- $title = (!empty($instance['title'])) ? esc_attr($instance['title']) : '';
250
- $channel = (!empty($instance['channel'])) ? esc_attr($instance['channel']) : '';
251
- $playlist = (!empty($instance['playlist'])) ? esc_attr($instance['playlist']) : '';
252
-
253
- $use_res = (!empty($instance['use_res'])) ? esc_attr($instance['use_res']) : 0; // resource to use: channel, favorites, playlis : ''t
254
- $only_pl = (!empty($instance['only_pl'])) ? esc_attr($instance['only_pl']) : '';
255
-
256
- $cache_time = (!empty($instance['cache_time'])) ? esc_attr($instance['cache_time']) : '';
257
-
258
- $maxrnd = (!empty($instance['maxrnd'])) ? esc_attr($instance['maxrnd']) : 25; // items to fetch
259
- $vidqty = (!empty($instance['vidqty'])) ? esc_attr($instance['vidqty']) : 1; // number of items to show
260
-
261
- $enhprivacy = (!empty($instance['enhprivacy'])) ? esc_attr($instance['enhprivacy']) : '';
262
- $fixnoitem = (!empty($instance['fixnoitem'])) ? esc_attr($instance['fixnoitem']) : '';
263
- $getrnd = (!empty($instance['getrnd'])) ? esc_attr($instance['getrnd']) : '';
264
-
265
- // Video Settings
266
- $ratio = (!empty($instance['ratio'])) ? esc_attr($instance['ratio']) : 3;
267
- $width = (!empty($instance['width'])) ? esc_attr($instance['width']) : 220;
268
- // $height = (!empty($instance['height'])) ? esc_attr($instance['height']) : '';
269
-
270
- $to_show = (!empty($instance['to_show'])) ? esc_attr($instance['to_show']) : '';
271
- $themelight = (!empty($instance['themelight'])) ? esc_attr($instance['themelight']) : '';
272
- $controls = (!empty($instance['controls'])) ? esc_attr($instance['controls']) : '';
273
- $fixyt = (!empty($instance['fixyt'])) ? esc_attr($instance['fixyt']) : '';
274
- $autoplay = (!empty($instance['autoplay'])) ? esc_attr($instance['autoplay']) : '';
275
- $autoplay_mute = (!empty($instance['autoplay_mute'])) ? esc_attr($instance['autoplay_mute']) : '';
276
- $norel = (!empty($instance['norel'])) ? esc_attr($instance['norel']) : '';
277
-
278
- // Content Layout
279
- $showtitle = (!empty($instance['showtitle'])) ? esc_attr($instance['showtitle']) : '';
280
- $showvidesc = (!empty($instance['showvidesc'])) ? esc_attr($instance['showvidesc']) : '';
281
- $videsclen = (!empty($instance['videsclen'])) ? esc_attr($instance['videsclen']) : 0;
282
- $descappend = (!empty($instance['descappend'])) ? esc_attr($instance['descappend']) : '&hellip;';
283
-
284
- $hideanno = (!empty($instance['hideanno'])) ? esc_attr($instance['hideanno']) : '';
285
- $hideinfo = (!empty($instance['hideinfo'])) ? esc_attr($instance['hideinfo']) : '';
286
-
287
- // Link to Channel
288
- $goto_txt = (!empty($instance['goto_txt'])) ? esc_attr($instance['goto_txt']) : '';
289
- $showgoto = (!empty($instance['showgoto'])) ? esc_attr($instance['showgoto']) : '';
290
- $popup_goto = (!empty($instance['popup_goto'])) ? esc_attr($instance['popup_goto']) : '';
291
- $userchan = (!empty($instance['userchan'])) ? esc_attr($instance['userchan']) : '';
292
 
293
- // Debug YTC
294
- $debugon = (!empty($instance['debugon'])) ? esc_attr($instance['debugon']) : '';
295
- ?>
 
 
 
296
 
297
- <p>
298
- <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title:', YTCTDOM); ?><input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" title="<?php _e('Title for widget', YTCTDOM); ?>" /></label>
299
- </p>
300
- <p>
301
- <label for="<?php echo $this->get_field_id('channel'); ?>"><?php _e('Channel ID:', YTCTDOM); ?><input type="text" class="widefat" id="<?php echo $this->get_field_id('channel'); ?>" name="<?php echo $this->get_field_name('channel'); ?>" value="<?php echo $channel; ?>" title="<?php _e('YouTube Channel name (not URL to channel)', YTCTDOM); ?>" /></label>
302
- </p>
303
- <p>
304
- <label for="<?php echo $this->get_field_id('playlist'); ?>"><?php _e('Playlist ID:', YTCTDOM); ?><input type="text" class="widefat" id="<?php echo $this->get_field_id('playlist'); ?>" name="<?php echo $this->get_field_name('playlist'); ?>" value="<?php echo $playlist; ?>" title="<?php _e('YouTube Playlist ID (not playlist name)', YTCTDOM); ?>" /></label>
305
- </p>
306
- <p>
307
- <label for="<?php echo $this->get_field_id('use_res'); ?>"><?php _e('Resource to use:', YTCTDOM); ?></label>
308
- <select class="widefat" id="<?php echo $this->get_field_id( 'use_res' ); ?>" name="<?php echo $this->get_field_name( 'use_res' ); ?>">
309
- <option value="0"<?php selected( $use_res, 0 ); ?>><?php _e('Channel', YTCTDOM); ?></option>
310
- <option value="1"<?php selected( $use_res, 1 ); ?>><?php _e('Favorites', YTCTDOM); ?></option>
311
- <option value="2"<?php selected( $use_res, 2 ); ?>><?php _e('Playlist', YTCTDOM); ?></option>
312
- </select>
313
- <br />
314
- <label style="display: none" for="<?php echo $this->get_field_id( 'only_pl' ); ?>" id="<?php echo $this->get_field_id( 'only_pl' ); ?>_label"><input class="checkbox" type="checkbox" <?php checked( (bool) $only_pl, true ); ?> id="<?php echo $this->get_field_id( 'only_pl' ); ?>" name="<?php echo $this->get_field_name( 'only_pl' ); ?>" title="<?php _e('Enable this option to embed YouTube playlist widget instead single video from playlist', YTCTDOM); ?>" /> <?php _e('Embed standard playlist', YTCTDOM); ?></label>
315
- </p>
316
- <?php $onlypl_js_fn = str_replace('-','_',$this->get_field_id( 'only_pl' )); ?>
317
- <script type="text/javascript">
318
- jQuery(document).ready(function($){
319
- toggle_<?php echo $onlypl_js_fn; ?>($('#<?php echo $this->get_field_id( 'use_res' ); ?>'));
320
- $('#<?php echo $this->get_field_id( 'use_res' ); ?>').change(function(){
321
- toggle_<?php echo $onlypl_js_fn; ?>($(this));
322
- });
323
- function toggle_<?php echo $onlypl_js_fn; ?>(d) {
324
- if ( d.find(':selected')[0].value == 2 ) {
325
- $('#<?php echo $this->get_field_id( 'only_pl' ); ?>_label').fadeIn();
326
- } else {
327
- $('#<?php echo $this->get_field_id( 'only_pl' ); ?>_label').fadeOut();
328
- }
329
- }
330
- });
331
- </script>
332
- <p>
333
- <label for="<?php echo $this->get_field_id('cache_time'); ?>"><?php _e('Cache feed:', YTCTDOM); ?></label>
334
- <select class="widefat" id="<?php echo $this->get_field_id( 'cache_time' ); ?>" name="<?php echo $this->get_field_name( 'cache_time' ); ?>">
335
- <option value="0"<?php selected( $cache_time, 0 ); ?>><?php _e('Do not chache', YTCTDOM); ?></option>
336
- <?php echo self::cache_time($cache_time); ?>
337
- </select>
338
- </p>
339
- <p>
340
- <label for="<?php echo $this->get_field_id('maxrnd'); ?>"><?php _e('Fetch:', YTCTDOM); ?> <input class="small-text" id="<?php echo $this->get_field_id('maxrnd'); ?>" name="<?php echo $this->get_field_name('maxrnd'); ?>" type="number" min="2" value="<?php echo $maxrnd; ?>" title="<?php _e('Number of videos that will be used for random pick (min 2, max 50, default 25)', YTCTDOM); ?>" /> video(s)</label>
341
- <br />
342
- <label for="<?php echo $this->get_field_id('vidqty'); ?>"><?php _e('Show:', YTCTDOM); ?></label> <input class="small-text" id="<?php echo $this->get_field_id('vidqty'); ?>" name="<?php echo $this->get_field_name('vidqty'); ?>" type="number" min="1" value="<?php echo ( $vidqty ) ? $vidqty : '1'; ?>" title="<?php _e('Number of videos to display', YTCTDOM); ?>" /> video(s)
343
- </p>
344
- <p>
345
- <input class="checkbox" type="checkbox" <?php checked( (bool) $enhprivacy, true ); ?> id="<?php echo $this->get_field_id( 'enhprivacy' ); ?>" name="<?php echo $this->get_field_name( 'enhprivacy' ); ?>" title="<?php _e('Enable this option to protect your visitors privacy', YTCTDOM); ?>" /> <label for="<?php echo $this->get_field_id( 'enhprivacy' ); ?>"><?php printf(__('Use <a href="%s" target="_blank">Enhanced Privacy</a>', YTCTDOM), 'http://support.google.com/youtube/bin/answer.py?hl=en-GB&answer=171780'); ?></label>
346
- <br />
347
- <input class="checkbox" type="checkbox" <?php checked( (bool) $fixnoitem, true ); ?> id="<?php echo $this->get_field_id( 'fixnoitem' ); ?>" name="<?php echo $this->get_field_name( 'fixnoitem' ); ?>" title="<?php _e('Enable this option if you get error No Item', YTCTDOM); ?>" /> <label for="<?php echo $this->get_field_id( 'fixnoitem' ); ?>"><?php _e('Fix <em>No items</em> error/Respect playlist order', YTCTDOM); ?></label>
348
- <br />
349
- <input class="checkbox" type="checkbox" <?php checked( (bool) $getrnd, true ); ?> id="<?php echo $this->get_field_id( 'getrnd' ); ?>" name="<?php echo $this->get_field_name( 'getrnd' ); ?>" title="<?php _e('Get random videos of all fetched from channel or playlist', YTCTDOM); ?>" /> <label for="<?php echo $this->get_field_id( 'getrnd' ); ?>"><?php _e('Show random video', YTCTDOM); ?></label>
350
- </p>
351
-
352
- <h4><?php _e('Video Settings', YTCTDOM); ?></h4>
353
- <p><label for="<?php echo $this->get_field_id('ratio'); ?>"><?php _e('Aspect ratio', YTCTDOM); ?>:</label>
354
- <select class="widefat" id="<?php echo $this->get_field_id( 'ratio' ); ?>" name="<?php echo $this->get_field_name( 'ratio' ); ?>">
355
- <?php /* <option value="0"<?php selected( $ratio, 0 ); ?>><?php _e('Custom (as set above)', YTCTDOM); ?></option> */ ?>
356
- <option value="3"<?php selected( $ratio, 3 ); ?>>16:9</option>
357
- <option value="2"<?php selected( $ratio, 2 ); ?>>16:10</option>
358
- <option value="1"<?php selected( $ratio, 1 ); ?>>4:3</option>
359
- </select>
360
- </p>
361
- <p>
362
- <label for="<?php echo $this->get_field_id('width'); ?>"><?php _e('Width', YTCTDOM); ?>:</label> <input class="small-text" id="<?php echo $this->get_field_id('width'); ?>" name="<?php echo $this->get_field_name('width'); ?>" type="number" min="32" value="<?php echo $width; ?>" title="<?php _e('Set video width in pixels', YTCTDOM); ?>" /> px (<?php _e('default', YTCTDOM); ?> 220)
363
- </p>
364
- <p>
365
- <label for="<?php echo $this->get_field_id('to_show'); ?>"><?php _e('What to show?', YTCTDOM); ?></label>
366
- <select class="widefat" id="<?php echo $this->get_field_id( 'to_show' ); ?>" name="<?php echo $this->get_field_name( 'to_show' ); ?>">
367
- <option value="thumbnail"<?php selected( $to_show, 'thumbnail' ); ?>><?php _e('Thumbnail', YTCTDOM); ?></option>
368
- <option value="object"<?php selected( $to_show, 'object' ); ?>><?php _e('Flash (object)', YTCTDOM); ?></option>
369
- <option value="iframe"<?php selected( $to_show, 'iframe' ); ?>><?php _e('HTML5 (iframe)', YTCTDOM); ?></option>
370
- <option value="iframe2"<?php selected( $to_show, 'iframe2' ); ?>><?php _e('HTML5 (iframe) Async', YTCTDOM); ?></option>
371
- <option value="chromeless"<?php selected( $to_show, 'chromeless' ); ?>><?php _e('Chromeless', YTCTDOM); ?></option>
372
- </select>
373
- <input class="checkbox" type="checkbox" <?php checked( (bool) $themelight, true ); ?> id="<?php echo $this->get_field_id( 'themelight' ); ?>" name="<?php echo $this->get_field_name( 'themelight' ); ?>" /> <label for="<?php echo $this->get_field_id( 'themelight' ); ?>"><?php _e('Use light theme (default is dark)', YTCTDOM); ?></label><br />
374
- <input class="checkbox" type="checkbox" <?php checked( (bool) $controls, true ); ?> id="<?php echo $this->get_field_id( 'controls' ); ?>" name="<?php echo $this->get_field_name( 'controls' ); ?>" /> <label for="<?php echo $this->get_field_id( 'controls' ); ?>"><?php _e('Hide player controls', YTCTDOM); ?></label><br />
375
- <input class="checkbox" type="checkbox" <?php checked( (bool) $fixyt, true ); ?> id="<?php echo $this->get_field_id( 'fixyt' ); ?>" name="<?php echo $this->get_field_name( 'fixyt' ); ?>" /> <label for="<?php echo $this->get_field_id( 'fixyt' ); ?>"><?php _e('Fix height taken by controls', YTCTDOM); ?></label><br />
376
- <input class="checkbox" type="checkbox" <?php checked( (bool) $autoplay, true ); ?> id="<?php echo $this->get_field_id( 'autoplay' ); ?>" name="<?php echo $this->get_field_name( 'autoplay' ); ?>" /> <label for="<?php echo $this->get_field_id( 'autoplay' ); ?>"><?php _e('Autoplay video or playlist', YTCTDOM); ?></label><br />
377
- <input class="checkbox" type="checkbox" <?php checked( (bool) $autoplay_mute, true ); ?> id="<?php echo $this->get_field_id( 'autoplay_mute' ); ?>" name="<?php echo $this->get_field_name( 'autoplay_mute' ); ?>" /> <label for="<?php echo $this->get_field_id( 'autoplay_mute' ); ?>"><?php _e('Mute video on autoplay', YTCTDOM); ?></label><br />
378
- <input class="checkbox" type="checkbox" <?php checked( (bool) $norel, true ); ?> id="<?php echo $this->get_field_id( 'norel' ); ?>" name="<?php echo $this->get_field_name( 'norel' ); ?>" /> <label for="<?php echo $this->get_field_id( 'norel' ); ?>"><?php _e('Hide related videos', YTCTDOM); ?></label>
379
- </p>
380
-
381
- <h4><?php _e('Content Layout', YTCTDOM); ?></h4>
382
- <p>
383
- <input class="checkbox" type="checkbox" <?php checked( (bool) $showtitle, true ); ?> id="<?php echo $this->get_field_id( 'showtitle' ); ?>" name="<?php echo $this->get_field_name( 'showtitle' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showtitle' ); ?>"><?php _e('Show video title', YTCTDOM); ?></label><br />
384
- <input class="checkbox" type="checkbox" <?php checked( (bool) $showvidesc, true ); ?> id="<?php echo $this->get_field_id( 'showvidesc' ); ?>" name="<?php echo $this->get_field_name( 'showvidesc' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showvidesc' ); ?>"><?php _e('Show video description', YTCTDOM); ?></label><br />
385
- <label for="<?php echo $this->get_field_id('videsclen'); ?>"><?php _e('Description length', YTCTDOM); ?>: <input class="small-text" id="<?php echo $this->get_field_id('videsclen'); ?>" name="<?php echo $this->get_field_name('videsclen'); ?>" type="number" value="<?php echo $videsclen; ?>" title="<?php _e('Set number of characters to cut down video description to (0 means full length)', YTCTDOM);?>" /> (0 = full)</label><br />
386
- <label for="<?php echo $this->get_field_id('descappend'); ?>"><?php _e('Et cetera string', YTCTDOM); ?> <input class="small-text" id="<?php echo $this->get_field_id('descappend'); ?>" name="<?php echo $this->get_field_name('descappend'); ?>" type="text" value="<?php echo $descappend; ?>" title="<?php _e('Default: &amp;hellip;', YTCTDOM); ?>"/></label><br />
387
- <input class="checkbox" type="checkbox" <?php checked( (bool) $hideanno, true ); ?> id="<?php echo $this->get_field_id( 'hideanno' ); ?>" name="<?php echo $this->get_field_name( 'hideanno' ); ?>" /> <label for="<?php echo $this->get_field_id( 'hideanno' ); ?>"><?php _e('Hide annotations from video', YTCTDOM); ?></label><br />
388
- <input class="checkbox" type="checkbox" <?php checked( (bool) $hideinfo, true ); ?> id="<?php echo $this->get_field_id( 'hideinfo' ); ?>" name="<?php echo $this->get_field_name( 'hideinfo' ); ?>" /> <label for="<?php echo $this->get_field_id( 'hideinfo' ); ?>"><?php _e('Hide video info', YTCTDOM); ?></label>
389
- </p>
390
-
391
- <h4><?php _e('Link to Channel', YTCTDOM); ?></h4>
392
- <p>
393
- <label for="<?php echo $this->get_field_id('goto_txt'); ?>"><?php _e('Visit YouTube Channel text:', YTCTDOM); ?> <input class="widefat" id="<?php echo $this->get_field_id('goto_txt'); ?>" name="<?php echo $this->get_field_name('goto_txt'); ?>" type="text" value="<?php echo $goto_txt; ?>" title="<?php _e('Default: Visit channel %channel%. Use placeholder %channel% to insert channel name.', YTCTDOM); ?>" /></label>
394
- <input class="checkbox" type="checkbox" <?php checked( (bool) $showgoto, true ); ?> id="<?php echo $this->get_field_id( 'showgoto' ); ?>" name="<?php echo $this->get_field_name( 'showgoto' ); ?>" /> <label for="<?php echo $this->get_field_id( 'showgoto' ); ?>"><?php _e('Show link to channel', YTCTDOM); ?></label><br />
395
-
396
- <select class="widefat" id="<?php echo $this->get_field_id( 'popup_goto' ); ?>" name="<?php echo $this->get_field_name( 'popup_goto' ); ?>">
397
- <option value="0"<?php selected( $popup_goto, 0 ); ?>><?php _e('in same window', YTCTDOM); ?></option>
398
- <option value="1"<?php selected( $popup_goto, 1 ); ?>><?php _e('in new window (JavaScript)', YTCTDOM); ?></option>
399
- <option value="2"<?php selected( $popup_goto, 2 ); ?>><?php _e('in new window (Target)', YTCTDOM); ?></option>
400
- </select>
401
-
402
- <input class="checkbox" type="checkbox" <?php checked( (bool) $userchan, true ); ?> id="<?php echo $this->get_field_id( 'userchan' ); ?>" name="<?php echo $this->get_field_name( 'userchan' ); ?>" /> <label for="<?php echo $this->get_field_id( 'userchan' ); ?>"><?php _e('Link to channel instead to user', YTCTDOM); ?></label><br />
403
- </p>
404
-
405
- <h4><?php _e('Debug YTC', YTCTDOM); ?></h4>
406
- <p>
407
- <input class="checkbox" type="checkbox" <?php checked( (bool) $debugon, true ); ?> id="<?php echo $this->get_field_id( 'debugon' ); ?>" name="<?php echo $this->get_field_name( 'debugon' ); ?>" /> <label for="<?php echo $this->get_field_id( 'debugon' ); ?>">Enable debugging</label><br />
408
 
409
- <?php
410
- if ( $debugon == 'on' ) {
411
- global $wp_version;
412
- $debug_arr = array_merge(
413
- array(
414
- 'server' => $_SERVER["SERVER_SOFTWARE"],
415
- 'php' => PHP_VERSION, //phpversion(),
416
- 'wp' => $wp_version, // get_bloginfo('version'),
417
- 'ytc' => YTCVER,
418
- 'url' => get_site_url()
419
- ),
420
- $instance);
421
- ?>
422
- <textarea name="debug" class="widefat" style="height: 100px;"><?php echo au_ytc_dbg($debug_arr); ?></textarea><br />
423
- <small>Insert debug data to <a href="http://wordpress.org/support/plugin/youtube-channel" target="_support">support forum</a>.<br />Please do not remove channel and playlist ID's. If you are concerned about privacy, send this debug log to email <a href="mailto:urke.kg@gmail.com?subject=YTC%20debug%20log">urke.kg@gmail.com</a></small>
424
- <?php } ?>
425
- </p>
426
-
427
- <p>
428
- <input type="button" value="Support YTC / Donate via PayPal" onclick="window.location='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6Q762MQ97XJ6'" class="button-secondary">
429
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
 
431
- <?php
432
- }
433
-
434
- public function update($new_instance, $old_instance) {
435
- // processes widget options to be saved
436
- $instance = $old_instance;
437
- $instance['title'] = strip_tags($new_instance['title']);
438
- $instance['channel'] = strip_tags($new_instance['channel']);
439
- $instance['vidqty'] = $new_instance['vidqty'];
440
- $instance['playlist'] = strip_tags($new_instance['playlist']);
441
- $instance['use_res'] = $new_instance['use_res'];
442
- $instance['cache_time'] = $new_instance['cache_time'];
443
- $instance['only_pl'] = (isset($new_instance['only_pl'])) ? $new_instance['only_pl'] : false;
444
- $instance['getrnd'] = (isset($new_instance['getrnd'])) ? $new_instance['getrnd'] : false;
445
- $instance['maxrnd'] = $new_instance['maxrnd'];
446
-
447
- $instance['goto_txt'] = strip_tags($new_instance['goto_txt']);
448
- $instance['showgoto'] = (isset($new_instance['showgoto'])) ? $new_instance['showgoto'] : false;
449
- $instance['popup_goto'] = $new_instance['popup_goto'];
450
-
451
- $instance['showtitle'] = (isset($new_instance['showtitle'])) ? $new_instance['showtitle'] : false;
452
- $instance['showvidesc'] = (isset($new_instance['showvidesc'])) ? $new_instance['showvidesc'] : false;
453
- $instance['descappend'] = strip_tags($new_instance['descappend']);
454
- $instance['videsclen'] = strip_tags($new_instance['videsclen']);
455
- $instance['width'] = strip_tags($new_instance['width']);
456
- // $instance['height'] = strip_tags($new_instance['height']);
457
- $instance['to_show'] = strip_tags($new_instance['to_show']);
458
- $instance['autoplay'] = (isset($new_instance['autoplay'])) ? $new_instance['autoplay'] : false;
459
- $instance['autoplay_mute'] = (isset($new_instance['autoplay_mute'])) ? $new_instance['autoplay_mute'] : false;
460
- $instance['norel'] = (isset($new_instance['norel'])) ? $new_instance['norel'] : false;
461
-
462
- $instance['controls'] = (isset($new_instance['controls'])) ? $new_instance['controls'] : false;
463
- $instance['fixnoitem'] = (isset($new_instance['fixnoitem'])) ? $new_instance['fixnoitem'] : false;
464
- $instance['ratio'] = strip_tags($new_instance['ratio']);
465
- $instance['fixyt'] = (isset($new_instance['fixyt'])) ? $new_instance['fixyt'] : '';
466
- $instance['hideinfo'] = (isset($new_instance['hideinfo'])) ? $new_instance['hideinfo'] : '';
467
- $instance['hideanno'] = (isset($new_instance['hideanno'])) ? $new_instance['hideanno'] : '';
468
- $instance['themelight'] = (isset($new_instance['themelight'])) ? $new_instance['themelight'] : '';
469
- $instance['debugon'] = (isset($new_instance['debugon'])) ? $new_instance['debugon'] : '';
470
- $instance['userchan'] = (isset($new_instance['userchan'])) ? $new_instance['userchan'] : '';
471
- $instance['enhprivacy'] = (isset($new_instance['enhprivacy'])) ? $new_instance['enhprivacy'] : '';
472
-
473
- return $instance;
474
- }
475
-
476
-
477
- public static function youtube_channel_shortcode($attr)
478
- {
479
- $defaults = WPAU_YOUTUBE_CHANNEL::defaults();
480
- if (!empty($attr)) extract( $attr );
481
- $instance = array();
482
- $instance['channel'] = (empty($channel)) ? $defaults['channel'] : $channel;
483
- $instance['playlist'] = (empty($playlist)) ? $defaults['playlist'] : $playlist;
484
- $instance['use_res'] = (empty($res)) ? $defaults['use_res'] : $res; // resource: 0 channel, 1 favorites, 2 playlist
485
- $instance['only_pl'] = (empty($only_pl)) ? $defaults['only_pl'] : true; // use embedded playlist - false by default
486
- $instance['cache_time'] = (empty($cache)) ? $defaults['cache_time'] : $cache; // in seconds, def 5min - settings?
487
-
488
- $instance['maxrnd'] = (empty($fetch)) ? $defaults['maxrnd'] : $fetch;
489
- $instance['vidqty'] = (empty($num)) ? $defaults['vidqty'] : $num; // num: 1
490
-
491
- $instance['fixnoitem'] = (empty($fix)) ? $defaults['fixnoitem'] : $fix; // fix noitem
492
- $instance['getrnd'] = (empty($random)) ? $defaults['getrnd'] : $random; // use embedded playlist - false by default
493
-
494
- // Video Settings
495
- $instance['ratio'] = (empty($ratio)) ? $defaults['ratio'] : $ratio; // aspect ratio: 3 - 16:9, 2 - 16:10, 1 - 4:3
496
- $instance['width'] = (empty($width)) ? $defaults['width'] : $width; // 220
497
- $instance['to_show'] = (empty($show)) ? $defaults['to_show'] : $show; // thumbnail, iframe, iframe2, object, chromeless
498
-
499
- $instance['themelight'] = (empty($themelight)) ? $defaults['themelight'] : $themelight; // use light theme, dark by default
500
- $instance['controls'] = (empty($controls)) ? $defaults['controls'] : $controls; // hide controls, false by default
501
- $instance['fixyt'] = (empty($fix_h)) ? $defaults['fixyt'] : $fix_h; // fix youtube height, disabled by default
502
- $instance['autoplay'] = (empty($autoplay)) ? $defaults['autoplay'] : $autoplay; // autoplay disabled by default
503
- $instance['autoplay_mute'] = (empty($mute)) ? $defaults['autoplay_mute'] : $mute; // mute sound on autoplay - disabled by default
504
- $instance['norel'] = (empty($norel)) ? $defaults['norel'] : $norel; // hide related videos
505
-
506
- // Content Layout
507
- $instance['showtitle'] = (empty($showtitle)) ? $defaults['showtitle'] : $showtitle; // show video title, disabled by default
508
- $instance['showvidesc'] = (empty($showdesc)) ? $defaults['showvidesc'] : $showdesc; // show video description, disabled by default
509
- $instance['videsclen'] = (empty($desclen)) ? $defaults['videsclen'] : $desclen; // cut video description, number of characters
510
- $instance['hideinfo'] = (empty($noinfo)) ? $defaults['hideinfo'] : $noinfo; // hide info by default
511
- $instance['hideanno'] = (empty($noanno)) ? $defaults['hideanno'] : $noanno; // hide annotations, false by default
512
-
513
- // Link to Channel
514
- $instance['showgoto'] = (empty($goto)) ? $defaults['showgoto'] : $goto; // show goto link, disabled by default
515
- $instance['goto_txt'] = (empty($goto_txt)) ? $defaults['goto_txt'] : $goto_txt; // text for goto link - use settings
516
- $instance['popup_goto'] = (empty($popup)) ? $defaults['popup_goto'] : $popup; // open channel in: 0 same window, 1 javascript new, 2 target new
517
- $instance['userchan'] = (empty($userchan)) ? $defaults['userchan'] : $userchan; // link to user channel instaled page
518
-
519
- // return implode(self::print_ytc($instance));
520
- return implode(array_values(self::print_ytc($instance)));
521
- }
522
 
523
- // print out widget
524
- public static function print_ytc($instance)
525
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
 
527
- // set default channel if nothing predefined
528
- $channel = $instance['channel'];
529
- if ( $channel == "" ) $channel = YTCUID;
 
 
 
 
 
 
530
 
531
- // set playlist id
532
- $playlist = $instance['playlist'];
533
- if ( $playlist == "" ) $playlist = YTCPLID;
534
 
535
- // trim PL in front of playlist ID
536
- $playlist = preg_replace('/^PL/', '', $playlist);
537
- $use_res = $instance['use_res'];
 
 
 
 
 
 
 
 
 
 
538
 
539
- $output = array();
540
 
541
- $output[] = '<div class="youtube_channel">';
542
 
543
- if ( $instance['only_pl'] && $use_res == 2 ) { // print standard playlist
544
- $output = array_merge($output, ytc_only_pl($instance));
545
- } else { // channel or playlist single videos
546
-
547
- // get max items for random video
548
- $maxrnd = $instance['maxrnd'];
549
- if ( $maxrnd < 1 ) { $maxrnd = 10; } // default 10
550
- elseif ( $maxrnd > 50 ) { $maxrnd = 50; } // max 50
551
 
552
- $feed_attr = '?alt=json';
553
- // select fields
554
- $feed_attr .= "&fields=entry(published,title,link,content)";
555
 
556
- if ( !$instance['fixnoitem'] && $use_res != 1 )
557
- $feed_attr .= '&orderby=published';
558
-
559
- $getrnd = $instance['getrnd'];
560
- if ( $getrnd ) $feed_attr .= '&max-results='.$maxrnd;
561
 
562
- $feed_attr .= '&rel=0';
563
- switch ($use_res) {
564
- case 1: // favorites
565
- $feed_url = 'http://gdata.youtube.com/feeds/base/users/'.$channel.'/favorites'.$feed_attr;
566
- break;
567
- case 2: // playlist
568
- $playlist = ytc_clean_playlist_id($playlist);
569
- $feed_url = 'http://gdata.youtube.com/feeds/api/playlists/'.$playlist.$feed_attr;
570
- break;
571
- default:
572
- $feed_url = 'http://gdata.youtube.com/feeds/base/users/'.$channel.'/uploads'.$feed_attr;
 
 
573
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
574
 
575
- // do we need cache?
576
- if ($instance['cache_time'] > 0 ) {
577
- // generate feed cache key for caching time
578
- $cache_key = 'ytc_'.md5($feed_url).'_'.$instance['cache_time'];
579
 
580
- if (!empty($_GET['ytc_force_recache']))
581
- delete_transient($cache_key);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
582
 
583
- // get/set transient cache
584
- if ( false === ($json = get_transient($cache_key)) ) {
585
- // no cached JSON, get new
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
  $wprga = array(
587
  'timeout' => 2 // two seconds only
588
  );
589
  $response = wp_remote_get($feed_url, $wprga);
590
  $json = wp_remote_retrieve_body( $response );
591
-
592
- // $json = file_get_contents($feed_url,0,null,null);
593
- // set decoded JSON to transient cache_key
594
- set_transient($cache_key, base64_encode($json), $instance['cache_time']);
595
- } else {
596
- // we already have cached feed JSON, get it encoded
597
- $json = base64_decode($json);
598
  }
599
- } else {
600
- // just get fresh feed if cache disabled
601
- // $json = file_get_contents($feed_url,0,null,null);
602
- $wprga = array(
603
- 'timeout' => 2 // two seconds only
604
- );
605
- $response = wp_remote_get($feed_url, $wprga);
606
- $json = wp_remote_retrieve_body( $response );
607
- }
608
 
609
- // decode JSON data
610
- $json_output = json_decode($json);
611
 
612
- // predefine maxitems to prevent undefined notices
613
- $maxitems = 0;
614
- if ( !is_wp_error($json_output) && is_object($json_output) ) {
615
- // sort by date uploaded
616
- $json_entry = $json_output->feed->entry;
617
 
618
- /* AU:20140216 for what we need this at all, when feed already have orderby=published */
619
- // do we need sort when use playlist?
620
- // if ( $use_res != 2 ) usort($json_entry, "ytc_json_sort_by_date");
621
-
622
- $vidqty = $instance['vidqty'];
623
- if ( $vidqty > $maxrnd ) { $maxrnd = $vidqty; }
624
- $maxitems = ( $maxrnd > sizeof($json_entry) ) ? sizeof($json_entry) : $maxrnd;
625
 
626
- if ( $getrnd ) {
627
- $items = array_slice($json_entry,0,$maxitems);
628
- } else {
629
- if ( !$vidqty ) $vidqty = 1;
630
- $items = array_slice($json_entry,0,$vidqty);
 
631
  }
632
- }
633
 
634
- if ($maxitems == 0) {
635
- // $output[] = __( 'No items' , YTCTDOM );
636
- $output[] = __("No items", YTCTDOM).' [<a href="'.$feed_url.'" target="_blank">'.__("Check here why",YTCTDOM).'</a>]';
637
- } else {
638
 
639
- if ( $getrnd ) $rnd_used = array(); // set array for unique random item
640
 
641
- for ($y = 1; $y <= $vidqty; $y++) {
642
- if ( $getrnd ) {
643
- $rnd_item = mt_rand(0, (count($items)-1));
644
- while ( $y > 1 && in_array($rnd_item, $rnd_used) ) {
645
  $rnd_item = mt_rand(0, (count($items)-1));
 
 
 
 
 
 
 
646
  }
647
- $rnd_used[] = $rnd_item;
648
- $item = $items[$rnd_item];
649
- } else {
650
- $item = $items[$y-1];
651
  }
652
-
653
- // print single video block
654
- $output = array_merge( $output, ytc_print_video($item, $instance, $y) );
655
  }
 
 
 
 
 
656
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
657
  }
658
- } // single playlist or ytc way
659
 
660
- $output = array_merge( $output, ytc_channel_link($instance) ); // insert link to channel on bootom of widget
661
 
662
- $output[] = '</div><!-- .youtube_channel -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
663
 
664
- return $output;
665
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
 
667
- // TODO: make shortcode
668
- public function widget($args, $instance) {
669
- // outputs the content of the widget
670
- extract( $args );
671
 
672
- $title = apply_filters('widget_title', $instance['title']);
673
- $output = array();
674
- $output[] = $before_widget;
675
- if ( $title ) $output[] = $before_title . $title . $after_title;
676
- $output[] = implode(self::print_ytc($instance));
677
- $output[] = $after_widget;
678
 
679
- echo implode('',array_values($output));
680
- }
 
 
681
 
682
- } // class WPAU_YOUTUBE_CHANNEL()
 
 
 
 
 
 
 
683
 
684
- if( class_exists('WPAU_YOUTUBE_CHANNEL'))
685
- {
686
- // Installation and uninstallation hooks
687
- register_activation_hook(__FILE__, array('WPAU_YOUTUBE_CHANNEL', 'activate'));
688
-
689
- /* Load plugin's textdomain */
690
- add_action( 'init', 'youtube_channel_init' ); /*TODO: move inside class*/
691
- function youtube_channel_init() {
692
- load_plugin_textdomain( YTCTDOM, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
693
- }
694
-
695
- /* Load YTC player script */
696
- function ytc_enqueue_scripts() {
697
- wp_enqueue_style( 'youtube-channel', plugins_url('assets/css/youtube-channel.min.css', __FILE__), array(), YTCVER );
698
-
699
- // enqueue magnific-popup
700
- wp_enqueue_script( 'magnific-popup', plugins_url('assets/lib/magnific-popup/jquery.magnific-popup.min.js', __FILE__), array('jquery'), YTCVER, true );
701
- wp_enqueue_style( 'magnific-popup', plugins_url('assets/lib/magnific-popup/magnific-popup.min.css', __FILE__), array(), YTCVER );
702
- wp_enqueue_script( 'youtube-channel', plugins_url('assets/js/youtube-channel.min.js', __FILE__), array(), YTCVER, true );
703
- }
704
- add_action( 'wp_enqueue_scripts', 'ytc_enqueue_scripts' );
705
-
706
- function ytc_footer_js() {
707
- // Print JS only if we have set YTC array
708
- if ( !empty($_SESSION['ytc_html5_js']) )
709
- {
710
- ?>
711
- <!-- YouTube Channel v<?php echo YTCVER; ?> -->
712
- <script type="text/javascript">
713
- var tag = document.createElement('script');
714
- tag.src = "https://www.youtube.com/iframe_api";
715
- var firstScriptTag = document.getElementsByTagName('script')[0];
716
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
717
- function onYouTubeIframeAPIReady() {
718
- <?php echo $_SESSION['ytc_html5_js']; ?>
719
- }
720
- function ytc_mute(event){
721
- event.target.mute();
722
- }
723
- </script>
724
- <?php
725
- }
726
- }
727
- add_action( 'wp_footer', 'ytc_footer_js' );
728
- }
729
 
730
- /* function to print standard playlist embed code */
731
- function ytc_only_pl($instance) {
 
 
 
732
  $width = $instance['width'];
733
  if ( empty($width) )
734
- $width = 220;
735
 
736
- $playlist = (empty($instance['playlist'])) ? YTCPLID : $instance['playlist'];
737
 
738
  $height = height_ratio($width, $instance['ratio']);
739
- // $height = height_ratio($width, $instance['height'], $instance['ratio']);
740
 
741
  $height += ($instance['fixyt']) ? 25 : 0;
742
 
743
- $playlist = ytc_clean_playlist_id($playlist);
744
 
745
  $autoplay = (empty($instance['autoplay'])) ? '' : '&autoplay=1';
746
 
747
  $rel = (empty($instance['norel'])) ? '' : '&rel=0';
748
 
749
  // enhanced privacy
750
- $yt_domain = yt_domain($instance);
751
  $output[] = '<div class="ytc_video_container ytc_video_1 ytc_video_single">
752
- <iframe src="http://'.$yt_domain.'/embed/videoseries?list=PL'.$playlist.$autoplay.$rel.'"
753
- width="'.$width.'" height="'.$height.'" frameborder="0"></iframe></div>';
754
- return $output;
755
- }
756
-
757
- /* function to print video in widget */
758
- function ytc_print_video($item, $instance, $y) {
759
-
760
- // get hideinfo, autoplay and controls settings
761
- // where this is used?
762
- $hideinfo = $instance['hideinfo'];
763
- $autoplay = $instance['autoplay'];
764
- $autoplay_mute = $instance['autoplay_mute'];
765
- $controls = $instance['controls'];
766
- $norel = $instance['norel'];
767
-
768
- // set width and height
769
- $width = ( empty($instance['width']) ) ? 220 : $instance['width'];
770
- $height = height_ratio($width, $instance['ratio']);
771
-
772
- // calculate image height based on width for 4:3 thumbnail
773
- $imgfixedheight = $width / 4 * 3;
774
-
775
- // which type to show
776
- $to_show = (empty($instance['to_show'])) ? 'object' : $instance['to_show'];
777
-
778
- // if not thumbnail, increase video height for 25px taken by video controls
779
- if ( $to_show != 'thumbnail' && !$controls && $instance['fixyt'] )
780
- $height += 25;
781
-
782
- $hideanno = $instance['hideanno'];
783
- $themelight = $instance['themelight'];
784
- /* end of video settings */
785
-
786
- $yt_id = $item->link[0]->href;
787
- $yt_id = preg_replace('/^.*=(.*)&.*$/', '${1}', $yt_id);
788
- $yt_url = "v/$yt_id";
789
-
790
- $yt_thumb = "http://img.youtube.com/vi/$yt_id/0.jpg"; // zero for HD thumb
791
- $yt_video = $item->link[0]->href;
792
- $yt_video = preg_replace('/\&.*$/','',$yt_video);
793
-
794
- $yt_title = $item->title->{'$t'};
795
- $yt_date = $item->published->{'$t'};
796
- //$yt_date = $item->get_date('j F Y | g:i a');
797
-
798
- switch ($y) {
799
- case 1:
800
- $vnumclass = 'first';
801
- break;
802
- case $instance['vidqty']:
803
- $autoplay = false;
804
- $vnumclass = 'last';
805
- break;
806
- default:
807
- $vnumclass = 'mid';
808
- $autoplay = false;
809
- break;
810
- }
811
-
812
- $output[] = '<div class="ytc_video_container ytc_video_'.$y.' ytc_video_'.$vnumclass.'">';
813
-
814
- // show video title?
815
- if ( $instance['showtitle'] )
816
- $output[] = '<h3 class="ytc_title">'.$yt_title.'</h3>';
817
-
818
- // define object ID
819
- $ytc_vid = 'ytc_' . $yt_id;
820
-
821
- // enhanced privacy
822
- $yt_domain = yt_domain($instance);
823
 
824
- // print out video
825
- if ( $to_show == "thumbnail" ) {
826
- // set proper class for responsive thumbs per selected aspect ratio
827
- switch ($instance['ratio'])
828
  {
829
- case 1: $arclass = 'ar4_3'; break;
830
- case 2: $arclass = 'ar16_10'; break;
831
- default: $arclass = 'ar16_9';
832
- }
833
- $title = sprintf( __( 'Watch video %1$s published on %2$s' , YTCTDOM ), $yt_title, $yt_date );
834
- $rel = ( $norel ) ? "0" : "1";
835
- $output[] = '<a href="'.$yt_video.'&rel='.$rel.'" title="'.$yt_title.'" class="ytc_thumb ytc-lightbox '.$arclass.'"><span style="background-image: url('.$yt_thumb.');" title="'.$title.'" id="'.$ytc_vid.'"></span></a>';
836
- } else if ( $to_show == "chromeless" ) {
837
- ob_start();
838
- ?>
839
- <object type="application/x-shockwave-flash" data="<?php echo YOUTUBE_CHANNEL_URL . 'chromeless.swf'; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" id="<?php echo $ytc_vid; ?>">
840
- <param name="flashVars" value="video_source=<?php echo $yt_id; ?>&video_width=<?php echo $width; ?>&video_height=<?php echo $height; ?><?php if ( $autoplay ) echo "&autoplay=Yes"; if ( !$controls ) echo "&youtube_controls=Yes"; if ( $hideanno ) echo "&iv_load_policy=3"; if ( $themelight ) echo "&theme=light"; if ( $norel ) echo "&rel=0"; ?>" />
841
- <param name="quality" value="high" />
842
- <param name="wmode" value="opaque" />
843
- <param name="swfversion" value="6.0.65.0" />
844
- <param name="movie" value="<?php echo YOUTUBE_CHANNEL_URL . 'chromeless.swf'; ?>" />
845
- </object>
846
- <?php
847
- $output[] = ob_get_contents();
848
- ob_end_clean();
849
- } else if ( $to_show == "iframe" ) {
850
- if ( empty($usepl) ) $yt_url = $yt_id;
851
-
852
- $output[] = '<iframe title="YouTube video player" width="'.$width.'" height="'.$height.'" src="//'.$yt_domain.'/embed/'.$yt_url.'?wmode=opaque'; //&enablejsapi=1';
853
- if ( $controls ) $output[] = "&amp;controls=0";
854
- if ( $hideinfo ) $output[] = "&amp;showinfo=0";
855
- if ( $autoplay ) $output[] = "&amp;autoplay=1";
856
- if ( $hideanno ) $output[] = "&amp;iv_load_policy=3";
857
- if ( $themelight ) $output[] = "&amp;theme=light";
858
- // disable related videos
859
- if ( $norel ) $output[] = "&amp;rel=0";
860
-
861
- $output[] = '" style="border: 0;" allowfullscreen id="'.$ytc_vid.'"></iframe>';
862
- } else if ( $to_show == "iframe2" ) {
863
- // youtube API async
864
- if ( empty($usepl) ) $yt_url = $yt_id;
865
-
866
- $js_rel = ( $norel ) ? "rel: 0," : '';
867
- $js_controls = ( $controls ) ? "controls: 0," : '';
868
- $js_showinfo = ( $hideinfo ) ? "showinfo: 0," : '';
869
- $js_iv_load_policy = ( $hideanno ) ? "iv_load_policy: 3," : '';
870
- $js_theme = ( $themelight ) ? "theme: 'light'," : '';
871
- $js_autoplay = ( $autoplay ) ? "autoplay: 1," : '';
872
- $js_autoplay_mute = ( $autoplay && $autoplay_mute ) ? "events: {'onReady': ytc_mute}" : '';
873
- $js_player_id = str_replace('-', '_', $yt_url);
874
-
875
- $output[] = '<div id="ytc_player_'.$js_player_id.'"></div>';
876
- $site_domain = $_SERVER['HTTP_HOST'];
877
- $ytc_html5_js = <<<JS
878
- var ytc_player_$js_player_id;
879
- ytc_player_$js_player_id = new YT.Player('ytc_player_$js_player_id', {
880
- height: '$height',
881
- width: '$width',
882
- videoId: '$yt_url',
883
- enablejsapi: 1,
884
- playerVars: {
885
- $js_autoplay $js_showinfo $js_controls $js_theme $js_rel wmmode: 'opaque'
886
- },
887
- origin: '$site_domain',
888
- $js_iv_load_policy $js_autoplay_mute
889
- });
890
- JS;
891
-
892
- // prepare JS for footer
893
- if ( empty($_SESSION['ytc_html5_js']) )
894
- $_SESSION['ytc_html5_js'] = $ytc_html5_js;
895
- else
896
- $_SESSION['ytc_html5_js'] .= $ytc_html5_js;
897
-
898
- } else { // default is object
899
- $obj_url = '//'.$yt_domain.'/'.$yt_url.'?version=3';
900
- $obj_url .= ( $controls ) ? '&amp;controls=0' : '';
901
- $obj_url .= ( $hideinfo ) ? '&amp;showinfo=0' : '';
902
- $obj_url .= ( $autoplay ) ? '&amp;autoplay=1' : '';
903
- $obj_url .= ( $hideanno ) ? '&amp;iv_load_policy=3' : '';
904
- $obj_url .= ( $themelight ) ? '&amp;theme=light' : '';
905
- $obj_url .= ( $norel ) ? '&amp;rel=0' : '';
906
- ob_start();
907
- ?>
908
- <object width="<?php echo $width; ?>" height="<?php echo $height; ?>" type="application/x-shockwave-flash" data="<?php echo $obj_url; ?>">
909
- <param name="movie" value="<?php echo $obj_url; ?>" />
910
- <param name="allowFullScreen" value="true" />
911
- <param name="allowscriptaccess" value="always" />
912
- <param name="quality" value="high" />
913
- <param name="wmode" value="opaque" />
914
- <embed src="<?php echo $obj_url; ?>" type="application/x-shockwave-flash" width="<?php echo $width; ?>" height="<?php echo $height; ?>" allowscriptaccess="always" allowfullscreen="true" />
915
- </object>
916
-
917
- <?php
918
- $output[] = ob_get_contents();
919
- ob_end_clean();
920
- }
921
-
922
- // do we need to show video description?
923
- if ( $instance['showvidesc'] ) {
924
-
925
- preg_match('/><span>(.*)<\/span><\/div>/', $item->content->{'$t'}, $videsc);
926
- if ( empty($videsc[1]) ) {
927
- $videsc[1] = $item->content->{'$t'};
928
- }
929
-
930
- // clean HTML
931
- $nohtml = explode("</div>",$videsc[1]);
932
- if ( sizeof($nohtml) > 1 ) {
933
- $videsc[1] = strip_tags($nohtml[2]);
934
- unset($nohtml);
935
- } else {
936
- $videsc[1] = strip_tags($videsc[1]);
937
- }
938
 
939
- if ( $instance['videsclen'] > 0 ) {
940
- if ( strlen($videsc[1]) > $instance['videsclen'] ) {
941
- $video_description = substr($videsc[1], 0, $instance['videsclen']);
942
- if ( $instance['descappend'] ) {
943
- $etcetera = $instance['descappend'];
944
- } else {
945
- $etcetera = '&hellip;';
946
- }
947
  }
948
- } else {
949
- $video_description = $videsc[1];
950
- $etcetera = '';
951
- }
952
- if (!empty($video_description))
953
- $output[] = '<p class="ytc_description">' .$video_description.$etcetera. '</p>';
954
- }
955
- $output[] = '</div><!-- .ytc_video_container -->';
 
 
 
 
 
 
 
 
 
956
 
957
- return $output;
958
- }
959
 
960
- // function to calculate height by width and ratio
961
- function height_ratio($width=220, $ratio) {
962
- switch ($ratio)
963
- {
964
- case 1:
965
- $height = round(($width / 4 ) * 3);
966
- break;
967
- case 2:
968
- $height = round(($width / 16 ) * 10);
969
- break;
970
- case 3:
971
- default:
972
- $height = round(($width / 16 ) * 9);
973
- }
974
- return $height;
975
- }
976
-
977
- // function to insert link to channel
978
- function ytc_channel_link($instance) {
979
- // initialize array
980
- $output = array();
981
- // do we need to show goto link?
982
- if ( $instance['showgoto'] ) {
983
- $channel = $instance['channel'];
984
- if ( !$channel )
985
- $channel = 'urkekg';
986
- $goto_txt = $instance['goto_txt'];
987
- if ( $goto_txt == "" )
988
- $goto_txt = sprintf( __( 'Visit channel %1$s' , YTCTDOM ), $channel );
989
- else
990
- $goto_txt = str_replace('%channel%', $channel, $goto_txt);
991
-
992
- $output[] = '<div class="ytc_link">';
993
- $userchan = ( $instance['userchan'] ) ? 'channel' : 'user';
994
- $goto_url = 'http://www.youtube.com/'.$userchan.'/'.$channel.'/';
995
- $newtab = __("in new window/tab", "youtube-channel");
996
- $output[] = '<p>';
997
- switch ( $instance['popup_goto'] ) {
998
- case 1:
999
- $output[] = '<a href="javascript: window.open(\''.$goto_url.'\'); void 0;" title="'.$goto_txt.' '.$newtab.'">'.$goto_txt.'</a>';
1000
- break;
1001
- case 2:
1002
- $output[] = '<a href="'.$goto_url.'" target="_blank" title="'.$goto_txt.' '.$newtab.'">'.$goto_txt.'</a>';
1003
- break;
1004
- default:
1005
- $output[] = '<a href="'.$goto_url.'" title="'.$goto_txt.'">'.$goto_txt.'</a>';
1006
- } // switch popup_goto
1007
- $output[] = '</p>';
1008
- $output[] = '</div>';
1009
-
1010
- } // showgoto
1011
-
1012
- return $output;
1013
- }
1014
-
1015
- function ytc_clean_playlist_id($playlist) {
1016
- if ( substr($playlist,0,4) == "http" ) {
1017
- // if URL provided, extract playlist ID
1018
- $playlist = preg_replace('/.*list=PL([A-Za-z0-9\-\_]*).*/','$1', $playlist);
1019
- } else if ( substr($playlist,0,2) == 'PL' ) {
1020
- $playlist = substr($playlist,2);
1021
- }
1022
- return $playlist;
1023
- }
1024
-
1025
- /* Register plugin's widget */
1026
- function youtube_channel_register_widget() {
1027
- register_widget( 'WPAU_YOUTUBE_CHANNEL' );
1028
- }
1029
- add_action( 'widgets_init', 'youtube_channel_register_widget' );
1030
-
1031
- function au_ytc_dbg($arr) {
1032
- $out = '';
1033
- foreach ( $arr as $key => $val ) {
1034
- if ( empty($val) ) { $val = 'null'; }
1035
- $out .= $key . ': ' . $val . chr(13);
1036
- }
1037
- return $out;
1038
- }
1039
- // do we still need this?
1040
- function ytc_json_sort_by_date($a, $b) {
1041
- $ap = $a->published;
1042
- $bp = $b->published;
1043
- return strnatcmp($bp, $ap);
1044
- }
1045
- function yt_domain($instance) {
1046
- $yt_domain = ( !empty($instance['enhprivacy']) ) ? 'www.youtube-nocookie.com' : 'www.youtube.com';
1047
- return $yt_domain;
1048
- }
4
  Plugin URI: http://urosevic.net/wordpress/plugins/youtube-channel/
5
  Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
6
  Author: Aleksandar Urošević
7
+ Version: 2.4.0
8
  Author URI: http://urosevic.net/
9
  */
10
+ // @TODO make FitViedo optional
 
 
 
 
 
11
 
12
+ // Exit if accessed directly
13
+ if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
+ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
16
+ {
17
+ class WPAU_YOUTUBE_CHANNEL
18
+ {
19
 
20
+ public $plugin_version = "2.4.0";
21
+ public $plugin_name = "YouTube Channel";
22
+ public $plugin_slug = "youtube-channel";
23
+ public $plugin_option = "youtube_channel_defaults";
24
+ public $channel_id = "urkekg";
25
+ public $playlist_id = "PLEC850BE962234400";
26
+ public $plugin_url;
27
 
28
+ function __construct()
29
+ {
30
+ $this->plugin_url = plugin_dir_url(__FILE__);
31
+ load_plugin_textdomain( $this->plugin_slug, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
32
 
33
+ // Installation and uninstallation hooks
34
+ register_activation_hook(__FILE__, array($this, 'activate'));
 
 
35
 
36
+ // Initialize Plugin Settings Magic
37
+ if ( is_admin() )
38
+ add_action('init', array($this, 'settings_init'), 900);
39
 
40
+ // Load widget definition
41
+ require_once('inc/widget.php');
42
 
43
+ // Add youtube_channel shortcode
44
+ add_shortcode( 'youtube_channel', array($this, 'shortcode') );
45
+ add_shortcode( 'ytc', array($this, 'shortcode') );
46
 
47
+ // Update YTC version in database on request
48
+ if ( !empty($_GET['ytc_dismiss_update_notice']) )
49
+ update_option( 'ytc_version', $this->plugin_version );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
+ // add dashboard notice if version changed
52
+ $version = get_option('ytc_version','0');
53
+ if ( version_compare($version, $this->plugin_version, "<") )
54
+ add_action( 'admin_notices', array($this, 'admin_notices') );
55
 
56
+ add_action( 'wp_enqueue_scripts', array($this, 'enqueue_scripts') );
57
+ add_action( 'wp_footer', array($this, 'footer_scripts') );
58
 
59
+ } // end __construct
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
+ function settings_init()
62
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
+ // Load Redux Framework
65
+ if ( class_exists( "ReduxFramework" ) )
66
+ {
67
+ // Add Settings link on Plugins page if Redux is installed
68
+ add_filter('plugin_action_links_'.plugin_basename(__FILE__), array($this, 'add_settings_link') );
 
 
 
 
69
 
70
+ // Load Settings Page configuration
71
+ if ( file_exists(dirname(__FILE__).'/inc/config.php') ){
72
+ require_once( dirname( __FILE__ ) . '/inc/config.php' );
73
  }
74
+ } else {
75
+ // Add admin notice for Redux Framework
76
+ add_action( 'admin_notices', array($this,'admin_notice_redux') );
77
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
+ } // settings_init()
80
 
81
+ function admin_notices()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  {
83
+ $previous_version = get_option('ytc_version','0');
84
+
85
+ $settings_page = "options-general.php?page=youtube-channel";
86
+ $msg = "";
87
+ switch ($previous_version)
88
  {
89
+ case "0":
90
+ $msg = sprintf(__('Please review <a href="%s">global settings</a>, YTC widgets and shortcodes.', 'youtube-channel'), $settings_page);
 
 
 
91
  break;
92
+ case "2.2.2":
93
+ $msg = sprintf(__('If you use caching for any YTC widget or shortcode, please <strong>ReCache</strong> feeds in <strong>Tools</strong> section of <a href="%s">plugin settings</a> page.', 'youtube-channel'), $settings_page);
94
  break;
95
+ case "2.2.3":
96
+ $msg = sprintf(__('We switched to <em>Redux Framework</em> so please review global plugin <a href="%s">settings page</a>.', 'youtube-channel'), $settings_page);
97
  break;
98
  }
99
+ if ( !empty($msg) )
100
+ printf(
101
+ '<div class="update-nag"><p><strong>%s</strong> ' . __("updated to version", 'youtube-channel') . ' <strong>%s</strong>. '.$msg.'&nbsp;&nbsp;<a href="?ytc_dismiss_update_notice=1" class="button button-secondary">' . __("I did this already, dismiss notice!", 'youtube-channel') . '</a></p></div>',
102
+ $this->plugin_name,
103
+ $this->plugin_version);
104
+ } // end admin_notices
105
+
106
+ function admin_notice_redux()
107
+ {
108
+ echo '<div class="error"><p>'.sprintf(__("To configure global <strong>%s</strong> options, you need to install and activate <strong>%s</strong>.", 'youtube-channel'), $this->plugin_name, "Redux Framework Plugin") . '</p></div>';
109
+ } // admin_notice()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
 
111
+ function add_settings_link($links)
112
+ {
113
+ $settings_link = '<a href="options-general.php?page='.$this->plugin_slug.'">'.__('Settings').'</a>';
114
+ array_unshift( $links, $settings_link );
115
+ return $links;
116
+ } // add_settings_link()
117
 
118
+ public function defaults()
119
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
+ $init = array(
122
+ 'channel' => $this->channel_id,
123
+ 'playlist' => $this->playlist_id,
124
+ 'use_res' => false,
125
+ 'only_pl' => false,
126
+ 'cache_time' => 300, // 5 minutes
127
+ 'maxrnd' => 25,
128
+ 'vidqty' => 1,
129
+ 'enhprivacy' => false,
130
+ 'fixnoitem' => false,
131
+ 'getrnd' => false,
132
+ 'ratio' => 3, // 3 - 16:9, 2 - 16:10, 1 - 4:3
133
+ 'width' => 306,
134
+ 'to_show' => 'thumbnail', // thumbnail, iframe, iframe2, chromeless, object
135
+ 'themelight' => false,
136
+ 'controls' => false,
137
+ 'fixyt' => false,
138
+ 'autoplay' => false,
139
+ 'autoplay_mute' => false,
140
+ 'norel' => false,
141
+
142
+ 'showtitle' => false,
143
+ 'showvidesc' => false,
144
+ 'videsclen' => 0,
145
+ 'descappend' => '&hellip;',
146
+ 'hideanno' => false,
147
+ 'hideinfo' => false,
148
+
149
+ 'goto_txt' => 'Visit our channel',
150
+ 'showgoto' => false,
151
+ 'popup_goto' => 3, // 3 same window, 2 new window JS, 1 new window target
152
+ 'userchan' => false
153
+ );
154
+ $defaults = get_option($this->plugin_option, $init);
155
+
156
+ // $options = wp_parse_args(get_option('youtube_channel_defaults'), $defaults);
157
+ // return $options;
158
+ return $defaults;
159
+ }
160
 
161
+ /**
162
+ * Activate the plugin
163
+ */
164
+ public static function activate()
165
+ {
166
+ // Transit old settings to new format
167
+ // get pre-2.0.0 YTC widgets, and if exist, convert to 2.0.0+ version
168
+ if ( $old = get_option('widget_youtube_channel_widget') ) {
169
+ // if we have pre-2.0.0 YTC widgets, merge them to new version
170
+
171
+ // get new YTC widgets
172
+ $new = get_option('widget_youtube-channel');
173
+
174
+ // get all widget areas
175
+ $widget_areas = get_option('sidebars_widgets');
176
+
177
+ // update options to 2.0.0+ version
178
+ foreach ($old as $k=>$v) {
179
+
180
+ if ( $k !== "_multiwidget" ){
181
+ // option for resource
182
+ $v['use_res'] = 0;
183
+ if ( $v['usepl'] == "on" ) {
184
+ $v['use_res'] = 2;
185
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
 
187
+ $v['popup_goto'] = 0;
188
+ if ( $v['popupgoto'] == "on" ) {
189
+ $v['popup_goto'] = 1;
190
+ } else if ($v['target'] == "on") {
191
+ $v['popup_goto'] = 2;
192
+ }
193
+ unset($v['usepl'], $v['popupgoto'], $v['target']);
194
+
195
+ $v['cache_time'] = 0;
196
+ $v['userchan'] = 0;
197
+ $v['enhprivacy'] = 0;
198
+ $v['autoplay_mute'] = 0;
199
+
200
+ // add old YTC widget to new set
201
+ // but append at the end if YTC widget with same ID already exist
202
+ // in new set (created in version 2.0.0)
203
+ if ( is_array($new[$k]) ) {
204
+ // populate at the end
205
+ array_push($new, $v);
206
+ $ytc_widget_id = "youtube-channel-".end(array_keys($new));
207
+ } else {
208
+ // set as current widget ID
209
+ $new[$k] = $v;
210
+ $ytc_widget_id = "youtube-channel-$k";
211
+ }
212
 
213
+ $ytc_widget_added = 0;
214
+ foreach ( $widget_areas as $wak => $wav ) {
215
+ // check if here we have this widget
216
+ if ( is_array($wav) && in_array($ytc_widget_id,$wav) )
217
+ $ytc_widget_added++;
218
+ }
219
+ // if YTC widget has not present in any widget area, add it to inactive widgets ;)
220
+ if ( $ytc_widget_added == 0 )
221
+ array_push($widget_areas['wp_inactive_widgets'], $ytc_widget_id);
222
 
223
+ }
224
+ // add to inactive widgets if don't belong to any widget area
 
225
 
226
+ } // foreach widget option
227
+
228
+ // update widget areas set
229
+ update_option('sidebars_widgets',$widget_areas);
230
+
231
+ // update new YTC widgets
232
+ update_option('widget_youtube-channel',$new);
233
+
234
+ // remove old YTC widgets entry
235
+ delete_option('widget_youtube_channel_widget');
236
+
237
+ // clear temporary vars
238
+ unset ($old,$new);
239
 
240
+ } // if we have old YTC widgets
241
 
242
+ } // end function activate
243
 
244
+ function enqueue_scripts() {
245
+ wp_enqueue_style( 'youtube-channel', plugins_url('assets/css/youtube-channel.min.css', __FILE__), array(), $this->plugin_version );
 
 
 
 
 
 
246
 
247
+ // enqueue fitVid
248
+ wp_enqueue_script( 'fitvid', plugins_url('assets/js/jquery.fitvids.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
 
249
 
250
+ // enqueue magnific-popup
251
+ wp_enqueue_script( 'magnific-popup', plugins_url('assets/lib/magnific-popup/jquery.magnific-popup.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
252
+ wp_enqueue_style( 'magnific-popup', plugins_url('assets/lib/magnific-popup/magnific-popup.min.css', __FILE__), array(), $this->plugin_version );
253
+ wp_enqueue_script( 'youtube-channel', plugins_url('assets/js/youtube-channel.min.js', __FILE__), array(), $this->plugin_version, true );
254
+ } // end function enqueue_scripts
255
 
256
+ function footer_scripts() {
257
+ // Print JS only if we have set YTC array
258
+ if ( !empty($_SESSION['ytc_html5_js']) )
259
+ {
260
+ ?>
261
+ <!-- YouTube Channel v<?php echo $this->plugin_version; ?> -->
262
+ <script type="text/javascript">
263
+ var tag = document.createElement('script');
264
+ tag.src = "https://www.youtube.com/iframe_api";
265
+ var firstScriptTag = document.getElementsByTagName('script')[0];
266
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
267
+ function onYouTubeIframeAPIReady() {
268
+ <?php echo $_SESSION['ytc_html5_js']; ?>
269
  }
270
+ function ytc_mute(event){
271
+ event.target.mute();
272
+ }
273
+ </script>
274
+ <?php
275
+ }
276
+ ?>
277
+ <script>
278
+ jQuery(document).ready(function($){
279
+ $(window).on('load', function() { $(".ytc_video_container").fitVids(); });
280
+ });
281
+ </script>
282
+ <?php
283
+ } // end fucntion footer_scripts
284
+
285
+ public function shortcode($atts)
286
+ {
287
+ // get general default settings
288
+ $instance = $this->defaults();
289
+
290
+ // extract shortcode parameters
291
+ extract(
292
+ shortcode_atts(
293
+ array(
294
+ 'channel' => $instance['channel'],
295
+ 'playlist' => $instance['playlist'],
296
+ 'res' => $instance['use_res'],
297
+ 'only_pl' => $instance['only_pl'],
298
+ 'cache' => $instance['cache_time'],
299
+
300
+ 'fetch' => $instance['maxrnd'],
301
+ 'num' => $instance['vidqty'],
302
+
303
+ 'fix' => $instance['fixnoitem'],
304
+ 'random' => $instance['getrnd'],
305
+
306
+ 'ratio' => $instance['ratio'],
307
+ 'width' => $instance['width'],
308
+ 'show' => $instance['to_show'],
309
+
310
+ 'themelight' => $instance['themelight'],
311
+ 'controls' => $instance['controls'],
312
+ 'fix_h' => $instance['fixyt'],
313
+ 'autoplay' => $instance['autoplay'],
314
+ 'mute' => $instance['autoplay_mute'],
315
+ 'norel' => $instance['norel'],
316
+
317
+ 'showtitle' => $instance['showtitle'],
318
+ 'showdesc' => $instance['showvidesc'],
319
+ 'desclen' => $instance['videsclen'],
320
+ 'noinfo' => $instance['hideinfo'],
321
+ 'noanno' => $instance['hideanno'],
322
+
323
+ 'goto' => $instance['showgoto'],
324
+ 'goto_txt' => $instance['goto_txt'],
325
+ 'popup' => $instance['popup_goto'],
326
+ 'userchan' => $instance['userchan'],
327
+
328
+ 'class' => (!empty($instance['class'])) ? $instance['class'] : ''
329
+ ),
330
+ $atts
331
+ )
332
+ );
333
+
334
+ // prepare instance for output
335
+ $instance['channel'] = $channel;
336
+ $instance['playlist'] = $playlist;
337
+ $instance['use_res'] = $res; // resource: 0 channel, 1 favorites, 2 playlist
338
+ $instance['only_pl'] = $only_pl; // use embedded playlist - false by default
339
+ $instance['cache_time'] = $cache; // in seconds, def 5min - settings?
340
+
341
+ $instance['maxrnd'] = $fetch;
342
+ $instance['vidqty'] = $num; // num: 1
343
+
344
+ $instance['fixnoitem'] = $fix; // fix noitem
345
+ $instance['getrnd'] = $random; // use embedded playlist - false by default
346
+
347
+ // Video Settings
348
+ $instance['ratio'] = $ratio; // aspect ratio: 3 - 16:9, 2 - 16:10, 1 - 4:3
349
+ $instance['width'] = $width; // 306
350
+ $instance['to_show'] = $show; // thumbnail, iframe, iframe2, object, chromeless
351
+
352
+ $instance['themelight'] = $themelight; // use light theme, dark by default
353
+ $instance['controls'] = $controls; // hide controls, false by default
354
+ $instance['fixyt'] = $fix_h; // fix youtube height, disabled by default
355
+ $instance['autoplay'] = $autoplay; // autoplay disabled by default
356
+ $instance['autoplay_mute'] = $mute; // mute sound on autoplay - disabled by default
357
+ $instance['norel'] = $norel; // hide related videos
358
+
359
+ // Content Layout
360
+ $instance['showtitle'] = $showtitle; // show video title, disabled by default
361
+ $instance['showvidesc'] = $showdesc; // show video description, disabled by default
362
+ $instance['videsclen'] = $desclen; // cut video description, number of characters
363
+ $instance['hideinfo'] = $noinfo; // hide info by default
364
+ $instance['hideanno'] = $noanno; // hide annotations, false by default
365
+
366
+ // Link to Channel
367
+ $instance['showgoto'] = $goto; // show goto link, disabled by default
368
+ $instance['goto_txt'] = $goto_txt; // text for goto link - use settings
369
+ $instance['popup_goto'] = $popup; // open channel in: 0 same window, 1 javascript new, 2 target new
370
+ $instance['userchan'] = $userchan; // link to user channel instaled page
371
+
372
+ // Customization
373
+ $instance['class'] = $class; // custom additional class for container
374
+
375
+ return implode(array_values($this->output($instance)));
376
+ }
377
+
378
+ // print out widget
379
+ public function output($instance)
380
+ {
381
+
382
+ // set default channel if nothing predefined
383
+ $channel = $instance['channel'];
384
+ if ( $channel == "" ) $channel = $this->channel_id;
385
+
386
+ // set playlist id
387
+ $playlist = $instance['playlist'];
388
+ if ( $playlist == "" ) $playlist = $this->playlist_id;
389
+
390
+ // trim PL in front of playlist ID
391
+ $playlist = preg_replace('/^PL/', '', $playlist);
392
+ $use_res = $instance['use_res'];
393
+
394
+ $class = $instance['class'] ? $instance['class'] : 'default';
395
+
396
+ $output = array();
397
 
398
+ $output[] = '<div class="youtube_channel '.$class.'">';
 
 
 
399
 
400
+ if ( $instance['only_pl'] && $use_res == 2 ) { // print standard playlist
401
+ $output = array_merge($output, ytc_only_pl($instance));
402
+ } else { // channel or playlist single videos
403
+
404
+ // get max items for random video
405
+ $maxrnd = $instance['maxrnd'];
406
+ if ( $maxrnd < 1 ) { $maxrnd = 10; } // default 10
407
+ elseif ( $maxrnd > 50 ) { $maxrnd = 50; } // max 50
408
+
409
+ $feed_attr = '?alt=json';
410
+ // select fields
411
+ $feed_attr .= "&fields=entry(published,title,link,content)";
412
+
413
+ if ( !$instance['fixnoitem'] && $use_res != 1 )
414
+ $feed_attr .= '&orderby=published';
415
+
416
+ $getrnd = $instance['getrnd'];
417
+ if ( $getrnd ) $feed_attr .= '&max-results='.$maxrnd;
418
+
419
+ $feed_attr .= '&rel=0';
420
+ switch ($use_res) {
421
+ case 1: // favorites
422
+ $feed_url = 'http://gdata.youtube.com/feeds/base/users/'.$channel.'/favorites'.$feed_attr;
423
+ break;
424
+ case 2: // playlist
425
+ $playlist = $this->clean_playlist_id($playlist);
426
+ $feed_url = 'http://gdata.youtube.com/feeds/api/playlists/'.$playlist.$feed_attr;
427
+ break;
428
+ default:
429
+ $feed_url = 'http://gdata.youtube.com/feeds/base/users/'.$channel.'/uploads'.$feed_attr;
430
+ }
431
 
432
+ // do we need cache?
433
+ if ($instance['cache_time'] > 0 ) {
434
+ // generate feed cache key for caching time
435
+ $cache_key = 'ytc_'.md5($feed_url).'_'.$instance['cache_time'];
436
+
437
+ if (!empty($_GET['ytc_force_recache']))
438
+ delete_transient($cache_key);
439
+
440
+ // get/set transient cache
441
+ if ( false === ($json = get_transient($cache_key)) ) {
442
+ // no cached JSON, get new
443
+ $wprga = array(
444
+ 'timeout' => 2 // two seconds only
445
+ );
446
+ $response = wp_remote_get($feed_url, $wprga);
447
+ $json = wp_remote_retrieve_body( $response );
448
+
449
+ // set decoded JSON to transient cache_key
450
+ set_transient($cache_key, base64_encode($json), $instance['cache_time']);
451
+ } else {
452
+ // we already have cached feed JSON, get it encoded
453
+ $json = base64_decode($json);
454
+ }
455
+ } else {
456
+ // just get fresh feed if cache disabled
457
  $wprga = array(
458
  'timeout' => 2 // two seconds only
459
  );
460
  $response = wp_remote_get($feed_url, $wprga);
461
  $json = wp_remote_retrieve_body( $response );
 
 
 
 
 
 
 
462
  }
 
 
 
 
 
 
 
 
 
463
 
464
+ // decode JSON data
465
+ $json_output = json_decode($json);
466
 
467
+ // predefine maxitems to prevent undefined notices
468
+ $maxitems = 0;
469
+ if ( !is_wp_error($json_output) && is_object($json_output) && !empty($json_output->feed->entry) ) {
470
+ // sort by date uploaded
471
+ $json_entry = $json_output->feed->entry;
472
 
473
+ $vidqty = $instance['vidqty'];
474
+ if ( $vidqty > $maxrnd ) { $maxrnd = $vidqty; }
475
+ $maxitems = ( $maxrnd > sizeof($json_entry) ) ? sizeof($json_entry) : $maxrnd;
 
 
 
 
476
 
477
+ if ( $getrnd ) {
478
+ $items = array_slice($json_entry,0,$maxitems);
479
+ } else {
480
+ if ( !$vidqty ) $vidqty = 1;
481
+ $items = array_slice($json_entry,0,$vidqty);
482
+ }
483
  }
 
484
 
485
+ if ($maxitems == 0) {
486
+ $output[] = __("No items", $this->plugin_slug).' [<a href="'.$feed_url.'" target="_blank">'.__("Check here why",$this->plugin_slug).'</a>]';
487
+ } else {
 
488
 
489
+ if ( $getrnd ) $rnd_used = array(); // set array for unique random item
490
 
491
+ for ($y = 1; $y <= $vidqty; $y++) {
492
+ if ( $getrnd ) {
 
 
493
  $rnd_item = mt_rand(0, (count($items)-1));
494
+ while ( $y > 1 && in_array($rnd_item, $rnd_used) ) {
495
+ $rnd_item = mt_rand(0, (count($items)-1));
496
+ }
497
+ $rnd_used[] = $rnd_item;
498
+ $item = $items[$rnd_item];
499
+ } else {
500
+ $item = $items[$y-1];
501
  }
502
+
503
+ // print single video block
504
+ $output = array_merge( $output, $this->ytc_print_video($item, $instance, $y) );
 
505
  }
506
+
 
 
507
  }
508
+ } // single playlist or ytc way
509
+
510
+ $output = array_merge( $output, $this->ytc_channel_link($instance) ); // insert link to channel on bootom of widget
511
+
512
+ $output[] = '</div><!-- .youtube_channel -->';
513
 
514
+ return $output;
515
+ }
516
+
517
+ // --- HELPER FUNCTIONS ---
518
+
519
+ // function to calculate height by width and ratio
520
+ function height_ratio($width=306, $ratio) {
521
+ switch ($ratio)
522
+ {
523
+ case 1:
524
+ $height = round(($width / 4 ) * 3);
525
+ break;
526
+ case 2:
527
+ $height = round(($width / 16 ) * 10);
528
+ break;
529
+ case 3:
530
+ default:
531
+ $height = round(($width / 16 ) * 9);
532
+ }
533
+ return $height;
534
+ } // end function height_ratio
535
+
536
+ // function to insert link to channel
537
+ function ytc_channel_link($instance) {
538
+ // initialize array
539
+ $output = array();
540
+ // do we need to show goto link?
541
+ if ( $instance['showgoto'] ) {
542
+ $channel = $instance['channel'];
543
+ if ( !$channel )
544
+ $channel = 'urkekg';
545
+ $goto_txt = $instance['goto_txt'];
546
+ if ( $goto_txt == "" )
547
+ $goto_txt = sprintf( __('Visit channel %1$s', 'youtube-channel'), $channel );
548
+ else
549
+ $goto_txt = str_replace('%channel%', $channel, $goto_txt);
550
+
551
+ $output[] = '<div class="ytc_link">';
552
+ $userchan = ( $instance['userchan'] ) ? 'channel' : 'user';
553
+ $goto_url = 'http://www.youtube.com/'.$userchan.'/'.$channel.'/';
554
+ $newtab = __("in new window/tab", 'youtube-channel');
555
+ $output[] = '<p>';
556
+ switch ( $instance['popup_goto'] ) {
557
+ case 1:
558
+ $output[] = '<a href="javascript: window.open(\''.$goto_url.'\'); void 0;" title="'.$goto_txt.' '.$newtab.'">'.$goto_txt.'</a>';
559
+ break;
560
+ case 2:
561
+ $output[] = '<a href="'.$goto_url.'" target="_blank" title="'.$goto_txt.' '.$newtab.'">'.$goto_txt.'</a>';
562
+ break;
563
+ default:
564
+ $output[] = '<a href="'.$goto_url.'" title="'.$goto_txt.'">'.$goto_txt.'</a>';
565
+ } // switch popup_goto
566
+ $output[] = '</p>';
567
+ $output[] = '</div>';
568
+
569
+ } // showgoto
570
+
571
+ return $output;
572
+ } // end function ytc_channel_link
573
+
574
+ /* function to print video block */
575
+ function ytc_print_video($item, $instance, $y) {
576
+
577
+ // get hideinfo, autoplay and controls settings
578
+ // where this is used?
579
+ $hideinfo = $instance['hideinfo'];
580
+ $autoplay = $instance['autoplay'];
581
+ $autoplay_mute = $instance['autoplay_mute'];
582
+ $controls = $instance['controls'];
583
+ $norel = $instance['norel'];
584
+ $class = $instance['class'];
585
+
586
+ // set width and height
587
+ $width = ( empty($instance['width']) ) ? 306 : $instance['width'];
588
+ $height = $this->height_ratio($width, $instance['ratio']);
589
+
590
+ // calculate image height based on width for 4:3 thumbnail
591
+ $imgfixedheight = $width / 4 * 3;
592
+
593
+ // which type to show
594
+ $to_show = (empty($instance['to_show'])) ? 'object' : $instance['to_show'];
595
+
596
+ // if not thumbnail, increase video height for 25px taken by video controls
597
+ if ( $to_show != 'thumbnail' && !$controls && $instance['fixyt'] )
598
+ $height += 25;
599
+
600
+ $hideanno = $instance['hideanno'];
601
+ $themelight = $instance['themelight'];
602
+ /* end of video settings */
603
+
604
+ $yt_id = $item->link[0]->href;
605
+ $yt_id = preg_replace('/^.*=(.*)&.*$/', '${1}', $yt_id);
606
+ $yt_url = "v/$yt_id";
607
+
608
+ $yt_thumb = "http://img.youtube.com/vi/$yt_id/0.jpg"; // zero for HD thumb
609
+ $yt_video = $item->link[0]->href;
610
+ $yt_video = preg_replace('/\&.*$/','',$yt_video);
611
+
612
+ $yt_title = $item->title->{'$t'};
613
+ $yt_date = $item->published->{'$t'};
614
+ //$yt_date = $item->get_date('j F Y | g:i a');
615
+
616
+ switch ($y) {
617
+ case 1:
618
+ $vnumclass = 'first';
619
+ break;
620
+ case $instance['vidqty']:
621
+ $autoplay = false;
622
+ $vnumclass = 'last';
623
+ break;
624
+ default:
625
+ $vnumclass = 'mid';
626
+ $autoplay = false;
627
+ break;
628
  }
 
629
 
630
+ $output[] = '<div class="ytc_video_container ytc_video_'.$y.' ytc_video_'.$vnumclass.'" style="width:'.$width.'px">';
631
 
632
+ // show video title?
633
+ if ( $instance['showtitle'] )
634
+ $output[] = '<h3 class="ytc_title">'.$yt_title.'</h3>';
635
+
636
+ // define object ID
637
+ $ytc_vid = 'ytc_' . $yt_id;
638
+
639
+ // enhanced privacy
640
+ $youtube_domain = $this->youtube_domain($instance);
641
+
642
+ // print out video
643
+ if ( $to_show == "thumbnail" ) {
644
+ // set proper class for responsive thumbs per selected aspect ratio
645
+ switch ($instance['ratio'])
646
+ {
647
+ case 1: $arclass = 'ar4_3'; break;
648
+ case 2: $arclass = 'ar16_10'; break;
649
+ default: $arclass = 'ar16_9';
650
+ }
651
+ $title = sprintf( __('Watch video %1$s published on %2$s', 'youtube-channel' ), $yt_title, $yt_date );
652
+ $rel = ( $norel ) ? "0" : "1";
653
+ $output[] = '<a href="'.$yt_video.'&rel='.$rel.'" title="'.$yt_title.'" class="ytc_thumb ytc-lightbox '.$arclass.'"><span style="background-image: url('.$yt_thumb.');" title="'.$title.'" id="'.$ytc_vid.'"></span></a>';
654
+ } else if ( $to_show == "chromeless" ) {
655
+ ob_start();
656
+ ?>
657
+ <object type="application/x-shockwave-flash" data="<?php echo $this->plugin_url . 'chromeless.swf'; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" id="<?php echo $ytc_vid; ?>">
658
+ <param name="flashVars" value="video_source=<?php echo $yt_id; ?>&video_width=<?php echo $width; ?>&video_height=<?php echo $height; ?><?php if ( $autoplay ) echo "&autoplay=Yes"; if ( !$controls ) echo "&youtube_controls=Yes"; if ( $hideanno ) echo "&iv_load_policy=3"; if ( $themelight ) echo "&theme=light"; if ( $norel ) echo "&rel=0"; ?>" />
659
+ <param name="quality" value="high" />
660
+ <param name="wmode" value="opaque" />
661
+ <param name="swfversion" value="6.0.65.0" />
662
+ <param name="movie" value="<?php echo $this->plugin_url . 'chromeless.swf'; ?>" />
663
+ </object>
664
+ <?php
665
+ $output[] = ob_get_contents();
666
+ ob_end_clean();
667
+ } else if ( $to_show == "iframe" ) {
668
+ if ( empty($usepl) ) $yt_url = $yt_id;
669
+
670
+ $output[] = '<iframe title="YouTube video player" width="'.$width.'" height="'.$height.'" src="//'.$youtube_domain.'/embed/'.$yt_url.'?wmode=opaque'; //&enablejsapi=1';
671
+ if ( $controls ) $output[] = "&amp;controls=0";
672
+ if ( $hideinfo ) $output[] = "&amp;showinfo=0";
673
+ if ( $autoplay ) $output[] = "&amp;autoplay=1";
674
+ if ( $hideanno ) $output[] = "&amp;iv_load_policy=3";
675
+ if ( $themelight ) $output[] = "&amp;theme=light";
676
+ // disable related videos
677
+ if ( $norel ) $output[] = "&amp;rel=0";
678
+
679
+ $output[] = '" style="border: 0;" allowfullscreen id="'.$ytc_vid.'"></iframe>';
680
+ } else if ( $to_show == "iframe2" ) {
681
+ // youtube API async
682
+ if ( empty($usepl) ) $yt_url = $yt_id;
683
+
684
+ $js_rel = ( $norel ) ? "rel: 0," : '';
685
+ $js_controls = ( $controls ) ? "controls: 0," : '';
686
+ $js_showinfo = ( $hideinfo ) ? "showinfo: 0," : '';
687
+ $js_iv_load_policy = ( $hideanno ) ? "iv_load_policy: 3," : '';
688
+ $js_theme = ( $themelight ) ? "theme: 'light'," : '';
689
+ $js_autoplay = ( $autoplay ) ? "autoplay: 1," : '';
690
+ $js_autoplay_mute = ( $autoplay && $autoplay_mute ) ? "events: {'onReady': ytc_mute}" : '';
691
+ $js_player_id = str_replace('-', '_', $yt_url);
692
+
693
+ $output[] = '<div id="ytc_player_'.$js_player_id.'"></div>';
694
+ $site_domain = $_SERVER['HTTP_HOST'];
695
+ $ytc_html5_js = <<<JS
696
+ var ytc_player_$js_player_id;
697
+ ytc_player_$js_player_id = new YT.Player('ytc_player_$js_player_id', {
698
+ height: '$height',
699
+ width: '$width',
700
+ videoId: '$yt_url',
701
+ enablejsapi: 1,
702
+ playerVars: {
703
+ $js_autoplay $js_showinfo $js_controls $js_theme $js_rel wmmode: 'opaque'
704
+ },
705
+ origin: '$site_domain',
706
+ $js_iv_load_policy $js_autoplay_mute
707
+ });
708
+ JS;
709
 
710
+ // prepare JS for footer
711
+ if ( empty($_SESSION['ytc_html5_js']) )
712
+ $_SESSION['ytc_html5_js'] = $ytc_html5_js;
713
+ else
714
+ $_SESSION['ytc_html5_js'] .= $ytc_html5_js;
715
+
716
+ } else { // default is object
717
+ $obj_url = '//'.$youtube_domain.'/'.$yt_url.'?version=3';
718
+ $obj_url .= ( $controls ) ? '&amp;controls=0' : '';
719
+ $obj_url .= ( $hideinfo ) ? '&amp;showinfo=0' : '';
720
+ $obj_url .= ( $autoplay ) ? '&amp;autoplay=1' : '';
721
+ $obj_url .= ( $hideanno ) ? '&amp;iv_load_policy=3' : '';
722
+ $obj_url .= ( $themelight ) ? '&amp;theme=light' : '';
723
+ $obj_url .= ( $norel ) ? '&amp;rel=0' : '';
724
+ ob_start();
725
+ ?>
726
+ <object width="<?php echo $width; ?>" height="<?php echo $height; ?>" type="application/x-shockwave-flash" data="<?php echo $obj_url; ?>">
727
+ <param name="movie" value="<?php echo $obj_url; ?>" />
728
+ <param name="allowFullScreen" value="true" />
729
+ <param name="allowscriptaccess" value="always" />
730
+ <param name="quality" value="high" />
731
+ <param name="wmode" value="opaque" />
732
+ <embed src="<?php echo $obj_url; ?>" type="application/x-shockwave-flash" width="<?php echo $width; ?>" height="<?php echo $height; ?>" allowscriptaccess="always" allowfullscreen="true" />
733
+ </object>
734
 
735
+ <?php
736
+ $output[] = ob_get_contents();
737
+ ob_end_clean();
738
+ }
739
 
740
+ // do we need to show video description?
741
+ if ( $instance['showvidesc'] ) {
 
 
 
 
742
 
743
+ preg_match('/><span>(.*)<\/span><\/div>/', $item->content->{'$t'}, $videsc);
744
+ if ( empty($videsc[1]) ) {
745
+ $videsc[1] = $item->content->{'$t'};
746
+ }
747
 
748
+ // clean HTML
749
+ $nohtml = explode("</div>",$videsc[1]);
750
+ if ( sizeof($nohtml) > 1 ) {
751
+ $videsc[1] = strip_tags($nohtml[2]);
752
+ unset($nohtml);
753
+ } else {
754
+ $videsc[1] = strip_tags($videsc[1]);
755
+ }
756
 
757
+ if ( $instance['videsclen'] > 0 ) {
758
+ if ( strlen($videsc[1]) > $instance['videsclen'] ) {
759
+ $video_description = substr($videsc[1], 0, $instance['videsclen']);
760
+ if ( $instance['descappend'] ) {
761
+ $etcetera = $instance['descappend'];
762
+ } else {
763
+ $etcetera = '&hellip;';
764
+ }
765
+ }
766
+ } else {
767
+ $video_description = $videsc[1];
768
+ $etcetera = '';
769
+ }
770
+ if (!empty($video_description))
771
+ $output[] = '<p class="ytc_description">' .$video_description.$etcetera. '</p>';
772
+ }
773
+ $output[] = '</div><!-- .ytc_video_container -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
774
 
775
+ return $output;
776
+ } // end function ytc_print_video
777
+
778
+ /* function to print standard playlist embed code */
779
+ function ytc_only_pl($instance) {
780
  $width = $instance['width'];
781
  if ( empty($width) )
782
+ $width = 306;
783
 
784
+ $playlist = (empty($instance['playlist'])) ? $this->playlist_id : $instance['playlist'];
785
 
786
  $height = height_ratio($width, $instance['ratio']);
 
787
 
788
  $height += ($instance['fixyt']) ? 25 : 0;
789
 
790
+ $playlist = $this->clean_playlist_id($playlist);
791
 
792
  $autoplay = (empty($instance['autoplay'])) ? '' : '&autoplay=1';
793
 
794
  $rel = (empty($instance['norel'])) ? '' : '&rel=0';
795
 
796
  // enhanced privacy
797
+ $youtube_domain = $this->youtube_domain($instance);
798
  $output[] = '<div class="ytc_video_container ytc_video_1 ytc_video_single">
799
+ <iframe src="http://'.$youtube_domain.'/embed/videoseries?list=PL'.$playlist.$autoplay.$rel.'"
800
+ width="'.$width.'" height="'.$height.'" frameborder="0"></iframe></div>';
801
+ return $output;
802
+ } // end function ytc_only_pl
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
803
 
804
+ // Helper function cache_time()
805
+ function cache_time($cache_time)
 
 
806
  {
807
+ $times = array(
808
+ 'minute' => array(
809
+ 1 => __("1 minute", 'youtube-channel'),
810
+ 5 => __("5 minutes", 'youtube-channel'),
811
+ 15 => __("15 minutes", 'youtube-channel'),
812
+ 30 => __("30 minutes", 'youtube-channel')
813
+ ),
814
+ 'hour' => array(
815
+ 1 => __("1 hour", 'youtube-channel'),
816
+ 2 => __("2 hours", 'youtube-channel'),
817
+ 5 => __("5 hours", 'youtube-channel'),
818
+ 10 => __("10 hours", 'youtube-channel'),
819
+ 12 => __("12 hours", 'youtube-channel'),
820
+ 18 => __("18 hours", 'youtube-channel')
821
+ ),
822
+ 'day' => array(
823
+ 1 => __("1 day", 'youtube-channel'),
824
+ 2 => __("2 days", 'youtube-channel'),
825
+ 3 => __("3 days", 'youtube-channel'),
826
+ 4 => __("4 days", 'youtube-channel'),
827
+ 5 => __("5 days", 'youtube-channel'),
828
+ 6 => __("6 days", 'youtube-channel')
829
+ ),
830
+ 'week' => array(
831
+ 1 => __("1 week", 'youtube-channel'),
832
+ 2 => __("2 weeks", 'youtube-channel'),
833
+ 3 => __("3 weeks", 'youtube-channel'),
834
+ 4 => __("1 month", 'youtube-channel')
835
+ )
836
+ );
837
+
838
+ $out = "";
839
+ foreach ($times as $period => $timeset)
840
+ {
841
+ switch ($period)
842
+ {
843
+ case 'minute':
844
+ $sc = MINUTE_IN_SECONDS;
845
+ break;
846
+ case 'hour':
847
+ $sc = HOUR_IN_SECONDS;
848
+ break;
849
+ case 'day':
850
+ $sc = DAY_IN_SECONDS;
851
+ break;
852
+ case 'week':
853
+ $sc = WEEK_IN_SECONDS;
854
+ break;
855
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
856
 
857
+ foreach ($timeset as $n => $s)
858
+ {
859
+ $sec = $sc * $n;
860
+ $out .='<option value="'.$sec.'" '. selected( $cache_time, $sec, 0 ).'>'.__($s, $this->plugin_slug).'</option>';
861
+ unset($sec);
862
+ }
 
 
863
  }
864
+ return $out;
865
+ } // end function cache_time
866
+
867
+ function youtube_domain($instance) {
868
+ $youtube_domain = ( !empty($instance['enhprivacy']) ) ? 'www.youtube-nocookie.com' : 'www.youtube.com';
869
+ return $youtube_domain;
870
+ } // end function youtube_domain
871
+
872
+ function clean_playlist_id($playlist) {
873
+ if ( substr($playlist,0,4) == "http" ) {
874
+ // if URL provided, extract playlist ID
875
+ $playlist = preg_replace('/.*list=PL([A-Za-z0-9\-\_]*).*/','$1', $playlist);
876
+ } else if ( substr($playlist,0,2) == 'PL' ) {
877
+ $playlist = substr($playlist,2);
878
+ }
879
+ return $playlist;
880
+ } // end function clean_playlist_id
881
 
882
+ } // end class
883
+ } // end class check
884
 
885
+ global $WPAU_YOUTUBE_CHANNEL;
886
+ $WPAU_YOUTUBE_CHANNEL = new WPAU_YOUTUBE_CHANNEL();