Sync plugins from current page

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-09-11 19:08:46 +02:00
parent 85d41e4216
commit 8515ff9587
1847 changed files with 505469 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -0,0 +1 @@
<html><body><p><a href="http://wordpress.org/extend/plugins/wp-youtube-lyte/">WP-YouTube-Lyte</a> is a WordPress plugin that inserts "Lite YouTube Embeds" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href="http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/" title="performance tests comparing youtube embeds with lyte embeds">reducing download size & rendering time substantially</a>. The plugin can optionally use <a href="http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html">YouTube's new experimental HTML5 embed code</a>, meaning you can have an entirely flash-less YouTube experience on your blog.</p><p>Up to date info on WP-YouTube-Lyte <a href="http://blog.futtta.be/tag/lyte/" title="more about Lyte on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/tag/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>

View File

@@ -0,0 +1,89 @@
/*jslint browser: true */ /*global jQuery: true */
/**
* jQuery Cookie plugin
*
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
// TODO JsDoc
/**
* Create a cookie with the given key and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
* used when the cookie was set.
*
* @param String key The key of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
/**
* Get the value of a cookie with the given key.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String key The key of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function (key, value, options) {
// key and value given, set cookie...
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
options = jQuery.extend({}, options);
if (value === null) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
return (document.cookie = [
encodeURIComponent(key), '=',
options.raw ? String(value) : encodeURIComponent(String(value)),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// key and possibly options given, get cookie...
options = value || {};
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};

View File

@@ -0,0 +1 @@
jQuery.cookie=function(key,value,options){if(arguments.length>1&&(value===null||typeof value!=="object")){options=jQuery.extend({},options);if(value===null){options.expires=-1;}if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}return(document.cookie=[encodeURIComponent(key),'=',options.raw?String(value):encodeURIComponent(String(value)),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};

View File

@@ -0,0 +1,33 @@
/**
* Here's where everything gets included. You don't need
* to change anything here, and doing so might break
* stuff. Here be dragons and all that.
*/
/**
* Default variables
*
* While these can be set with JavaScript, it's probably
* better and faster to just set them here, compile to
* CSS and include that instead to use some of that
* hardware-accelerated goodness.
*/
.unslider-nav ol {
list-style: none;
text-align: center;
}
.unslider-nav ol li {
display: inline-block;
width: 6px;
height: 6px;
margin: 0 4px;
background: transparent;
border-radius: 5px;
overflow: hidden;
text-indent: -999em;
border: 2px solid #fff;
cursor: pointer;
}
.unslider-nav ol li.unslider-active {
background: #fff;
cursor: default;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.unslider{overflow:auto;margin:0;padding:0}.unslider-wrap{position:relative}.unslider-wrap.unslider-carousel>li{float:left}.unslider-vertical>ul{height:100%}.unslider-vertical li{float:none;width:100%}.unslider-fade{position:relative}.unslider-fade .unslider-wrap li{position:absolute;left:0;top:0;right:0;z-index:8}.unslider-fade .unslider-wrap li.unslider-active{z-index:10}.unslider li,.unslider ol,.unslider ul{list-style:none;margin:0;padding:0;border:none}.unslider-arrow{position:absolute;left:20px;z-index:2;cursor:pointer}.unslider-arrow.next{left:auto;right:20px}

View File

@@ -0,0 +1 @@
<html><body><p><a href="http://wordpress.org/extend/plugins/wp-youtube-lyte/">WP-YouTube-Lyte</a> is a WordPress plugin that inserts "Lite YouTube Embeds" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href="http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/" title="performance tests comparing youtube embeds with lyte embeds">reducing download size & rendering time substantially</a>. The plugin can optionally use <a href="http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html">YouTube's new experimental HTML5 embed code</a>, meaning you can have an entirely flash-less YouTube experience on your blog.</p><p>Up to date info on WP-YouTube-Lyte <a href="http://blog.futtta.be/tag/lyte/" title="more about Lyte on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/tag/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>

View File

@@ -0,0 +1 @@
<html><body><p><a href="http://wordpress.org/extend/plugins/wp-youtube-lyte/">WP-YouTube-Lyte</a> is a WordPress plugin that inserts "Lite YouTube Embeds" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href="http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/" title="performance tests comparing youtube embeds with lyte embeds">reducing download size & rendering time substantially</a>. The plugin can optionally use <a href="http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html">YouTube's new experimental HTML5 embed code</a>, meaning you can have an entirely flash-less YouTube experience on your blog.</p><p>Up to date info on WP-YouTube-Lyte <a href="http://blog.futtta.be/tag/lyte/" title="more about Lyte on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/tag/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>

View File

@@ -0,0 +1,203 @@
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-youtube-lyte\n"
"POT-Creation-Date: 2011-10-12 13:51:40+00:00\n"
"PO-Revision-Date: 2011-10-21 12:43+0100\n"
"Last-Translator: frank goossens <futtta@gmail.com>\n"
"Language-Team: frank goossens ('futtta') <futtta@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Catalan\n"
#: widget.php:74
msgid "Title:"
msgstr "Títol:"
#: widget.php:75
msgid "Size:"
msgstr "Tamany:"
#: widget.php:91
msgid "Type:"
msgstr "Tipus"
#: widget.php:99
msgid "audio"
msgstr ""
#: widget.php:100
msgid "video"
msgstr "vídeo"
#: widget.php:104
msgid "Youtube-URL:"
msgstr ""
#: widget.php:105
msgid "Text:"
msgstr "Texte:"
#: player_sizes.inc.php:11
msgid "Smaller 4:3 player"
msgstr ""
#: player_sizes.inc.php:16
msgid "Smaller 16:9 player"
msgstr ""
#: player_sizes.inc.php:21
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr ""
#: player_sizes.inc.php:26
msgid "YouTube default for 16:9-ratio video"
msgstr ""
#: player_sizes.inc.php:31
msgid "Larger 4:3 player"
msgstr ""
#: player_sizes.inc.php:36
msgid "Larger 16:9 player"
msgstr ""
#: player_sizes.inc.php:41
msgid "Maxi 4:3 player"
msgstr ""
#: player_sizes.inc.php:46
msgid "Maxi 16:9 player"
msgstr ""
#: wp-youtube-lyte.php:60
#: wp-youtube-lyte.php:64
msgid "Watch this playlist on YouTube"
msgstr "Mirar aquesta llista de reproducció a YouTube"
#: wp-youtube-lyte.php:65
msgid "Watch this playlist"
msgstr "Mirar aquesta llista de reproducció"
#: wp-youtube-lyte.php:65
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "on YouTube"
msgstr "a YouTube"
#: wp-youtube-lyte.php:73
msgid "Watch this video on YouTube"
msgstr "Veure aquest vídeo a YouTube"
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "Watch this video"
msgstr "Veure aquest vídeo"
#: wp-youtube-lyte.php:78
msgid "or on"
msgstr "o damunt"
#: options.php:37
msgid "WP YouTube Lyte Settings"
msgstr ""
#: options.php:39
msgid "WP YouTube Lyte inserts \"Lite YouTube Embeds\" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/\" target=\"_blank\">reducing download size & rendering time substantially</a>. When a video is played, WP-YouTube-Lyte can either activate <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank\">YouTube's embedded html5-player</a> or the older Flash-version, depending on the settings below."
msgstr ""
#: options.php:40
msgid "You can place video and audio in your posts and pages by adding one or more http<strong>v</strong> or http<strong>a</strong> YouTube-links to your post. These will automatically be replaced by WP YouTube Lyte with the correct (flash-less) code. To add a video for example, you type a URL like <em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or <em>http<strong>v</strong>://www.youtube.com/playlist?list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP YouTube Lyte FAQ page</a>."
msgstr ""
#: options.php:41
msgid "You can modify WP-YouTube-Lyte's behaviour by changing the following settings:"
msgstr ""
#: options.php:48
msgid "Player size"
msgstr ""
#: options.php:65
msgid "Add links below the embedded videos?"
msgstr ""
#: options.php:67
msgid "Show links?"
msgstr ""
#: options.php:68
msgid " Add YouTube-link."
msgstr ""
#: options.php:69
msgid " Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr ""
#: options.php:70
msgid " Don't add any links."
msgstr ""
#: options.php:75
msgid "Play video in HD if possible?"
msgstr ""
#: options.php:79
msgid "Enable HD"
msgstr ""
#: options.php:80
msgid "No HD, we're smallband!"
msgstr ""
#: options.php:85
msgid "Bonus feature: "
msgstr ""
#: options.php:89
msgid "Disable 3rd party tracking."
msgstr ""
#: options.php:90
msgid "I don't mind 3rd party tracking (default)"
msgstr ""
#: options.php:97
msgid "Save Changes"
msgstr "Guardar Canvis"
#: options.php:105
msgid "futtta about"
msgstr ""
#. #-#-#-#-# plugin.pot (WP YouTube Lyte 0.8.0) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: options.php:107
msgid "WP YouTube Lyte"
msgstr "WP YouTube Lyte"
#: options.php:108
msgid "WordPress"
msgstr ""
#: options.php:109
msgid "Web Technology"
msgstr ""
#. Plugin URI of the plugin/theme
msgid "http://blog.futtta.be/tag/lyte"
msgstr "http://blog.futtta.be/tag/lyte"
#. Description of the plugin/theme
msgid "Lite and accessible YouTube audio and video embedding."
msgstr "Vídeo i audio de YouTube lleuger i de fàcil accés."
#. Author of the plugin/theme
msgid "Frank Goossens (futtta)"
msgstr "Frank Goossens (futtta)"
#. Author URI of the plugin/theme
msgid "http://blog.futtta.be/"
msgstr "http://blog.futtta.be/"

View File

@@ -0,0 +1,304 @@
# Copyright (C) 2014 WP YouTube Lyte
# This file is distributed under the same license as the WP YouTube Lyte package.
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte 1.4.2\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-youtube-lyte\n"
"POT-Creation-Date: 2014-12-07 12:21:25+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2014-12-08 15:12+0100\n"
"Last-Translator: frank goossens (futtta) <futtta@gmail.com>\n"
"Language-Team: \n"
"X-Generator: Poedit 1.5.4\n"
"Language: German\n"
#: options.php:21
msgid "Your WP YouTube Lyte cache has been succesfully cleared."
msgstr "Ihr WP-YouTube-Lyte-Zwischenspeicher wurde erfolgreich geleert."
#: options.php:27
msgid "There was a problem, the WP YouTube Lyte cache could not be cleared."
msgstr ""
"Es gab ein Problem, der WP-YouTube-Lyte-Zwischenspeicher konnte nichtgeleert "
"werden."
#: options.php:71
msgid "WP YouTube Lyte Settings"
msgstr "WP-YouTube-Lyte-Einstellungen"
#: options.php:73
msgid ""
"WP YouTube Lyte inserts \"Lite YouTube Embeds\" in your blog. These look and "
"feel like normal embedded YouTube, but don't use Flash unless clicked on, "
"thereby <a href=\"http://blog.futtta.be/2012/04/03/speed-matters-re-"
"evaluating-wp-youtube-lytes-performance/\" target=\"_blank\">reducing "
"download size & rendering time substantially</a>. When a video is played, WP-"
"YouTube-Lyte can either activate <a href=\"http://apiblog.youtube."
"com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank"
"\">YouTube's embedded html5-player</a> or the older Flash-version, depending "
"on the settings below."
msgstr ""
"WP YouTube Lyte fügt \"Leichtes eingebettetes YouTube\" Ihrem Blog hinzu. "
"Dieses verhält sich wie normales eingebettetes YouTube, verwendet jedoch "
"kein Flash, bis es angeklickt wird, wodurch <a href=\"http://blog.futtta."
"be/2012/04/03/speed-matters-re-evaluating-wp-youtube-lytes-performance/\" "
"target=\"_blank\">Downloadgröße und Ladedauer wesentlich verringert werden</"
"a>. Wenn ein Video abgespielt wird, kann WP YouTube Lyte entweder <a href="
"\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" "
"target=\"_blank\">YouTubes eingebetteten HTML5-Player</a> oder die ältere "
"Flashversion aktivieren - je nach Einstellungen."
#: options.php:74
msgid ""
"You can place video and audio in your posts and pages by adding one or more "
"http<strong>v</strong> or http<strong>a</strong> YouTube-links to your post. "
"These will automatically be replaced by WP YouTube Lyte with the correct "
"(flash-less) code. To add a video for example, you type a URL like "
"<em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or "
"<em>http<strong>v</strong>://www.youtube.com/playlist?"
"list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only "
"player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?"
"v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/"
"extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP "
"YouTube Lyte FAQ page</a>."
msgstr ""
"Sie können Video und Audio in Ihre Artikel und Seiten einfügen, indem Sie "
"einen oder mehr http<strong>v</strong>- oder http<strong>a</strong>-YouTube-"
"Links im Text verwenden. Diese werden von WP YouTube Lyte automatisch mit "
"dem korrekten (flashlosen) Code ersetzt. Um zum Beispiel ein Video "
"hinzuzufügen, geben Sie einen URL wie <em>http<strong>v</strong>://www."
"youtube.com/watch?v=QQPSMRQnNlU</em> oder <em>http<strong>v</strong>://www."
"youtube.com/playlist?list=PLA486E741B25F8E00</em> für eine Wiedergabeliste "
"ein. Wenn Sie eine Wiedergabe ohne Bild bevorzugen, geben Sie "
"<em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em> ein. "
"Weitere Informationen erhalten Sie in den <a href=\"http://wordpress.org/"
"extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">FAQ auf wordpress."
"org</a>."
#: options.php:75
msgid ""
"You can modify WP-YouTube-Lyte's behaviour by changing the following "
"settings:"
msgstr ""
"Sie können das Verhalten von WP YouTube Lyte mittels folgender Einstellungen "
"anpassen:"
#: options.php:84
msgid "Player size"
msgstr "Wiedergabegröße"
#: options.php:103
msgid "Add links below the embedded videos?"
msgstr "Links unter den eingebetteten Videos hinzufügen?"
#: options.php:106
msgid "Show links?"
msgstr "Links zeigen?"
#: options.php:107
msgid " Add YouTube-link."
msgstr " YouTube-Link hinzufügen."
#: options.php:108
msgid ""
" Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/"
"index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr ""
" Sowohl einen YouTube- als auch einen <a href=\"http://icant.co.uk/easy-"
"youtube/docs/index.html\" target=\"_blank\">Easy-YouTube</a>-Link hinzufügen."
#: options.php:109
msgid " Don't add any links."
msgstr " Keine Links hinzufügen."
#: options.php:114
msgid "Player position:"
msgstr "Wiedergabeposition:"
#: options.php:117
msgid "Left, center or right?"
msgstr "Links, mittig oder rechts?"
#: options.php:118
msgid "Left"
msgstr "Links"
#: options.php:119
msgid "Center"
msgstr "Mittig"
#: options.php:124
msgid "Try to force HD (experimental)?"
msgstr "Versuchen HD zu erzwingen (experimentell)?"
#: options.php:127
msgid "HD or not?"
msgstr "HD oder nicht?"
#: options.php:128
msgid "Enable HD"
msgstr "HD aktivieren"
#: options.php:129
msgid "No HD (default)"
msgstr "Kein HD (Standard)"
#: options.php:134
msgid "Add microdata?"
msgstr "Mikrodaten hinzufügen?"
#: options.php:137
msgid "Add video microdata to the HTML?"
msgstr "Video-Mikrodaten zu HTML hinzufügen?"
#: options.php:138 options.php:148
msgid "Yes (default)"
msgstr "Ja (Standard)"
#: options.php:139
msgid "No microdata, thanks."
msgstr "Keine Mikrodaten, danke."
#: options.php:144 options.php:147
msgid "Also act on normal YouTube links?"
msgstr "Auch auf normale YouTube-Links reagieren?"
#: options.php:149
msgid "No thanks."
msgstr "Nein danke."
#: options.php:154
msgid "Empty WP YouTube Lyte's cache"
msgstr "Den Zwischenspeicher von WP YouTube Lyte leeren"
#: options.php:165
msgid "Save Changes"
msgstr "Änderungen speichern"
#: options.php:173
msgid "futtta about"
msgstr "futtta über"
#. #-#-#-#-# plugin.pot (WP YouTube Lyte 1.4.2) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: options.php:175
msgid "WP YouTube Lyte"
msgstr "WP YouTube Lyte"
#: options.php:176
msgid "WordPress"
msgstr "WordPress"
#: options.php:177
msgid "Web Technology"
msgstr "Webtechnik"
#: options.php:181
msgid "Do not donate for this plugin!"
msgstr "Nicht für dieses Plugin spenden!"
#: player_sizes.inc.php:11
msgid "Mini 16:9 player"
msgstr "Mini-16:9-Format"
#: player_sizes.inc.php:17
msgid "Smaller 4:3 player"
msgstr "Kleineres 4:3-Format"
#: player_sizes.inc.php:23
msgid "Smaller 16:9 player"
msgstr "Kleineres 16:9-Format"
#: player_sizes.inc.php:29
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr "Standardwert, YouTube-Standard für 4:3-Video"
#: player_sizes.inc.php:35
msgid "YouTube default for 16:9-ratio video"
msgstr "YouTube-Standard für 16:9-Video"
#: player_sizes.inc.php:41
msgid "Larger 4:3 player"
msgstr "Größeres 4:3-Format"
#: player_sizes.inc.php:47
msgid "Larger 16:9 player"
msgstr "Größeres 16:9-Format"
#: player_sizes.inc.php:53
msgid "Maxi 4:3 player"
msgstr "Maxi-4:3-Format"
#: player_sizes.inc.php:59
msgid "Maxi 16:9 player"
msgstr "Maxi-16:9-Format"
#: widget.php:130
msgid "Title:"
msgstr "Titel:"
#: widget.php:131
msgid "Size:"
msgstr "Größe:"
#: widget.php:150
msgid "Type:"
msgstr "Typ:"
#: widget.php:158
msgid "audio"
msgstr "Audio"
#: widget.php:159
msgid "video"
msgstr "Video"
#: widget.php:163
msgid "Youtube-URL:"
msgstr "YouTube-URL:"
#: widget.php:164
msgid "Text:"
msgstr "Text:"
#: wp-youtube-lyte.php:181
msgid "Watch this playlist on YouTube"
msgstr "Diese Wiedergabeliste auf YouTube ansehen"
#: wp-youtube-lyte.php:187
msgid "Watch this playlist"
msgstr "Diese Wiedergabeliste ansehen"
#: wp-youtube-lyte.php:187 wp-youtube-lyte.php:199 wp-youtube-lyte.php:203
msgid "on YouTube"
msgstr "auf YouTube"
#: wp-youtube-lyte.php:194
msgid "Watch this video on YouTube"
msgstr "Dieses Video auf YouTube ansehen"
#: wp-youtube-lyte.php:199 wp-youtube-lyte.php:203
msgid "Watch this video"
msgstr "Dieses Video ansehen"
#: wp-youtube-lyte.php:199
msgid "or on"
msgstr "oder auf"
#. Plugin URI of the plugin/theme
msgid "http://blog.futtta.be/wp-youtube-lyte/"
msgstr "http://blog.futtta.be/wp-youtube-lyte/"
#. Description of the plugin/theme
msgid "Lite and accessible YouTube audio and video embedding."
msgstr "Einfaches und zugängliches Einbinden von YouTube-Video und -Audio."
#. Author of the plugin/theme
msgid "Frank Goossens (futtta)"
msgstr "Frank Goossens (futtta)"
#. Author URI of the plugin/theme
msgid "http://blog.futtta.be/"
msgstr "http://blog.futtta.be/"

View File

@@ -0,0 +1,205 @@
# Copyright (C) 2010 WP YouTube Lyte
# This file is distributed under the same license as the WP YouTube Lyte package.
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte 0.8.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-youtube-lyte\n"
"POT-Creation-Date: 2011-10-12 13:51:40+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2011-11-08 07:09+0100\n"
"Last-Translator: frank goossens <futtta@gmail.com>\n"
"Language-Team: \n"
"X-Poedit-Language: Spanish\n"
#: widget.php:74
msgid "Title:"
msgstr "Título:"
#: widget.php:75
msgid "Size:"
msgstr "Tamaño:"
#: widget.php:91
msgid "Type:"
msgstr "Tipo:"
#: widget.php:99
msgid "audio"
msgstr "audio"
#: widget.php:100
msgid "video"
msgstr "video"
#: widget.php:104
msgid "Youtube-URL:"
msgstr "URL-de-YouTube:"
#: widget.php:105
msgid "Text:"
msgstr "Texto:"
#: player_sizes.inc.php:11
msgid "Smaller 4:3 player"
msgstr "Reproductor pequeño 4:3"
#: player_sizes.inc.php:16
msgid "Smaller 16:9 player"
msgstr "Reproductor pequeño 16:9"
#: player_sizes.inc.php:21
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr "Valor standard, por defecto video de YouTube son 4:3"
#: player_sizes.inc.php:26
msgid "YouTube default for 16:9-ratio video"
msgstr "Video de YouTube por defecto 16:9"
#: player_sizes.inc.php:31
msgid "Larger 4:3 player"
msgstr "Reproductor Grande 4:3"
#: player_sizes.inc.php:36
msgid "Larger 16:9 player"
msgstr "Reproductor Grande 16:9"
#: player_sizes.inc.php:41
msgid "Maxi 4:3 player"
msgstr "Reproductor Maxi 4:3"
#: player_sizes.inc.php:46
msgid "Maxi 16:9 player"
msgstr "Reproductor Maxi 16:9"
#: wp-youtube-lyte.php:60
#: wp-youtube-lyte.php:64
msgid "Watch this playlist on YouTube"
msgstr "Mire esta lista de reproducción en Youtube"
#: wp-youtube-lyte.php:65
msgid "Watch this playlist"
msgstr "Mire esta lista de reproducción"
#: wp-youtube-lyte.php:65
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "on YouTube"
msgstr "en Youtube"
#: wp-youtube-lyte.php:73
msgid "Watch this video on YouTube"
msgstr "Mire este video en YouTube"
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "Watch this video"
msgstr "Mire este video"
#: wp-youtube-lyte.php:78
msgid "or on"
msgstr "o en"
#: options.php:37
msgid "WP YouTube Lyte Settings"
msgstr "Configuración de WP YouTube Lyte"
#: options.php:39
msgid "WP YouTube Lyte inserts \"Lite YouTube Embeds\" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/\" target=\"_blank\">reducing download size & rendering time substantially</a>. When a video is played, WP-YouTube-Lyte can either activate <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank\">YouTube's embedded html5-player</a> or the older Flash-version, depending on the settings below."
msgstr "WP YouTube Lyte inserta \"Lite YouTube Embeds\" en tu blog. Se ven y se sienten como video normales de YouTube insertados, pero no utilizan flash a menos que se haga clic, por lo tanto <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/\" target=\"_blank\"> achica el tamaño de la descarga y el tiempo de renderizado sustancialmente</ a>. Cuando se reproduce un video, WP-YouTube-Lyte puede activar <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank\">El reproductor html5 de YouTube insertado</a> o la versión de Flash más antigua, dependiendo de las opciones escogidas abajo."
#: options.php:40
msgid "You can place video and audio in your posts and pages by adding one or more http<strong>v</strong> or http<strong>a</strong> YouTube-links to your post. These will automatically be replaced by WP YouTube Lyte with the correct (flash-less) code. To add a video for example, you type a URL like <em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or <em>http<strong>v</strong>://www.youtube.com/playlist?list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP YouTube Lyte FAQ page</a>."
msgstr "Usted puede poner audio y video en sus entradas de blog y páginas agregando uno o más http<strong>v</strong> o http<strong>a</strong> enlaces de YouTube en su entrada de blog. Estos serán reemplazados automáticamente por WP YouTube Lyte con el código correcto (sin flash). Para añadir un vídeo, por ejemplo, escriba una dirección URL como <em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> o <em>http<strong>v</strong>://www.youtube.com/playlist?list=PLA486E741B25F8E00</em> para una lista de reproducción. Si quiere un reproductor sólo de audio, introduzca <em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em>. Hay más información sobre la <a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\"> página wordpress.org de WP YouTube Lyte FAQ </a >."
#: options.php:41
msgid "You can modify WP-YouTube-Lyte's behaviour by changing the following settings:"
msgstr "Usted puede modificar el comportamiento de WP-YouTube-Lyte cambiando las siguientes configuraciones:"
#: options.php:48
msgid "Player size"
msgstr "Tamaño del reproductor:"
#: options.php:65
msgid "Add links below the embedded videos?"
msgstr "¿Agregar enlaces abajo de los videos insertados?"
#: options.php:67
msgid "Show links?"
msgstr "¿Mostrar los enlaces?"
#: options.php:68
msgid " Add YouTube-link."
msgstr "Agregue enlace de YouTube"
#: options.php:69
msgid " Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr "Agregue ambos, enlace YouTube y un enlace de <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>."
#: options.php:70
msgid " Don't add any links."
msgstr "No agregue ningún enlace."
#: options.php:75
msgid "Play video in HD if possible?"
msgstr "Reproducir el video en calidad HD si es posible?"
#: options.php:79
msgid "Enable HD"
msgstr "Habilitar HD"
#: options.php:80
msgid "No HD, we're smallband!"
msgstr "No HD 'banda pequeña)!"
#: options.php:85
msgid "Bonus feature: "
msgstr "Funcionalidad extra:"
#: options.php:89
msgid "Disable 3rd party tracking."
msgstr "Deshabilitar el seguimiento (tracking) de otras aplicaciones."
#: options.php:90
msgid "I don't mind 3rd party tracking (default)"
msgstr "No me molesta seguimiento (tracking) de otras aplicaciones (por defecto)"
#: options.php:97
msgid "Save Changes"
msgstr "Guarde los cambios"
#: options.php:105
msgid "futtta about"
msgstr "futtta sobre"
#. #-#-#-#-# plugin.pot (WP YouTube Lyte 0.8.0) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: options.php:107
msgid "WP YouTube Lyte"
msgstr "WP YouTube Lyte"
#: options.php:108
msgid "WordPress"
msgstr "WordPress"
#: options.php:109
msgid "Web Technology"
msgstr "Tecnología de la Web"
#. Plugin URI of the plugin/theme
msgid "http://blog.futtta.be/tag/lyte"
msgstr "http://blog.futtta.be/tag/lyte"
#. Description of the plugin/theme
msgid "Lite and accessible YouTube audio and video embedding."
msgstr "Video y audio de Youtube en su blog con rápido y fácil acceso."
#. Author of the plugin/theme
msgid "Frank Goossens (futtta)"
msgstr "Frank Goossens (futtta)"
#. Author URI of the plugin/theme
msgid "http://blog.futtta.be/"
msgstr "http://blog.futtta.be/"

View File

@@ -0,0 +1,207 @@
# Copyright (C) 2010 WP YouTube Lyte
# This file is distributed under the same license as the WP YouTube Lyte package.
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte 0.8.0 In Hebrew\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-youtube-lyte\n"
"POT-Creation-Date: 2011-10-12 13:51:40+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2011-10-20 23:58+0200\n"
"Last-Translator: שגיב SEO <info@sagive.co.il>\n"
"Language-Team: Sagive SEO <info@sagive.co.il>\n"
"X-Poedit-Language: Hebrew\n"
"X-Poedit-Country: ISRAEL\n"
"X-Poedit-SourceCharset: utf-8\n"
#: widget.php:74
msgid "Title:"
msgstr "כותרת:"
#: widget.php:75
msgid "Size:"
msgstr "גודל:"
#: widget.php:91
msgid "Type:"
msgstr "סוג:"
#: widget.php:99
msgid "audio"
msgstr "אודיו"
#: widget.php:100
msgid "video"
msgstr "וידאו"
#: widget.php:104
msgid "Youtube-URL:"
msgstr "יוטיוב-URL:"
#: widget.php:105
msgid "Text:"
msgstr "טקסט\""
#: player_sizes.inc.php:11
msgid "Smaller 4:3 player"
msgstr "נגן 4:3 קטן"
#: player_sizes.inc.php:16
msgid "Smaller 16:9 player"
msgstr "נגן 16:9 קטן"
#: player_sizes.inc.php:21
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr "ערך סטנדרטי, נגן יוטיוב ברירת מחדל 4:3 יחס צפייה"
#: player_sizes.inc.php:26
msgid "YouTube default for 16:9-ratio video"
msgstr "נגן יוטיוב ברירת מחדל 16:9 יחס צפייה"
#: player_sizes.inc.php:31
msgid "Larger 4:3 player"
msgstr "נגן גדול 4:3"
#: player_sizes.inc.php:36
msgid "Larger 16:9 player"
msgstr "נגן גדול 16:9"
#: player_sizes.inc.php:41
msgid "Maxi 4:3 player"
msgstr "נגן מקסי 4:3"
#: player_sizes.inc.php:46
msgid "Maxi 16:9 player"
msgstr "נגן מקסי 16:9"
#: wp-youtube-lyte.php:60
#: wp-youtube-lyte.php:64
msgid "Watch this playlist on YouTube"
msgstr "צפה ברשימת השמעה זאת ביוטיוב"
#: wp-youtube-lyte.php:65
msgid "Watch this playlist"
msgstr "צפה ברשימת השמעה זאת"
#: wp-youtube-lyte.php:65
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "on YouTube"
msgstr "ביוטיוב"
#: wp-youtube-lyte.php:73
msgid "Watch this video on YouTube"
msgstr "צפה בסרטון זה ביוטיוב"
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "Watch this video"
msgstr "צפה בסרטון זה"
#: wp-youtube-lyte.php:78
msgid "or on"
msgstr "או ב-"
#: options.php:37
msgid "WP YouTube Lyte Settings"
msgstr "הגדרות WP YouTube Lyte"
#: options.php:39
msgid "WP YouTube Lyte inserts \"Lite YouTube Embeds\" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/\" target=\"_blank\">reducing download size & rendering time substantially</a>. When a video is played, WP-YouTube-Lyte can either activate <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank\">YouTube's embedded html5-player</a> or the older Flash-version, depending on the settings below."
msgstr "התוסף WP YouTube Lyte מכניס \"Lite YouTube Embeds\" בבלוג שלך. אלו מרגישים ומתנהגים כמו סרטוני יוטיוב רגילים אך לא משתמשים בפלאש אלא אם לחצתם על האפשרות, בצורה כזאת <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/\" target=\"_blank\">מקטינים את זמן ההורדה בצורה משמעותית</a>. כאשר הסרטון מתנגן, WP-YouTube-Lyte תפעיל את <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank\">הנגן HTML5 של יוטיוב</a> או את גרסת הפלאש הישנה בהתאם להגדרות למטה."
#: options.php:40
msgid "You can place video and audio in your posts and pages by adding one or more http<strong>v</strong> or http<strong>a</strong> YouTube-links to your post. These will automatically be replaced by WP YouTube Lyte with the correct (flash-less) code. To add a video for example, you type a URL like <em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or <em>http<strong>v</strong>://www.youtube.com/playlist?list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP YouTube Lyte FAQ page</a>."
msgstr "אתה יכול להטמיע סאונד וסרטונים על ידי הוספה בתוך הכתובת של הסרטון של http<strong>v</strong> או http<strong>a</strong> בפוסטים או בדפים שלך. אלה יוחלפו באופן אוטומטי על ידי WP YouTube Lyte עם הקוד הנכון. לדוגמה, כדי להוסיף סרטון אתה מדביק את הכתובת <em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> או <em>http<strong>v</strong>://www.youtube.com/playlist?list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP YouTube Lyte FAQ page</a>. שימו לב לתוספת של האות V."
#: options.php:41
msgid "You can modify WP-YouTube-Lyte's behaviour by changing the following settings:"
msgstr "אתה יכול לשנות את ההתנהגות של WP-YouTube-Lyte בעזרת ההגדרות הבאות:"
#: options.php:48
msgid "Player size"
msgstr "גודל נגן"
#: options.php:65
msgid "Add links below the embedded videos?"
msgstr "להוסיף קישורים מתחת לסרטון המוטמע?"
#: options.php:67
msgid "Show links?"
msgstr "להציג קישורים?"
#: options.php:68
msgid " Add YouTube-link."
msgstr "הוספת קישור יוטיוב"
#: options.php:69
msgid " Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr "הוסף קישור גם ליוטיוב וגם ל<a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>."
#: options.php:70
msgid " Don't add any links."
msgstr "אל תוסיף אף קישור."
#: options.php:75
msgid "Play video in HD if possible?"
msgstr "לנגן את הסרטון באיכות HD אם אפשר?"
#: options.php:79
msgid "Enable HD"
msgstr "הפעל HD"
#: options.php:80
msgid "No HD, we're smallband!"
msgstr "בלי HD, אין לנו רוחב פס!"
#: options.php:85
msgid "Bonus feature: "
msgstr "תכונת בונוס:"
#: options.php:89
msgid "Disable 3rd party tracking."
msgstr "כבה מעקב צד שלישי"
#: options.php:90
msgid "I don't mind 3rd party tracking (default)"
msgstr "לא מפריע לי מעקב צד שלישי (ברירת מחדל)"
#: options.php:97
msgid "Save Changes"
msgstr "שמור שינויים"
#: options.php:105
msgid "futtta about"
msgstr "אודות futta"
#. #-#-#-#-# plugin.pot (WP YouTube Lyte 0.8.0) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: options.php:107
msgid "WP YouTube Lyte"
msgstr "WP YouTube Lyte"
#: options.php:108
msgid "WordPress"
msgstr "וורדפרס"
#: options.php:109
msgid "Web Technology"
msgstr "טכנולוגיית רשת"
#. Plugin URI of the plugin/theme
msgid "http://blog.futtta.be/tag/lyte"
msgstr "http://blog.futtta.be/tag/lyte"
#. Description of the plugin/theme
msgid "Lite and accessible YouTube audio and video embedding."
msgstr "טכנולוגייה קלה משקל להטמעה של סרטוני יוטיוב"
#. Author of the plugin/theme
msgid "Frank Goossens (futtta)"
msgstr "Frank Goossens (futtta)"
#. Author URI of the plugin/theme
msgid "http://blog.futtta.be/"
msgstr "http://blog.futtta.be/"

View File

@@ -0,0 +1,202 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
# This file is distributed under the same license as the WP YouTube Lyte package.
#: widget.php:74
msgid "Title:"
msgstr "Titlu:"
#: widget.php:75
msgid "Size:"
msgstr "Dimensiune:"
#: widget.php:91
msgid "Type:"
msgstr "Tip:"
#: widget.php:99
msgid "audio"
msgstr "audio"
#: widget.php:100
msgid "video"
msgstr "video"
#: widget.php:104
msgid "Youtube-URL:"
msgstr "YouTube-URL:"
#: widget.php:105
msgid "Text:"
msgstr "Text:"
#: player_sizes.inc.php:11
msgid "Smaller 4:3 player"
msgstr "Mai mic player de 4: 3"
#: player_sizes.inc.php:16
msgid "Smaller 16:9 player"
msgstr "Mai mic 16:9 jucător"
#: player_sizes.inc.php:21
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr "Valoarea standard, YouTube implicit pentru 4: 3-raportul video"
#: player_sizes.inc.php:26
msgid "YouTube default for 16:9-ratio video"
msgstr "YouTube implicit pentru 16: 9-raportul video"
#: player_sizes.inc.php:31
msgid "Larger 4:3 player"
msgstr "Mai mare jucator 04:03"
#: player_sizes.inc.php:36
msgid "Larger 16:9 player"
msgstr "Mai mare jucător 16:9"
#: player_sizes.inc.php:41
msgid "Maxi 4:3 player"
msgstr "Player maxi 4: 3"
#: player_sizes.inc.php:46
msgid "Maxi 16:9 player"
msgstr "Player maxi 16: 9"
#: wp-youtube-lyte.php:60
#: wp-youtube-lyte.php:64
msgid "Watch this playlist on YouTube"
msgstr "Uita-te la acest playlist pe YouTube"
#: wp-youtube-lyte.php:65
msgid "Watch this playlist"
msgstr "Uita-te la această listă de redare"
#: wp-youtube-lyte.php:65
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "on YouTube"
msgstr "pe YouTube"
#: wp-youtube-lyte.php:73
msgid "Watch this video on YouTube"
msgstr "Uita-te la acest video de pe YouTube"
#: wp-youtube-lyte.php:78
#: wp-youtube-lyte.php:82
msgid "Watch this video"
msgstr "Uita-te la acest video"
#: wp-youtube-lyte.php:78
msgid "or on"
msgstr "sau pe"
#: options.php:37
msgid "WP YouTube Lyte Settings"
msgstr "WP YouTube Lyte Setări"
#: options.php:39
msgid "WP YouTube Lyte inserts \"Lite YouTube Embeds\" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/\" target=\"_blank\">reducing download size & rendering time substantially</a>. When a video is played, WP-YouTube-Lyte can either activate <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank\">YouTube's embedded html5-player</a> or the older Flash-version, depending on the settings below."
msgstr "WP YouTube introduce Lyte \"Lite YouTube Încorporează\" în blog. Aceste aspect si simt ca normală Embedded YouTube, dar nu folosi Flash excepţia cazului în care a făcut clic pe, astfel <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/\" target=\"_blank\"> reducerea dimensiunii de descărcare şi redare de timp în mod substanţial </a>. Când un film este jucat, WP-YouTube-Lyte poate activa fie <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html\" target=\"_blank\"> YouTube încorporat HTML5-player-ul </a> sau mai vechi Flash-versiune, în funcţie de setările de mai jos."
#: options.php:40
msgid "You can place video and audio in your posts and pages by adding one or more http<strong>v</strong> or http<strong>a</strong> YouTube-links to your post. These will automatically be replaced by WP YouTube Lyte with the correct (flash-less) code. To add a video for example, you type a URL like <em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or <em>http<strong>v</strong>://www.youtube.com/playlist?list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP YouTube Lyte FAQ page</a>."
msgstr "Puteţi pune video şi audio in mesajele dumneavoastră şi pagini prin adăugarea uneia sau mai multor http </strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or <em>http<strong>v</strong>://www.youtube.com/playlist?list=PLA486E741B25F8E00</em> YouTube-link-uri pentru a posta dvs.. Acestea vor fi înlocuite automat cu WP . YouTube Lyte cu corectă (flash-mai puţin) cod pentru a adauga un film de exemplu, tastaţi un URL ca <em>http<strong>a</strong>://www.youtube.com/watch?v=BIQIGR-kWtc</em> wordpress.org <a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP YouTube Lyte FAQ page</a>.\"WP YouTube lyte Întrebări frecvente pagina </ a>."
#: options.php:41
msgid "You can modify WP-YouTube-Lyte's behaviour by changing the following settings:"
msgstr "Puteţi modifica comportamentul WP-YouTube-Lyte prin schimbarea următoarele setări:"
#: options.php:48
msgid "Player size"
msgstr "Player size"
#: options.php:65
msgid "Add links below the embedded videos?"
msgstr "Adauga linkurile de mai jos clipurile video încorporate?"
#: options.php:67
msgid "Show links?"
msgstr "Afişare link-uri?"
#: options.php:68
msgid " Add YouTube-link."
msgstr "Adăugaţi YouTube-link."
#: options.php:69
msgid " Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr "Adăugaţi atât o pe YouTube şi un <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>-link."
#: options.php:70
msgid " Don't add any links."
msgstr "Nu adăuga orice link-uri."
#: options.php:75
msgid "Play video in HD if possible?"
msgstr "Redare video în format HD, dacă este posibil?"
#: options.php:79
msgid "Enable HD"
msgstr "Permite HD"
#: options.php:80
msgid "No HD, we're smallband!"
msgstr "Nu HD, suntem smallband!"
#: options.php:85
msgid "Bonus feature: "
msgstr "Caracteristica bonus: "
#: options.php:89
msgid "Disable 3rd party tracking."
msgstr "Dezactivaţi urmărirea 3rd party."
#: options.php:90
msgid "I don't mind 3rd party tracking (default)"
msgstr "Nu ma deranjeaza de urmărire 3rd party (implicit)"
#: options.php:97
msgid "Save Changes"
msgstr "Salvaţi Modificările"
#: options.php:105
msgid "futtta about"
msgstr "futtta despre"
#. #-#-#-#-# plugin.pot (WP YouTube Lyte 0.8.0) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: options.php:107
msgid "WP YouTube Lyte"
msgstr "WP YouTube Lyte"
#: options.php:108
msgid "WordPress"
msgstr "WordPress"
#: options.php:109
msgid "Web Technology"
msgstr "Web Tehnologie"
#. Plugin URI of the plugin/theme
msgid "http://blog.futtta.be/tag/lyte"
msgstr "http://blog.futtta.be/Tag/lyte"
#. Description of the plugin/theme
msgid "Lite and accessible YouTube audio and video embedding."
msgstr "Lite şi accesibile pe YouTube audio şi video de încorporare."
#. Author of the plugin/theme
msgid "Frank Goossens (futtta)"
msgstr "Frank Goossens (futtta)"
#. Author URI of the plugin/theme
msgid "http://blog.futtta.be/"
msgstr "http://blog.futtta.be/"

View File

@@ -0,0 +1,485 @@
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte v1.5.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-youtube-lyte\n"
"POT-Creation-Date: 2011-10-12 13:51:40+00:00\n"
"PO-Revision-Date: 2015-03-30 11:17:25+0200\n"
"Last-Translator: Mitja Mihelic <mitja@arnes.si>\n"
"Language-Team: ARNES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;\n"
"X-Generator: CSL v1.x\n"
"X-Poedit-Language: \n"
"X-Poedit-Country: \n"
"X-Poedit-SourceCharset: utf-8\n"
"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"
"X-Poedit-Basepath: \n"
"X-Poedit-Bookmarks: \n"
"X-Poedit-SearchPath-0: .\n"
"X-Textdomain-Support: yes"
#: widget.php:130
#@ wp-youtube-lyte
msgid "Title:"
msgstr "Naslov:"
#: widget.php:131
#@ wp-youtube-lyte
msgid "Size:"
msgstr "Velikost:"
#: widget.php:150
#@ wp-youtube-lyte
msgid "Type:"
msgstr "Tip:"
#: widget.php:158
#@ wp-youtube-lyte
msgid "audio"
msgstr "zvok"
#: widget.php:159
#@ wp-youtube-lyte
msgid "video"
msgstr "video"
#: widget.php:163
#@ wp-youtube-lyte
msgid "Youtube-URL:"
msgstr "YouTube URL:"
#: widget.php:164
#@ wp-youtube-lyte
msgid "Text:"
msgstr "Besedilo:"
#: player_sizes.inc.php:17
#@ wp-youtube-lyte
msgid "Smaller 4:3 player"
msgstr "Manjši predvajalnik: razmerje 4:3"
#: player_sizes.inc.php:23
#@ wp-youtube-lyte
msgid "Smaller 16:9 player"
msgstr "Manjši predvajalnik: razmerje 16:9"
#: player_sizes.inc.php:29
#@ wp-youtube-lyte
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr "Standardna velikost: YouTubova privzeta velikost za video v razmerju 4:3"
#: player_sizes.inc.php:35
#@ wp-youtube-lyte
msgid "YouTube default for 16:9-ratio video"
msgstr "YouTubova privzeta velikost za video v razmerju 16:9"
#: player_sizes.inc.php:41
#@ wp-youtube-lyte
msgid "Larger 4:3 player"
msgstr "Večji predvajalnik: razmerje 4:3"
#: player_sizes.inc.php:47
#@ wp-youtube-lyte
msgid "Larger 16:9 player"
msgstr "Večji predvajalnik: razmerje 16:9"
#: player_sizes.inc.php:53
#@ wp-youtube-lyte
msgid "Maxi 4:3 player"
msgstr "Maksi predvajalnik: razmerje 4:3"
#: player_sizes.inc.php:59
#@ wp-youtube-lyte
msgid "Maxi 16:9 player"
msgstr "Maksi predvajalnik: razmerje 16:9"
#: wp-youtube-lyte.php:186
#@ wp-youtube-lyte
msgid "Watch this playlist on YouTube"
msgstr "Oglej si seznam predvajanja na YouTube"
#: wp-youtube-lyte.php:192
#@ wp-youtube-lyte
msgid "Watch this playlist"
msgstr "Oglej si seznam predvajanja"
#: wp-youtube-lyte.php:192
#: wp-youtube-lyte.php:204
#: wp-youtube-lyte.php:208
#@ wp-youtube-lyte
msgid "on YouTube"
msgstr "na Youtube"
#: wp-youtube-lyte.php:199
#@ wp-youtube-lyte
msgid "Watch this video on YouTube"
msgstr "Oglej si posnetek na YouTube"
#: wp-youtube-lyte.php:204
#: wp-youtube-lyte.php:208
#@ wp-youtube-lyte
msgid "Watch this video"
msgstr "Oglej si posnetek"
#: wp-youtube-lyte.php:204
#@ wp-youtube-lyte
msgid "or on"
msgstr "ali na"
#: options.php:91
#@ wp-youtube-lyte
msgid "WP YouTube Lyte Settings"
msgstr "Nastavitve za WP YouTube Lyte"
#: options.php:136
#@ wp-youtube-lyte
msgid "Add links below the embedded videos?"
msgstr "Dodaj povezave pod vdelan video"
#: options.php:139
#@ wp-youtube-lyte
msgid "Show links?"
msgstr "Prikaži povezave?"
#: options.php:140
#@ wp-youtube-lyte
msgid " Add YouTube-link."
msgstr " Dodaj povezavo na YouTube"
#: options.php:141
#@ wp-youtube-lyte
msgid " Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr " Dodaj povezavo na YouTube in na <a href=\"http://icant.co.uk/easy-youtube/docs/index.html\" target=\"_blank\">Easy YouTube</a>"
#: options.php:142
#@ wp-youtube-lyte
msgid " Don't add any links."
msgstr " Ne dodaj povezav"
#: options.php:161
#@ wp-youtube-lyte
msgid "Enable HD"
msgstr "Omogoči HD (širokopasovna povezava)"
#: options.php:198
#@ wp-youtube-lyte
msgid "Save Changes"
msgstr "Shrani spremembe"
#: options.php:207
#@ wp-youtube-lyte
msgid "futtta about"
msgstr "futtta o"
#. translators: plugin header field 'Name'
#: options.php:209
#: wp-youtube-lyte.php:0
#@ wp-youtube-lyte
msgid "WP YouTube Lyte"
msgstr "WP Youtube Lyte"
#: options.php:210
#@ wp-youtube-lyte
msgid "WordPress"
msgstr "WordPress"
#: options.php:211
#@ wp-youtube-lyte
msgid "Web Technology"
msgstr "spletnih tehnologijah"
#. translators: plugin header field 'Description'
#: wp-youtube-lyte.php:0
#@ wp-youtube-lyte
msgid "Lite and accessible YouTube audio and video embedding."
msgstr "Preprosto vstavljanje posnetkov YouTube."
#. translators: plugin header field 'Author'
#: wp-youtube-lyte.php:0
#@ wp-youtube-lyte
msgid "Frank Goossens (futtta)"
msgstr "Frank Goossens (futtta)"
#. translators: plugin header field 'AuthorURI'
#: wp-youtube-lyte.php:0
#@ wp-youtube-lyte
msgid "http://blog.futtta.be/"
msgstr "http://blog.futta.be/"
#: options.php:21
#@ wp-youtube-lyte
msgid "Your WP YouTube Lyte cache has been succesfully cleared."
msgstr "Predpomnilnik YouTube Lyte je bil uspešno izpraznjen."
#: options.php:27
#@ wp-youtube-lyte
msgid "There was a problem, the WP YouTube Lyte cache could not be cleared."
msgstr "Napaka, predpomnilnika YouTube Lyte ni bilo mogoče izprazniti."
#: options.php:115
#: options.php:117
#@ wp-youtube-lyte
msgid "Player size"
msgstr "Velikost predvajalnika"
#: options.php:147
#@ wp-youtube-lyte
msgid "Player position:"
msgstr "Položaj predvajalnika"
#: options.php:151
#@ wp-youtube-lyte
msgid "Left"
msgstr "Levo"
#: options.php:152
#@ wp-youtube-lyte
msgid "Center"
msgstr "Sredinsko"
#: options.php:157
#@ wp-youtube-lyte
msgid "Try to force HD (experimental)?"
msgstr "Skušaj vsiliti HD (poskusno)"
#: options.php:162
#@ wp-youtube-lyte
msgid "No HD (default)"
msgstr "Brez HD (privzeto)"
#: options.php:167
#@ wp-youtube-lyte
msgid "Add microdata?"
msgstr "Dodaj mikropodatke"
#: options.php:171
#: options.php:181
#@ wp-youtube-lyte
msgid "Yes (default)"
msgstr "Da (privzeto)"
#: options.php:172
#@ wp-youtube-lyte
msgid "No microdata, thanks."
msgstr "Brez mikropodatkov"
#: options.php:187
#@ wp-youtube-lyte
msgid "Empty WP YouTube Lyte's cache"
msgstr "Izprazni predpomnilnik YouTube Lyte"
#: options.php:215
#@ wp-youtube-lyte
msgid "Do not donate for this plugin!"
msgstr "Brez donacij, prosim!"
#: player_sizes.inc.php:11
#@ wp-youtube-lyte
msgid "Mini 16:9 player"
msgstr "Mini predvajalnik: razmerje 16:9"
#. translators: plugin header field 'PluginURI'
#: wp-youtube-lyte.php:0
#@ wp-youtube-lyte
msgid "http://blog.futtta.be/wp-youtube-lyte/"
msgstr "http://blog.futtta.be/wp-youtube-lyte/"
#: options.php:150
#@ wp-youtube-lyte
msgid "Left, center or right?"
msgstr "Levo, sredinsko ali desno?"
#: options.php:160
#@ wp-youtube-lyte
msgid "HD or not?"
msgstr "HD ali ne?"
#: options.php:170
#@ wp-youtube-lyte
msgid "Add video microdata to the HTML?"
msgstr "Dodaj mikropodatke v HTML?"
#: options.php:177
#: options.php:180
#@ wp-youtube-lyte
msgid "Also act on normal YouTube links?"
msgstr "Deluj tudi za običajne YouTube povezave"
#: options.php:182
#@ wp-youtube-lyte
msgid "No thanks."
msgstr "Ne"
#. translators: plugin header field 'Version'
#: wp-youtube-lyte.php:0
#@ wp-youtube-lyte
msgid "1.5.0"
msgstr ""
#: options.php:140
#@ wp-youtube-lyte
msgid "Show YouTube-link"
msgstr "Prikaži YouTube povezavo"
#: options.php:142
#@ wp-youtube-lyte
msgid "Don't include links."
msgstr "Ne prikaži YouTube povezave"
#: options.php:161
#@ wp-youtube-lyte
msgid "Enable HD?"
msgstr "Omogoči predvajanje v HD"
#: options.php:162
#@ wp-youtube-lyte
msgid "Don't enable HD playback"
msgstr "Onemogoči predvajanje v HD"
#: options.php:171
#@ wp-youtube-lyte
msgid "Sure, add microdata!"
msgstr "Da, dodaj mikropodatke"
#: options.php:172
#@ wp-youtube-lyte
msgid "No microdata in my HTML please."
msgstr "Na spletišču ne želim mikropodatkov"
#: options.php:181
#@ wp-youtube-lyte
msgid "That would be great!"
msgstr "Da, deluj tudi za običajne YouTube povezave"
#: options.php:61
#@ wp-youtube-lyte
msgid "For WP YouTube Lyte to function optimally, you should enter an YouTube API key "
msgstr "Za najboljše delovanje vtičnika je priročljivo, da vpišete ključ za YoutTube API. "
#: options.php:63
#@ wp-youtube-lyte
msgid "in the settings screen."
msgstr " v nastavitvah."
#: options.php:76
#@ wp-youtube-lyte
msgid "WP YouTube Lyte got the following error back from the YouTube API: "
msgstr "YouTube API je vrnil naslednjo napako: "
#: options.php:104
#@ wp-youtube-lyte
msgid "Please enter your YouTube API key."
msgstr "Vpišete vaš ključ za YouTube API."
#: options.php:105
#@ wp-youtube-lyte
msgid "API key"
msgstr "API ključ"
#: options.php:105
#@ wp-youtube-lyte
msgid "Test Key"
msgstr "Preveri ključ"
#: options.php:107
#@ wp-youtube-lyte
msgid "WP YouTube Lyte uses YouTube's API to fetch information on each video. For your site to use that API, you will have to <a href=\"https://console.developers.google.com/project/\" target=\"_blank\">register your site as a new application</a>, enable the YouTube API for it and get a server key and fill it out here."
msgstr "Vtičnik prek YouTube APIja pridobi informacijo za vsak posnetek. Da bi na vašem spletišču lahko uporabili YouTube API, <a href=\"https://console.developers.google.com/project/\" target=\"_blank\">registrirajte vaš spletišče kot novo aplikacijo</a>, zanjo omogočite YouTube API, pridobite ključ in ga vpišite v zgornje polje."
#: options.php:110
#@ wp-youtube-lyte
msgid "Great, your YouTube API key has been taken care of!"
msgstr "Odlično! Vaš ključ za YouTube API je bil uspešno vpisan."
#: options.php:182
#@ wp-youtube-lyte
msgid "No, I'll stick to httpv or shortcodes."
msgstr "Ne, deluj le za httpv, httpa in kratke kode."
#: options.php:204
#@ wp-youtube-lyte
msgid "Happy with WP YouTube Lyte? Try my other plugins!"
msgstr "Vam je vtičnik WP YouTube Lyte všeč? Preizkusite še ostale moje vtičnike."
#: options.php:229
#@ wp-youtube-lyte
msgid "Checking your key ..."
msgstr "Preverjanje ključa ..."
#: options.php:243
#@ wp-youtube-lyte
msgid "That does not seem to be a correct API key!"
msgstr "Vnesli ste napačen API ključ!"
#: options.php:284
#@ wp-youtube-lyte
msgid "API seems OK, you can Save Changes below now."
msgstr "API ključ je veljaven. Zdaj lahko shranite nastavitve."
#: options.php:286
#@ wp-youtube-lyte
msgid "API key not OK, your key seems to "
msgstr "Napaka pri API ključu. "
#: options.php:289
#@ wp-youtube-lyte
msgid "be invalid."
msgstr "Vpisani ključ ni veljaven."
#: options.php:292
#@ wp-youtube-lyte
msgid "be valid, but restricted to an IP-address which is not your server's."
msgstr "Ključ je veljaven, a je omejen na naslov IP, ki pa ni vaš strežnik."
#: options.php:293
#@ wp-youtube-lyte
msgid "Try changing the allowed IP for your API key to include this one: "
msgstr "Poskusite spremeniti dovoljene naslove IP na naslednjega: "
#: options.php:297
#@ wp-youtube-lyte
msgid "have expired, please check in the Google Developer Console."
msgstr "Ključ je potekel. Preverite ga na Google Developer Console."
#: options.php:303
#@ wp-youtube-lyte
msgid "be correct, but seems to have exceeded the number of requests that can be made with it."
msgstr "Ključ je pravilen, a videti je, da je število zahtevkov, ki jih sme opraviti, preseženo."
#: options.php:306
#@ wp-youtube-lyte
msgid "probably work, but as the video with id "
msgstr "Ključ verjetno deluje. Žal posnetek z IDjem "
#: options.php:308
#@ wp-youtube-lyte
msgid " was not found we cannot be sure, please try again."
msgstr "ni bil najden, zato ga ni bilo mogoče preveriti. Poskusite ponovno."
#: options.php:311
#@ wp-youtube-lyte
msgid "be faulty, with YouTube API returning reason: "
msgstr "Ključ je napačen. YouTube API je vrnil napako: "
#: options.php:316
#@ wp-youtube-lyte
msgid "Something went wrong, WP YouTube Lyte might not have been able to retrieve information from the YouTube API, got error: "
msgstr "Prišlo je do napake. Vtičnik ni mogel pridobiti podatkov prek YouTube APIja. "
#: wp-youtube-lyte.php:586
#@ wp-youtube-lyte
msgid "Settings"
msgstr "Nastavitve"
#: options.php:98
#@ wp-youtube-lyte
msgid "Your YouTube API key:"
msgstr "Vaš ključ za YouTube API:"
#: options.php:141
#@ wp-youtube-lyte
msgid "Show YouTube and Easy YouTube link"
msgstr "Dodaj povezavo na YouTube in na Easy YouTube"

View File

@@ -0,0 +1,242 @@
# Copyright (C) 2010 WP YouTube Lyte
# This file is distributed under the same license as the WP YouTube Lyte package.
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte 0.8.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-youtube-lyte\n"
"POT-Creation-Date: 2011-10-12 13:51:40+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2014-11-26 09:17+0100\n"
"Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"X-Generator: Poedit 1.5.7\n"
#: widget.php:74
msgid "Title:"
msgstr "Naslov:"
#: widget.php:75
msgid "Size:"
msgstr "Veličina:"
#: widget.php:91
msgid "Type:"
msgstr "Vrsta:"
#: widget.php:99
msgid "audio"
msgstr "audio"
#: widget.php:100
msgid "video"
msgstr "video"
#: widget.php:104
msgid "Youtube-URL:"
msgstr "Youtube-URL:"
#: widget.php:105
msgid "Text:"
msgstr "Tekst:"
#: player_sizes.inc.php:11
msgid "Smaller 4:3 player"
msgstr "Manji 4:3 player"
#: player_sizes.inc.php:16
msgid "Smaller 16:9 player"
msgstr "Manji 16:9 player"
#: player_sizes.inc.php:21
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr "Standardna vrednost, podrazumevana za YouTube video-odnos 4:3 "
#: player_sizes.inc.php:26
msgid "YouTube default for 16:9-ratio video"
msgstr "YouTube podrazumevana vrednost za video-odnos 16:9"
#: player_sizes.inc.php:31
msgid "Larger 4:3 player"
msgstr "Veći 4:3 player"
#: player_sizes.inc.php:36
msgid "Larger 16:9 player"
msgstr "Veći 16:9 player"
#: player_sizes.inc.php:41
msgid "Maxi 4:3 player"
msgstr "Najveći 4:3 player"
#: player_sizes.inc.php:46
msgid "Maxi 16:9 player"
msgstr "Najveći 16:9 player"
#: wp-youtube-lyte.php:60 wp-youtube-lyte.php:64
msgid "Watch this playlist on YouTube"
msgstr "Gledajte ovu listu pesama na YouTube-u"
#: wp-youtube-lyte.php:65
msgid "Watch this playlist"
msgstr "Gledajte ovu listu pesama"
#: wp-youtube-lyte.php:65 wp-youtube-lyte.php:78 wp-youtube-lyte.php:82
msgid "on YouTube"
msgstr "na YouTube-u"
#: wp-youtube-lyte.php:73
msgid "Watch this video on YouTube"
msgstr "Gledajte ovaj video na YouTube-u"
#: wp-youtube-lyte.php:78 wp-youtube-lyte.php:82
msgid "Watch this video"
msgstr "Gledajte ovaj video"
#: wp-youtube-lyte.php:78
msgid "or on"
msgstr "ili na"
#: options.php:37
msgid "WP YouTube Lyte Settings"
msgstr "WP YouTube Lyte podešavanja"
#: options.php:39
msgid ""
"WP YouTube Lyte inserts \"Lite YouTube Embeds\" in your blog. These look and "
"feel like normal embedded YouTube, but don't use Flash unless clicked on, "
"thereby <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-"
"lyte/\" target=\"_blank\">reducing download size & rendering time "
"substantially</a>. When a video is played, WP-YouTube-Lyte can either "
"activate <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-"
"youtube-videos.html\" target=\"_blank\">YouTube's embedded html5-player</a> "
"or the older Flash-version, depending on the settings below."
msgstr ""
"WP YouTube Lyte ubacuje \"Lite YouTube Embeds\" u vaš blog. Izgleda i "
"funkcioniše kao uobičajeni ubačeni YouTube, ali nemojte koristiti Flash, "
"osim ako niste kliknuli na <a href=\"http://blog.futtta.be/2010/08/30/the-"
"state-of-wp-youtube-lyte/\" target=\"_blank\">smanjenje veličine preuzimanja "
"i vremena prikazivanja </a>. Kad se prikazuje video, WP-YouTube-Lyte može "
"aktivirati <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-"
"youtube-videos.html\" target=\"_blank\">ugrađeni YouTube html5-player</a> "
"ili stariju Flash verziju u zavisnosti od podešavanja koja slede."
#: options.php:40
msgid ""
"You can place video and audio in your posts and pages by adding one or more "
"http<strong>v</strong> or http<strong>a</strong> YouTube-links to your post. "
"These will automatically be replaced by WP YouTube Lyte with the correct "
"(flash-less) code. To add a video for example, you type a URL like "
"<em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or "
"<em>http<strong>v</strong>://www.youtube.com/playlist?"
"list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only "
"player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?"
"v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/"
"extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP "
"YouTube Lyte FAQ page</a>."
msgstr ""
"Možete ubaciti video ili audio sadržaj u svoje postove i stranice tako što "
"ćete dodati jedan ili više http<strong>v</strong> ili http<strong>a</strong> "
"YouTube linkova svom postu. Njih će WP YouTube Lyte automatski zameniti "
"ispravnim kodom (bez flash-a). Da biste dodali video, na primer, unesite URL "
"kao što je <em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</"
"em> ili <em>http<strong>v</strong>://www.youtube.com/playlist?"
"list=PLA486E741B25F8E00</em> za listu pesama. Više informacija naći ćete na "
"<a href=\"http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/\" target="
"\"_blank\">wordpress.org WP YouTube Lyte FAQ page</a>."
#: options.php:41
msgid ""
"You can modify WP-YouTube-Lyte's behaviour by changing the following "
"settings:"
msgstr "WP-YouTube-Lyte možete modifikovati izmenom sledećih podešavanja:"
#: options.php:48
msgid "Player size"
msgstr "Veličina player-a"
#: options.php:65
msgid "Add links below the embedded videos?"
msgstr "Dodati linkove ispod ugrađenih video sadržaja?"
#: options.php:67
msgid "Show links?"
msgstr "Prikaži linkove?"
#: options.php:68
msgid " Add YouTube-link."
msgstr "Dodaj YouTube link."
#: options.php:69
msgid ""
" Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/"
"index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr ""
"Dodaj i YouTube i <a href=\"http://icant.co.uk/easy-youtube/docs/index.html"
"\" target=\"_blank\">Easy YouTube</a> link."
#: options.php:70
msgid " Don't add any links."
msgstr "Nemoj da dodaješ nikakve linkove."
#: options.php:75
msgid "Play video in HD if possible?"
msgstr "Prikaži video u HD-u ako je moguće?"
#: options.php:79
msgid "Enable HD"
msgstr "Aktiviraj HD"
#: options.php:80
msgid "No HD, we're smallband!"
msgstr "Nema HD-a, mi smo smallband!"
#: options.php:85
msgid "Bonus feature: "
msgstr "Dodatna karakteristika:"
#: options.php:89
msgid "Disable 3rd party tracking."
msgstr "Deaktiviraj praćenje 3. strane."
#: options.php:90
msgid "I don't mind 3rd party tracking (default)"
msgstr "Ne smeta mi praćenje 3. strane (podrazumevano)"
#: options.php:97
msgid "Save Changes"
msgstr "Sačuvaj izmene"
#: options.php:105
msgid "futtta about"
msgstr "futtta o"
#. #-#-#-#-# plugin.pot (WP YouTube Lyte 0.8.0) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: options.php:107
msgid "WP YouTube Lyte"
msgstr "WP YouTube Lyte"
#: options.php:108
msgid "WordPress"
msgstr "WordPress"
#: options.php:109
msgid "Web Technology"
msgstr "Web tehnologija"
#. Plugin URI of the plugin/theme
msgid "http://blog.futtta.be/tag/lyte"
msgstr "http://blog.futtta.be/tag/lyte"
#. Description of the plugin/theme
msgid "Lite and accessible YouTube audio and video embedding."
msgstr "Lite i pristupačno ugrađivanje YouTube audio i video sadržaja."
#. Author of the plugin/theme
msgid "Frank Goossens (futtta)"
msgstr "Frank Goossens (futtta)"
#. Author URI of the plugin/theme
msgid "http://blog.futtta.be/"
msgstr "http://blog.futtta.be/"

View File

@@ -0,0 +1,228 @@
# Copyright (C) 2010 WP YouTube Lyte
# This file is distributed under the same license as the WP YouTube Lyte package.
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte 0.8.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-youtube-lyte\n"
"POT-Creation-Date: 2011-10-12 13:51:40+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2014-05-22 23:31+0200\n"
"Last-Translator: Michael Yunat <Michael.Yunat@gmail.com>\n"
"Language-Team: http://getvoip.com/\n"
"Language: uk\n"
"X-Generator: Poedit 1.6.5\n"
#: widget.php:74
msgid "Title:"
msgstr "Назва:"
#: widget.php:75
msgid "Size:"
msgstr "Розмір:"
#: widget.php:91
msgid "Type:"
msgstr "Тип:"
#: widget.php:99
msgid "audio"
msgstr "аудіо"
#: widget.php:100
msgid "video"
msgstr "відео"
#: widget.php:104
msgid "Youtube-URL:"
msgstr "Youtube-URL:"
#: widget.php:105
msgid "Text:"
msgstr "Текст:"
#: player_sizes.inc.php:11
msgid "Smaller 4:3 player"
msgstr "Менше 4:03 гравець"
#: player_sizes.inc.php:16
msgid "Smaller 16:9 player"
msgstr "Менше 16:9 гравець"
#: player_sizes.inc.php:21
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr "Стандартне значення, YouTube замовчуванням для 4:3 відео з пропорцією"
#: player_sizes.inc.php:26
msgid "YouTube default for 16:9-ratio video"
msgstr "YouTube за замовчуванням для 16:09-відео з пропорцією"
#: player_sizes.inc.php:31
msgid "Larger 4:3 player"
msgstr "Великі 4:03 гравець"
#: player_sizes.inc.php:36
msgid "Larger 16:9 player"
msgstr "Великі 16:9 гравець"
#: player_sizes.inc.php:41
msgid "Maxi 4:3 player"
msgstr "Максі 4:03 гравець"
#: player_sizes.inc.php:46
msgid "Maxi 16:9 player"
msgstr "Максі 16:9 гравець"
#: wp-youtube-lyte.php:60 wp-youtube-lyte.php:64
msgid "Watch this playlist on YouTube"
msgstr "Дивитися цей плейлист на YouTube"
#: wp-youtube-lyte.php:65
msgid "Watch this playlist"
msgstr "Дивитися цей плейлист"
#: wp-youtube-lyte.php:65 wp-youtube-lyte.php:78 wp-youtube-lyte.php:82
msgid "on YouTube"
msgstr "на YouTube"
#: wp-youtube-lyte.php:73
msgid "Watch this video on YouTube"
msgstr "Дивитися це відео на YouTube"
#: wp-youtube-lyte.php:78 wp-youtube-lyte.php:82
msgid "Watch this video"
msgstr "Дивитися це відео"
#: wp-youtube-lyte.php:78
msgid "or on"
msgstr "або на"
#: options.php:37
msgid "WP YouTube Lyte Settings"
msgstr "WP YouTube Налаштування Lyte"
#: options.php:39
msgid ""
"WP YouTube Lyte inserts \"Lite YouTube Embeds\" in your blog. These look and "
"feel like normal embedded YouTube, but don't use Flash unless clicked on, "
"thereby <a href=\"http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-"
"lyte/\" target=\"_blank\">reducing download size & rendering time "
"substantially</a>. When a video is played, WP-YouTube-Lyte can either "
"activate <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-embed-"
"youtube-videos.html\" target=\"_blank\">YouTube's embedded html5-player</a> "
"or the older Flash-version, depending on the settings below."
msgstr ""
"WP YouTube Лайт вставки \"Lite YouTube Вріже\" в свій блог. Ці виглядати і "
"відчувати себе як звичайні вбудовані YouTube, але не використовувати Flash, "
"якщо натиснути на них, тим самим <a href=\"http://blog.futtta.be/2010/08/30/-"
"state-of-wp-youtube-Лайт/\" target=\"_blank\">скорочення розміру "
"завантаження і відтворення час істотно</a>. При відтворенні відео WP-YouTube-"
"Лайт може активувати <a href=\"http://apiblog.youtube.com/2010/07/new-way-to-"
"embed-youtube-videos.html\" target=\"_blank\">YouTube embedded html5-плеєр</"
"a> або старшого Flash-версії, в залежності від налаштувань нижче."
#: options.php:40
msgid ""
"You can place video and audio in your posts and pages by adding one or more "
"http<strong>v</strong> or http<strong>a</strong> YouTube-links to your post. "
"These will automatically be replaced by WP YouTube Lyte with the correct "
"(flash-less) code. To add a video for example, you type a URL like "
"<em>http<strong>v</strong>://www.youtube.com/watch?v=QQPSMRQnNlU</em> or "
"<em>http<strong>v</strong>://www.youtube.com/playlist?"
"list=PLA486E741B25F8E00</em> for a playlist. If you want an audio-only "
"player, you enter <em>http<strong>a</strong>://www.youtube.com/watch?"
"v=BIQIGR-kWtc</em>. There's more info on the <a href=\"http://wordpress.org/"
"extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP "
"YouTube Lyte FAQ page</a>."
msgstr ""
"Ви можете розмістити відео і аудіо в ваших повідомленнях і сторінках, "
"додавши один або декілька HTTP <strong>V</strong> або HTTP <strong>через</"
"strong> YouTube посилання на ваш пост. Вони будуть автоматично замінені WP "
"YouTube Lyte з правильним (Flash- менше) код. Щоб додати відео приміром, ви "
"набираєте URL кшталт <em>HTTP <strong>V</strong> ://www.youtube.com/watch?"
"v=QQPSMRQnNlU</em> або <em>HTTP <strong>V</strong> ://www.youtube.com/"
"плейлист? Список = PLA486E741B25F8E00</em> для відтворення. Якщо ви хочете "
"аудіо-тільки гравця, ви входите <em>HTTP ://www.youtube.com/дивитися? V = "
"BIQIGR-kWtc.</em> Там більше інформації на <a href=\"http://wordpress.org/"
"extend/plugins/wp-youtube-lyte/faq/\" target=\"_blank\">wordpress.org WP "
"YouTube Lyte Довідка сторінку</a> ."
#: options.php:41
msgid ""
"You can modify WP-YouTube-Lyte's behaviour by changing the following "
"settings:"
msgstr ""
"Ви можете змінити поведінку WP-YouTube-Lyte, змінюючи наступне налаштування:"
#: options.php:48
msgid "Player size"
msgstr "Розмір гравця"
#: options.php:65
msgid "Add links below the embedded videos?"
msgstr "Додати посилання нижче вбудованих відео?"
#: options.php:67
msgid "Show links?"
msgstr "Показати посилання?"
#: options.php:68
msgid " Add YouTube-link."
msgstr "Додати YouTube-посилання."
#: options.php:69
msgid ""
" Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/"
"index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr ""
"Додати як на YouTube і <a href=\"http://icant.co.uk/easy-youtube/docs/index."
"html\" target=\"_blank\">Easy YouTube</a> -посилання. "
#: options.php:70
msgid " Don't add any links."
msgstr "Не додавайте посилання."
#: options.php:75
msgid "Play video in HD if possible?"
msgstr "Відтворення відео в HD, якщо це можливо?"
#: options.php:79
msgid "Enable HD"
msgstr "Включити HD"
#: options.php:80
msgid "No HD, we're smallband!"
msgstr "Ні HD, ми не будемо ліній з низькою пропускною!"
#: options.php:85
msgid "Bonus feature: "
msgstr "Бонус особливість:"
#: options.php:89
msgid "Disable 3rd party tracking."
msgstr "Вимкніть відстеження 3 учасника."
#: options.php:90
msgid "I don't mind 3rd party tracking (default)"
msgstr "Я не проти третьої партії відстеження (за замовчуванням)"
#: options.php:97
msgid "Save Changes"
msgstr "Зберегти зміни"
#: options.php:105
msgid "futtta about"
msgstr "futtta про"
#: options.php:107
msgid "WP YouTube Lyte"
msgstr "WP YouTube Lyte"
#: options.php:108
msgid "WordPress"
msgstr "WordPress"
#: options.php:109
msgid "Web Technology"
msgstr "Веб-технології"

View File

@@ -0,0 +1,380 @@
# Copyright (C) 2015 WP YouTube Lyte
# This file is distributed under the same license as the WP YouTube Lyte package.
msgid ""
msgstr ""
"Project-Id-Version: WP YouTube Lyte 1.5.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-youtube-lyte\n"
"POT-Creation-Date: 2015-03-06 17:49:26+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: options.php:21
msgid "Your WP YouTube Lyte cache has been succesfully cleared."
msgstr ""
#: options.php:27
msgid "There was a problem, the WP YouTube Lyte cache could not be cleared."
msgstr ""
#: options.php:61
msgid ""
"For WP YouTube Lyte to function optimally, you should enter an YouTube API "
"key "
msgstr ""
#: options.php:63
msgid "in the settings screen."
msgstr ""
#: options.php:76
msgid "WP YouTube Lyte got the following error back from the YouTube API: "
msgstr ""
#: options.php:91
msgid "WP YouTube Lyte Settings"
msgstr ""
#: options.php:98
msgid "Your YouTube API key."
msgstr ""
#: options.php:104
msgid "Please enter your YouTube API key."
msgstr ""
#: options.php:105
msgid "API key"
msgstr ""
#: options.php:105
msgid "Test Key"
msgstr ""
#: options.php:107
msgid ""
"WP YouTube Lyte uses YouTube's API to fetch information on each video. For "
"your site to use that API, you will have to <a href=\"https://console."
"developers.google.com/project/\" target=\"_blank\">register your site as a "
"new application</a>, enable the YouTube API for it and get a server key and "
"fill it out here."
msgstr ""
#: options.php:110
msgid "Great, your YouTube API key has been taken care of!"
msgstr ""
#: options.php:115 options.php:117
msgid "Player size"
msgstr ""
#: options.php:136
msgid "Add links below the embedded videos?"
msgstr ""
#: options.php:139
msgid "Show links?"
msgstr ""
#: options.php:140
msgid "Show YouTube-link"
msgstr ""
#: options.php:140
msgid " Add YouTube-link."
msgstr ""
#: options.php:141
msgid "Show YouTube and Ease YouTube link"
msgstr ""
#: options.php:141
msgid ""
" Add both a YouTube and an <a href=\"http://icant.co.uk/easy-youtube/docs/"
"index.html\" target=\"_blank\">Easy YouTube</a>-link."
msgstr ""
#: options.php:142
msgid "Don't include links."
msgstr ""
#: options.php:142
msgid " Don't add any links."
msgstr ""
#: options.php:147
msgid "Player position:"
msgstr ""
#: options.php:150
msgid "Left, center or right?"
msgstr ""
#: options.php:151
msgid "Left"
msgstr ""
#: options.php:152
msgid "Center"
msgstr ""
#: options.php:157
msgid "Try to force HD (experimental)?"
msgstr ""
#: options.php:160
msgid "HD or not?"
msgstr ""
#: options.php:161
msgid "Enable HD?"
msgstr ""
#: options.php:161
msgid "Enable HD"
msgstr ""
#: options.php:162
msgid "Don't enable HD playback"
msgstr ""
#: options.php:162
msgid "No HD (default)"
msgstr ""
#: options.php:167
msgid "Add microdata?"
msgstr ""
#: options.php:170
msgid "Add video microdata to the HTML?"
msgstr ""
#: options.php:171
msgid "Sure, add microdata!"
msgstr ""
#: options.php:171 options.php:181
msgid "Yes (default)"
msgstr ""
#: options.php:172
msgid "No microdata in my HTML please."
msgstr ""
#: options.php:172
msgid "No microdata, thanks."
msgstr ""
#: options.php:177 options.php:180
msgid "Also act on normal YouTube links?"
msgstr ""
#: options.php:181
msgid "That would be great!"
msgstr ""
#: options.php:182
msgid "No, I'll stick to httpv or shortcodes."
msgstr ""
#: options.php:182
msgid "No thanks."
msgstr ""
#: options.php:187
msgid "Empty WP YouTube Lyte's cache"
msgstr ""
#: options.php:198
msgid "Save Changes"
msgstr ""
#: options.php:206
msgid "futtta about"
msgstr ""
#. #-#-#-#-# plugin.pot (WP YouTube Lyte 1.5.0) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: options.php:208
msgid "WP YouTube Lyte"
msgstr ""
#: options.php:209
msgid "WordPress"
msgstr ""
#: options.php:210
msgid "Web Technology"
msgstr ""
#: options.php:214
msgid "Do not donate for this plugin!"
msgstr ""
#: options.php:228
msgid "Checking your key ..."
msgstr ""
#: options.php:242
msgid "That does not seem to be a correct API key!"
msgstr ""
#: options.php:283
msgid "API seems OK, you can Save Changes below now."
msgstr ""
#: options.php:285
msgid "API key not OK, your key seems to "
msgstr ""
#: options.php:288
msgid "be invalid."
msgstr ""
#: options.php:291
msgid "be valid, but restricted to an IP-address which is not your server's."
msgstr ""
#: options.php:292
msgid "Try changing the allowed IP for your API key to include this one: "
msgstr ""
#: options.php:296
msgid "have expired, please check in the Google Developer Console."
msgstr ""
#: options.php:302
msgid ""
"be correct, but seems to have exceeded the number of requests that can be "
"made with it."
msgstr ""
#: options.php:305
msgid "probably work, but as the video with id "
msgstr ""
#: options.php:307
msgid " was not found we cannot be sure, please try again."
msgstr ""
#: options.php:310
msgid "be faulty, with YouTube API returning reason: "
msgstr ""
#: options.php:315
msgid ""
"Something went wrong, WP YouTube Lyte might not have been able to retrieve "
"information from the YouTube API, got error: "
msgstr ""
#: player_sizes.inc.php:11
msgid "Mini 16:9 player"
msgstr ""
#: player_sizes.inc.php:17
msgid "Smaller 4:3 player"
msgstr ""
#: player_sizes.inc.php:23
msgid "Smaller 16:9 player"
msgstr ""
#: player_sizes.inc.php:29
msgid "Standard value, YouTube default for 4:3-ratio video"
msgstr ""
#: player_sizes.inc.php:35
msgid "YouTube default for 16:9-ratio video"
msgstr ""
#: player_sizes.inc.php:41
msgid "Larger 4:3 player"
msgstr ""
#: player_sizes.inc.php:47
msgid "Larger 16:9 player"
msgstr ""
#: player_sizes.inc.php:53
msgid "Maxi 4:3 player"
msgstr ""
#: player_sizes.inc.php:59
msgid "Maxi 16:9 player"
msgstr ""
#: widget.php:130
msgid "Title:"
msgstr ""
#: widget.php:131
msgid "Size:"
msgstr ""
#: widget.php:150
msgid "Type:"
msgstr ""
#: widget.php:158
msgid "audio"
msgstr ""
#: widget.php:159
msgid "video"
msgstr ""
#: widget.php:163
msgid "Youtube-URL:"
msgstr ""
#: widget.php:164
msgid "Text:"
msgstr ""
#: wp-youtube-lyte.php:186
msgid "Watch this playlist on YouTube"
msgstr ""
#: wp-youtube-lyte.php:192
msgid "Watch this playlist"
msgstr ""
#: wp-youtube-lyte.php:192 wp-youtube-lyte.php:204 wp-youtube-lyte.php:208
msgid "on YouTube"
msgstr ""
#: wp-youtube-lyte.php:199
msgid "Watch this video on YouTube"
msgstr ""
#: wp-youtube-lyte.php:204 wp-youtube-lyte.php:208
msgid "Watch this video"
msgstr ""
#: wp-youtube-lyte.php:204
msgid "or on"
msgstr ""
#: wp-youtube-lyte.php:586
msgid "Settings"
msgstr ""
#. Plugin URI of the plugin/theme
msgid "http://blog.futtta.be/wp-youtube-lyte/"
msgstr ""
#. Description of the plugin/theme
msgid "Lite and accessible YouTube audio and video embedding."
msgstr ""
#. Author of the plugin/theme
msgid "Frank Goossens (futtta)"
msgstr ""
#. Author URI of the plugin/theme
msgid "http://blog.futtta.be/"
msgstr ""

View File

@@ -0,0 +1 @@
<html><body><p><a href="http://wordpress.org/extend/plugins/wp-youtube-lyte/">WP-YouTube-Lyte</a> is a WordPress plugin that inserts "Lite YouTube Embeds" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href="http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/" title="performance tests comparing youtube embeds with lyte embeds">reducing download size & rendering time substantially</a>. The plugin can optionally use <a href="http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html">YouTube's new experimental HTML5 embed code</a>, meaning you can have an entirely flash-less YouTube experience on your blog.</p><p>Up to date info on WP-YouTube-Lyte <a href="http://blog.futtta.be/tag/lyte/" title="more about Lyte on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/tag/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>

View File

@@ -0,0 +1 @@
(function(e){var t=document;var n="https";e.te=function(){if(!r){var r=1;lts=e.getElementsByClassName("lyMe","div");for(var s=0,o=lts.length;s<o;s+=1){p=lts[s];vid=p.id.substring(4);if(mOs===null){cN=p.className.replace(/lyMe/,"lyte")+" lP";p.className=cN;sprite=bU+"lytesprite.png";e.addCss(".lyte .ctrl, .lyte .Rctrl, .lyte .Lctrl, .lyte .play { background-image: url("+sprite+"); }");if(cN.indexOf("audio")===-1){bgId="lyte_"+vid;thumb=t.getElementById(bgId).getAttribute("data-src");if(thumb!==""){bgCss="#"+bgId+" { background-image: url("+thumb+"); }";e.addCss(bgCss)}else{scr=t.createElement("script");scr.src=n+"://gdata.youtube.com/feeds/api/playlists/"+vid+"?v=2&alt=json-in-script&callback=ly.parsePL&fields=id,entry";scr.type="text/javascript";t.getElementsByTagName("head")[0].appendChild(scr)}}p.onclick=e.play}else{e.play(p.id)}}}var r=""};e.parsePL=function(t){thumb=t.feed.entry[0].media$group.media$thumbnail[1].url;if(n=="https"&&thumb.indexOf("https"==-1)){thumb=thumb.replace("http://","https://")}t_id=t.feed.id.$t.match(/:playlist:(PL[a-zA-Z0-9_]+)/);id="lyte_"+t_id[1];bgCss="#"+id+" { background-image: url("+thumb+"); }";e.addCss(bgCss)};e.getQ=function(e){qsa="";if(rqs=e.className.match(/qsa_(.*)\s/,"$1"))qsa=rqs[1].replace(/\\([\&\=\?])/g,"$1");return qsa};e.play=function(r){if(typeof r==="string"){tH=t.getElementById(r);aP=0}else{tH=this;tH.onclick="";aP=1}vid=tH.id.substring(4);hidef=0;if(tH.className.indexOf("hidef")!==-1){hidef="1&vq=hd720"}if(tH.className.indexOf("playlist")===-1){eU=n+"://www.youtube-nocookie.com/embed/"+vid+"?"}else{eU=n+"://www.youtube-nocookie.com/embed/videoseries?list="+vid+"&"}qsa=e.getQ(tH);if(tH.className.indexOf("audio")!==-1&&aP==1){qsa+="&autohide=0";aHgh="438";aSt="position:relative;top:-400px;"}else if(tH.className.indexOf("audio")!==-1&&aP==0){tH.parentNode.style.height="";tH.style.height="";aHgh=tH.clientHeight;aSt="height:"+aHgh+"px !important;"}else{aHgh=tH.clientHeight;aSt=""}tH.innerHTML='<iframe id="iF_'+vid+'" width="'+tH.clientWidth*2+'" height="'+aHgh+'" src="'+eU+"autoplay="+aP+"&controls=1&wmode=opaque&rel=0&egm=0&iv_load_policy=3&hd="+hidef+qsa+'" frameborder="0" style="'+aSt+'" allowfullscreen allow="autoplay"></iframe>';if(typeof tH.firstChild.getAttribute("kabl")=="string")tH.innerHTML="Please check Karma Blocker's config.";if(aP==0){window.addEventListener("orientationchange",function(){t.getElementById(r).width=t.getElementById(r).parentNode.clientWidth},false)}};e.getElementsByClassName=function(e,n,r){if(t.getElementsByClassName){getElementsByClassName=function(e,n,r){r=r||t;var i=r.getElementsByClassName(e),s=n?new RegExp("\\b"+n+"\\b","i"):null,o=[],u;for(var a=0,f=i.length;a<f;a+=1){u=i[a];if(!s||s.test(u.nodeName)){o.push(u)}}return o}}else if(t.evaluate){getElementsByClassName=function(e,n,r){n=n||"*";r=r||t;var i=e.split(" "),s="",o="http://www.w3.org/1999/xhtml",u=t.documentElement.namespaceURI===o?o:null,a=[],f,l;for(var c=0,h=i.length;c<h;c+=1){s+="[contains(concat(' ', @class, ' '), ' "+i[c]+" ')]"}try{f=t.evaluate(".//"+n+s,r,u,0,null)}catch(p){f=t.evaluate(".//"+n+s,r,null,0,null)}while(l=f.iterateNext()){a.push(l)}return a}}else{getElementsByClassName=function(e,n,r){n=n||"*";r=r||t;var i=e.split(" "),s=[],o=n==="*"&&r.all?r.all:r.getElementsByTagName(n),u,a=[],f;for(var l=0,c=i.length;l<c;l+=1){s.push(new RegExp("(^|\\s)"+i[l]+"(\\s|$)"))}for(var h=0,p=o.length;h<p;h+=1){u=o[h];f=false;for(var v=0,m=s.length;v<m;v+=1){f=s[v].test(u.className);if(!f){break}}if(f){a.push(u)}}return a}}return getElementsByClassName(e,n,r)};e.addCss=function(e){var n=t.createElement("style");n.type="text/css";if(n.styleSheet){n.styleSheet.cssText=e}else{n.appendChild(document.createTextNode(e))}t.getElementsByTagName("head")[0].appendChild(n)}})(window.ly=window.ly||{});(function(){var e=window;var t=document;if(e.addEventListener){e.addEventListener("load",ly.te,false);t.addEventListener("DomContentLoaded",function(){setTimeout("ly.te()",750)},false)}else{e.onload=ly.te;setTimeout("ly.te()",1e3)}})()

View File

@@ -0,0 +1,191 @@
(function( ly ) {
var d = document;
var sch="https";
ly.te = function() {
if (!rn) {
var rn=1;
lts = ly.getElementsByClassName("lyMe", "div");
for (var i = 0, lln = lts.length; i < lln; i += 1) {
p = lts[i];
vid = p.id.substring(4);
if (mOs === null) {
cN = p.className.replace(/lyMe/, "lyte")+ " lP";
p.className = cN;
sprite=(bU+"lytesprite.png");
ly.addCss(".lyte .ctrl, .lyte .Rctrl, .lyte .Lctrl, .lyte .play { background-image: url("+sprite+"); }");
if (cN.indexOf('audio') === -1) {
bgId="lyte_"+vid;
thumb=d.getElementById(bgId).getAttribute("data-src");
if (thumb !== "") {
bgCss="#"+bgId+" { background-image: url("+thumb+"); }";
ly.addCss(bgCss);
} else {
scr = d.createElement('script');
scr.src = sch+"://gdata.youtube.com/feeds/api/playlists/"+ vid +"?v=2&alt=json-in-script&callback=ly.parsePL&fields=id,entry";
scr.type = "text/javascript";
d.getElementsByTagName('head')[0].appendChild(scr);
}
}
p.onclick = ly.play;
} else {
ly.play(p.id);
}
}
}
var rn="";
}
ly.parsePL = function(r) {
thumb=r.feed.entry[0].media$group.media$thumbnail[1].url;
if ((sch=="https")&&(thumb.indexOf('https'==-1))) {thumb=thumb.replace("http://","https://");}
t_id=r.feed.id.$t.match(/:playlist:(PL[a-zA-Z0-9_]+)/);
id="lyte_"+t_id[1];
bgCss="#"+id+" { background-image: url("+thumb+"); }";
ly.addCss(bgCss);
}
ly.getQ = function(nD) {
qsa="";
if (rqs=nD.className.match(/qsa_(.*)\s/,"$1")) qsa=rqs[1].replace(/\\([\&\=\?])/g, "$1");
return qsa;
}
ly.play = function(id) {
if (typeof id === 'string') {
tH=d.getElementById(id);
aP=0;
} else {
tH=this;
tH.onclick="";
aP=1;
}
vid=tH.id.substring(4);
hidef=0;
if (tH.className.indexOf("hidef") !== -1) { hidef="1&amp;vq=hd720" }
if (tH.className.indexOf("playlist") === -1) {
eU=sch+"://www.youtube-nocookie.com/embed/" + vid + "?"
} else {
eU=sch+"://www.youtube-nocookie.com/embed/videoseries?list=" + vid + "&"
}
qsa=ly.getQ(tH);
if ((tH.className.indexOf("audio") !== -1) && (aP == 1)) {
qsa+="&amp;autohide=0";aHgh="438";aSt="position:relative;top:-400px;"
} else if ((tH.className.indexOf("audio") !== -1) && (aP == 0)) {
tH.parentNode.style.height="";
tH.style.height="";
aHgh=tH.clientHeight;
aSt="height:"+aHgh+"px !important;";
} else {
aHgh=tH.clientHeight;
aSt="";
}
tH.innerHTML="<iframe id=\"iF_" + vid + "\" width=\"" + tH.clientWidth*2 + "\" height=\"" + aHgh + "\" src=\""+eU+"autoplay="+aP+"&amp;controls=1&amp;wmode=opaque&amp;rel=0&amp;egm=0&amp;iv_load_policy=3&amp;hd="+hidef+qsa+"\" frameborder=\"0\" style=\"" + aSt + "\" allow="autoplay" allowfullscreen></iframe>"
if(typeof tH.firstChild.getAttribute('kabl')=="string") tH.innerHTML="Please check Karma Blocker's config.";
if (aP==0){window.addEventListener("orientationchange", function() {d.getElementById(id).width=d.getElementById(id).parentNode.clientWidth;}, false);}
}
ly.getElementsByClassName = function(className, tag, elm) {
if (d.getElementsByClassName) {
getElementsByClassName = function (className, tag, elm) {
elm = elm || d;
var elements = elm.getElementsByClassName(className),
nodeName = (tag) ? new RegExp("\\b" + tag + "\\b", "i") : null,
returnElements = [],
current;
for (var i = 0, il = elements.length; i < il; i += 1) {
current = elements[i];
if (!nodeName || nodeName.test(current.nodeName)) {
returnElements.push(current)
}
}
return returnElements
}
} else if (d.evaluate) {
getElementsByClassName = function (className, tag, elm) {
tag = tag || "*";
elm = elm || d;
var classes = className.split(" "),
classesToCheck = "",
xhtmlNamespace = "http://www.w3.org/1999/xhtml",
namespaceResolver = (d.documentElement.namespaceURI === xhtmlNamespace) ? xhtmlNamespace : null,
returnElements = [],
elements, node;
for (var j = 0, jl = classes.length; j < jl; j += 1) {
classesToCheck += "[contains(concat(' ', @class, ' '), ' " + classes[j] + " ')]"
}
try {
elements = d.evaluate(".//" + tag + classesToCheck, elm, namespaceResolver, 0, null)
} catch (e) {
elements = d.evaluate(".//" + tag + classesToCheck, elm, null, 0, null)
}
while ((node = elements.iterateNext())) {
returnElements.push(node)
}
return returnElements
}
} else {
getElementsByClassName = function (className, tag, elm) {
tag = tag || "*";
elm = elm || d;
var classes = className.split(" "),
classesToCheck = [],
elements = (tag === "*" && elm.all) ? elm.all : elm.getElementsByTagName(tag),
current, returnElements = [],
match;
for (var k = 0, kl = classes.length; k < kl; k += 1) {
classesToCheck.push(new RegExp("(^|\\s)" + classes[k] + "(\\s|$)"))
}
for (var l = 0, ll = elements.length; l < ll; l += 1) {
current = elements[l];
match = false;
for (var m = 0, ml = classesToCheck.length; m < ml; m += 1) {
match = classesToCheck[m].test(current.className);
if (!match) {
break
}
}
if (match) {
returnElements.push(current)
}
}
return returnElements
}
}
return getElementsByClassName(className, tag, elm)
};
ly.addCss = function(cssCode) {
var stEl = d.createElement("style");
stEl.type = "text/css";
if (stEl.styleSheet) {
stEl.styleSheet.cssText = cssCode;
} else {
stEl.appendChild(document.createTextNode(cssCode));
}
d.getElementsByTagName("head")[0].appendChild(stEl);
}
}
( window.ly = window.ly || {} ));
(function(){
var w = window;
var d = document;
if(w.addEventListener) {
w.addEventListener('load', ly.te, false);
d.addEventListener('DomContentLoaded', function(){setTimeout("ly.te()",750)}, false);
} else {
w.onload=ly.te;
setTimeout("ly.te()",1000);
}}())

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@@ -0,0 +1,122 @@
<?php
/*
Classlessly add a "more tools" tab to promote (future) AO addons and/ or affiliate services
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
add_action('admin_init', 'lyte_partner_tabs_preinit');
function lyte_partner_tabs_preinit() {
if (apply_filters('wp-youtube-lyte_filter_show_partner_tabs',true)) {
add_filter('wp-youtube-lyte_filter_settingsscreen_tabs','lyte_add_partner_tabs');
}
}
function lyte_add_partner_tabs($in) {
$in=array_merge($in,array('lyte_partners' => __('More Performance!','wp-youtube-lyte')));
return $in;
}
add_action('admin_menu','lyte_partners_init');
function lyte_partners_init() {
if (apply_filters('wp-youtube-lyte_filter_show_partner_tabs',true)) {
$hook=add_submenu_page(NULL,'Lyte partner','Lyte partner','manage_options','lyte_partners','lyte_partners');
// register_settings here as well if needed
}
}
function lyte_partners() {
?>
<style>
.itemDetail {
background: #fff;
width: 250px;
min-height: 290px;
border: 1px solid #ccc;
float: left;
padding: 15px;
position: relative;
margin: 0 10px 10px 0;
}
.itemTitle {
margin-top:0px;
margin-bottom:10px;
}
.itemImage {
text-align: center;
}
.itemImage img {
max-width: 95%;
max-height: 150px;
}
.itemDescription {
margin-bottom:30px;
}
.itemButtonRow {
position: absolute;
bottom: 10px;
right: 10px;
width:100%;
}
.itemButton {
float:right;
}
.itemButton a {
text-decoration: none;
color: #555;
}
.itemButton a:hover {
text-decoration: none;
color: #23282d;
}
</style>
<div class="wrap">
<h1><?php _e('WP YouTube Lyte Settings','wp-youtube-lyte'); ?></h1>
<?php echo lyte_admin_tabs(); ?>
<?php
echo '<h2>'. __("These related services will improve your site's performance even more!",'wp-youtube-lyte') . '</h2>';
?>
<div>
<?php getLytePartnerFeed(); ?>
</div>
</div>
<?php
}
function getLytePartnerFeed() {
$noFeedText=__( 'Have a look at <a href="http://optimizingmatters.com/">optimizingmatters.com</a> for wp-youtube-lyte power-ups!', 'wp-youtube-lyte' );
if (apply_filters('wp-youtube-lyte_settingsscreen_remotehttp',true)) {
$rss = fetch_feed( "http://feeds.feedburner.com/OptimizingMattersDownloads" );
$maxitems = 0;
if ( ! is_wp_error( $rss ) ) {
$maxitems = $rss->get_item_quantity( 20 );
$rss_items = $rss->get_items( 0, $maxitems );
} ?>
<ul>
<?php
if ( $maxitems == 0 ) {
echo $noFeedText;
} else {
foreach ( $rss_items as $item ) :
$itemURL = esc_url( $item->get_permalink() ); ?>
<li class="itemDetail">
<h3 class="itemTitle"><a href="<?php echo $itemURL; ?>" target="_blank"><?php echo esc_html( $item->get_title() ); ?></a></h3>
<?php
if (($enclosure = $item->get_enclosure()) && (strpos($enclosure->get_type(),"image")!==false) ) {
$itemImgURL=esc_url($enclosure->get_link());
echo "<div class=\"itemImage\"><a href=\"".$itemURL."\" target=\"_blank\"><img src=\"".$itemImgURL."\"/></a></div>";
}
?>
<div class="itemDescription"><?php echo wp_kses_post($item -> get_description() ); ?></div>
<div class="itemButtonRow"><div class="itemButton button-secondary"><a href="<?php echo $itemURL; ?>" target="_blank">More info</a></div></div>
</li>
<?php endforeach; ?>
<?php } ?>
</ul>
<?php
} else {
echo $noFeedText;
}
}

View File

@@ -0,0 +1,203 @@
<?php
/*
* simple proxy for YouTube images
*
* @param string origThumbUrl
* @return image
*
* assumption 1: thumbnails are served from known domain ("ytimg.com","youtube.com","youtu.be")
* assumption 2: thumbnails are always jpg
*
*/
// no error reporting, those break header() output
error_reporting(0);
/*
* step 0: set constant for dir where thumbs are stored + declaring some variables
*/
if ( ! defined( 'LYTE_CACHE_DIR' ) ) {
define( 'WP_CONTENT_DIR', dirname( dirname( __DIR__ ) ) );
define( 'LYTE_CACHE_CHILD_DIR', 'cache/lyteThumbs' );
define( 'LYTE_CACHE_DIR', WP_CONTENT_DIR .'/'. LYTE_CACHE_CHILD_DIR );
}
$lyte_thumb_error = "";
$lyte_thumb_dontsave = "";
$thumbContents = "";
$lyte_thumb_report_err = false;
/*
* step 1: get vid ID (or full thumbnail URL) from request and validate
*/
// should we output debug info in a header?
if ( array_key_exists("reportErr", $_GET) ) {
$lyte_thumb_report_err = true;
}
// get thumbnail-url from request
if ( array_key_exists("origThumbUrl", $_GET) && $_GET["origThumbUrl"] !== "" ) {
$origThumbURL = urldecode($_GET["origThumbUrl"]);
} else {
// faulty request, force a grey background
$origThumbURL = "https://i.ytimg.com/vi/thisisnotavalidvid/hqdefault.jpg";
}
// make sure the thumbnail-url is for youtube
$origThumbDomain = parse_url($origThumbURL, PHP_URL_HOST);
if ( str_replace( array("ytimg.com","youtube.com","youtu.be"), "", $origThumbDomain ) === $origThumbDomain ) {
// faulty request, force a grey background
$origThumbURL = "https://i.ytimg.com/vi/thisisnotavalidvid/hqdefault.jpg";
}
// make sure the thumbnail-url is for an image (.jpg)
$origThumbPath = parse_url($origThumbURL, PHP_URL_PATH);
if ( lyte_str_ends_in( $origThumbPath, ".jpg" ) !== true ) {
// faulty request, force a grey background
$origThumbURL = "https://i.ytimg.com/vi/thisisnotavalidvid/hqdefault.jpg";
}
// TODO: extra checks to prevent automated hotlinking abuse?
/*
* step 2: check for and if need be create wp-content/cache/lyte_thumbs
*/
if ( lyte_check_cache_dir(LYTE_CACHE_DIR) === false ) {
$lyte_thumb_dontsave = true;
$lyte_thumb_error .= "checkcache fail/ ";
}
/*
* step 3: if not in cache: fetch from YT and store in cache
*/
if ( strpos($origThumbURL,'http') !== 0 && strpos($origThumbURL,'//') === 0 ) {
$origThumbURL = 'https:'.$origThumbURL;
}
$localThumb = LYTE_CACHE_DIR . '/' . md5($origThumbURL) . ".jpg";
if ( !file_exists($localThumb) || $lyte_thumb_dontsave ) {
$thumbContents = lyte_get_thumb($origThumbURL);
if ( $thumbContents != "" && !$lyte_thumb_dontsave ) {
file_put_contents($localThumb, $thumbContents);
}
}
/*
* step 4: serve img
*/
if ( $thumbContents == "" && !$lyte_thumb_dontsave && file_exists($localThumb) && mime_content_type($localThumb) === "image/jpeg" ) {
$thumbContents = file_get_contents( $localThumb );
} else {
$lyte_thumb_error .= "not from cache/ ";
}
if ( $thumbContents != "") {
if ( $lyte_thumb_error !== "" && $lyte_thumb_report_err ) {
header('X-lyte-error: '.$lyte_thumb_error);
}
$modTime=filemtime($localThumb);
date_default_timezone_set("UTC");
$modTimeMatch = (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === $modTime);
if ( $modTimeMatch ) {
header('HTTP/1.1 304 Not Modified');
header('Connection: close');
} else {
// send all sorts of headers
$expireTime=60*60*24*7; // 1w
header('Content-Length: '.strlen($thumbContents));
header('Cache-Control: max-age='.$expireTime.', public, immutable');
header('Expires: '.gmdate('D, d M Y H:i:s', time() + $expireTime).' GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $modTime).' GMT');
header('Content-type:image/jpeg');
echo $thumbContents;
}
} else {
$lyte_thumb_error .= "no thumbContent/ ";
lyte_thumb_fallback();
}
/*
* helper functions
*/
function lyte_check_cache_dir( $dir ) {
// Try creating the dir if it doesn't exist.
if ( ! file_exists( $dir ) ) {
@mkdir( $dir, 0775, true );
if ( ! file_exists( $dir ) ) {
return false;
}
}
// If we still cannot write, bail.
if ( ! is_writable( $dir ) ) {
return false;
}
// Create an index.html in there to avoid prying eyes!
$idx_file = rtrim( $dir, '/\\' ) . '/index.html';
if ( ! is_file( $idx_file ) ) {
@file_put_contents( $idx_file, '<html><head><meta name="robots" content="noindex, nofollow"></head><body>Generated by <a href="http://wordpress.org/extend/plugins/wp-youtube-lyte/" rel="nofollow">WP YouTube Lyte</a></body></html>' );
}
return true;
}
function lyte_str_ends_in($haystack,$needle) {
$needleLength = strlen($needle);
$haystackLength = strlen($haystack);
$lastPos=strrpos($haystack,$needle);
if ($lastPos === $haystackLength - $needleLength) {
return true;
} else {
return false;
}
}
function lyte_get_thumb($thumbUrl) {
global $lyte_thumb_error;
if (function_exists("curl_init")) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $thumbUrl);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727)");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
$str = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ( !$err && $str != "" ) {
return $str;
} else {
$lyte_thumb_error .= "curl err: ".$err."/ ";
}
} else {
$lyte_thumb_error .= "no curl/ ";
}
// if no curl or if curl error
$resp = file_get_contents($thumbUrl);
return $resp;
}
function lyte_thumb_fallback() {
global $origThumbURL, $lyte_thumb_error, $lyte_thumb_report_err;
// if for any reason we can't show a local thumbnail, we redirect to the original one
if ( strpos( $origThumbURL, "http" ) !== 0) {
$origThumbURL = "https:".$origThumbURL;
}
if ( $lyte_thumb_report_err ) {
header('X-lyte-error: '.$lyte_thumb_error);
}
header('HTTP/1.1 301 Moved Permanently');
header('Location: '. $origThumbURL );
}

View File

@@ -0,0 +1,113 @@
<?php
/*
Plugin Name: Lyte Helper
Plugin URI: http://blog.futtta.be/category/wp-youtube-lyte/
Description: Lyte Helper contains some helper functions to make WP YouTube Lyte even more flexible
Author: Frank Goossens (futtta)
Version: 0.2
Author URI: http://blog.futtta.be/
*/
/**
available filter hooks: lyte_settings, lyte_content_preparse, lyte_match_preparse_fragment, lyte_match_postparse_template, lyte_content_postparse, lyte_css, lyte_docaptions, lyte_match_thumburl
available action hooks; lyte_actionsfilters
*/
/** force widget text to be parsed as well using lyte_actionsfilters action */
// add_action('lyte_actionsfilters','lyte_force_widgets',10,0);
function lyte_force_widgets() {
add_filter('widget_text', 'lyte_parse', 4);
}
/** force wp youtube lyte to act on normal youtube url's as well using lyte_content_preparse filter */
// add_filter('lyte_content_preparse','lyte_force_nonhttpv',10,1);
function lyte_force_nonhttpv($content) {
$content=preg_replace('/^https?:\/\/(www.)?youtu(be.com|.be)\/(watch\?v=)?/m','httpv://www.youtube.com/watch?v=',$content);
return $content;
}
/** force hqThumb for all lytes using lyte_match_preparse_fragment */
// add_filter('lyte_match_preparse_fragment','lyte_force_hqthumb',10,1);
function lyte_force_hqthumb($httpv) {
if (strpos($httpv,"hqThumb")===FALSE) {
if (strpos($httpv,"#")===FALSE) {
$httpv.="#hqThumb=1";
} else {
$httpv.="&hqThumb=1";
}
}
return $httpv;
}
/** force showinfo=0 for all lytes using lyte_match_preparse_fragment filter */
// add_filter('lyte_match_preparse_fragment','lyte_force_noinfo',10,1);
function lyte_force_noinfo($httpv) {
if (strpos($httpv,"showinfo")===FALSE) {
if (strpos($httpv,"#")===FALSE) {
$httpv.="#showinfo=0";
} else {
$httpv.="&showinfo=0";
}
}
return $httpv;
}
/** add clickable video thumbnail to excerpt.*/
// add_filter('lyte_match_postparse_template','lyte_override_excerpt_template',10,2);
function lyte_override_excerpt_template($content,$type) {
global $lyteSettings, $vid, $postID;
if ($type==="excerpt") {
$content = "<a href=\"".get_permalink( $postID )."\"><img src=\"".$lyteSettings['scheme']."://i.ytimg.com/vi/".$vid."/0.jpg\" alt=\"YouTube Video\"></a>";
}
return $content;
}
/** change setting from within code using lyte_settings filter */
// add_filter('lyte_settings','lyte_change_settings',10,1);
function lyte_change_settings($settingsArray) {
$settingsArray['links']="0";
return $settingsArray;
}
/** disable captions lookup */
// add_filter('lyte_docaptions','lyte_nocaptions',10,0);
function lyte_nocaptions() {
return false;
}
/** force lyte javascript (which includes css) to be loaded in head instead of footer */
// lyte_force_jshead();
function lyte_force_jshead() {
add_filter('wp_head', lyte_init);
global $lynited;
$lynited=true;
}
/** function to filter out httpv/a links from description tag as generated by all in one seo pack */
// add_filter('aioseop_description','lyte_filter_aioseop_description');
function lyte_filter_aioseop_description($description) {
return preg_replace('/\shttp(v|a):\/\/([^\s<]*)/','',$description);
}
/** function to override thumbnail used for a video */
// add_filter('lyte_match_thumburl','lyte_my_own_thumburl');
function lyte_my_own_thumburl($thumb) {
return "http://images.vrt.be/mobile320/2014/08/05/8570f3aa-1c9e-11e4-b923-00163edf75b7.jpg";
}
/** change lyte css, for example to load Robota fond and force bottom control visible */
// add_filter('lyte_css','fgo_lyte_change_css',10,1);
function fgo_lyte_change_css($lyte_css) {
// import robota
$lyte_css="@import url(https://fonts.googleapis.com/css?family=Roboto&subset=latin,latin-ext);".$lyte_css;
// show bottom control
$lyte_css.=" .ctrl{display:block !important;}";
return $lyte_css;
}
/** don't do lyte on mobile to avoid users having to press play twice */
// add_filter('lyte_do_mobile','no_lyte_on_mobile',10,0);
function no_lyte_on_mobile(){
return false;
}
?>

View File

@@ -0,0 +1,512 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
require("lytePartners.php");
$plugin_dir = basename(dirname(__FILE__)).'/languages';
load_plugin_textdomain( 'wp-youtube-lyte', false, $plugin_dir );
add_action('admin_menu', 'lyte_create_menu');
if (get_option('lyte_emptycache','0')==="1") {
$emptycache=lyte_rm_cache();
update_option('lyte_emptycache','0');
if ($emptycache==="OK") {
add_action('admin_notices', 'lyte_cacheclear_ok_notice');
} elseif ($emptycache==="PART") {
add_action('admin_notices', 'lyte_cacheclear_part_notice');
update_option('lyte_emptycache','1'); // to ensure cache-purging continues
} else {
add_action('admin_notices', 'lyte_cacheclear_fail_notice');
}
}
function lyte_cacheclear_ok_notice() {
echo '<div class="updated"><p>';
_e('Your WP YouTube Lyte cache has been succesfully cleared.', 'wp-youtube-lyte' );
echo '</p></div>';
}
function lyte_cacheclear_part_notice() {
echo '<div class="error"><p>';
_e('WP YouTube Lyte cache was partially cleared, refresh this page to continue purging.', 'wp-youtube-lyte' );
echo '</p></div>';
}
function lyte_cacheclear_fail_notice() {
echo '<div class="error"><p>';
_e('There was a problem, the WP YouTube Lyte cache could not be cleared.', 'wp-youtube-lyte' );
echo '</p></div>';
}
function lyte_create_menu() {
$hook=add_options_page( 'WP YouTube Lyte settings', 'WP YouTube Lyte', 'manage_options', 'lyte_settings_page', 'lyte_settings_page');
add_action( 'admin_init', 'register_lyte_settings' );
add_action( 'admin_print_scripts-'.$hook, 'lyte_admin_scripts' );
add_action( 'admin_print_styles-'.$hook, 'lyte_admin_styles' );
}
function register_lyte_settings() {
register_setting( 'lyte-settings-group', 'lyte_show_links' );
register_setting( 'lyte-settings-group', 'lyte_size' );
register_setting( 'lyte-settings-group', 'lyte_hidef' );
register_setting( 'lyte-settings-group', 'lyte_position' );
register_setting( 'lyte-settings-group', 'lyte_notification' );
register_setting( 'lyte-settings-group', 'lyte_microdata' );
register_setting( 'lyte-settings-group', 'lyte_emptycache' );
register_setting( 'lyte-settings-group', 'lyte_greedy' );
register_setting( 'lyte-settings-group', 'lyte_yt_api_key' );
register_setting( 'lyte-settings-group', 'lyte_local_thumb' );
register_setting( 'lyte-settings-group', 'lyte_disclaimer' );
}
function lyte_admin_scripts() {
wp_enqueue_script('jqcookie', plugins_url('/external/jquery.cookie.min.js', __FILE__), array('jquery'),null,true);
wp_enqueue_script('unslider', plugins_url('/external/unslider-min.js', __FILE__), array('jquery'),null,true);
}
function lyte_admin_styles() {
wp_enqueue_style('unslider', plugins_url('/external/unslider.css', __FILE__));
wp_enqueue_style('unslider-dots', plugins_url('/external/unslider-dots.css', __FILE__));
}
function lyte_admin_nag_apikey() {
echo "<div class=\"update-nag\">";
_e('For WP YouTube Lyte to function optimally, you should enter an YouTube API key ', 'wp-youtube-lyte');
echo " <a href=\"options-general.php?page=lyte_settings_page\">";
_e('in the settings screen.','wp-youtube-lyte');
echo "</a>.</div>";
}
$lyte_yt_api_key=get_option('lyte_yt_api_key','');
$lyte_yt_api_key=apply_filters('lyte_filter_yt_api_key', $lyte_yt_api_key);
if (empty($lyte_yt_api_key)) {
add_action('admin_notices', 'lyte_admin_nag_apikey');
}
function lyte_admin_api_error(){
$yt_error=json_decode(get_option('lyte_api_error'),1);
echo '<div class="error"><p>';
_e('WP YouTube Lyte got the following error back from the YouTube API: ','wp-youtube-lyte');
echo "<strong>".$yt_error["reason"]."</strong>";
echo " (".date("r",$yt_error["timestamp"]).").";
echo '</a>.</p></div>';
update_option('lyte_api_error','');
}
if (get_option('lyte_api_error','')!=='') {
add_action('admin_notices', 'lyte_admin_api_error');
}
function lyte_settings_page() {
global $pSize, $pSizeOrder;
?>
<style>
/* rss block */
#futtta_feed ul{list-style:outside;}
#futtta_feed {font-size:medium; margin:0px 20px;}
/* banner + unslider */
.lyte_banner {
margin: 0 38px;
padding-bottom: 5px;
}
.lyte_banner ul li {
font-size:medium;
text-align:center;
}
.unslider {
position:relative;
}
.unslider-arrow {
display: block;
left: unset;
margin-top: -35px;
margin-left: 7px;
margin-right: 7px;
border-radius: 32px;
background: rgba(0, 0, 0, 0.10) no-repeat 50% 50%;
color: rgba(255, 255, 255, 0.8);
font: normal 20px/1 dashicons;
speak: none;
padding: 3px 2px 3px 4px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.unslider-arrow:hover {
background-color: rgba(0, 0, 0, 0.20);
color: #FFF;
}
.unslider-arrow.prev {
padding: 3px 4px 3px 2px;
}
.unslider-arrow.next {
right: 0px;
}
.unslider-arrow.prev::before {
content: "\f341";
}
.unslider-arrow.next::before {
content: "\f345";
}
/* responsive stuff: hide admin-feed on smaller screens */
@media (min-width: 961px) {
#lyte_main {float:left;width:69%;}
#lyte_admin_feed{float:right;width:30%;display:block !important;}
}
@media (max-width: 960px) {
#lyte_main {width:100%;}
#lyte_admin_feed {width:0%;display:none !important;}
}
@media (max-width: 782px) {
#lyte_hide_adv span, #lyte_show_adv span {display: none;}
#lyte_hide_adv,#lyte_show_adv {height: 34px;padding: 4px 12px 8px 8px;}
#lyte_hide_adv:before,#lyte_show_adv:before {font-size: 25px;}
#lyte_main input[type="checkbox"] {margin-left: 10px;}
#lyte_main .cb_label {display: block; padding-left: 45px; text-indent: -45px;}
}
</style>
<div class="wrap">
<h2><?php _e("WP YouTube Lyte Settings","wp-youtube-lyte") ?></h2>
<div style="float:left;width:70%;">
<?php echo lyte_admin_tabs(); ?>
<form method="post" action="options.php">
<?php settings_fields( 'lyte-settings-group' ); ?>
<table class="form-table">
<input type="hidden" name="lyte_notification" value="<?php echo get_option('lyte_notification','0'); ?>" />
<tr valign="top">
<th scope="row"><?php _e("Your YouTube API key.","wp-youtube-lyte") ?></th>
<td>
<?php // only show api key input field if there's no result from filter
$filter_key=apply_filters('lyte_filter_yt_api_key','');
if (empty($filter_key)) { ?>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("Please enter your YouTube API key.","wp-youtube-lyte") ?></span></legend>
<label title="<?php _e('API key','wp-youtube-lyte'); ?>"><input type="text" size="28" name="lyte_yt_api_key" id="lyte_yt_api_key" value="<?php echo get_option('lyte_yt_api_key',''); ?>"><span id="check_api_key" class="submit button-secondary" style="margin:0px 5px;"><?php _e("Test Key"); ?></span></label><br />
<div id="lyte_key_check_output" style="display:none;margin-bottom:5px;background-color:white;border-left:solid;border-width:4px;border-color:#2ea2cc;padding:5px 5px 5px 15px;"></div>
<?php _e("WP YouTube Lyte uses YouTube's API to fetch information on each video. For your site to use that API, you will have to <a href=\"https://console.developers.google.com/project/\" target=\"_blank\">register your site as a new application</a>, enable the YouTube API for it and get a server key and fill it out here.","wp-youtube-lyte"); ?>
</fieldset>
<?php } else { ?>
<?php _e("Great, your YouTube API key has been taken care of!","wp-youtube-lyte"); ?>
<?php } ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Player size","wp-youtube-lyte") ?>:</th>
<td>
<fieldset><legend class="screen-reader-text"><span><?php _e("Player size","wp-youtube-lyte") ?></span></legend>
<?php
$sel = !is_bool(get_option('lyte_size')) ? (int) get_option('lyte_size') : 0;
foreach (array("169","43") as $f) {
foreach ($pSizeOrder[$f] as $i) {
$pS=$pSize[$i];
if ($pS['a']===true) {
?>
<label title="<?php echo $pS['w']."X".$pS['h']; ?>"><input type="radio" name="lyte_size" class="l_size" value="<?php echo $i."\"";if($i===$sel) echo " checked";echo " /> ".$pS['w']."X".$pS['h']." (".$pS['t'];?>)</label><br />
<?php
}
}
?><br /><?php
}
?>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Add links below the embedded videos?","wp-youtube-lyte") ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("Show links?","wp-youtube-lyte") ?></span></legend>
<label title="<?php _e('Show YouTube-link','wp-youtube-lyte');?>"><input type="radio" name="lyte_show_links" value="1" <?php if (get_option('lyte_show_links')==="1" || get_option('lyte_show_links')==="2") echo "checked" ?> /><?php _e(" Add YouTube-link.","wp-youtube-lyte") ?></label><br />
<label title="<?php _e('Don\'t include links.','wp-youtube-lyte');?>"><input type="radio" name="lyte_show_links" value="0" <?php if ((get_option('lyte_show_links')!=="1") && (get_option('lyte_show_links')!=="2")) echo "checked" ?> /><?php _e(" Don't add any links.","wp-youtube-lyte") ?></label>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Player position:","wp-youtube-lyte") ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("Left, center or right?","wp-youtube-lyte"); ?></span></legend>
<label title="<?php _e('Left','wp-youtube-lyte');?>"><input type="radio" name="lyte_position" value="0" <?php if (get_option('lyte_position','0')==="0") echo "checked" ?> /><?php _e("Left","wp-youtube-lyte") ?></label><br />
<label title="<?php _e('Center','wp-youtube-lyte');?>"><input type="radio" name="lyte_position" value="1" <?php if (get_option('lyte_position','0')==="1") echo "checked" ?> /><?php _e("Center","wp-youtube-lyte") ?></label>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Try to force HD?","wp-youtube-lyte") ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("HD or not?","wp-youtube-lyte"); ?></span></legend>
<label title="<?php _e('Enable HD?','wp-youtube-lyte');?>"><input type="radio" name="lyte_hidef" value="1" <?php if (get_option('lyte_hidef','0')==="1") echo "checked" ?> /><?php _e("Enable HD","wp-youtube-lyte") ?></label><br />
<label title="<?php _e('Don\'t enable HD playback','wp-youtube-lyte');?>"><input type="radio" name="lyte_hidef" value="0" <?php if (get_option('lyte_hidef','0')!=="1") echo "checked" ?> /><?php _e("No HD (default)","wp-youtube-lyte") ?></label>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Add microdata?","wp-youtube-lyte") ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("Add video microdata to the HTML?","wp-youtube-lyte"); ?></span></legend>
<label title="<?php _e('Sure, add microdata!','wp-youtube-lyte');?>"><input type="radio" name="lyte_microdata" value="1" <?php if (get_option('lyte_microdata','1')==="1") echo "checked" ?> /><?php _e("Yes (default)","wp-youtube-lyte") ?></label><br />
<label title="<?php _e('No microdata in my HTML please.','wp-youtube-lyte');?>"><input type="radio" name="lyte_microdata" value="0" <?php if (get_option('lyte_microdata','1')!=="1") echo "checked" ?> /><?php _e("No microdata, thanks.","wp-youtube-lyte") ?></label>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Also act on normal YouTube links and iframes?","wp-youtube-lyte") ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("Also act on normal YouTube links?","wp-youtube-lyte") ?></span></legend>
<label title="<?php _e('That would be great!','wp-youtube-lyte');?>"><input type="radio" name="lyte_greedy" value="1" <?php if (get_option('lyte_greedy','1')==="1") echo "checked" ?> /><?php _e("Yes (default)","wp-youtube-lyte") ?></label><br />
<label title="<?php _e('No, I\'ll stick to httpv or shortcodes.','wp-youtube-lyte');?>"><input type="radio" name="lyte_greedy" value="0" <?php if (get_option('lyte_greedy','1')!=="1") echo "checked" ?> /><?php _e("No thanks.","wp-youtube-lyte") ?></label>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Cache thumbnails locally?","wp-youtube-lyte"); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("Cache thumbnails locally?","wp-youtube-lyte") ?></span></legend>
<label title="<?php _e('That would be great!','wp-youtube-lyte');?>"><input type="radio" name="lyte_local_thumb" value="1" <?php if (get_option('lyte_local_thumb','0')==="1") echo "checked" ?> /><?php _e("Yes.","wp-youtube-lyte") ?></label><br />
<label title="<?php _e('No, keep on using YouTube hosted thumbnails.','wp-youtube-lyte');?>"><input type="radio" name="lyte_local_thumb" value="0" <?php if (get_option('lyte_local_thumb','0')!=="1") echo "checked" ?> /><?php _e("No (default).","wp-youtube-lyte") ?></label>
<br />
<?php _e("Having the thumbnails cached locally can improve performance and will enhance visitor privacy as by default no requests will be sent to YouTube unless the video is played.","wp-youtube-lyte"); ?>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Text to be added under every LYTE video.","wp-youtube-lyte"); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php _e("Text (e.g. for disclaimer) to be added under every LYTE video.","wp-youtube-lyte") ?></span></legend>
<input type="text" style="width:100%;" name="lyte_disclaimer" placeholder="" value="<?php echo esc_textarea(get_option('lyte_disclaimer','')); ?>" /><br />
<br />
<?php _e("If you want to add e.g. a privacy disclaimer under every LYTE embedded video, you can do so here. Some HTML is allowed. Simply leave empty not to show anything.","wp-youtube-lyte"); ?>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php _e("Empty WP YouTube Lyte's cache","wp-youtube-lyte") ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span>Remove WP YouTube Lyte's cache</span></legend>
<input type="checkbox" name="lyte_emptycache" value="1" />
</fieldset>
</td>
</tr>
</table>
<p class="submit">
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
</p>
</form>
</div>
<div id="lyte_admin_feed" class="">
<div class="lyte_banner ">
<ul>
<?php
if (apply_filters('wp-youtube-lyte_settingsscreen_remotehttp',true)) {
$lyte_banner=get_transient("wp-youtube-lyte_banner");
if (empty($lyte_banner)) {
$banner_resp = wp_remote_get("http://misc.optimizingmatters.com/wp-youtube-lyte_news.html");
if (!is_wp_error($banner_resp)) {
if (wp_remote_retrieve_response_code($banner_resp)=="200") {
$lyte_banner = wp_kses_post(wp_remote_retrieve_body($banner_resp));
set_transient("wp-youtube-lyte_banner",$lyte_banner,DAY_IN_SECONDS);
}
}
}
echo $lyte_banner;
}
?>
<li><?php _e("Need help? <a href='https://wordpress.org/plugins/wp-youtube-lyte/faq/'>Check out the FAQ here</a>.","wp-youtube-lyte"); ?></li>
<li><?php _e("Happy with wp-youtube-lyte?","wp-youtube-lyte"); ?><br /><a href="<?php echo network_admin_url(); ?>plugin-install.php?tab=search&type=author&s=optimizingmatters"><?php _e("Try my other plugins!","wp-youtube-lyte"); ?></a></li>
</ul>
</div>
<div style="margin-left:10px;margin-top:-5px;">
<h2>
<?php _e("futtta about","wp-youtube-lyte") ?>
<select id="feed_dropdown" >
<option value="1"><?php _e("WP YouTube Lyte","wp-youtube-lyte") ?></option>
<option value="2"><?php _e("WordPress","wp-youtube-lyte") ?></option>
<option value="3"><?php _e("Web Technology","wp-youtube-lyte") ?></option>
</select>
</h2>
<div id="futtta_feed">
<div id="wp-youtube-lytefeed">
<?php getFutttaFeeds("http://feeds.feedburner.com/futtta_wp-youtube-lyte"); ?>
</div>
<div id="wordpressfeed">
<?php getFutttaFeeds("http://feeds.feedburner.com/futtta_wordpress"); ?>
</div>
<div id="webtechfeed">
<?php getFutttaFeeds("http://feeds.feedburner.com/futtta_webtech"); ?>
</div>
</div>
</div>
<div style="float:right;margin:50px 15px;"><a href="http://blog.futtta.be/2013/10/21/do-not-donate-to-me/" target="_blank"><img width="100px" height="85px" src="<?php echo plugins_url().'/'.plugin_basename(dirname(__FILE__)).'/external/do_not_donate_smallest.png'; ?>" title="<?php _e("Do not donate for this plugin!","wp-youtube-lyte"); ?>"></a></div>
</div>
<script type="text/javascript">
var feed = new Array;
feed[1]="wp-youtube-lytefeed";
feed[2]="wordpressfeed";
feed[3]="webtechfeed";
cookiename="wp-youtube-lyte_feed";
jQuery(document).ready(function() {
jQuery( "#check_api_key" ).click(function() {
jQuery("#lyte_key_check_output").show();
jQuery("#lyte_key_check_output").append('<p><?php _e("Checking your key ..."); ?></p>');
lyte_yt_api_key=jQuery("input#lyte_yt_api_key").val();
if ((lyte_yt_api_key.length>9) &&(lyte_yt_api_key.length<99)) {
var data = {
'action': 'lyte_check_yt_api_key',
'lyte_nonce': '<?php echo wp_create_nonce( "lyte_check_api_key" );?>',
'lyte_yt_api_key': jQuery("input#lyte_yt_api_key").val()
};
jQuery.post(ajaxurl, data, function(response) {
jQuery("#lyte_key_check_output").append('<p>'+response+'</p>');
});
} else {
jQuery("#lyte_key_check_output").append('<p><?php _e("That does not seem to be a correct API key!"); ?></p>');
}
})
jQuery('#lyte_admin_feed').fadeTo("slow",1).show();
jQuery('.lyte_banner').unslider({autoplay:true, delay:3500, infinite: false, arrows:{prev:'<a class="unslider-arrow prev"></a>', next:'<a class="unslider-arrow next"></a>'}}).fadeTo("slow",1).show();
jQuery( "#feed_dropdown" ).change(function() {
jQuery("#futtta_feed").fadeTo(0,0);
jQuery("#futtta_feed").fadeTo("slow",1);
});
jQuery("#feed_dropdown").change(function() { show_feed(jQuery("#feed_dropdown").val()) });
feedid=jQuery.cookie(cookiename);
if(typeof(feedid) !== "string") feedid=1;
show_feed(feedid);
})
function show_feed(id) {
jQuery('#futtta_feed').children().hide();
jQuery('#'+feed[id]).show();
jQuery("#feed_dropdown").val(id);
jQuery.cookie(cookiename,id,{ expires: 365 });
}
</script>
</div>
<?php }
// ajax receiver for YT API key check
add_action( 'wp_ajax_lyte_check_yt_api_key', 'lyte_check_yt_api_key_callback' );
function lyte_check_yt_api_key_callback() {
check_ajax_referer( "lyte_check_api_key", 'lyte_nonce' );
$api_key = strip_tags($_POST['lyte_yt_api_key']);
// use random video to make sure a cache is not spoiling things
$vidToCheck=array("ZmnZHudtzXg","2_7oQcAkyl8","nOvv80wkSgI","pBCt5nfsZ30","KHw7gdJ14uQ","qJ_PMvjmC6M","DVwHCGAr_OE","LtOGa5M8AuU","VHO9uZX9FNU");
$randVidIndex=array_rand($vidToCheck);
$api_response = lyte_get_YT_resp($vidToCheck[$randVidIndex],false,"",$api_key);
if (is_array($api_response)) {
if (!empty($api_response["title"])) {
_e("API seems OK, you can Save Changes below now.");
} else if (!empty($api_response["reason"])) {
$all_but_one = __("API key not OK, your key seems to ");
switch ($api_response["reason"]) {
case "keyInvalid":
echo $all_but_one;
_e("be invalid.",'wp-youtube-lyte');
break;
case "ipRefererBlocked":
echo $all_but_one;
_e("be valid, but restricted to an IP-address which is not your server's.",'wp-youtube-lyte');
_e("Try changing the allowed IP for your API key to include this one: ",'wp-youtube-lyte');
echo $_SERVER["SERVER_ADDR"];
break;
case "keyExpired":
echo $all_but_one;
_e("have expired, please check in the Google Developer Console.",'wp-youtube-lyte');
break;
case "limitExceeded":
case "quotaExceeded":
case "rateLimitExceeded":
case "userRateLimitExceeded":
echo $all_but_one;
_e("be correct, but seems to have exceeded the number of requests that can be made with it.",'wp-youtube-lyte');
break;
case "videoNotFound":
echo $all_but_one;
_e("probably work, but as the video with id ",'wp-youtube-lyte');
echo $vidToCheck[$randVidIndex];
_e(" was not found we cannot be sure, please try again.",'wp-youtube-lyte');
break;
default:
_e("Your API key might be OK, but the API call did not succeed or the response was not entirely expected. Technical error: ",'wp-youtube-lyte');
echo $api_response["reason"];
}
}
} else {
_e("Something went wrong, WP YouTube Lyte might not have been able to retrieve information from the YouTube API, got error: ",'wp-youtube-lyte');
print_r($api_response);
}
wp_die();
}
function getFutttaFeeds($url) {
if (apply_filters('lyte_settingsscreen_remotehttp',true)) {
$rss = fetch_feed( $url );
$maxitems = 0;
if ( ! is_wp_error( $rss ) ) {
$maxitems = $rss->get_item_quantity( 7 );
$rss_items = $rss->get_items( 0, $maxitems );
}
?>
<ul>
<?php if ( $maxitems == 0 ) : ?>
<li><?php _e( 'No items', 'autoptimize' ); ?></li>
<?php else : ?>
<?php foreach ( $rss_items as $item ) : ?>
<li>
<a href="<?php echo esc_url( $item->get_permalink() ); ?>"
title="<?php printf( __( 'Posted %s', 'autoptimize' ), $item->get_date('j F Y | g:i a') ); ?>">
<?php echo esc_html( $item->get_title() ); ?>
</a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<?php
}
}
// based on http://wordpress.stackexchange.com/a/58826
function lyte_admin_tabs(){
$tabs = apply_filters('wp-youtube-lyte_filter_settingsscreen_tabs',array('lyte_settings_page' => __('Main','wp-youtube-lyte')));
$tabContent="";
if (count($tabs) >= 1) {
if(isset($_GET['page'])){
$currentId = $_GET['page'];
} else {
$currentId = "wp-youtube-lyte";
}
$tabContent .= "<h2 class=\"nav-tab-wrapper\">";
foreach($tabs as $tabId => $tabName){
if($currentId == $tabId){
$class = " nav-tab-active";
} else{
$class = "";
}
$tabContent .= '<a class="nav-tab'.$class.'" href="?page='.$tabId.'">'.$tabName.'</a>';
}
$tabContent .= "</h2>";
} else {
$tabContent = "<hr/>";
}
return $tabContent;
}
?>

View File

@@ -0,0 +1,99 @@
<?php
$plugin_dir = basename(dirname(__FILE__)).'/languages';
load_plugin_textdomain( 'wp-youtube-lyte', false, $plugin_dir );
$pDefault=2;
$pSize[8]['a']=true;
$pSize[8]['w']=420;
$pSize[8]['h']=236;
$pSize[8]['t']=__("Mini 16:9 player","wp-youtube-lyte");
$pSize[8]['f']="169";
$pSize[0]['a']=true;
$pSize[0]['w']=420;
$pSize[0]['h']=315;
$pSize[0]['t']=__("Smaller 4:3 player","wp-youtube-lyte");
$pSize[0]['f']="43";
$pSize[1]['a']=true;
$pSize[1]['w']=560;
$pSize[1]['h']=315;
$pSize[1]['t']=__("Smaller 16:9 player","wp-youtube-lyte");
$pSize[1]['f']="169";
$pSize[2]['a']=true;
$pSize[2]['w']=480;
$pSize[2]['h']=360;
$pSize[2]['t']=__("Standard value, YouTube default for 4:3-ratio video","wp-youtube-lyte");
$pSize[2]['f']="43";
$pSize[3]['a']=true;
$pSize[3]['w']=640;
$pSize[3]['h']=360;
$pSize[3]['t']=__("YouTube default for 16:9-ratio video","wp-youtube-lyte");
$pSize[3]['f']="169";
$pSize[4]['a']=true;
$pSize[4]['w']=640;
$pSize[4]['h']=480;
$pSize[4]['t']=__("Larger 4:3 player","wp-youtube-lyte");
$pSize[4]['f']="43";
$pSize[5]['a']=true;
$pSize[5]['w']=853;
$pSize[5]['h']=480;
$pSize[5]['t']=__("Larger 16:9 player","wp-youtube-lyte");
$pSize[5]['f']="169";
$pSize[6]['a']=true;
$pSize[6]['w']=960;
$pSize[6]['h']=720;
$pSize[6]['t']=__("Maxi 4:3 player","wp-youtube-lyte");
$pSize[6]['f']="43";
$pSize[7]['a']=true;
$pSize[7]['w']=1280;
$pSize[7]['h']=720;
$pSize[7]['t']=__("Maxi 16:9 player","wp-youtube-lyte");
$pSize[7]['f']="169";
$pSizeOrder['169']=array(8,1,3,5,7);
$pSizeOrder['43']=array(0,2,4,6);
// widget sizes
$wDefault=4;
$wSize[1]['h']=125;
$wSize[1]['w']=150;
$wSize[1]['depr']=true;
$wSize[2]['h']=133;
$wSize[2]['w']=160;
$wSize[2]['depr']=true;
$wSize[3]['h']=150;
$wSize[3]['w']=180;
$wSize[3]['depr']=true;
$wSize[4]['h']=200;
$wSize[4]['w']=200;
$wSize[4]['depr']=false;
$wSize[5]['h']=200;
$wSize[5]['w']=250;
$wSize[5]['depr']=false;
$wSize[6]['h']=225;
$wSize[6]['w']=300;
$wSize[6]['depr']=false;
$wSize[7]['h']=300;
$wSize[7]['w']=400;
$wSize[7]['depr']=false;
// bigger widgets, for use in pagebuilders rather then sidebars
$wSize[8]['h']=400;
$wSize[8]['w']=711;
$wSize[8]['depr']=false;
$wSize[9]['h']=500;
$wSize[9]['w']=889;
$wSize[9]['depr']=false;
$wSize[10]['h']=600;
$wSize[10]['w']=1066;
$wSize[10]['depr']=false;
?>

View File

@@ -0,0 +1,519 @@
=== WP YouTube Lyte ===
Contributors: futtta, optimizingmatters
Tags: youtube, video, performance, gdpr, lazy load
Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
Requires at least: 4.0
Tested up to: 5.2
Stable tag: 1.7.7
High performance YouTube video, playlist and audio-only embeds which don't slow down your blog and offer optimal accessibility.
== Description ==
WP YouTube Lyte allows you to "lazy load" your video's, by inserting responsive "Lite YouTube Embeds". These look and feel like normal embedded YouTube, but only call the "fat" YouTube-player when clicked on, thereby [reducing download size & rendering time substantially](http://blog.futtta.be/2012/04/03/speed-matters-re-evaluating-wp-youtube-lytes-performance/) when embedding YouTube occasionally and improving page performance dramatically when you've got multiple YouTube video's on one and the same page. The plugin can be configured to cache YouTube thumbnails locally, improving both performance and privacy. As such LYTE embedded YouTube videos do not require requests to the YouTube servers, probably (I am not a lawyer) allowing for better GDPR-compliance.
The plugin picks up on normal YouTube links, taking over from WordPress core's oEmbed. Alternatively you can add a YouTube-link for a video or [an entire playlist](http://blog.futtta.be/2011/10/11/wp-youtube-lyte-support-for-playlists-almost-included/) with "httpv" instead of "http(s)" or add a Lyte widget to your sidebar and WP YouTube Lyte replaces that link with the correct performance-optimized code. Some examples:
* httpv://www.youtube.com/watch?v=_SQkWbRublY (normal video embed)
* httpv://youtu.be/_SQkWbRublY (video embed with youtube-shortlink)
* httpa://www.youtube.com/watch?v=_SQkWbRublY (audio only embed)
* httpv://www.youtube.com/playlist?list=PLA486E741B25F8E00 (playlist embed)
* httpv://www.youtube.com/watch?v=_SQkWbRublY#stepSize=-1 (video player, one size smaller than what's configured as default)
* httpv://www.youtube.com/watch?v=_SQkWbRublY?start=20&showinfo=0 (video player, start playing at 20 seconds and don't show title)
Or using shortcodes:
`[lyte id="_SQkWbRublY" /]`
`[lyte id="_SQkWbRublY" audio="true" /]`
`[lyte id="A486E741B25F8E00" playlist="true" /]`
WP YouTube Lyte has been written with optimal performance as primary goal, but has been tested for maximum browser-compatibility (iPad included) while keeping an eye on accessibility. Starting with version 1.2.0 lyte embeds are fully responsive and can automatically embed [videoObject microdata](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2413309) as well. The plugin is fully multi-language, with support for Catalan, Dutch, English, French, German, Hebrew, Romanian, Spanish and Slovene.
Feedback is welcome; see [info in the faq](http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/) for bug reports/ feature requests and feel free to [rate and/or report on compatibility on wordpress.org](http://wordpress.org/extend/plugins/wp-youtube-lyte/).
== Installation ==
Just install form your Wordpress "Plugins|Add New" screen and all will be well. Manual installation is very straightforward as well:
1. Upload the zip-file and unzip it in the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Place a link to a YouTube clip like this; httpv://www.youtube.com/watch?v=_SQkWbRublY
== Frequently Asked Questions ==
= Why does WP YouTube Lyte need to access the YouTube API? What is an API anyway? =
An API is a way to have two pieces of software talk to each other to exchange information. In this case WP YouTube Lyte contacts YouTube to ask it for the thumbnail, the title and the description of the video you added. The thumbnail and title are visible on the webpage (in the Lyte player) while the description is in the HTML as microdata for search engines optimization reasons (see below).
= OK, now how can get that API key? =
1. Go to [Google Developer Console](https://console.developers.google.com/projectselector/apis/library) and log in with your Google account.
2. Click on 'Create Project' and:
* Fill in a Project Name
* Fill in a Project ID
* Click on 'Create'
3. On the next page (or when there is no next page, click on your Project's name):
* Click on 'Enable an API'
* Scroll down to YouTube Data API v3 and click on it
* Click on 'OFF' at the top to enable the API
* Optionally disable other API's
4. In the sidebar on the left:
* Click on 'Credentials'
* Click on 'Create Credential'
* Click on 'API key'
* Set as little restrictions as possible, most problems with getting this working are caused by these settings.
* Click on 'Create'
5. Copy your API key to WP YouTube Lyte settings page.
= Will WP YouTube Lyte work if I don't provide an API key? =
Yes, with some exceptions; WP YouTube Lyte will continue to work, rendering Lyte players, but without the title and microdata (description, time, ...) and without thumbnails for playlists.
= I don't want an API key, how can I get rid of the "API key"-notice? =
Just enter "none" (without the quotes) in the API key field and Lyte will stop nagging you.
= Does WP YouTube Lyte protect my visitor's privacy? =
As opposed to some of the [most important](http://blog.futtta.be/2010/12/15/wordpress-com-stats-trojan-horse-for-quantcast-tracking/) [plugins](http://blog.futtta.be/2010/01/22/add-to-any-removed-from-here/) there is no 3rd party tracking code in WP YouTube Lyte, but YouTube off course does see visitor requests coming in for the thumbnails unless the option to cache thumbnails locally is enabled. If thumbnails are cached locally, no request will be sent to YouTube by your visitor's browser until/ unless the video is played.
= I use a page builder and LYTE does not seem active on the YouTube video's I add there? =
LYTE by default uses WordPress' "the_content"-filter. Page builders don't apply that filter to their content and thus LYTE does not get triggered on those. As a workaround you can either add the LYTE widget or add the LYTE video using the shortcode in your page-builder Text-block, this works in most page-builders.
= Can I use WP YouTube Lyte for a custom field? =
Just pass the httpv url of such a field to lyte_preparse like this:
`if(function_exists('lyte_preparse')) { echo lyte_preparse($video); }`
and you're good to go!
= Does WP YouTube Lyte work with Infinite Scroll? =
Starting from version 1.1.0 it does; in [Infinite Scroll](http://wordpress.org/extend/plugins/infinite-scroll/)'s configuration you just have to add "ly.te()" in the "Javascript to be called after the next posts are fetched"-box.
= How does WP YouTube Lyte support microdata? =
* There is a [specific microdata scheme for "videoObject"](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2413309) which WP YouTube Lyte can add to your page, which Google can use to display the video thumbnail next to the search-result
* This is optional and can be disabled in the options page
* The videoobject microdata is NOT added for audio-only embeds, playlists or widgets
* Google will not always display the thumbnail, this presumably depends of the relevance of the video to the rest of the page.
= How does captions-support get added to the microdata? =
In January 2014 [Benetech](http://benetech.org/), a U.S. nonprofit that develops and uses technology to create positive social change, offered a patch that adds the [accessibilityFeature property](http://schema.org/accessibilityFeature) to the microdata for videos that have captions. If you have microdata enabled, WP YouTube Lyte will automatically try to check (in a seperate, asynchronous call via a proxy-webservice, as YouTube only offers captions in their API v3 which requires authentication) if captions are available and if so, adds the accessibilityFeature property with value captions to the microdata. This can be disabled by either disabling microdata or, if you want microdata but not the accessibilityFeature-property by using the "lyte_docaptions"-filter to set captions to false (example-code is in lyte_helper.php_example).
= Responsive LYTE embeds =
* The video width in posts and pages will adapt to the width of the container (the div) in which your blogposts/ pages are shown. This means that if your theme is responsive, WP YouTube Lyte will follow.
* Widgets are not responsive.
* if the content div width gets to around 200 pixels, the LYTE UI will become garbled (YouTube requires the minimum embed width to be 200px as well).
= Can I use WP YouTube Lyte on normal YouTube links or iframes? =
Yes, starting with version 1.5.0 normal YouTube links are automatically transferred in Lyte embeds as well. You will automagically also get a (non-Lyte) preview of the video in your visual post edit screen. Starting from LYTE 1.7.5 YouTube iframes can be automatically converted as well.
= What can I do with the API? =
A whole lot; there are filters to pre-parse the_content, to change settings, to change the CSS, to change the HTML of the LYTE-div, ... There are examples for all filters (and one action) in lyte_helper.php_example
= Problem with All In One Seo Pack =
All in One SEO Pack be default generates a description which still has httpv-links in it. To remove those, you'll have to use (example code in) lyte_helper.php (see above) and add lyte_filter_aioseop_description to the aioseop-filter in there.
= When I click on a LYTE video, a link to YouTube opens, what's up with that? =
You probably added a link around the httpv-url. No link is needed, just the httpv-url.
= My video's seem to load slower on mobile devices? =
By default (unless "cache thumbnail locally" is active) WP YouTube Lyte will indeed load slower normal YouTube video's instead of Lyte ones, as Lyte video's require would require two clicks from the user to play a video (once to load the YouTube video and once to start it) because there is no autoplay-support on mobile. If you want to, you can force WP YouTube Lyte to make video's Lyte on mobile with this code (add it in your child theme's functions.php, in a seperate helper plugin or using the [code snippets plugin](https://wordpress.org/plugins/code-snippets/);
`
add_filter('lyte_do_mobile','lyte_on_mobile',10,0);
function lyte_on_mobile(){
return true;
}
`
= Any other issues should I know about? =
* Having the same YouTube-video on one page can cause WP YouTube Lyte to malfunction (as the YouTube id is used as the div's id in the DOM, and DOM id's are supposed to be unique)
= I found a bug/ I would like a feature to be added! =
Just tell me, I like the feedback! Use the [Contact-page on my blog](http://blog.futtta.be/contact/), [leave a comment in a post about wp-youtube-lyte](http://blog.futtta.be/tag/wp-youtube-lyte/) or [create a new topic on the wordpress.org forum](http://wordpress.org/tags/wp-youtube-lyte?forum_id=10#postform).
= How you can help =
* Tell me about bugs you think you've found and if you can't find any, [confirm it works with your version of WP on wordpress.org](http://wordpress.org/extend/plugins/wp-youtube-lyte/)
* Ask me for a feature you would like to see added
* [Rate my plugin on wordpress.org](http://wordpress.org/extend/plugins/wp-youtube-lyte/)
== Changelog ==
= 1.7.7 =
* bugfix: avoid having to click play twice in Chrome (due to autoplay not working)
= 1.7.6 =
* improvement: extra parameters for shortcode (start, showinfo, stepsize and hqthumb).
* improvement: also turn youtube-nocookie.com iframes into LYTE's as proposed by Maxim.
* improvement: also remove cached thumbnails when clearing cache.
* improvement: also set image in noscript tag to local hosted thumbnail if that option is active.
* bugfix: when multiple iframes were on one page, the ones after the LYTE got lost (reported by Daniel Pardella, thanks).
= 1.7.5 =
* improvement: also act on YouTube iframe code if "also act on YouTube links" is on.
* improvement: if extracted from Gutenburg YouTube embed blocks keep the figure-tag with all relevant CSS classes and keep the caption (if set).
= 1.7.4 =
* improvement: make sure locally cached thumbnails are served with good HTTP response headers (allowing HTTP 304 responses and allowing images to be cached in browser).
* improvemnet: bigger widget sizes for use in pagebuilders.
= 1.7.3 =
* switched YouTube to youtube-nocookie.com.
* added span around description to ensure it can be styled separately.
= 1.7.2 =
* new: you can add a text underneath each video (e.g. for privacy disclaimer purposes, think GDPR) by adding it on the settings-page
* fix: thumbnails from LYTE without API key can now also be cached locally
= 1.7.1 =
* Finally fixed a nasty bug that caused API key validation to fail on PHP 7.1 and higher. A big thank you to @emilyatal, @mkalina, @nicolaottomano, @aminech, @partounian, @nicksws who all provided valuable input in [the WordPress LYTE support forum](https://wordpress.org/support/topic/youtube-api-got-error-1-2/) and tested multiple debug-versions to help fix this.
= 1.7.0 =
* new: option to have thumbnail hosted locally to improve performance and privacy (I am not a lawyer, but this could make embedded YouTube GDPR compliant as not requests are sent to YouTube unless/ until the video is played).
* removed option to add "easy youtube"-links (defunct)
* make widgets not break HTTPS (thanks R33D3M33R)
= 1.6.8 =
* new: support for Gutenberg blocks with embedded YouTube (tested with Gutenberg plugin version 2.3.0)
* updated admin screen
* misc bugfixes (see GitHub commit log for details)
* confirmed working with WordPress 4.9.4
= 1.6.7 =
* fix for AMP-trouble as [reported by winderttal](https://wordpress.org/support/topic/error-in-amp-pages/)
= 1.6.6 =
* emergency bugfix; else was lost but now got found. sorry for that!
= 1.6.5 =
* bug: PHP warning/ notices when title is empty, fix by [kReEsTaL](http://marieguillaumet.com/), thanks!
* bug: YouTube player controls not visible in all browsers when loaded over HTTP, switching to HTTPS for all, as [reported by georg6840tb](https://wordpress.org/support/topic/bottom-control-buttons-not-displayed)
= 1.6.4 =
* updated to latest YouTube UI, again thanks to Draikin. the bottom control is now hidden by defaults, see FAQ
* added filter `lyte_do_mobile` to display lyte video instead of normal youtube on mobile as well, see FAQ
* if WP YouTube Lyte is configured to load HD video, it will also show the maxresdefault.jpg thumbnail.
* bugfix: on some mobile browsers WP YouTybe Lyte [made the page too wide](https://wordpress.org/support/topic/mobil-page-view-only-covering-14-size?replies=11#post-7328487)
= 1.6.3 =
* changed Lyte widget constructor to PHP5-style object contructor
* tested & confirmed working with WordPress 4.3
= 1.6.2 =
* improvement: youtube playlist URL will now be recognized automatically and rendered LYTE as well (hat tip to [markothaler for proposing this](https://wordpress.org/support/topic/playlist-recognition-possible))
* improvement: enter "none" in API key not to be bothered by the missing key notice any more (as [requested by TheGiantRedFox1986](https://wordpress.org/support/topic/remove-notice-in-backend))
* improvement: if no API key (or "none" for key) is provided, don't try to contact YouTube any more, instead just setting a thumbnail (does not work for playlists).
* cleanup: removed code that catered to YouTube API v2.
* updated French translations (merci Serge!)
= 1.6.1 =
* fix for WP YouTube Lyte widgets not loading
= 1.6.0 =
* New: support for YouTube API v3, requiring a server API key to be provided (due to [YouTube closing down the anonymous v2 API](http://blog.futtta.be/2015/01/27/wp-youtube-lyte-and-youtube-api-v2-end-of-life/))
* New: updated player UI by Draikin, great job!
* Improvement: better support for renamed wp-content directories (kudos to [Wendihihihi](https://wordpress.org/support/topic/plugin-doesnt-work-in-custom-plugins-dir))
* Added Slovenian translation by [Mitja Mihelič or arnes.si](http://arnes.si)
* Updated Dutch & French translations, [others are more then welcome](http://blog.futtta.be/contact/)
= 1.5.0 =
* New: WP YouTube Lyte can now also act on normal YouTube URL's. This behavior is by default active on new installations and is by default off for upgrades (from 1.4.x) to avoid unexpected behavior.
* Improvement (API): apply lyte_settings filter after after_setup_theme actoin as [proposed by Yun](http://blog.futtta.be/wp-youtube-lyte/#comment-61923)
* Improvement (API): added lyte_match_thumburl filter to set thumbnail as [requested by Simon Barnett](https://wordpress.org/support/topic/hqthumb1-not-reflecting-on-playlists-in-custom-fields?replies=6#post-5861751)
* Bugfix: for audio-only player make title visible to improve accessibility (for screenreaders) as [requested](http://blog.futtta.be/wp-youtube-lyte/#comment-61928) by [Octocorn](http://www.nemoviz.org/)
* Bugfix: some playlists were not working, as [reported by jpress](https://wordpress.org/support/topic/individual-playlist-not-working)
* Updated most translations, added Ukranian (by [Michael Yunat of getvoip.com](http://getvoip.com/blog) and Serbian [by Ogi Djuraskovic of firstsiteguide.com](http://firstsiteguide.com/), kudo's to all who helped!
= 1.4.2 =
* Bugfix: Playlists in rss-feeds were broken
* Bugfix: YouTube-link under a playlist was wrong
* Improvement: example code in lyte_helper.php to also parse http-youtube-links now only triggers if the link is on a new line
* Tested with WordPress 3.9
= 1.4.1 =
* set interval for captionscheck to 30 days
= 1.4.0 =
* new: if microdata is enabled, check if captions are available and if so add the accessibilityFeature=captions markup. Gracefully contributed [by Benetech](http://benetech.org/)
* bugfix: widgets with youtu.be short URL's were broken (as observed by [Robert of audio-times.com](http://www.audio-times.com/).
* bugfix: in some cases iframe size on mobile was not correct (reported by [David of webquarry.com](http://www.webquarry.com/).
* bugfix: mobile rotation handled more efficiently (based on [feedback from Skyfield](http://wordpress.org/support/topic/rotation-bug-on-iphoneipad#post-5102835)
= 1.3.3 =
* fix for playlist shortcode as [reported by pete777](http://wordpress.org/support/topic/playlist-via-shortcode-broken)
* fix for mobile orientation-change bug [described by Kevinlikes](http://wordpress.org/support/topic/rotation-bug-on-iphoneipad)
* fix for better html-validation as [requested by Kevinlikes](http://wordpress.org/support/topic/validatorw3-error)
* tested and confirmed working with WordPress 3.7
* added "Do not Donate"-link
= 1.3.2 =
* Added playlist support in the WP YouTube Lyte widget (forget to add it really, thanks to [Ed Dingwall](http://www.sinthomedia.com/) to remind me)
* Added an alternative lytesprite version, created by [Claes from PCPLAY.se](http://pcplay.se/). To switch, rename lyte/lytesprite.png to lyte/lytesprite_orig.png and then rename lyte/lytesprite_claes.png to lyte/lytesprite.png.
* Fixed some PHP notices in widget.php
= 1.3.1 =
* Workaround for broken audio-only on mobile (due to YouTube not showing bottom controls when iOS or Android is detected) as reported by [stevygee1987](http://wordpress.org/support/topic/audio-embed-is-a-black-bar-on-iphone). Result; audio-only YouTube becomes a normal YouTube video on mobile [until a better solution can be found](http://stackoverflow.com/questions/18273658/embedded-yt-on-mobile-autohide-0controls-1-but-controls-invisible).
* Added extra check to prevent plugin-files being called outside of WordPress [as suggested in this good article on security](http://mikejolley.com/2013/08/keeping-your-shit-secure-whilst-developing-for-wordpress/).
= 1.3.0 =
* WP YouTube Lyte now has an API to allow its behavior to be changed, with extensive examples in lyte_helper.php_example
* Support for higher quality thumbnails by adding #hqThumb=1 to httpv-link
* You can disable microdata on a per-video level by adding #noMicrodata=1 to the httpv-link when microdata is enabled.
* Checkbox on admin-page to flush WP YouTube Lyte cache (which holds title, description, ... from YouTube)
* added a lyte_preparse function to be used by themes/ plugins (input is the YouTube ID)
* improvement: added opacity to the play-button when not hovered over
* bugfix: suppress error messages if yt_resp does not contain all data
* bugfix: solve PHP notice for pS-array in options.php
= 1.2.2 =
* bugfix: apply sanitize_text_field to microdata description- and title-fields to escape e.g. quotes
* bugfix: added CSS resets to better avoid CSS-conflicts with themes (as reported by longtime user [FruityOaty](http://fruityoaty.com/))
* bugfix: fallback for missing wp_trim_words function in wordpress < 3.3 (as reported by [Armude](http://www.armudepictures.es/))
* bugfix: check if the data from cache/ youtube is valid before trying to extract info from it [as reported by Collin](http://blog.futtta.be/2013/03/01/the-best-wp-youtube-lyte-to-date/#li-comment-39222)
* improvement: better support for RSS/ ATOM feeds [as requested by drreen](http://wordpress.org/support/topic/textlinks-around-embedded-video-in-rss-feed)
* added item in FAQ on how to force normal YouTube links to be parsed by WP YouTube Lyte as well
* tested with WordPress 3.6 beta 1
= 1.2.1 =
* bugfix: if e.g. modernizr added "audio" as class to the html element, wp youtube lyte got confused. reported by [Peco of dubtechnoblog.com](http://www.dubtechnoblog.com/) and [Delphuk](http://delphuk.ru/)
* tested succesfully with WordPress 3.6 (development-version)
= 1.2.0 =
* LYTE embeds are now fully responsive
* automatic inclusion of [scheme.org microdata (VideoObject)](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2413309)
* even better performance (less requests; was 5, now 3)
* updated to current YouTube look & feel
* less JavaScript, more CSS
* bugfix: all lyte-output is now removed from excerpts
= 1.1.9 =
* privacy enhancement: load thumbnails from the cookie-less i.ytimg.com instead of from the cookie-riddled youtube.com (but there are some caveats, [see FAQ](http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/))
* bugfix: the fullscreen-button did not always appear when playing a video, added the "allowfullscreen" attribute to the iframe (as in the most recent youtube embed code)
* still [waiting for the big leap forwards (responsive LYTE and custom sizes) I'm afraid](http://blog.futtta.be/2012/10/16/wp-youtube-lyte-waiting-for-the-big-leap-forwards/)
= 1.1.8 =
* bugfix: [playlists API changed: playlists can now have ID's of more than 16 chars and always should be prepended with PL](http://apiblog.youtube.com/2012/08/playlists-now-with-more-pl.html), which broke playlist rendering. Hat tip for the guys over at [dubtechnoblog.com](http://www.dubtechnoblog.com) for reporting!
* bugfix: further work on excerpts to make sure http(v|a) links in manual excerpts get replaced by a lyte player.
= 1.1.7 =
* bugfix: 1.1.6 broke excerpts, as reported by Franz of [noobtech.at](http://www.noobtech.at)
= 1.1.6 =
* bugfix: remove noscript-stuff from the_excerpt [as requested by wordpressvoxbox13](http://wordpress.org/support/topic/plugin-wp-youtube-lyte-wp-youtube-lyte-adds-text-to-my-posts?replies=8#post-2977006)
* bugfix: switch HTTPS detection to is_ssl() WordPress function to avoid breakage on MS IIS
* removed the "DoNotTrack" bonus feature due to added complexity, [at least one bug](http://wordpress.org/support/topic/wp-youtube-lyte-conflicts-with-wysija-newsletter) and the fact that [WP DoNotTrack](http://wordpress.org/extend/plugins/wp-donottrack/) does a better job at this
= 1.1.5 =
* bugfix: added missing lyte/controls-400.png, which was needed for the new widget-size in 1.1.4
* bugfix: force margin for widget to 0 for themes that think they know better (as reported by long-time user [FruityOaty](http://fruityoaty.com/))
* bugfix: workaround for iOS quirk that caused the video to only start after 2nd click (as reported by Robert of [audio-times.com](http://audio-times.com) and [Collin Maessen](http://www.realsceptic.com/))
* bugfix: add sizes to images as [suggested by elmll on the wordpress.org forum](http://wordpress.org/support/topic/plugin-wp-youtube-lyte-specify-img-dimensions)
* beta: shortcode (see [Description](http://wordpress.org/extend/plugins/wp-youtube-lyte/) for examples) as [suggested by ben4d85 on the wordpress.org forum](http://wordpress.org/support/topic/plugin-wp-youtube-lyte-shortcode-custom-class)
= 1.1.4 =
* bugfix: audio-only youtube was broken due to changes at YouTube (thanks for reporting [Adrian](http://www.yeahlabs.ca/)!)
* bugfix: playlist embedding was somewhat broken (again due to changes at YouTube)
* bugfix: httpv- or httpa- links were only found if the v-parameter was at the beginning of the querystring (as discovered by [Mye](http://virtualassistanttipsthatmatters.com/))
* added 2 new widget sizes (250X200px and 400X333px)
= 1.1.3 =
* new: Player position can now be set to "left" (default) or "center".
* YouTube bugfix: playlist player should now [also work on iphone/ipad](http://apiblog.youtube.com/2012/03/new-player-options-for-lists-of-videos.html)
* YouTube TOS change: official [minimal embed size is now 200X200](http://apiblog.youtube.com/2012/03/minimum-embeds-200px-x-200px.html), created new widget size for that and marked others as deprecated
* bugfix: recent version of [AddThis caused problems with getElementsByClassName](http://support.addthis.com/customer/portal/questions/216309-getelementsbyclassname-error-appearing), which impacted WP YouTube Lyte as reported by [nocotytato](http://nocotytato.org.pl/).
* bugfix for mixed HTTP/HTTPS resources while in HTTPS admin (as reported for [WP DoNotTrack](http://wordpress.org/extend/plugins/wp-donottrack/) by Paul Martinus)
* tested and confirmed to work with WordPress 3.4 (beta 2).
= 1.1.2 =
* bugfix: during development of 1.1.0 the javascript to lazy load the lyte player got lost somehow, readded (now in lyte(-min).js)
* performance: replaced the external stylesheet (lyte.css) with inline javascript that adds an internal stylesheet to the head of the document (thanks for pushing me [Collin](http://www.realsceptic.com/)!
= 1.1.1 =
* bugfix: lyte css wasn't applied as class was already removed (regression caused by "Infinite Scroll" support), lyMe now is the name of the unprocessed div and becomes lyte after processing
* performance: [minimizing reflows caused by amongst others how styles are applied](http://blog.futtta.be/2012/03/20/going-against-the-reflow/) (kudo's to ["der Tuxman"](http://tuxproject.de/blog) again, buy that man a beer!)
= 1.1.0 =
* updated LYTE-player UI: larger display of preview image, changed look of title placeholder, updated controls image
* new: added support for "Infinite Scroll" as proposed by ["der Tuxman"](http://tuxproject.de/blog) and [Olivier](http://www.wwebsolution.com/hemisphere)
* new: added beta-support for YouTube's JS API as requested by Yun
* performance: remove double DOM-lookups in javascript, hat tip Yun
* annoyance-avoidance: check for "Karma Blocker" addon and warn, based on feedback from [Leona](http://www.tinuum.net/)
* translation: added Romanian, thanks to Alexander and [Web Hosting Geeks](http://webhostinggeeks.com/)
* bugfix: 2nd video with start or showinfo parameters inherited the ones from the 1st one as well as reported by Josh D
* bugfix: marked lyte img border css as !important
* bugfix: moved inline javascript (for each lyte-div) to the footer of the page to solve conflict with some jQuery plugins in MSIE as reported by Yun
* bugfix: set autohide to false for audio-only embeds
= 1.0.0 =
* new: also works on (manual) excerpts; just add a httpv link to the "excerpt" field on the post/page admin (based on feedback from [Ruben@tuttingegneri](http://www.tuttingegneri.com))
* new: if youtube-url contains "start" or "showinfo" parameters, these are used when playing the actual video. This means that you can now jump to a specific time in the YouTube video or stop the title/ author from being displayed (based on feedback from a.o. Miguel and Josh D)
* update: javascript now initiates either after full page load or after 1 second (whatever comes first), thus avoiding video not showing due to other requests taking too long
* update: bonus feature stops lockerz.com tracking by addtoany (you'll still want to [hide the "earn pointz" tab though](http://share.lockerz.com/buttons/customize/hide_lockerz_earn_ptz_tab))
* bugfix: prevent the playing video to be in front of e.g. a dropdown-menu or lightbox (thanks to Matt Whittingham)
* bugfix: solve overlap between player and text when option was set not to show links (reported by Josh D)
= 0.9.4 =
* security: WP YouTube Lyte now works entirely in https if your blog is running in https
* performance (js/ page rendering): initiate the javascript a little later (at "load" instead of "DOMContentLoaded") to speed up page load (might need further optimizations)
* performance (php): have the plugin [only include/ execute php when needed](http://w-shadow.com/blog/2009/02/22/make-your-plugin-faster-with-conditional-tags/)
* updated donottrack.js to match the version used in my [WP DoNotTrack-plugin](http://wordpress.org/extend/plugins/wp-donottrack/). if want to tweak the way donottrack.js functions, you migth want to [check that plugin out](http://wordpress.org/extend/plugins/wp-donottrack/) (and disable the option in WP YouTube Lyte)
* bugfix: small tweak in css to force transparency of play-button
= 0.9.3 =
* Bugfix: donottrack.js incorrectly handled document.write, causing javascript that depends on it to malfunction (reported by [S.K.](http://aimwa.in), thanks for helping out!)
* Bugfix: moved inline javascript into a function expression to protect values (d=document) from other javascript that might use global variables (thanks to Eric McNiece of [emc2innovation.com](http://emc2innovation.com) for reporting & investigating)
* Bugfix: made changes to widgets to allow a video to appear both in a blog post and in the widget bar and to allow httpv-links in there (although httpv is not needed in widgets) based on feedback from [Nick Tann](http://nicktann.co.uk/)
* Bugfix: changed priority of add_filter to ensure wp-youtube-lyte can work alongside of the new Smart Youtube Pro v4 (although this might become a problem again if/when a new version of Smart Youtube arrives)
* Languages: added a full French translation (thanks Serge of [blogaf.org](http://www.blogaf.org))
= 0.9.2 =
* solved bug with W3 Total Cache where the URL for lyte-min.js got broken (thanks to Serge of [blogaf.org](http://www.blogaf.org) for reporting and helping figure this out)
* some [work on the bonus feature](http://blog.futtta.be/2011/11/16/applying-javascript-aop-magic-to-stop-3rd-party-tracking-in-wordpress/)
= 0.9.1 =
* even better xhtml-compliancy
* fixed readme.txt problems
= 0.9.0 =
* you can now change player size from the default one (as proposed by [Edward Owen](http://www.edwardlowen.com/)); httpv://www.youtube.com/watch?v=_SQkWbRublY#stepSize=-2 or httpv://youtu.be/_SQkWbRublY#stepSize=+1 will change player size to one of the other available sizes in your choosen format (4:3 or 16:9)
* added a smaller 16:9 size and re-arranged player sizes on the options-screen
* Bugfix: changed lyte-div ID to force it to be xhtml-compliant (ID's can't start with a digit, hat tip: Ruben of [ytuquelees.net](http://ytuquelees.net)
* Bugfix: added version in js-call to avoid caching issues (lyte-min.js?ver=0.8.1) as experienced by some users and reported by [Ryan of givemeshred.com](http://www.givemeshred.com)
* Upgrade to the "bonus feature" to [fix things](http://blog.futtta.be/2011/11/07/wp-privacy-quantcast-sneaks-back-in/) (consider this beta)
* Languages: added Hebrew (by [Sagive SEO](http://www.sagive.co.il/)) and Catalan (by Ruben of [ytuquelees.net](http://ytuquelees.net)) translations and added completed Spanish version (thanks to [Paulino Brener from Social Media Travelers](http://socialmediatravelers.com/ "Paulino Brener from Social Media Travelers, Your guide to your Social Media journey. We help businesses start or improve their Social Media presence."))
* tested succesfully on WordPress 3.3 (beta 2)
= 0.8.0 =
* added support for playlists
* added support for HD
* dropped support for the legacy YouTube embed-code
* updated UI elements to match new, dark YouTube player style
* updated player sizes to match YouTube's
* added new translations: Spanish (front-end strings, thanks to [Paulino Brener @Social Media Travelers](http://socialmediatravelers.com/)) and German (complete, by ["der Tuxman"](http://tuxproject.de/blog))
= 0.7.3 =
* sdded support for youtu.be links
* added sl_SI translation (thanks [Mitja Miheli&#268; @arnes.si](http://www.arnes.si/))
* load donottrack js in https if needed (thanks [Chris @campino2k.de](http://campino2k.de/))
* tested & confirmed to work perfectly with wordpress 3.2.1
= 0.7.2 =
* fixed a bug introduced in 0.7.1 which caused httpv-links that were not on newline, not to be turned into a lyte-player
* added audio as option for widgets as well (consider this beta, not thoroughly tested yet)
= 0.7.1 =
* re-minized lyte-min.js (there's lyte.js for your reading pleasure though)
* thumbnail image in noscript-tags now inherits size of div (to keep it from messing up the layout when JS is not available, e.g. in a feedburner-feed)
* the html5 version of the audio-player now is a bit higher (was 27px, now 33px) to allow scrolling through the clip
* the html-output of the plugin now validates against xhtml 1.0 transitional (thanks for the heads-up Carolin)
* text in frontend (i.e. what your visitors see) is translated into Dutch & French, [corrections and other translations are welcome](http://blog.futtta.be/contact/)
= 0.7.0 =
* new feature (as seen [on Pitchfork](http://pitchfork.com/ "great site for music lovers")): [audio-only YouTube embeds](http://blog.futtta.be/2011/04/19/audio-only-youtube-embedding-with-wp-youtube-lyte-0-7/) (use "httpa://" instead of "httpv://")
* merged lyte-min.js and lyte-newtube-min.js into one file
* added wmode=transparant when video is played in flash-mode
= 0.6.5 =
* updated images for html5-version to new look&feel
* disabled "watch later" by adding variable "probably_logged_in=false" to youtube embed
* changed lyte/lyte.css (move margin from .lt to .lyte) to allow changes to positioning of player
* changed name of js-variable in options.php to solve small bug in rss display
* added an (experimental) bonus feature
= 0.6.4 =
* happy New Year & thanks for the 10.000 downloads so far!
* solved an [issue with pre-5.2.1 versions of PHP which caused errors in widget.php](http://wordpress.org/support/topic/plugin-wp-youtube-lyte-parse_url-error-in-widget-version)
* tested on iPad, the HTML5-version works
* tested succesfully on WordPress 3.0.4 and 3.1 (release candidate)
= 0.6.3 =
* only load jquery plugins on this plugin's options page
* change thumbnail positiong slightly (5 pixels up)
* tested on WordPress 3.0.3
= 0.6.2 =
* bugfix: the javascript in widgets.php caused a wp youtube lyte widget not to be shown in the sidebar if no wp youtube lyte was present in the main content
* load jquery plugins in admin screen using wp_enqueue_script rather then adding them "manually"
* store the selected feed on the admin-page in a cookie to show the same feed next time
= 0.6.1 =
* widget size can now be set (3 sizes available, to be specified for each widget individually)
* admin-page now contains links to most recent info (blogposts) on WP YouTube Lyte (and optionally WordPress and Web Technology in general) using [the excellent jQuery-plugin zrssfeed](http://www.zazar.net/developers/zrssfeed/)
* bugfix: removed CDATA-wrapper from javascript as WordPress turned ]]> into ]]&amp;gt; which broke the html (which in turn broke syndication in e.g. planets)
= 0.6.0 =
* There now is a WP-YouTube-Lyte widget which you can add to your sidebar (see under "Appearance"->"Widgets"), as requested by the fabulous [fruityoaty](http://fruityoaty.com/)
* The thumbnail is now stretched to use as much of the player as possible (thanks to css3's background-size:contain directive, which works in [all bleeding edge browsers](https://developer.mozilla.org/en/CSS/background-size#Browser_compatibility))
* Updated the "play"-button to fit the new YouTube style
= 0.5.3 =
* we now wait for the DOM to be fully loaded (except for MS IE, where we have to wait for window.load) before kicking in, which means wp-youtube-lyte now functions correctly in Opera
* fixed a bug where lyte's javascript would overwrite the main div's class-name (causing css-issues in some themes)
* there's [new test-data on my blog](http://blog.futtta.be/2010/08/30/the-state-of-wp-youtube-lyte/) that shows how fast wp-youtube-lyte really is.
= 0.5.2 =
* fixed a bug where WordPress' the_excerpt function showed wp-youtube-lyte javascript as text in excerpts
* fixed problem where google tried to index e.g. options.php (which produced ugly php errors)
* fixed some css-related bugs, do contact me (see FAQ) if LYTE-player isn't rendered correctly in your wordpress-theme!
* moved more css out of javascript to the static css-file
= 0.5.1 =
* added new versions of images, fitting the player width (no more ugly rescaling)
* moved a lot of css from javascript to a css-file which gets loaded on-the-fly
= 0.5.0 =
* implemented the new [HTML5 YouTube embed code](http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html) and removed my [newTube.js-hack](http://blog.futtta.be/2010/06/16/embedding-html5-youtube-video-with-wp-youtube-lyte/) for html5-embedding
* player size now applies to Flash- and the new HTML5-embeds
= 0.4.1 =
* add fullscreen-button to player
* disable size in options if html5 is selected
* move player_sizes.inc to player_sizes.inc.php
= 0.4.0 =
* add options to change player size (does not apply to html5-version)
* noscript optimizations: show image (typically useful in rss-feeds), no text if config is to show links beneath lyte-player
= 0.3.5 =
* changed function-name in options.php to avoid errors like "Fatal error: Cannot redeclare register_mysettings()"
= 0.3.4 =
* tested succesfully on the brand new wordpress 3.0 release
* css changes to avoid themes messing up lyte-player layout
* minor text tweaks
= 0.3.3 =
* the "sorry for the linebreak-release"; a linebreak at the very end of options.php caused some configurations [to produce "headers already sent" errors on all wp-admin pages](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F).
* some further readme.txt optimizations
= 0.3.2 =
* fixed misc. readme.txt markdown issues (again)
= 0.3.0 =
* added very experimental support for embedded html5 video (see [faq](http://wordpress.org/extend/plugins/wp-youtube-lyte/faq/))
= 0.2.2 =
* improved the html of the form in options.php for better accessibility
= 0.2.1 =
* 0.2.0 was broken (options.php M.I.A.), 0.2.1 fixes this
= 0.2.0 =
* Added a simple admin-page to allow administrators to choose if links to YouTube and Easy YouTube are added or not
* Added some bottom-margin to the lytelinks div
= 0.1.4 =
* forgot to update version in the php-file for 0.1.3, causing the update not being fully propageted
= 0.1.3 =
* small bugfix release (opacity of the play-button in Chrome/Safari)
= 0.1.2 =
Accessibility enhancements (hat tip: Ricky Buchanan):
* added alt attributes to images
* moved youtube link from noscript to div
* added link to easy youtube
= 0.1.1 =
* Changed meta-info in readme and php-file
= 0.1 =
* Initial version

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -0,0 +1,178 @@
<?php
class WYLWidget extends WP_Widget {
public function __construct() {
parent::__construct(false, $name = 'WP YouTube Lyte');
}
function widget($args, $instance) {
extract( $args );
global $wSize, $wyl_version, $wp_lyte_plugin_url, $lyteSettings;
$lyteSettings['path']= plugins_url() . "/" . dirname(plugin_basename(__FILE__)) . '/lyte/';
$qsa="";
$WYLtitle = apply_filters('widget_title', $instance['WYLtitle']);
$WYLtext = apply_filters( 'widget_text', $instance['WYLtext'], $instance );
$WYLsize = apply_filters( 'widget_text', $instance['WYLsize'], $instance );
if ($WYLsize=="") $WYLsize=$wDefault;
$WYLaudio = apply_filters( 'widget_text', $instance['WYLaudio'], $instance );
if ($WYLaudio!=="audio") {
$wrapperClass = " lidget";
$audioClass = "";
$wHeight = $wSize[$WYLsize]['h'];
} else {
$wrapperClass = "-audio lidget";
$audioClass = " lyte-audio";
$wHeight = "38";
}
$WYLurl=str_replace("httpv://","https://",trim($instance['WYLurl']));
$WYLqs=substr(strstr($WYLurl,'?'),1);
parse_str($WYLqs,$WYLarr);
if (strpos($WYLurl,'youtu.be')) {
$WYLid=substr(parse_url($WYLurl,PHP_URL_PATH),1,11);
$PLClass="";
$WYLthumb="https://img.youtube.com/vi/".$WYLid."/hqdefault.jpg";
} else {
if (isset($WYLarr['v'])) {
$WYLid=$WYLarr['v'];
$PLClass="";
$WYLthumb="https://img.youtube.com/vi/".$WYLid."/hqdefault.jpg";
} else if (isset($WYLarr['list'])) {
$WYLid=$WYLarr['list'];
$yt_resp=lyte_get_YT_resp($WYLid,true,"","",true);
$WYLthumb=$yt_resp["thumbUrl"];
$PLClass=" playlist";
}
}
// do we have to serve the thumbnail from local cache?
if (get_option('lyte_local_thumb','0') === '1') {
$WYLthumb = plugins_url( 'lyteThumbs.php?origThumbUrl=' . urlencode($WYLthumb) , __FILE__ );
}
// filter to alter the thumbnail
$WYLthumb = apply_filters( "lyte_filter_widget_thumb", $WYLthumb, $WYLid );
if (isset($WYLarr['start'])) $qsa="&amp;start=".$WYLarr['start'];
if (isset($WYLarr['enablejsapi'])) {
$urlArr=parse_url($lyteSettings['path']);
$origin=$urlArr[scheme]."://".$urlArr[host]."/";
$qsa.="&amp;enablejsapi=".$WYLarr['enablejsapi']."&amp;origin=".$origin;
}
if (!empty($qsa)) {
$esc_arr=array("&" => "\&", "?" => "\?", "=" => "\=");
$qsaClass=" qsa_".strtr($qsa,$esc_arr);
} else {
$qsaClass="";
}
$WYL_dom_id="YLW_".$WYLid;
?>
<?php echo $before_widget; ?>
<?php if ( $WYLtitle ) echo $before_title . $WYLtitle . $after_title; ?>
<div class="lyte-wrapper<?php echo $wrapperClass; ?>" style="width:<?php echo $wSize[$WYLsize]['w']; ?>px; height:<?php echo $wHeight; ?>px; min-width:200px; max-width:100%;"><div class="lyMe<?php echo $PLClass; echo $audioClass; echo $qsaClass; ?>" id="<?php echo $WYL_dom_id; ?>"><div id="lyte_<?php echo $WYLid; ?>" data-src="<?php echo $WYLthumb;?>" class="pL"><div class="play"></div><div class="ctrl"><div class="Lctrl"></div></div></div></div><noscript><a href="https://youtu.be/<?php echo $WYLid;?>"><img src="<?php echo $WYLthumb; ?>" alt="" /></a></noscript></div>
<div><?php echo $WYLtext ?></div>
<?php echo $after_widget; ?>
<?php
lyte_initer();
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['WYLtitle'] = strip_tags($new_instance['WYLtitle']);
$instance['WYLurl'] = strip_tags($new_instance['WYLurl']);
$instance['WYLsize'] = strip_tags($new_instance['WYLsize']);
$instance['WYLaudio'] = strip_tags($new_instance['WYLaudio']);
if ( current_user_can('unfiltered_html') ) {
$instance['WYLtext'] = $new_instance['WYLtext'];
} else {
$instance['WYLtext'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['WYLtext']) ) );
}
return $instance;
}
function form($instance) {
global $wSize, $wDefault;
if (isset($instance['WYLtitle'])) {
$WYLtitle = esc_attr($instance['WYLtitle']);
} else {
$WYLtitle = "";
}
if (isset($instance['WYLurl'])) {
$WYLurl = esc_attr($instance['WYLurl']);
} else {
$WYLurl = "";
}
if (isset($instance['WYLtext'])) {
$WYLtext = format_to_edit($instance['WYLtext']);
} else {
$WYLtext = "";
}
if (isset($instance['WYLaudio'])) {
$WYLaudio = esc_attr($instance['WYLaudio']);
} else {
$WYLaudio = "";
}
if ($WYLaudio!=="audio") $WYLaudio="";
if (isset($instance['WYLsize'])) {
$WYLsize = esc_attr($instance['WYLsize']);
} else {
$WYLsize = "";
}
if ($WYLsize=="") $WYLsize=$wDefault;
?>
<p><label for="<?php echo $this->get_field_id('WYLtitle'); ?>"><?php _e("Title:","wp-youtube-lyte") ?> <input class="widefat" id="<?php echo $this->get_field_id('WYLtitle'); ?>" name="<?php echo $this->get_field_name('WYLtitle'); ?>" type="text" value="<?php echo $WYLtitle; ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('WYLsize'); ?>"><?php _e("Size:","wp-youtube-lyte") ?>
<select class="widefat" id="<?php echo $this->get_field_id('WYLsize'); ?>" name="<?php echo $this->get_field_name('WYLsize'); ?>">
<?php
foreach ($wSize as $x => $size) {
if ($x==$WYLsize) {
$selected=" selected=\"true\"";
} else {
$selected="";
}
if ($wSize[$x]['depr']!==true) {
echo "<option value=\"".$x."\"".$selected.">".$wSize[$x]['w']."X".$wSize[$x]['h']."</option>";
}
$x++;
}
?>
</select>
</label></p>
<p><label for="<?php echo $this->get_field_id('WYLaudio'); ?>"><?php _e("Type:","wp-youtube-lyte") ?>
<select class="widefat" id="<?php echo $this->get_field_id('WYLaudio'); ?>" name="<?php echo $this->get_field_name('WYLaudio'); ?>">
<?php
if($WYLaudio==="audio") {
$aselected=" selected=\"true\"";
$vselected="";
} else {
$vselected=" selected=\"true\"";
$aselected="";
}
echo "<option value=\"audio\"".$aselected.">".__("audio","wp-youtube-lyte")."</option>";
echo "<option value=\"video\"".$vselected.">".__("video","wp-youtube-lyte")."</option>";
?>
</select>
</label></p>
<p><label for="<?php echo $this->get_field_id('WYLurl'); ?>"><?php _e("Youtube-URL:","wp-youtube-lyte") ?> <input class="widefat" id="<?php echo $this->get_field_id('WYLurl'); ?>" name="<?php echo $this->get_field_name('WYLurl'); ?>" type="text" value="<?php echo $WYLurl; ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('WYLtext'); ?>"><?php _e("Text:","wp-youtube-lyte") ?> <textarea class="widefat" id="<?php echo $this->get_field_id('WYLtext'); ?>" name="<?php echo $this->get_field_name('WYLtext'); ?>" rows="16" cols="20"><?php echo $WYLtext; ?></textarea></label></p>
<?php
}
}
function lyte_register_widget() {
register_widget('WYLWidget');
}
add_action('widgets_init', 'lyte_register_widget');

View File

@@ -0,0 +1,729 @@
<?php
/*
Plugin Name: WP YouTube Lyte
Plugin URI: http://blog.futtta.be/wp-youtube-lyte/
Description: Lite and accessible YouTube audio and video embedding.
Author: Frank Goossens (futtta)
Version: 1.7.7
Author URI: http://blog.futtta.be/
Text Domain: wp-youtube-lyte
Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) exit;
$debug=false;
$lyte_version="1.7.7";
$lyte_db_version=get_option('lyte_version','none');
/** have we updated? */
if ($lyte_db_version !== $lyte_version) {
switch($lyte_db_version) {
case "1.5.0":
lyte_rm_cache();
break;
case "1.4.2":
case "1.4.1":
case "1.4.0":
lyte_rm_cache();
lyte_not_greedy();
break;
}
update_option('lyte_version',$lyte_version);
$lyte_db_version=$lyte_version;
}
/** are we in debug-mode */
if (!$debug) {
$wyl_version=$lyte_version;
$wyl_file="lyte-min.js";
} else {
$wyl_version=rand()/1000;
$wyl_file="lyte.js";
lyte_rm_cache();
}
/** get paths, language and includes */
$plugin_dir = basename(dirname(__FILE__)).'/languages';
load_plugin_textdomain( 'wp-youtube-lyte', null, $plugin_dir );
require_once(dirname(__FILE__).'/player_sizes.inc.php');
require_once(dirname(__FILE__).'/widget.php');
/** get default embed size and build array to change size later if requested */
$oSize = (int) get_option('lyte_size');
if ((is_bool($oSize)) || ($pSize[$oSize]['a']===false)) { $sel = (int) $pDefault; } else { $sel=$oSize; }
$pSizeFormat=$pSize[$sel]['f'];
$j=0;
foreach ($pSizeOrder[$pSizeFormat] as $sizeId) {
$sArray[$j]['w']=(int) $pSize[$sizeId]['w'];
$sArray[$j]['h']=(int) $pSize[$sizeId]['h'];
if ($sizeId===$sel) $selSize=$j;
$j++;
}
/** get other options and push in array*/
$lyteSettings['sizeArray']=$sArray;
$lyteSettings['selSize']=$selSize;
$lyteSettings['links']=get_option('lyte_show_links');
$lyteSettings['file']=$wyl_file."?wyl_version=".$wyl_version;
$lyteSettings['ratioClass']= ( $pSizeFormat==="43" ) ? " fourthree" : "";
$lyteSettings['pos']= ( get_option('lyte_position','0')==="1" ) ? "margin:5px auto;" : "margin:5px;";
$lyteSettings['microdata']=get_option('lyte_microdata','1');
$lyteSettings['hidef']=get_option('lyte_hidef',0);
$lyteSettings['scheme'] = ( is_ssl() ) ? "https" : "http";
/** API: filter hook to alter $lyteSettings */
function lyte_settings_enforcer() {
global $lyteSettings;
$lyteSettings = apply_filters( 'lyte_settings', $lyteSettings );
}
add_action('after_setup_theme','lyte_settings_enforcer');
function lyte_parse($the_content,$doExcerpt=false) {
/** bail if amp */
if ( is_amp()) { return str_replace( 'httpv://', 'https://', $the_content ); }
/** main function to parse the content, searching and replacing httpv-links */
global $lyteSettings, $toCache_index, $postID, $cachekey;
$lyteSettings['path']=plugins_url() . "/" . dirname(plugin_basename(__FILE__)) . '/lyte/';
$urlArr=parse_url($lyteSettings['path']);
$origin=$urlArr['scheme']."://".$urlArr['host']."/";
/** API: filter hook to preparse the_content, e.g. to force normal youtube links to be parsed */
$the_content = apply_filters( 'lyte_content_preparse',$the_content );
if ( get_option('lyte_greedy','1')==="1" && strpos($the_content,"youtu") !== false ){
// only preg_replace if "youtu" (as part of youtube.com or youtu.be) if found
if (strpos($the_content,'/playlist?list=') !== false ) {
// only preg_replace for playlists if there are playlists to be parsed
$the_content=preg_replace('/^https?:\/\/(www.)?youtu(be.com|.be)\/playlist\?list=/m','httpv://www.youtube.com/playlist?list=',$the_content);
}
$the_content=preg_replace('/^https?:\/\/(www.)?youtu(be.com|.be)\/(watch\?v=)?/m','httpv://www.youtube.com/watch?v=',$the_content);
// new: also replace original YT embed code (iframes)
if ( apply_filters( 'lyte_eats_yframes', true ) && preg_match_all('#<iframe(?:[^<]*)?\ssrc=["|\']https:\/\/www\.youtube(?:-nocookie)?\.com\/embed\/(.*)["|\'](?:.*)><\/iframe>#Usm', $the_content, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$the_content = str_replace($match[0], 'httpv://youtu.be/'.$match[1], $the_content);
}
}
}
if ( strpos($the_content,"<!-- wp:") !== false && strpos($the_content,"youtu") !== false ) {
/*
* do Gutenberg stuff here, playlists if needed first and then single videos
*
* having Gutenberg markup in HTML comments is ugly as hell
* esp. for 3rd parties such as Lyte who have to parse info out of that
*
* Luke Cavanagh; thanks for the Gutenbeard reference and for the funny animated gif :)
* https://media1.giphy.com/media/l2QZTNMFTQ2Z00zHG/giphy.gif
*/
if (strpos($the_content,'/playlist?list=') !== false ) {
$gutenbeard_playlist_regex = '%<\!--\s?wp:(?:core[-|/])?embed(?:/youtube)?\s?{"url":"https://www.youtube.com/playlist\?list=(.*)"}\s?-->.*<figcaption>(.*)</figcaption><\!--\s?/wp:(?:core[-|/])?embed(?:/youtube)?\s?-->%Us';
$the_content = preg_replace($gutenbeard_playlist_regex, '<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube">httpv://www.youtube.com/playlist?list=\1<figcaption>\2</figcaption></figure>',$the_content);
}
$gutenbeard_single_regex = '%<\!--\s?wp:(?:core[-|/])?embed(?:/youtube)?\s?{"url":"https?://(?:www\.)?youtu(?:be\.com|.be)/(?:watch\?v=)?(.*)"}\s?-->.*<figcaption>(.*)</figcaption><\!--\s?/wp:(?:core[-|/])?embed(?:/youtube)?\s?-->%Us';
$the_content = preg_replace($gutenbeard_single_regex, '<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube">httpv://www.youtube.com/watch?v=\1<figcaption>\2</figcaption></figure>',$the_content);
}
if((strpos($the_content, "httpv")!==FALSE)||(strpos($the_content, "httpa")!==FALSE)) {
if (apply_filters('lyte_remove_wpautop',false)) {
remove_filter('the_content','wpautop');
}
$char_codes = array('&#215;','&#8211;');
$replacements = array("x", "--");
$the_content=str_replace($char_codes, $replacements, $the_content);
$lyte_feed=is_feed();
$hidefClass = ($lyteSettings['hidef']==="1") ? " hidef" : "";
$postID = get_the_ID();
$toCache_index=array();
$lytes_regexp="/(?:<p>)?http(v|a):\/\/([a-zA-Z0-9\-\_]+\.|)(youtube|youtu)(\.com|\.be)\/(((watch(\?v\=|\/v\/)|.+?v\=|)([a-zA-Z0-9\-\_]{11}))|(playlist\?list\=([a-zA-Z0-9\-\_]*)))([^\s<]*)(<?:\/p>)?/";
preg_match_all($lytes_regexp, $the_content, $matches, PREG_SET_ORDER);
foreach($matches as $match) {
/** API: filter hook to preparse fragment in a httpv-url, e.g. to force hqThumb=1 or showinfo=0 */
$match[12] = apply_filters( 'lyte_match_preparse_fragment',$match[12] );
preg_match("/stepSize\=([\+\-0-9]{2})/",$match[12],$sMatch);
preg_match("/showinfo\=([0-1]{1})/",$match[12],$showinfo);
preg_match("/start\=([0-9]*)/",$match[12],$start);
preg_match("/enablejsapi\=([0-1]{1})/",$match[12],$jsapi);
preg_match("/hqThumb\=([0-1]{1})/",$match[12],$hqThumb);
preg_match("/noMicroData\=([0-1]{1})/",$match[12],$microData);
$thumb="normal";
if ($lyteSettings['hidef']==="1") {
$thumb="highres";
} else if (!empty($hqThumb)) {
if ($hqThumb[0]==="hqThumb=1") {
$thumb="highres";
}
}
$noMicroData="0";
if (!empty($microData)) {
if ($microData[0]==="noMicroData=1") {
$noMicroData="1";
}
}
$qsa="";
if (!empty($showinfo[0])) {
$qsa="&amp;".$showinfo[0];
$titleClass=" hidden";
} else {
$titleClass="";
}
if (!empty($start[0])) $qsa.="&amp;".$start[0];
if (!empty($jsapi[0])) $qsa.="&amp;".$jsapi[0]."&amp;origin=".$origin;
if (!empty($qsa)) {
$esc_arr=array("&" => "\&", "?" => "\?", "=" => "\=");
$qsaClass=" qsa_".strtr($qsa,$esc_arr);
} else {
$qsaClass="";
}
if (!empty($sMatch)) {
$newSize=(int) $sMatch[1];
$newPos=(int) $lyteSettings['selSize']+$newSize;
if ($newPos<0) {
$newPos=0;
} else if ($newPos > count($lyteSettings['sizeArray'])-1) {
$newPos=count($lyteSettings['sizeArray'])-1;
}
$lyteSettings[2]=$lyteSettings['sizeArray'][$newPos]['w'];
$lyteSettings[3]=$lyteSettings['sizeArray'][$newPos]['h'];
} else {
$lyteSettings[2]=$lyteSettings['sizeArray'][$lyteSettings['selSize']]['w'];
$lyteSettings[3]=$lyteSettings['sizeArray'][$lyteSettings['selSize']]['h'];
}
if ($match[1]!=="a") {
$divHeight=$lyteSettings[3];
$audioClass="";
$audio=false;
} else {
$audio=true;
$audioClass=" lyte-audio";
$divHeight=38;
}
$NSimgHeight=$divHeight-20;
if ($match[11]!="") {
$plClass=" playlist";
$vid=$match[11];
switch ($lyteSettings['links']) {
case "0":
$noscript_post="<br />".__("Watch this playlist on YouTube","wp-youtube-lyte");
$noscript="<noscript><a href=\"".$lyteSettings['scheme']."://youtube.com/playlist?list=".$vid."\">".$noscript_post."</a></noscript>";
$lytelinks_txt="";
break;
default:
$noscript="";
$lytelinks_txt="<div class=\"lL\" style=\"max-width:100%;width:".$lyteSettings[2]."px;".$lyteSettings['pos']."\">".__("Watch this playlist","wp-youtube-lyte")." <a href=\"".$lyteSettings['scheme']."://www.youtube.com/playlist?list=".$vid."\">".__("on YouTube","wp-youtube-lyte")."</a></div>";
}
} else if ($match[9]!="") {
$plClass="";
$vid=$match[9];
switch ($lyteSettings['links']) {
case "0":
$noscript_post="<br />".__("Watch this video on YouTube","wp-youtube-lyte");
$lytelinks_txt="<div class=\"lL\" style=\"max-width:100%;width:".$lyteSettings[2]."px;".$lyteSettings['pos']."\"></div>";
break;
default:
$noscript_post="";
$lytelinks_txt="<div class=\"lL\" style=\"max-width:100%;width:".$lyteSettings[2]."px;".$lyteSettings['pos']."\">".__("Watch this video","wp-youtube-lyte")." <a href=\"".$lyteSettings['scheme']."://youtu.be/".$vid."\">".__("on YouTube","wp-youtube-lyte")."</a>.</div>";
}
$thumbUrl = $lyteSettings['scheme']."://i.ytimg.com/vi/".$vid."/0.jpg";
if (get_option('lyte_local_thumb','0') === '1') {
$thumbUrl = plugins_url( 'lyteThumbs.php?origThumbUrl=' . urlencode($thumbUrl) , __FILE__ );
}
$noscript="<noscript><a href=\"".$lyteSettings['scheme']."://youtu.be/".$vid."\"><img src=\"" . $thumbUrl . "\" alt=\"\" width=\"".$lyteSettings[2]."\" height=\"".$NSimgHeight."\" />".$noscript_post."</a></noscript>";
}
// add disclaimer to lytelinks
$disclaimer = wp_kses_data( get_option( 'lyte_disclaimer', '') );
if ( !empty( $disclaimer ) ) {
$disclaimer = '<span class="lyte_disclaimer">' . $disclaimer . '</span>';
}
if ( $disclaimer && empty( $lytelinks_txt ) ) {
$lytelinks_txt = "<div class=\"lL\" style=\"max-width:100%;width:".$lyteSettings[2]."px;".$lyteSettings['pos']."\">".$diclaimer."</div>";
} else if ( $disclaimer ) {
$lytelinks_txt = str_replace('</div>','<br/>'.$disclaimer.'</div>',$lytelinks_txt);
}
// fetch data from YT api (v2 or v3)
$isPlaylist=false;
if ($plClass===" playlist") {
$isPlaylist=true;
}
$cachekey = '_lyte_' . $vid;
$yt_resp_array=lyte_get_YT_resp($vid,$isPlaylist,$cachekey);
// If there was a result from youtube or from cache, use it
if ( $yt_resp_array ) {
if (is_array($yt_resp_array)) {
if ($isPlaylist!==true) {
// captions, thanks to Benetech
$captionsMeta="";
$doCaptions=true;
/** API: filter hook to disable captions */
$doCaptions = apply_filters( 'lyte_docaptions', $doCaptions );
if(($lyteSettings['microdata'] === "1")&&($noMicroData !== "1" )&&($doCaptions === true)) {
if (array_key_exists('captions_data',$yt_resp_array)) {
if ($yt_resp_array["captions_data"]=="true") {
$captionsMeta="<meta itemprop=\"accessibilityFeature\" content=\"captions\" />";
$forceCaptionsUpdate=false;
} else {
$forceCaptionsUpdate=true;
}
} else {
$forceCaptionsUpdate=true;
$yt_resp_array["captions_data"]=false;
}
if ($forceCaptionsUpdate===true) {
$captionsMeta="";
$threshold = 30;
if (array_key_exists('captions_timestamp',$yt_resp_array)) {
$cache_timestamp = $yt_resp_array["captions_timestamp"];
$interval = (strtotime("now") - $cache_timestamp)/60/60/24;
} else {
$cache_timestamp = false;
$interval = $threshold+1;
}
if(!is_int($cache_timestamp) || ($interval > $threshold && !is_null( $yt_resp_array["captions_data"]))) {
$yt_resp_array['captions_timestamp'] = strtotime("now");
wp_schedule_single_event(strtotime("now") + 60*60, 'schedule_captions_lookup', array($postID, $cachekey, $vid));
$yt_resp_precache=json_encode($yt_resp_array);
$toCache=base64_encode(gzcompress($yt_resp_precache));
update_post_meta($postID, $cachekey, $toCache);
}
}
}
}
$thumbUrl="";
if (($thumb==="highres") && (!empty($yt_resp_array["HQthumbUrl"]))){
$thumbUrl=$yt_resp_array["HQthumbUrl"];
} else {
if (!empty($yt_resp_array["thumbUrl"])) {
$thumbUrl=$yt_resp_array["thumbUrl"];
} else {
$thumbUrl="//i.ytimg.com/vi/".$vid."/hqdefault.jpg";
}
}
} else {
// no useable result from youtube, fallback on video thumbnail (doesn't work on playlist)
$thumbUrl = "//i.ytimg.com/vi/".$vid."/hqdefault.jpg";
}
} else {
// same fallback
$thumbUrl = "//i.ytimg.com/vi/".$vid."/hqdefault.jpg";
}
// do we have to serve the thumbnail from local cache?
if (get_option('lyte_local_thumb','0') === '1') {
$thumbUrl = plugins_url( 'lyteThumbs.php?origThumbUrl=' . urlencode($thumbUrl) , __FILE__ );
}
/** API: filter hook to override thumbnail URL */
$thumbUrl = apply_filters( 'lyte_match_thumburl', $thumbUrl, $vid );
if ($audio===true) {
$wrapper="<div class=\"lyte-wrapper-audio\" style=\"width:".$lyteSettings[2]."px;max-width:100%;overflow:hidden;height:38px;".$lyteSettings['pos']."\">";
} else {
$wrapper="<div class=\"lyte-wrapper".$lyteSettings['ratioClass']."\" style=\"width:".$lyteSettings[2]."px;max-width: 100%;".$lyteSettings['pos']."\">";
}
if ($doExcerpt) {
$lytetemplate="";
$templateType="excerpt";
} elseif ($lyte_feed) {
$postURL = get_permalink( $postID );
$textLink = ($lyteSettings['links']===0)? "" : "<br />".strip_tags($lytelinks_txt, '<a>')."<br />";
$lytetemplate = "<a href=\"".$postURL."\"><img src=\"".$thumbUrl."\" alt=\"YouTube Video\"></a>".$textLink;
$templateType="feed";
} elseif (($audio !== true) && ( $plClass !== " playlist") && (($lyteSettings['microdata'] === "1")&&($noMicroData !== "1" ))) {
$lytetemplate = $wrapper."<div class=\"lyMe".$audioClass.$hidefClass.$plClass.$qsaClass."\" id=\"WYL_".$vid."\" itemprop=\"video\" itemscope itemtype=\"https://schema.org/VideoObject\"><meta itemprop=\"thumbnailUrl\" content=\"".$thumbUrl."\" /><meta itemprop=\"embedURL\" content=\"https://www.youtube.com/embed/".$vid."\" /><meta itemprop=\"uploadDate\" content=\"".$yt_resp_array["dateField"]."\" />".$captionsMeta."<div id=\"lyte_".$vid."\" data-src=\"".$thumbUrl."\" class=\"pL\"><div class=\"tC".$titleClass."\"><div class=\"tT\" itemprop=\"name\">".$yt_resp_array["title"]."</div></div><div class=\"play\"></div><div class=\"ctrl\"><div class=\"Lctrl\"></div><div class=\"Rctrl\"></div></div></div>".$noscript."<meta itemprop=\"description\" content=\"".$yt_resp_array["description"]."\"></div></div>".$lytelinks_txt;
$templateType="postMicrodata";
} else {
$lytetemplate = $wrapper."<div class=\"lyMe".$audioClass.$hidefClass.$plClass.$qsaClass."\" id=\"WYL_".$vid."\"><div id=\"lyte_".$vid."\" data-src=\"".$thumbUrl."\" class=\"pL\">";
if (isset($yt_resp_array) && !empty($yt_resp_array) && !empty($yt_resp_array["title"])) {
$lytetemplate .= "<div class=\"tC".$titleClass."\"><div class=\"tT\">".$yt_resp_array['title']."</div></div>";
}
$lytetemplate .= "<div class=\"play\"></div><div class=\"ctrl\"><div class=\"Lctrl\"></div><div class=\"Rctrl\"></div></div></div>".$noscript."</div></div>".$lytelinks_txt;
$templateType="post";
}
/** API: filter hook to parse template before being applied */
$lytetemplate = str_replace('$','&#36;',$lytetemplate);
$lytetemplate = apply_filters( 'lyte_match_postparse_template',$lytetemplate,$templateType );
$the_content = preg_replace($lytes_regexp, $lytetemplate, $the_content, 1);
}
// update lyte_cache_index
if ((is_array($toCache_index))&&(!empty($toCache_index))) {
$lyte_cache=json_decode(get_option('lyte_cache_index'),true);
$lyte_cache[$postID]=$toCache_index;
update_option('lyte_cache_index',json_encode($lyte_cache));
}
if (!$lyte_feed) {
lyte_initer();
}
}
/** API: filter hook to postparse the_content before returning */
$the_content = apply_filters( 'lyte_content_postparse',$the_content );
return $the_content;
}
function captions_lookup($postID, $cachekey, $vid) {
// captions lookup at YouTube via a11ymetadata.org
$response = wp_remote_request("http://api.a11ymetadata.org/captions/youtubeid=".$vid."/youtube");
if(!is_wp_error($response)) {
$rawJson = wp_remote_retrieve_body($response);
$decodeJson = json_decode($rawJson, true);
$yt_resp = get_post_meta($postID, $cachekey, true);
if (!empty($yt_resp)) {
$yt_resp = gzuncompress(base64_decode($yt_resp));
if($yt_resp) {
$yt_resp_array=json_decode($yt_resp,true);
if ($decodeJson['status'] == 'success' && $decodeJson['data']['captions'] == '1') {
$yt_resp_array['captions_data'] = true;
} else {
$yt_resp_array['captions_data'] = false;
}
$yt_resp_array['captions_timestamp'] = strtotime("now");
$yt_resp_precache=json_encode($yt_resp_array);
$toCache=base64_encode(gzcompress($yt_resp_precache));
update_post_meta($postID, $cachekey, $toCache);
}
}
}
}
function lyte_get_YT_resp($vid,$playlist=false,$cachekey,$apiTestKey="",$isWidget=false) {
/** logic to get video info from cache or get it from YouTube and set it */
global $postID, $cachekey, $toCache_index;
$_thisLyte = array();
$yt_error = array();
if ( $postID && empty($apiTestKey) && !$isWidget ) {
$cache_resp = get_post_meta( $postID, $cachekey, true );
if (!empty($cache_resp)) {
$_thisLyte = json_decode(gzuncompress(base64_decode($cache_resp)),1);
// make sure there are not old APIv2 full responses in cache
if (array_key_exists('entry', $_thisLyte)) {
if ($_thisLyte['entry']['xmlns$yt']==="http://gdata.youtube.com/schemas/2007") {
$_thisLyte = array();
}
}
}
} else if ($isWidget) {
$cache_resp = get_option("lyte_widget_cache");
if (!empty($cache_resp)) {
$widget_cache = json_decode(gzuncompress(base64_decode($cache_resp)),1);
$_thisLyte = $widget_cache[$vid];
}
}
if ( empty( $_thisLyte ) ) {
// get info from youtube
// first get yt api key
$lyte_yt_api_key = get_option('lyte_yt_api_key','');
$lyte_yt_api_key = apply_filters('lyte_filter_yt_api_key', $lyte_yt_api_key);
if (!empty($apiTestKey)) {
$lyte_yt_api_key=$apiTestKey;
}
if (($lyte_yt_api_key==="none") || (empty($lyte_yt_api_key))) {
$_thisLyte['title']="";
if ($playlist) {
$_thisLyte['thumbUrl']="";
$_thisLyte['HQthumbUrl']="";
} else {
$_thisLyte['thumbUrl']="//i.ytimg.com/vi/".$vid."/hqdefault.jpg";
$_thisLyte['HQthumbUrl']="//i.ytimg.com/vi/".$vid."/maxresdefault.jpg";
}
$_thisLyte['dateField']="";
$_thisLyte['duration']="";
$_thisLyte['description']="";
$_thisLyte['captions_data']="false";
$_thisLyte['captions_timestamp']=strtotime("now");
return $_thisLyte;
} else {
// v3, feeling somewhat lonely now v2 has gently been put to sleep
$yt_api_base = "https://www.googleapis.com/youtube/v3/";
if ($playlist) {
$yt_api_target = "playlists?part=snippet%2C+id&id=".$vid."&key=".$lyte_yt_api_key;
} else {
$yt_api_target = "videos?part=id%2C+snippet%2C+contentDetails&id=".$vid."&key=".$lyte_yt_api_key;
}
}
$yt_api_url = $yt_api_base.$yt_api_target;
$yt_resp = wp_remote_get($yt_api_url);
// check if we got through
if ( is_wp_error($yt_resp) ) {
$yt_error['code']=408;
$yt_error['reason']=$yt_resp->get_error_message();
$yt_error['timestamp']=strtotime("now");
if (!empty($apiTestKey)) {
return $yt_error;
}
} else {
$yt_resp_array = (array) json_decode(wp_remote_retrieve_body($yt_resp),true);
if(is_array($yt_resp_array)) {
// extract relevant data
// v3
if (in_array(wp_remote_retrieve_response_code($yt_resp),array(400,403,404))) {
$yt_error['code']=wp_remote_retrieve_response_code($yt_resp);
$yt_error['reason']=$yt_resp_array['error']['errors'][0]['reason'];
$yt_error['timestamp']=strtotime("now");
if (empty($apiTestKey)) {
update_option("lyte_api_error",json_encode($yt_error));
} else {
return $yt_error;
}
} else {
if ($playlist) {
$_thisLyte['title']="Playlist: ".esc_attr(sanitize_text_field(@$yt_resp_array['items'][0]['snippet']['title']));
$_thisLyte['thumbUrl']=esc_url(@$yt_resp_array['items'][0]['snippet']['thumbnails']['high']['url']);
$_thisLyte['HQthumbUrl']=esc_url(@$yt_resp_array['items'][0]['snippet']['thumbnails']['maxres']['url']);
$_thisLyte['dateField']=sanitize_text_field(@$yt_resp_array['items'][0]['snippet']['publishedAt']);
$_thisLyte['duration']="";
$_thisLyte['description']=esc_attr(sanitize_text_field(@$yt_resp_array['items'][0]['snippet']['description']));
$_thisLyte['captions_data']="false";
$_thisLyte['captions_timestamp'] = "";
} else {
$_thisLyte['title']=esc_attr(sanitize_text_field(@$yt_resp_array['items'][0]['snippet']['title']));
$_thisLyte['thumbUrl']=esc_url(@$yt_resp_array['items'][0]['snippet']['thumbnails']['high']['url']);
$_thisLyte['HQthumbUrl']=esc_url(@$yt_resp_array['items'][0]['snippet']['thumbnails']['maxres']['url']);
$_thisLyte['dateField']=sanitize_text_field(@$yt_resp_array['items'][0]['snippet']['publishedAt']);
$_thisLyte['duration']=sanitize_text_field(@$yt_resp_array['items'][0]['contentDetails']['duration']);
$_thisLyte['description']=esc_attr(sanitize_text_field(@$yt_resp_array['items'][0]['snippet']['description']));
$_thisLyte['captions_data']=sanitize_text_field(@$yt_resp_array['items'][0]['contentDetails']['caption']);
$_thisLyte['captions_timestamp'] = strtotime("now");
}
}
// try to cache the result
if ( (($postID) || ($isWidget)) && !empty($_thisLyte) && empty($apiTestKey) ) {
$_thisLyte['lyte_date_added']=time();
if ( $postID && !$isWidget ) {
$yt_resp_precache=json_encode($_thisLyte);
// then gzip + base64 (to limit amount of data + solve problems with wordpress removing slashes)
$yt_resp_precache=base64_encode(gzcompress($yt_resp_precache));
// and do the actual caching
$toCache = ( $yt_resp_precache ) ? $yt_resp_precache : '{{unknown}}';
update_post_meta( $postID, $cachekey, $toCache );
// and finally add new cache-entry to toCache_index which will be added to lyte_cache_index pref
$toCache_index[]=$cachekey;
} else if ($isWidget) {
$widget_cache[$vid]=$_thisLyte;
update_option("lyte_widget_cache",base64_encode(gzcompress(json_encode($widget_cache))));
}
}
}
}
}
foreach (array("title","thumbUrl","HQthumbUrl","dateField","duration","description","captions_data","captions_timestamp") as $key) {
if (!array_key_exists($key,$_thisLyte)) {
$_thisLyte[$key]="";
}
}
return $_thisLyte;
}
/* only add js/css once and only if needed */
function lyte_initer() {
global $lynited;
if (!$lynited) {
$lynited=true;
add_action('wp_footer', 'lyte_init');
}
}
/* actual initialization */
function lyte_init() {
global $lyteSettings;
$lyte_css = ".lyte-wrapper-audio div, .lyte-wrapper div {margin:0px; overflow:hidden;} .lyte,.lyMe{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;background-color:#777;} .fourthree .lyMe, .fourthree .lyte {padding-bottom:75%;} .lidget{margin-bottom:5px;} .lidget .lyte, .widget .lyMe {padding-bottom:0!important;height:100%!important;} .lyte-wrapper-audio .lyte{height:38px!important;overflow:hidden;padding:0!important} .lyMe iframe, .lyte iframe,.lyte .pL{position:absolute !important;top:0;left:0;width:100%;height:100%!important;background:no-repeat scroll center #000;background-size:cover;cursor:pointer} .tC{left:0;position:absolute;top:0;width:100%} .tC{background-image:linear-gradient(to bottom,rgba(0,0,0,0.6),rgba(0,0,0,0))} .tT{color:#FFF;font-family:Roboto,sans-serif;font-size:16px;height:auto;text-align:left;padding:5px 10px 50px 10px} .play{background:no-repeat scroll 0 0 transparent;width:88px;height:63px;position:absolute;left:43%;left:calc(50% - 44px);left:-webkit-calc(50% - 44px);top:38%;top:calc(50% - 31px);top:-webkit-calc(50% - 31px);} .widget .play {top:30%;top:calc(45% - 31px);top:-webkit-calc(45% - 31px);transform:scale(0.6);-webkit-transform:scale(0.6);-ms-transform:scale(0.6);} .lyte:hover .play{background-position:0 -65px;} .lyte-audio .pL{max-height:38px!important} .lyte-audio iframe{height:438px!important} .ctrl{background:repeat scroll 0 -220px rgba(0,0,0,0.3);width:100%;height:40px;bottom:0px;left:0;position:absolute;} .lyte-wrapper .ctrl{display:none}.Lctrl{background:no-repeat scroll 0 -137px transparent;width:158px;height:40px;bottom:0;left:0;position:absolute} .Rctrl{background:no-repeat scroll -42px -179px transparent;width:117px;height:40px;bottom:0;right:0;position:absolute;padding-right:10px;}.lyte-audio .play{display:none}.lyte-audio .ctrl{background-color:rgba(0,0,0,1)}.hidden{display:none}";
// by default show lyte vid on mobile (requiring user clicking play two times)
// but can be overruled by this filter
// also "do lyte mobile" when option to cache thumbnails is on to ensure privacy (gdpr)
$mobLyte = apply_filters( 'lyte_do_mobile', false );
if ( $mobLyte || get_option( 'lyte_local_thumb', 0 ) ) {
$mobJS = "var mOs=null;";
} else {
$mobJS = "var mOs=navigator.userAgent.match(/(iphone|ipad|ipod|android)/i);";
}
/** API: filter hook to change css */
$lyte_css = apply_filters( 'lyte_css', $lyte_css);
echo "<script type=\"text/javascript\">var bU='".$lyteSettings['path']."';".$mobJS."style = document.createElement('style');style.type = 'text/css';rules = document.createTextNode(\"".$lyte_css."\" );if(style.styleSheet) { style.styleSheet.cssText = rules.nodeValue;} else {style.appendChild(rules);}document.getElementsByTagName('head')[0].appendChild(style);</script>";
echo "<script type=\"text/javascript\" async src=\"".$lyteSettings['path'].$lyteSettings['file']."\"></script>";
}
/** override default wp_trim_excerpt to have lyte_parse remove the httpv-links */
function lyte_trim_excerpt($text) {
global $post;
$raw_excerpt = $text;
if ( '' == $text ) {
$text = get_the_content('');
$text = lyte_parse($text, true);
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]&gt;', $text);
$excerpt_length = apply_filters('excerpt_length', 55);
$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
if (function_exists('wp_trim_words')) {
$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
} else {
$length = $excerpt_length*6;
$text = substr( strip_tags(trim(preg_replace('/\s+/', ' ', $text))), 0, $length );
$text .= $excerpt_more;
}
}
return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
}
/** Lyte shortcode */
function shortcode_lyte($atts) {
extract(shortcode_atts(array(
"id" => '',
"audio" => '',
"playlist" => '',
"start" => '',
"showinfo" => '',
"stepsize" => '',
"hqthumb" => '',
), $atts));
$qs = '';
if ($audio) {$proto="httpa";} else {$proto="httpv";}
if ($start !== '') { $qs .= "&amp;start=".$start; }
if ($showinfo === "false") { $qs .= "&amp;showinfo=0"; }
if ($hqthumb) { $qs .= "&amp;hqThumb=1"; }
if ($stepsize) { $qs .= "#stepSize=".$stepsize; }
if ($playlist) {$action="playlist?list=";} else {$action="watch?v=";}
return lyte_parse($proto.'://www.youtube.com/'.$action.$id.$qs);
}
/** update functions */
/** upgrade, so lyte should not be greedy */
function lyte_not_greedy() {
update_option( "lyte_greedy", "0" );
}
/** function to flush YT responses from cache */
function lyte_rm_cache() {
// remove thumbnail cache
if (get_option('lyte_local_thumb','0') === '1') {
if ( ! defined( 'LYTE_CACHE_DIR' ) ) {
define( 'LYTE_CACHE_CHILD_DIR', 'cache/lyteThumbs' );
define( 'LYTE_CACHE_DIR', WP_CONTENT_DIR .'/'. LYTE_CACHE_CHILD_DIR );
}
array_map('unlink', glob(LYTE_CACHE_DIR . "/*"));
}
// and remove cached YT data from postmeta
try {
ini_set('max_execution_time',90); // give PHP some more time for this, post-meta can be sloooooow
// cache in post_meta, for posts
$lyte_posts = json_decode(get_option("lyte_cache_index"),true);
$lyteCacheIterator = 0;
$lytePurgeThreshold = 500;
$returnCode = "OK";
if (is_array($lyte_posts)){
foreach ($lyte_posts as $postID => $lyte_post) {
foreach ($lyte_post as $cachekey) {
delete_post_meta($postID, $cachekey);
}
unset ($lyte_posts[$postID]);
$lyteCacheIterator++;
if ($lyteCacheIterator > ($lytePurgeThreshold-1)) {
$returnCode = "PART";
break;
}
}
update_option("lyte_cache_index",json_encode($lyte_posts));
}
// and the widget cache which isn't in post_meta
update_option('lyte_widget_cache','');
return $returnCode;
} catch(Exception $e) {
return $e->getMessage();
}
}
/** function to call from within themes */
/* use with e.g. : <?php if(function_exists('lyte_preparse')) { echo lyte_preparse($videoId); } ?> */
function lyte_preparse($videoId) {
return lyte_parse('httpv://www.youtube.com/watch?v='.$videoId);
}
function lyte_add_action_link($links) {
$links[]='<a href="' . admin_url( 'options-general.php?page=lyte_settings_page' ) . '">' . __('Settings') . '</a>';
return $links;
}
/** is_amp, but I shouldn't have to do this, should I? */
if (!function_exists("is_amp")) {
function is_amp() {
if ((strpos($_SERVER['REQUEST_URI'],'?amp')!==false) || (strpos($_SERVER['REQUEST_URI'],'/amp/')!==false)) {
return true;
} else {
return false;
}
}
}
/** hooking it all up to wordpress */
if ( is_admin() ) {
require_once(dirname(__FILE__).'/options.php');
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'lyte_add_action_link' );
} else {
add_filter('the_content', 'lyte_parse', 4);
add_shortcode("lyte", "shortcode_lyte");
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'lyte_trim_excerpt');
add_action('schedule_captions_lookup', 'captions_lookup', 1, 3);
/** API: action hook to allow extra actions or filters to be added */
do_action("lyte_actionsfilters");
}
?>