Featured Video Plus - Version 2.3.0

Version Description

Download this release

Release Info

Developer a.hoereth
Plugin Icon 128x128 Featured Video Plus
Version 2.3.0
Comparing to
See all releases

Code changes from version 2.2.3 to 2.3.0

.gitignore DELETED
@@ -1,4 +0,0 @@
1
- node_modules
2
- build
3
- *.min.js
4
- *.css
 
 
 
 
CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
  # Changelog #
2
 
 
 
 
 
 
 
 
3
  ## 2.2.3: 2016-07-19 ##
4
  * Fix for bad iframe src attributes. ([*](https://wordpress.org/support/topic/fix-for-wordpress-442-for-youtube-video-error))
5
  * Fix a problem with image type detection. ([*](https://wordpress.org/support/topic/warning-and-no-featured-image-generated?replies=3), [*](https://wordpress.org/support/topic/plugin-is-not-supporting-by-wordpress-44))
1
  # Changelog #
2
 
3
+ ## 2.3.0: 2016-12-15 ##
4
+ * Now compatible with [Video SEO](https://yoast.com/wordpress/plugins/video-seo/)! ([*](https://wordpress.org/support/topic/compatibility-with-video-seo), [*](https://wordpress.org/support/topic/video-seo-featured-video-plus-compatability), [*](https://wordpress.org/support/topic/fantastic-a-must-have-for-all-video-sites))
5
+ * Fix AJAX vulnerability reported by [@jamesgol](https://github.com/jamesgol).
6
+ * **Disallow raw embeds (`iframe`, `object`, `embed`) by default for new videos -- can be enabled in the settings.** Could have been misused if somebody had gained access to an editor account beforehand. Reported by [@jamesgol](https://github.com/jamesgol).
7
+ * "Single" now actually means single posts **and** pages. ([*](https://wordpress.org/support/topic/is_singular), [*](https://github.com/ahoereth/featured-video-plus/issues/7))
8
+ * Fix some problem with fixed size specifications. ([*](https://wordpress.org/support/topic/modifying-size-has-no-effect), [*](https://wordpress.org/support/topic/not-able-to-change-size-of-video), [*](https://wordpress.org/support/topic/width-function-on-featured-video-plus-width560-is-not-working), [*](https://wordpress.org/support/topic/the_post_video-is-the-wrong-size))
9
+
10
  ## 2.2.3: 2016-07-19 ##
11
  * Fix for bad iframe src attributes. ([*](https://wordpress.org/support/topic/fix-for-wordpress-442-for-youtube-video-error))
12
  * Fix a problem with image type detection. ([*](https://wordpress.org/support/topic/warning-and-no-featured-image-generated?replies=3), [*](https://wordpress.org/support/topic/plugin-is-not-supporting-by-wordpress-44))
FAQ.md CHANGED
@@ -1,13 +1,13 @@
1
  # Frequently Asked Questions #
2
 
3
  ## Why do I just get text back after adding an URL to the Featured Video input? ##
4
- If the plugin just displays the URL back as text it probably does not recognize that it comes from a video provider. Try inserting the raw embed code instead and [check the docs](http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F) to see which providers are supported.
5
 
6
  ## How do I use my local videos? ##
7
  Click the small media icon in the Featured Video input box on the post edit screen and upload your video or choose it from the media library. WordPress does not support all formats tho, [check this table](http://www.mediaelementjs.com/#devices) for details.
8
 
9
- ## Why do I not see a featuerd video or image on the frontend at all? ##
10
- For the videos to be automatically displayed you need to define a Featured Image. This image will never be shown if a video is available. If your theme does not support featured images the plugin also has no chance of working out of the box.
11
 
12
  ## Why does the frontend still display the featured image although I added a featured video to the post? ##
13
  Sadly not all themes work out of the box. Themes need to make use of WordPress' native [Post Thumbnail](http://codex.wordpress.org/Post_Thumbnails) functionality (specifically `get_the_post_thumbnail()` and/or `the_post_thumbnail()`) - these functions are where the plugin can hook into the theme and modify what is displayed. Consider contacting the theme's creator or modifying the theme's sourcecode in order to add the plugin's [PHP-functions](https://wordpress.org/plugins/featured-video-plus/installation/).
@@ -15,5 +15,8 @@ Sadly not all themes work out of the box. Themes need to make use of WordPress'
15
  ## How can I make the videos fit into their designated space in my theme? ##
16
  Take a look at your media settings and try using a fixed width instead of responsive sizing.
17
 
 
 
 
18
  ## Can I help translating the plugin? ##
19
- Yes, please! Check out the public [Featured Video Plus Translation Project](https://poeditor.com/join/project?hash=WlyLh0cFO3).
1
  # Frequently Asked Questions #
2
 
3
  ## Why do I just get text back after adding an URL to the Featured Video input? ##
4
+ If the plugin just returns text instead of the actual video the pasted url is probably not valid or not from a valid video provider. Try inserting the raw embed code instead or [check the docs](http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F) to see which providers are supported.
5
 
6
  ## How do I use my local videos? ##
7
  Click the small media icon in the Featured Video input box on the post edit screen and upload your video or choose it from the media library. WordPress does not support all formats tho, [check this table](http://www.mediaelementjs.com/#devices) for details.
8
 
9
+ ## Why do I not see a featured video or image on the frontend at all? ##
10
+ For the videos to be automatically displayed you need to define a Featured Image. Depending on your featured video settings this image will never be shown if a video is set. If your theme does not support featured images the plugin also has no chance of working out of the box.
11
 
12
  ## Why does the frontend still display the featured image although I added a featured video to the post? ##
13
  Sadly not all themes work out of the box. Themes need to make use of WordPress' native [Post Thumbnail](http://codex.wordpress.org/Post_Thumbnails) functionality (specifically `get_the_post_thumbnail()` and/or `the_post_thumbnail()`) - these functions are where the plugin can hook into the theme and modify what is displayed. Consider contacting the theme's creator or modifying the theme's sourcecode in order to add the plugin's [PHP-functions](https://wordpress.org/plugins/featured-video-plus/installation/).
15
  ## How can I make the videos fit into their designated space in my theme? ##
16
  Take a look at your media settings and try using a fixed width instead of responsive sizing.
17
 
18
+ ## How can I make the plugin work with infinite scrolling? ##
19
+ While the plugin tries to handle infinite scrolling automatically, it does not work for all configurations. In those cases you will want to manually call `initFeaturedVideoPlus()` using JavaScript everytime new articles have been loaded. Most infinite scroll plugins should have some kind of post-load hook.
20
+
21
  ## Can I help translating the plugin? ##
22
+ Yes, please! Check out the official [Featured Video Plus Translation Project](https://translate.wordpress.org/projects/wp-plugins/featured-video-plus).
README.md CHANGED
@@ -15,6 +15,8 @@ There are three ways to get the videos onto your page:
15
  2. insert the `[featured-video-plus]`-__Shortcode__ in your posts or
16
  3. manually make use of the __PHP-functions__ in your theme's source files.
17
 
 
 
18
  > <strong>Theme compatibility</strong><br>
19
  > Sadly many themes do not follow the WordPress standards and implement their own fancy functions for displaying featured images - those very likely break this plugin. Check out the [FAQ](https://wordpress.org/plugins/featured-video-plus/faq/). Another common problem are sliders: Videos, in general, do not like sliders at all.
20
 
@@ -25,7 +27,7 @@ Besides **Local Videos** you can use videos from a whole lot of external provide
25
  After installing the plugin check your site's *Media Settings* (`Settings -> Media` in the administration interface): The plugin adds quite some little helper options there. Change to lazy or overlay mode, tweak video sizing, individualize the look of the most prominent providers' video players and turn on autoplay or video looping. By default videos try to dynamically fit their parent containers width and adjust their size responsively.
26
 
27
  > <strong>Support</strong><br>
28
- > I do read all support questions in the [forums](https://wordpress.org/support/plugin/featured-video-plus) but cannot reply to all of them. The plugin is an unpaid side project and full support would require more time than I can invest for free for over 10k active installs. If you really need help, consider [buying me a cookie](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AD8UKMQW2DMM6) - best way to attract my attention and to support future enhancements.
29
 
30
 
31
 
15
  2. insert the `[featured-video-plus]`-__Shortcode__ in your posts or
16
  3. manually make use of the __PHP-functions__ in your theme's source files.
17
 
18
+ For more details, check the [installation](http://wordpress.org/plugins/featured-video-plus/installation/) page.
19
+
20
  > <strong>Theme compatibility</strong><br>
21
  > Sadly many themes do not follow the WordPress standards and implement their own fancy functions for displaying featured images - those very likely break this plugin. Check out the [FAQ](https://wordpress.org/plugins/featured-video-plus/faq/). Another common problem are sliders: Videos, in general, do not like sliders at all.
22
 
27
  After installing the plugin check your site's *Media Settings* (`Settings -> Media` in the administration interface): The plugin adds quite some little helper options there. Change to lazy or overlay mode, tweak video sizing, individualize the look of the most prominent providers' video players and turn on autoplay or video looping. By default videos try to dynamically fit their parent containers width and adjust their size responsively.
28
 
29
  > <strong>Support</strong><br>
30
+ > I do read all support questions in the [forums](http://wordpress.org/support/plugin/featured-video-plus) but cannot reply to all of them. The plugin is an unpaid side project and full support would require more time than I can invest for free for over 20k active installs. If you really need help, consider [buying me a cookie](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AD8UKMQW2DMM6) - best way to attract my attention and to support future enhancements.
31
 
32
 
33
 
featured-video-plus.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Featured Video Plus
4
  Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/
5
  Description: Add Featured Videos to your posts and pages.
6
- Version: 2.2.3
7
  Author: Alexander Höreth
8
  Author URI: http://yrnxt.com
9
  Text Domain: featured-video-plus
@@ -32,7 +32,7 @@ License: GPL-2.0
32
  // ********************
33
  // CONSTANTS
34
  if ( ! defined( 'FVP_VERSION' ) ) {
35
- define( 'FVP_VERSION', '2.2.3' );
36
  }
37
 
38
  $pathinfo = pathinfo( dirname( plugin_basename( __FILE__ ) ) );
3
  Plugin Name: Featured Video Plus
4
  Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/
5
  Description: Add Featured Videos to your posts and pages.
6
+ Version: 2.3.0
7
  Author: Alexander Höreth
8
  Author URI: http://yrnxt.com
9
  Text Domain: featured-video-plus
32
  // ********************
33
  // CONSTANTS
34
  if ( ! defined( 'FVP_VERSION' ) ) {
35
+ define( 'FVP_VERSION', '2.3.0' );
36
  }
37
 
38
  $pathinfo = pathinfo( dirname( plugin_basename( __FILE__ ) ) );
js/post.js CHANGED
@@ -8,6 +8,7 @@
8
  var currentUrl;
9
  var mediaicon;
10
  var loadingicon = 'url(' + context.loading_gif + ')';
 
11
 
12
 
13
  /**
@@ -99,22 +100,25 @@
99
  // reset loading icon
100
  $media.css({ backgroundImage: mediaicon });
101
 
102
- // removed video
103
- if('remove' === data.task) {
104
- $container
105
- .css({height: $container.height() })
106
- .html('')
107
- .animate({height: 0});
108
 
109
- // new video data
 
 
 
 
 
 
 
110
  } else {
111
  // Suppress autoplay in admin interface. Cannot do this on the server
112
  // side because ajax requests from frontend and backend look the same.
113
  data.video = data.video.replace(/autoplay(?:=.?)?&?/i, '');
114
-
115
- $container
116
- .css({height: ''})
117
- .html(data.video);
118
  }
119
 
120
  // update featured image
@@ -126,6 +130,7 @@
126
  $(document).ready(function() {
127
  $input = $('.fvp-video');
128
  $media = $input.siblings('.fvp-video-choose').children('.fvp-media-icon');
 
129
  currentUrl = $input.val();
130
  mediaicon = $media.css('backgroundImage');
131
 
@@ -133,6 +138,12 @@
133
  // Update video and featured image with the returned data.
134
  $input.blur(submitVideo);
135
 
 
 
 
 
 
 
136
  // Initialize autosizing the url input field, disable enter key and
137
  // auto select content on click.
138
  // @see http://www.jacklmoore.com/autosize
8
  var currentUrl;
9
  var mediaicon;
10
  var loadingicon = 'url(' + context.loading_gif + ')';
11
+ var $invalidNotice;
12
 
13
 
14
  /**
100
  // reset loading icon
101
  $media.css({ backgroundImage: mediaicon });
102
 
103
+ if (data.valid !== false) {
104
+ $invalidNotice.hide();
105
+ } else {
106
+ $invalidNotice.css({ display: 'block' });
107
+ }
 
108
 
109
+ $input.val(data.full);
110
+ currentUrl = data.full; // Remember new url.
111
+ if(!data.full) {
112
+ var height = $container.height();
113
+ if (height) {
114
+ $container.css({ height: height }).animate({ height: 0 });
115
+ }
116
+ $container.html('')
117
  } else {
118
  // Suppress autoplay in admin interface. Cannot do this on the server
119
  // side because ajax requests from frontend and backend look the same.
120
  data.video = data.video.replace(/autoplay(?:=.?)?&?/i, '');
121
+ $container.css({ height: '' }).html(data.video);
 
 
 
122
  }
123
 
124
  // update featured image
130
  $(document).ready(function() {
131
  $input = $('.fvp-video');
132
  $media = $input.siblings('.fvp-video-choose').children('.fvp-media-icon');
133
+ $invalidNotice = $('#featured-video-plus-box .fvp-notice-invalid');
134
  currentUrl = $input.val();
135
  mediaicon = $media.css('backgroundImage');
136
 
138
  // Update video and featured image with the returned data.
139
  $input.blur(submitVideo);
140
 
141
+ $('#featured-video-plus-box .notice-dismiss').click(function(e) {
142
+ $input.val('');
143
+ $invalidNotice.hide();
144
+ submitVideo(e);
145
+ })
146
+
147
  // Initialize autosizing the url input field, disable enter key and
148
  // auto select content on click.
149
  // @see http://www.jacklmoore.com/autosize
js/post.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";function t(t){var i=e("#postimagediv .inside");t=t||i.html(),i.html(t),0<i.find(".fvp-remove-image").length&&(i.find("#remove-post-thumbnail").parent("p").hide(),i.find(".fvp-remove-image").parent("p").show())}function i(e){n(e,!0)}function a(i){i.preventDefault(),r.css({backgroundImage:f}),e.post(ajaxurl,{action:"fvp_remove_img",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val()},function(e){e.success&&(t(e.data),r.css({backgroundImage:c}))},"json")}function n(i,a){if(i.preventDefault(),a=a||!1,o.val(e.trim(o.val())).trigger("autosize"),s!==o.val()||a){r.css({backgroundImage:f}),s=o.val();var n={action:"fvp_save",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val(),fvp_video:o.val(),fvp_set_featimg:a};e.post(ajaxurl,n,function(i){if(!i.success)return!1;var a=i.data,n=e(".fvp-current-video");r.css({backgroundImage:c}),"remove"===a.task?n.css({height:n.height()}).html("").animate({height:0}):(a.video=a.video.replace(/autoplay(?:=.?)?&?/i,""),n.css({height:""}).html(a.video)),t(a.img)},"json")}}var o,r,s,c,v=fvpPost,f="url("+v.loading_gif+")";e(document).ready(function(){o=e(".fvp-video"),r=o.siblings(".fvp-video-choose").children(".fvp-media-icon"),s=o.val(),c=r.css("backgroundImage"),o.blur(n),o.autosize().trigger("blur").keypress(function(t){13===t.keyCode&&(t.preventDefault(),e(this).trigger("blur"))}).click(function(){e(this).select()}),e("#postimagediv").on("click",".fvp-set-image",i).on("click",".fvp-remove-image",a),t();var v,f={frame:function(){return this._frame?this._frame:(this._frame=wp.media({title:v.data("title"),library:{type:"video"},button:{text:v.data("button")},multiple:!1}),this._frame.on("open",this.updateFrame).state("library").on("select",this.select),this._frame)},select:function(){var t=this.get("selection"),i="url",a=v.data("target");e(a).val(t.pluck(i)).change().trigger("blur")},updateFrame:function(){},init:function(){e("#wpbody").on("click",".fvp-video-choose",function(t){t.preventDefault(),v=e(this).closest(".fvp-input-wrapper"),f.frame().open()})}};f.init()})}(jQuery);
1
+ !function(e){"use strict";function t(t){var i=e("#postimagediv .inside");t=t||i.html(),i.html(t),0<i.find(".fvp-remove-image").length&&(i.find("#remove-post-thumbnail").parent("p").hide(),i.find(".fvp-remove-image").parent("p").show())}function i(e){n(e,!0)}function a(i){i.preventDefault(),s.css({backgroundImage:f}),e.post(ajaxurl,{action:"fvp_remove_img",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val()},function(e){e.success&&(t(e.data),s.css({backgroundImage:c}))},"json")}function n(i,a){if(i.preventDefault(),a=a||!1,o.val(e.trim(o.val())).trigger("autosize"),r!==o.val()||a){s.css({backgroundImage:f}),r=o.val();var n={action:"fvp_save",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val(),fvp_video:o.val(),fvp_set_featimg:a};e.post(ajaxurl,n,function(i){if(!i.success)return!1;var a=i.data,n=e(".fvp-current-video");if(s.css({backgroundImage:c}),a.valid!==!1?l.hide():l.css({display:"block"}),o.val(a.full),r=a.full,a.full)a.video=a.video.replace(/autoplay(?:=.?)?&?/i,""),n.css({height:""}).html(a.video);else{var v=n.height();v&&n.css({height:v}).animate({height:0}),n.html("")}t(a.img)},"json")}}var o,s,r,c,l,v=fvpPost,f="url("+v.loading_gif+")";e(document).ready(function(){o=e(".fvp-video"),s=o.siblings(".fvp-video-choose").children(".fvp-media-icon"),l=e("#featured-video-plus-box .fvp-notice-invalid"),r=o.val(),c=s.css("backgroundImage"),o.blur(n),e("#featured-video-plus-box .notice-dismiss").click(function(e){o.val(""),l.hide(),n(e)}),o.autosize().trigger("blur").keypress(function(t){13===t.keyCode&&(t.preventDefault(),e(this).trigger("blur"))}).click(function(){e(this).select()}),e("#postimagediv").on("click",".fvp-set-image",i).on("click",".fvp-remove-image",a),t();var v,f={frame:function(){return this._frame?this._frame:(this._frame=wp.media({title:v.data("title"),library:{type:"video"},button:{text:v.data("button")},multiple:!1}),this._frame.on("open",this.updateFrame).state("library").on("select",this.select),this._frame)},select:function(){var t=this.get("selection"),i="url",a=v.data("target");e(a).val(t.pluck(i)).change().trigger("blur")},updateFrame:function(){},init:function(){e("#wpbody").on("click",".fvp-video-choose",function(t){t.preventDefault(),v=e(this).closest(".fvp-input-wrapper"),f.frame().open()})}};f.init()})}(jQuery);
lng/featured-video-plus-de_DE.mo CHANGED
Binary file
lng/featured-video-plus-de_DE.po CHANGED
@@ -1,348 +1,335 @@
 
 
1
  msgid ""
2
  msgstr ""
 
3
  "MIME-Version: 1.0\n"
4
  "Content-Type: text/plain; charset=UTF-8\n"
5
  "Content-Transfer-Encoding: 8bit\n"
6
- "X-Generator: POEditor.com\n"
7
- "Project-Id-Version: Featured Video Plus\n"
8
- "Language: de\n"
9
 
10
- #: build/php/class-backend.php:122 php/class-backend.php:122
11
  msgid "Featured Video"
12
  msgstr "Beitragsvideo"
13
 
14
- #: build/php/class-backend.php:164 php/class-backend.php:164
15
  msgid "Set Featured Video"
16
  msgstr "Beitragsvideo festlegen"
17
 
18
- #: build/php/class-backend.php:170 php/class-backend.php:170
19
  msgid "Video URL"
20
  msgstr "Video URL"
21
 
22
- #: build/php/class-backend.php:198 php/class-backend.php:198
23
  msgid "The current theme does not support Featured Images"
24
  msgstr "Das aktuelle Theme nutzt keine Beitragsbilder."
25
 
26
- #: build/php/class-backend.php:205 php/class-backend.php:205
27
  msgid "To display Featured Videos you need to use the %1$sShortcode%2$s or %1$sPHP functions%2$s. To hide this notice deactivate %3$sReplace Featured Images%4$s in the %5$sMedia Settings%6$s."
28
  msgstr "Um Beitragsvideos darzustellen musst du den %1$sShortcode%2§s oder %1$sPHP-Funktionen%2$s nutzen. Um diese Warnung zu deaktivieren stell %3$sBeitragsbilder ersetzen%4$s in den %5$sMedieneinstellungen%6$s aus."
29
 
30
- #. #-#-#-#-# featured-video-plus.pot (Featured Video Plus 1.9.2) #-#-#-#-#
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  #. Plugin Name of the plugin/theme
32
- #: build/php/class-help.php:23 php/class-help.php:23
33
  msgid "Featured Video Plus"
34
  msgstr "Featured Video Plus"
35
 
36
- #: build/php/class-help.php:31 php/class-help.php:31
37
  msgid "Take a video url from one of the %ssupported oembed providers%s and paste it into the Featured Video input field."
38
  msgstr "Kopiere einen Video-Link von einem der %sunterstützten Anbieter%s in das Beitragsvideo-Eingabefeld."
39
 
40
- #: php/class-backend.php:580
41
- msgid "Alternatively you can select one of the videos from your media library using the small media icon to the right in the URL input vield. The plugin makes use of %sWordPress' native functionality%s - no gurantee for compatibility with all formats."
42
- msgstr "Alternativ kannst du ein Video aus deiner Mediengallerie auswählen. Das Plugin nutzt die %soriginale WordPress Funktionsweise%s - keine Garantie für Kombatibilität mit allen Formaten & Geräten."
43
-
44
- #: php/class-backend.php:588
45
- msgid "Converting your videos"
46
- msgstr "Videos konvertieren"
47
-
48
- #: php/class-backend.php:592
49
- msgid "Take a look at the %sMiro Video Converter%s. It is open source, lightweight and compatible with Windows, Mac and Linux."
50
- msgstr "Schau dir den %sMiro Video Converter%s an. Er is Open Source, klein, einfach zu verwenden und mit Windows, Mac und Linux kompatibel."
51
 
52
- #: build/php/class-help.php:52 php/class-help.php:52
53
  msgid "Fixing upload errors"
54
  msgstr "Videoupload Fehler beheben"
55
 
56
- #: build/php/class-help.php:58 php/class-help.php:58
57
  msgid "Read %sthis%s on how to increase the maximum file upload size."
58
  msgstr "Schau dir %sdiesen Link%s an um zu erfahren wie man die maximale Upload größe erhöht."
59
 
60
- #: build/php/class-backend.php:603 build/php/class-settings.php:39
61
- #: php/class-backend.php:603 php/class-settings.php:39
62
- msgid "Featured Videos"
63
- msgstr "Beitragsvideos"
64
 
65
- #: build/php/class-backend.php:605 php/class-backend.php:605
66
- msgid "Simply paste a URL into this input to add a bit extra life to your posts. %sTry an example%s."
67
- msgstr "Kopier einfach eine URL in das Eingabefeld um deinen Videos ein wenig extra Leben einzuhauchen. %sProbier ein Beispiel%s."
 
68
 
69
- #: build/php/class-backend.php:612 php/class-backend.php:612
70
- msgid "To adjust how featured videos are displayed on the frontend checkout the %smedia settings%s."
71
- msgstr "Wirf einen Blick in die %sMedien-Einstellungen%s um anzupassen wie Beitragsvideos dargestellt werden."
72
 
73
- #: build/php/class-backend.php:669 php/class-backend.php:669
74
- msgid "Featured Videos require a Featured Image for automatic replacement."
75
- msgstr "Beitragsvideos benötigen ein Beitragsbild um automatisch dargestellt werden zu können."
76
 
77
- #: build/php/class-backend.php:673 php/class-backend.php:673
78
- msgid "Auto set"
79
- msgstr "Automatisch erstellen"
80
 
81
- #: build/php/class-settings.php:50 php/class-settings.php:50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  msgid "Display mode"
83
  msgstr "Modus"
84
 
85
- #: build/php/class-settings.php:58 php/class-settings.php:58
86
  msgid "Display Conditions"
87
  msgstr "Konditionen"
88
 
89
- #: build/php/class-settings.php:68 php/class-settings.php:68
90
  msgid "Video Sizing"
91
  msgstr "Videogröße"
92
 
93
- #: build/php/class-settings.php:77 php/class-settings.php:77
94
  msgid "Video Align"
95
  msgstr "Positionierung"
96
 
97
- #: build/php/class-settings.php:86 php/class-settings.php:86
98
  msgid "Default Arguments"
99
  msgstr "Parameter"
100
 
101
- #: build/php/class-settings.php:95 php/class-settings.php:95
102
  msgid "Support"
103
  msgstr "Support"
104
 
105
- #: build/php/class-settings.php:116 php/class-settings.php:116
106
  msgid "To display your featured videos you can either make use of the automatic replacement, use the %s or manually edit your theme's source files to make use of the plugins PHP-functions."
107
  msgstr "Um die Artikelvideos anzuzeigen kannst du entweder das automatische Ersetzen der Artikelbilder nutzen, auf den %s zurückgreifen oder manuel die PHP-Funktionen in deine Theme Dateien integrieren."
108
 
109
- #: build/php/class-settings.php:117 php/class-settings.php:117
110
  msgid "For more information about Shortcode and PHP functions see the %sContextual Help%s."
111
  msgstr "Für mehr Informationen über den Shortcode und die PHP-Funktionen schaue in die %sHilfe%s."
112
 
113
- #: build/php/class-settings.php:125 php/class-settings.php:125
114
  msgid "The current theme does not support featured images."
115
  msgstr "Das aktuelle Theme unterstützt keine Beitragsbilder."
116
 
117
- #: build/php/class-settings.php:128 php/class-settings.php:128
118
  msgid "To display Featured Videos you need to use the %1$sShortcode%2$s or %1$sPHP functions%2$s."
119
  msgstr "Um Beitragsvideos darzustellen musst du leider den %1$sShortcode%2$s oder die %1$sPHP-Funktionen%2$s nutzen."
120
 
121
- #: build/php/class-settings.php:151 php/class-settings.php:151
122
  msgid "Replace featured image automatically."
123
  msgstr "Beitragsbild automatisch ersetzen."
124
 
125
- #: build/php/class-settings.php:152 php/class-settings.php:152
126
  msgid "Replace featured image on click."
127
  msgstr "Beitragsbild bei anklicken ersetzen."
128
 
129
- #: build/php/class-settings.php:153 php/class-settings.php:153
130
  msgid "Open video overlay when featured image is clicked."
131
  msgstr "Video in Overlay darstellen."
132
 
133
- #: build/php/class-settings.php:154 php/class-settings.php:154
134
  msgid "Manual: PHP-functions or shortcodes."
135
  msgstr "Manuell: PHP-Funktionen oder Shortcode."
136
 
137
- #: build/php/class-settings.php:160 php/class-settings.php:160
138
  msgid "Automatic integration (options 1-3) requires your theme to make use of WordPress' native %sfeatured image%s functionality."
139
  msgstr "Automatische Integration (Optionen 1 bis 3) benötigen ein Theme das die nativen WordPress %sBeitragsbild%s Funktionen nutzt."
140
 
141
- #: build/php/class-settings.php:203 php/class-settings.php:203
 
 
 
 
142
  msgid "View options are not available in manual mode."
143
  msgstr "Darstellungsoptionen sind im manuellen Modus nicht verfügbar."
144
 
145
- #: build/php/class-settings.php:274 php/class-settings.php:274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  msgid "Responsive"
147
  msgstr "Dynamisch"
148
 
149
- #: build/php/class-settings.php:281 php/class-settings.php:281
150
  msgid "Width in pixels:"
151
  msgstr "Breite in Pixeln:"
152
 
153
- #: build/php/class-settings.php:298 php/class-settings.php:298
154
  msgid "The %1$sresponsive%2$s setting does not work when using the %1$soverlay%2$s display mode and might break completly in some themes - in such cases you should use a fixed width instead."
155
  msgstr "Die %1$dynamisch%2$s Einstellung funktioniert nicht in allen Themes und speziell auch nicht im %1$sOverlay%2$s-Modus. In dem Fall muss eine absolute Breite angegeben werden."
156
 
157
- #: build/php/class-settings.php:319 php/class-settings.php:319
158
  msgid "left"
159
  msgstr "links"
160
 
161
- #: build/php/class-settings.php:320 php/class-settings.php:320
162
  msgid "center"
163
  msgstr "zentriert"
164
 
165
- #: build/php/class-settings.php:321 php/class-settings.php:321
166
  msgid "right"
167
  msgstr "rechts"
168
 
169
- #: build/php/class-settings.php:344 php/class-settings.php:344
170
  msgid "Not all of the following options might be supported by all providers."
171
  msgstr "Nicht alle der folgenden Einstellungen werden von allen Providern unterstützt."
172
 
173
- #: build/php/class-settings.php:352 php/class-settings.php:352
174
- msgid "Autoplay"
175
- msgstr "Automatisch Abspielen"
176
-
177
- #: build/php/class-settings.php:353 php/class-settings.php:353
178
  msgid "Loop"
179
  msgstr "Dauerschleife"
180
 
181
- #: build/php/class-settings.php:361 php/class-settings.php:361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  msgid "If the owner of a video is a Plus member, some of these settings may be overridden by their preferences."
183
  msgstr "Wenn der Videoeigentümer Vimeo-Plus Mitglied ist, kann er die folgenden Einstellungen für sein Video überschreiben."
184
 
185
- #: build/php/class-settings.php:376 php/class-settings.php:376
186
  msgid "Hide user's portrait"
187
  msgstr "Nutzerbild verbergen."
188
 
189
- #: build/php/class-settings.php:380 php/class-settings.php:380
190
  msgid "Hide video title"
191
  msgstr "Videotitel verbergen."
192
 
193
- #: build/php/class-settings.php:384 php/class-settings.php:384
194
  msgid "Hide video byline"
195
  msgstr "Erstellerzeile verbergen."
196
 
197
- #: build/php/class-settings.php:397 php/class-settings.php:397
198
  msgid "Light theme"
199
  msgstr "Helles Theme."
200
 
201
- #: build/php/class-settings.php:401 php/class-settings.php:401
202
  msgid "White highlight color"
203
  msgstr "Weiße Betonungsfarbe."
204
 
205
- #: build/php/class-settings.php:403 php/class-settings.php:403
206
  msgid "Hide YouTube logo"
207
  msgstr "YouTube Logo verbergen."
208
 
209
- #: build/php/class-settings.php:406 build/php/class-settings.php:456
210
- #: php/class-settings.php:406 php/class-settings.php:456
 
 
 
211
  msgid "Hide related videos"
212
  msgstr "Verwandte Videos verbergen."
213
 
214
- #: build/php/class-settings.php:410 php/class-settings.php:410
215
  msgid "Disallow fullscreen"
216
  msgstr "Vollbildmodus unterdrücken."
217
 
218
- #: build/php/class-settings.php:414 build/php/class-settings.php:452
219
- #: php/class-settings.php:414 php/class-settings.php:452
220
  msgid "Hide video info"
221
  msgstr "Videoinfo verbergen."
222
 
223
- #: build/php/class-settings.php:416 php/class-settings.php:416
224
  msgid "Enable JavaScript API"
225
  msgstr "JavaScript API aktivieren."
226
 
227
- #: build/php/class-settings.php:448 php/class-settings.php:448
228
  msgid "Hide DailyMotion logo"
229
  msgstr "DailyMotion Logo verbergen."
230
 
231
- #: build/php/class-settings.php:460 php/class-settings.php:460
232
  msgid "Turn HD on by default"
233
  msgstr "HD automatisch einschalten."
234
 
235
- #: build/php/class-settings.php:479 php/class-settings.php:479
236
  msgid "If you have found a bug or think a specific feature is missing, %slet me know%s in the support forum. Like this plugin? %sRate it%s or %sbuy me a cookie%s!"
237
  msgstr "Wenn du einen Fehler gefunden hast oder eine bestimmte Funktion vermisst, %ssag im Support-Forum Bescheid%s. Dir gefällt das Plugin? %sHinterlasse eine Bewertung%s oder %sspende für die Entwicklung%s!"
238
 
239
- #: build/php/class-help.php:82 php/class-help.php:82
240
- msgid "PHP-Functions"
241
- msgstr "PHP-Funktionen"
242
-
243
- #: php/class-settings.php:583
244
- msgid "All parameters are optional. If %s the current post's id will be used. %s is either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32)."
245
- msgstr "Alle Parameter sind optional. Wenn %s gilt, wird die ID des aktuellen Beitrags genutzt. %s ist entweder ein String (thumbnail, medium, large oder full) oder ein Array mit zwei Stellen (Breite und Höhe); Zum Beispiel array(32,32)."
246
-
247
- #: build/php/class-help.php:115 php/class-help.php:115
248
- msgid "The functions are implemented corresponding to the original %sfunctions%s: They are intended to be used and to act the same way. Take a look into the WordPress Codex for further guidance:"
249
- msgstr "Die Funktionen sind nach den original %sFunktionen%s implementiert. Sie sollten genauso genutzt werden können und sich genauso verhalten. Schau dir für mehr Informationen den WordPress Codex an:"
250
-
251
- #: build/php/class-help.php:119 php/class-help.php:119
252
- msgid "Featured Image"
253
- msgstr "Beitragsbild"
254
-
255
- #: build/php/class-help.php:156 php/class-help.php:156
256
- msgid "Displays the video in its default size."
257
- msgstr "Stellt das Video in seiner Standardgröße dar."
258
-
259
- #: php/class-settings.php:620
260
- msgid "Displays the video with an width of 300 pixel. Height will be fitted to the aspect ratio."
261
- msgstr "Stellt das Video mit einer Breite von 300 Pixeln dar. Die Höhe wird automatisch angepasst, so dass das Seitenverhältniss erhalten bleibt."
262
-
263
- #: php/class-settings.php:624
264
- msgid "Displays the video with an fixed width and height."
265
- msgstr "Stellt das Video mit fester Breite und Höhe dar."
266
-
267
  #. Plugin URI of the plugin/theme
268
- #:
269
  msgid "http://yrnxt.com/wordpress/featured-video-plus/"
270
  msgstr "http://yrnxt.com/wordpress/featured-video-plus/"
271
 
272
  #. Description of the plugin/theme
273
- #:
274
  msgid "Add Featured Videos to your posts and pages."
275
  msgstr "Füge deinen Beiträgen und Seiten Beitragsvideos hinzu."
276
 
277
  #. Author of the plugin/theme
278
- #:
279
  msgid "Alexander Höreth"
280
  msgstr "Alexander Höreth"
281
 
282
  #. Author URI of the plugin/theme
283
- #:
284
  msgid "http://yrnxt.com"
285
- msgstr "http://yrnxt.com"
286
-
287
- #: build/php/class-help.php:41 php/class-help.php:41
288
- msgid "Alternatively you can select one of the videos from your media library using the small media icon to the right in the URL input field. The plugin makes use of %sWordPress' native HTML5 video functionality%s - no gurantee for compatibility with all formats."
289
- msgstr "Alternativ kannst du eines deiner eigenen Videos aus der Medienbibliothek auswählen indem du das kleine Icon rechts im URL Eingabefeld anklickst. Das Plugin nutzt die %WordPress eigene HTML5 Video-Funktionalität%s - keine Garantie dafür, dass alle Formate funktionieren."
290
-
291
- #: build/php/class-help.php:104 php/class-help.php:104
292
- msgctxt "%1$s is a boolean condition, \\\"post_id == null\\\", %2$s is a PHP variable, %2$s is a list of strings in paranthesis."
293
- msgid "All parameters are optional. If %1$s the current post's id will be used. %2$s is either a string %2$s or a 2-item array representing width and height in pixels, e.g. array(32,32)."
294
- msgstr "Alle Parameter sind optional. Wenn %1$s, wird die ID des aktuellen Posts genutzt. %2$s kann entweder ein String %2$s oder ein Array mit 2 Elementen sein die die Breite und Höhe in Pixeln festlegen, z.B. array(32, 32)."
295
-
296
- #: build/php/class-help.php:111 build/php/class-settings.php:198
297
- #: php/class-help.php:111 php/class-settings.php:198
298
- msgid "or"
299
- msgstr "oder"
300
-
301
- #: build/php/class-help.php:143 php/class-help.php:143
302
- msgid "Featured Video Plus: Shortcode"
303
- msgstr "Featured Video Plus: Shortcode"
304
-
305
- #: build/php/class-help.php:160 php/class-help.php:160
306
- msgid "Displays the video with a width of 300 pixel. Height will be fitted such that the aspect ratio is preserved."
307
- msgstr "Stellt das Video mit einer Breite von 300 Pixeln dar. Die Höhe wird automatisch so angepasst, dass das Seitenverhältnis erhalten bleibt."
308
-
309
- #: build/php/class-help.php:164 php/class-help.php:164
310
- msgid "Displays the video with a fixed width and height."
311
- msgstr "Stellt das Video mit einer absoluten Höhe und Breite dar."
312
-
313
- #: build/php/class-settings.php:169 php/class-settings.php:169
314
- msgid "Always use replace mode when viewing %ssingle%s posts and pages."
315
- msgstr "Auf %seinzelnen%s Seiten immer \"automatisch ersetzen\" nutzen."
316
-
317
- #: build/php/class-settings.php:225 php/class-settings.php:225
318
- msgid "when on the %spost index page%s %s"
319
- msgstr "wenn auf der %sIndex-Seite%s %s"
320
-
321
- #: build/php/class-settings.php:231 php/class-settings.php:231
322
- msgid "when inside the %smain query%s of each page %s"
323
- msgstr "wenn innerhalb des %Main-Queries%s einer jeden Seite %s"
324
-
325
- #: build/php/class-settings.php:237 php/class-settings.php:237
326
- msgid "when displaying %ssticky%s posts."
327
- msgstr "wenn ein %ssticky%s Post dargestellt wird."
328
-
329
- #: build/php/class-settings.php:249 php/class-settings.php:249
330
- msgid "If none of the above options is selected the display mode will be applied whenever possible."
331
- msgstr "Wenn keine der obenstehenden Optionen gewählt ist, wird der festgelegte Darstellungsmodus immer wenn möglich angewendet."
332
-
333
- #: build/php/class-settings.php:213 php/class-settings.php:213
334
- msgid "Apply display mode..."
335
- msgstr "Darstellungsmodus anwenden..."
336
-
337
- #: build/php/class-settings.php:219 php/class-settings.php:219
338
- msgid "when viewing %ssingle%s posts and pages %s"
339
- msgstr "wenn %seinzelne%s Beiträge oder Seiten angeschaut werden %s"
340
-
341
- #: build/php/class-backend.php:662 php/class-backend.php:662
342
- msgid "Remove featured image"
343
- msgstr "Beitragsbild entfernen"
344
-
345
- #: build/php/class-settings.php:242 php/class-settings.php:242
346
- msgid "when displaying not %ssticky%s posts."
347
- msgstr "wenn nicht %sangeheftete%s Beiträge angezeigt werden."
348
-
1
+ # Translation of Development (trunk) in German
2
+ # This file is distributed under the same license as the Development (trunk) package.
3
  msgid ""
4
  msgstr ""
5
+ "PO-Revision-Date: 2015-10-08 02:11:43+0000\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: GlotPress/2.1.0-alpha\n"
11
+ "Project-Id-Version: Development (trunk)\n"
12
 
13
+ #: php/class-backend.php:122
14
  msgid "Featured Video"
15
  msgstr "Beitragsvideo"
16
 
17
+ #: php/class-backend.php:164
18
  msgid "Set Featured Video"
19
  msgstr "Beitragsvideo festlegen"
20
 
21
+ #: php/class-backend.php:170
22
  msgid "Video URL"
23
  msgstr "Video URL"
24
 
25
+ #: php/class-backend.php:198
26
  msgid "The current theme does not support Featured Images"
27
  msgstr "Das aktuelle Theme nutzt keine Beitragsbilder."
28
 
29
+ #: php/class-backend.php:205
30
  msgid "To display Featured Videos you need to use the %1$sShortcode%2$s or %1$sPHP functions%2$s. To hide this notice deactivate %3$sReplace Featured Images%4$s in the %5$sMedia Settings%6$s."
31
  msgstr "Um Beitragsvideos darzustellen musst du den %1$sShortcode%2§s oder %1$sPHP-Funktionen%2$s nutzen. Um diese Warnung zu deaktivieren stell %3$sBeitragsbilder ersetzen%4$s in den %5$sMedieneinstellungen%6$s aus."
32
 
33
+ #: php/class-backend.php:628 php/class-settings.php:39
34
+ msgid "Featured Videos"
35
+ msgstr "Beitragsvideos"
36
+
37
+ #: php/class-backend.php:630
38
+ msgid "Simply paste a URL into this input to add a bit extra life to your posts. %sTry an example%s."
39
+ msgstr "Kopier einfach eine URL in das Eingabefeld um deinen Videos ein wenig extra Leben einzuhauchen. %sProbier ein Beispiel%s."
40
+
41
+ #: php/class-backend.php:637
42
+ msgid "To adjust how featured videos are displayed on the frontend checkout the %smedia settings%s."
43
+ msgstr "Wirf einen Blick in die %sMedien-Einstellungen%s um anzupassen wie Beitragsvideos dargestellt werden."
44
+
45
+ #: php/class-backend.php:693
46
+ msgid "Remove featured image"
47
+ msgstr "Beitragsbild entfernen"
48
+
49
+ #: php/class-backend.php:700
50
+ msgid "Featured Videos require a Featured Image for automatic replacement."
51
+ msgstr "Beitragsvideos benötigen ein Beitragsbild um automatisch dargestellt werden zu können."
52
+
53
+ #: php/class-backend.php:704
54
+ msgid "Auto set"
55
+ msgstr "Automatisch erstellen"
56
+
57
+ #. #-#-#-#-# tmp-featured-video-plus.pot (Featured Video Plus 2.2.3)
58
+ #. #-#-#-#-#
59
  #. Plugin Name of the plugin/theme
60
+ #: php/class-help.php:23
61
  msgid "Featured Video Plus"
62
  msgstr "Featured Video Plus"
63
 
64
+ #: php/class-help.php:31
65
  msgid "Take a video url from one of the %ssupported oembed providers%s and paste it into the Featured Video input field."
66
  msgstr "Kopiere einen Video-Link von einem der %sunterstützten Anbieter%s in das Beitragsvideo-Eingabefeld."
67
 
68
+ #: php/class-help.php:41
69
+ msgid "Alternatively you can select one of the videos from your media library using the small media icon to the right in the URL input field. The plugin makes use of %sWordPress' native HTML5 video functionality%s - no gurantee for compatibility with all formats."
70
+ msgstr "Alternativ kannst du eines deiner eigenen Videos aus der Medienbibliothek auswählen indem du das kleine Icon rechts im URL Eingabefeld anklickst. Das Plugin nutzt die %WordPress eigene HTML5 Video-Funktionalität%s - keine Garantie dafür, dass alle Formate funktionieren."
 
 
 
 
 
 
 
 
71
 
72
+ #: php/class-help.php:52
73
  msgid "Fixing upload errors"
74
  msgstr "Videoupload Fehler beheben"
75
 
76
+ #: php/class-help.php:58
77
  msgid "Read %sthis%s on how to increase the maximum file upload size."
78
  msgstr "Schau dir %sdiesen Link%s an um zu erfahren wie man die maximale Upload größe erhöht."
79
 
80
+ #: php/class-help.php:82
81
+ msgid "PHP-Functions"
82
+ msgstr "PHP-Funktionen"
 
83
 
84
+ #: php/class-help.php:104
85
+ msgctxt "%1$s is a boolean condition, \\\"post_id == null\\\", %2$s is a PHP variable, %2$s is a list of strings in paranthesis."
86
+ msgid "All parameters are optional. If %1$s the current post's id will be used. %2$s is either a string %2$s or a 2-item array representing width and height in pixels, e.g. array(32,32)."
87
+ msgstr "Alle Parameter sind optional. Wenn %1$s, wird die ID des aktuellen Posts genutzt. %2$s kann entweder ein String %2$s oder ein Array mit 2 Elementen sein die die Breite und Höhe in Pixeln festlegen, z.B. array(32, 32)."
88
 
89
+ #: php/class-help.php:111 php/class-settings.php:198
90
+ msgid "or"
91
+ msgstr "oder"
92
 
93
+ #: php/class-help.php:115
94
+ msgid "The functions are implemented corresponding to the original %sfunctions%s: They are intended to be used and to act the same way. Take a look into the WordPress Codex for further guidance:"
95
+ msgstr "Die Funktionen sind nach den original %sFunktionen%s implementiert. Sie sollten genauso genutzt werden können und sich genauso verhalten. Schau dir für mehr Informationen den WordPress Codex an:"
96
 
97
+ #: php/class-help.php:119
98
+ msgid "Featured Image"
99
+ msgstr "Beitragsbild"
100
 
101
+ #: php/class-help.php:143
102
+ msgid "Featured Video Plus: Shortcode"
103
+ msgstr "Featured Video Plus: Shortcode"
104
+
105
+ #: php/class-help.php:156
106
+ msgid "Displays the video in its default size."
107
+ msgstr "Stellt das Video in seiner Standardgröße dar."
108
+
109
+ #: php/class-help.php:160
110
+ msgid "Displays the video with a width of 300 pixel. Height will be fitted such that the aspect ratio is preserved."
111
+ msgstr "Stellt das Video mit einer Breite von 300 Pixeln dar. Die Höhe wird automatisch so angepasst, dass das Seitenverhältnis erhalten bleibt."
112
+
113
+ #: php/class-help.php:164
114
+ msgid "Displays the video with a fixed width and height."
115
+ msgstr "Stellt das Video mit einer absoluten Höhe und Breite dar."
116
+
117
+ #: php/class-settings.php:50
118
  msgid "Display mode"
119
  msgstr "Modus"
120
 
121
+ #: php/class-settings.php:58
122
  msgid "Display Conditions"
123
  msgstr "Konditionen"
124
 
125
+ #: php/class-settings.php:68
126
  msgid "Video Sizing"
127
  msgstr "Videogröße"
128
 
129
+ #: php/class-settings.php:77
130
  msgid "Video Align"
131
  msgstr "Positionierung"
132
 
133
+ #: php/class-settings.php:86
134
  msgid "Default Arguments"
135
  msgstr "Parameter"
136
 
137
+ #: php/class-settings.php:95
138
  msgid "Support"
139
  msgstr "Support"
140
 
141
+ #: php/class-settings.php:116
142
  msgid "To display your featured videos you can either make use of the automatic replacement, use the %s or manually edit your theme's source files to make use of the plugins PHP-functions."
143
  msgstr "Um die Artikelvideos anzuzeigen kannst du entweder das automatische Ersetzen der Artikelbilder nutzen, auf den %s zurückgreifen oder manuel die PHP-Funktionen in deine Theme Dateien integrieren."
144
 
145
+ #: php/class-settings.php:117
146
  msgid "For more information about Shortcode and PHP functions see the %sContextual Help%s."
147
  msgstr "Für mehr Informationen über den Shortcode und die PHP-Funktionen schaue in die %sHilfe%s."
148
 
149
+ #: php/class-settings.php:125
150
  msgid "The current theme does not support featured images."
151
  msgstr "Das aktuelle Theme unterstützt keine Beitragsbilder."
152
 
153
+ #: php/class-settings.php:128
154
  msgid "To display Featured Videos you need to use the %1$sShortcode%2$s or %1$sPHP functions%2$s."
155
  msgstr "Um Beitragsvideos darzustellen musst du leider den %1$sShortcode%2$s oder die %1$sPHP-Funktionen%2$s nutzen."
156
 
157
+ #: php/class-settings.php:151
158
  msgid "Replace featured image automatically."
159
  msgstr "Beitragsbild automatisch ersetzen."
160
 
161
+ #: php/class-settings.php:152
162
  msgid "Replace featured image on click."
163
  msgstr "Beitragsbild bei anklicken ersetzen."
164
 
165
+ #: php/class-settings.php:153
166
  msgid "Open video overlay when featured image is clicked."
167
  msgstr "Video in Overlay darstellen."
168
 
169
+ #: php/class-settings.php:154
170
  msgid "Manual: PHP-functions or shortcodes."
171
  msgstr "Manuell: PHP-Funktionen oder Shortcode."
172
 
173
+ #: php/class-settings.php:160
174
  msgid "Automatic integration (options 1-3) requires your theme to make use of WordPress' native %sfeatured image%s functionality."
175
  msgstr "Automatische Integration (Optionen 1 bis 3) benötigen ein Theme das die nativen WordPress %sBeitragsbild%s Funktionen nutzt."
176
 
177
+ #: php/class-settings.php:169
178
+ msgid "Always use replace mode when viewing %ssingle%s posts and pages."
179
+ msgstr "Auf %seinzelnen%s Seiten immer \"automatisch ersetzen\" nutzen."
180
+
181
+ #: php/class-settings.php:203
182
  msgid "View options are not available in manual mode."
183
  msgstr "Darstellungsoptionen sind im manuellen Modus nicht verfügbar."
184
 
185
+ #: php/class-settings.php:213
186
+ msgid "Apply display mode..."
187
+ msgstr "Darstellungsmodus anwenden..."
188
+
189
+ #: php/class-settings.php:219
190
+ msgid "when viewing %ssingle%s posts and pages %s"
191
+ msgstr "wenn %seinzelne%s Beiträge oder Seiten angeschaut werden %s"
192
+
193
+ #: php/class-settings.php:225
194
+ msgid "when on the %spost index page%s %s"
195
+ msgstr "wenn auf der %sIndex-Seite%s %s"
196
+
197
+ #: php/class-settings.php:231
198
+ msgid "when inside the %smain query%s of each page %s"
199
+ msgstr "wenn innerhalb des %Main-Queries%s einer jeden Seite %s"
200
+
201
+ #: php/class-settings.php:237
202
+ msgid "when displaying %ssticky%s posts."
203
+ msgstr "wenn ein %ssticky%s Post dargestellt wird."
204
+
205
+ #: php/class-settings.php:242
206
+ msgid "when displaying not %ssticky%s posts."
207
+ msgstr "wenn nicht %sangeheftete%s Beiträge angezeigt werden."
208
+
209
+ #: php/class-settings.php:249
210
+ msgid "If none of the above options is selected the display mode will be applied whenever possible."
211
+ msgstr "Wenn keine der obenstehenden Optionen gewählt ist, wird der festgelegte Darstellungsmodus immer wenn möglich angewendet."
212
+
213
+ #: php/class-settings.php:274
214
  msgid "Responsive"
215
  msgstr "Dynamisch"
216
 
217
+ #: php/class-settings.php:281
218
  msgid "Width in pixels:"
219
  msgstr "Breite in Pixeln:"
220
 
221
+ #: php/class-settings.php:298
222
  msgid "The %1$sresponsive%2$s setting does not work when using the %1$soverlay%2$s display mode and might break completly in some themes - in such cases you should use a fixed width instead."
223
  msgstr "Die %1$dynamisch%2$s Einstellung funktioniert nicht in allen Themes und speziell auch nicht im %1$sOverlay%2$s-Modus. In dem Fall muss eine absolute Breite angegeben werden."
224
 
225
+ #: php/class-settings.php:319
226
  msgid "left"
227
  msgstr "links"
228
 
229
+ #: php/class-settings.php:320
230
  msgid "center"
231
  msgstr "zentriert"
232
 
233
+ #: php/class-settings.php:321
234
  msgid "right"
235
  msgstr "rechts"
236
 
237
+ #: php/class-settings.php:345
238
  msgid "Not all of the following options might be supported by all providers."
239
  msgstr "Nicht alle der folgenden Einstellungen werden von allen Providern unterstützt."
240
 
241
+ #: php/class-settings.php:353
 
 
 
 
242
  msgid "Loop"
243
  msgstr "Dauerschleife"
244
 
245
+ #: php/class-settings.php:360
246
+ msgid "Always autoplay."
247
+ msgstr "Immer automatisch abspielen."
248
+
249
+ #: php/class-settings.php:361
250
+ msgid "Autoplay when..."
251
+ msgstr "Automatisch abspielen, wenn..."
252
+
253
+ #: php/class-settings.php:368
254
+ msgid "... lazy loading videos."
255
+ msgstr "... Videos nachträglich geladen werden."
256
+
257
+ #: php/class-settings.php:370
258
+ msgid "... viewing %ssingle%s posts and pages."
259
+ msgstr "... %seinzelne%s Posts oder Seiten angezeigt werden."
260
+
261
+ #: php/class-settings.php:380
262
  msgid "If the owner of a video is a Plus member, some of these settings may be overridden by their preferences."
263
  msgstr "Wenn der Videoeigentümer Vimeo-Plus Mitglied ist, kann er die folgenden Einstellungen für sein Video überschreiben."
264
 
265
+ #: php/class-settings.php:395
266
  msgid "Hide user's portrait"
267
  msgstr "Nutzerbild verbergen."
268
 
269
+ #: php/class-settings.php:399
270
  msgid "Hide video title"
271
  msgstr "Videotitel verbergen."
272
 
273
+ #: php/class-settings.php:403
274
  msgid "Hide video byline"
275
  msgstr "Erstellerzeile verbergen."
276
 
277
+ #: php/class-settings.php:416
278
  msgid "Light theme"
279
  msgstr "Helles Theme."
280
 
281
+ #: php/class-settings.php:420
282
  msgid "White highlight color"
283
  msgstr "Weiße Betonungsfarbe."
284
 
285
+ #: php/class-settings.php:422
286
  msgid "Hide YouTube logo"
287
  msgstr "YouTube Logo verbergen."
288
 
289
+ #: php/class-settings.php:425
290
+ msgid "Hide annotations"
291
+ msgstr "Anmerkungen verbergen."
292
+
293
+ #: php/class-settings.php:429 php/class-settings.php:479
294
  msgid "Hide related videos"
295
  msgstr "Verwandte Videos verbergen."
296
 
297
+ #: php/class-settings.php:433
298
  msgid "Disallow fullscreen"
299
  msgstr "Vollbildmodus unterdrücken."
300
 
301
+ #: php/class-settings.php:437 php/class-settings.php:475
 
302
  msgid "Hide video info"
303
  msgstr "Videoinfo verbergen."
304
 
305
+ #: php/class-settings.php:439
306
  msgid "Enable JavaScript API"
307
  msgstr "JavaScript API aktivieren."
308
 
309
+ #: php/class-settings.php:471
310
  msgid "Hide DailyMotion logo"
311
  msgstr "DailyMotion Logo verbergen."
312
 
313
+ #: php/class-settings.php:483
314
  msgid "Turn HD on by default"
315
  msgstr "HD automatisch einschalten."
316
 
317
+ #: php/class-settings.php:502
318
  msgid "If you have found a bug or think a specific feature is missing, %slet me know%s in the support forum. Like this plugin? %sRate it%s or %sbuy me a cookie%s!"
319
  msgstr "Wenn du einen Fehler gefunden hast oder eine bestimmte Funktion vermisst, %ssag im Support-Forum Bescheid%s. Dir gefällt das Plugin? %sHinterlasse eine Bewertung%s oder %sspende für die Entwicklung%s!"
320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  #. Plugin URI of the plugin/theme
 
322
  msgid "http://yrnxt.com/wordpress/featured-video-plus/"
323
  msgstr "http://yrnxt.com/wordpress/featured-video-plus/"
324
 
325
  #. Description of the plugin/theme
 
326
  msgid "Add Featured Videos to your posts and pages."
327
  msgstr "Füge deinen Beiträgen und Seiten Beitragsvideos hinzu."
328
 
329
  #. Author of the plugin/theme
 
330
  msgid "Alexander Höreth"
331
  msgstr "Alexander Höreth"
332
 
333
  #. Author URI of the plugin/theme
 
334
  msgid "http://yrnxt.com"
335
+ msgstr "http://yrnxt.com"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lng/featured-video-plus.pot CHANGED
File without changes
php/class-backend.php CHANGED
@@ -135,13 +135,10 @@ class FVP_Backend extends Featured_Video_Plus {
135
  * @since 1.0.0
136
  */
137
  public function metabox_content() {
138
- wp_nonce_field( FVP_NAME . FVP_VERSION, 'fvp_nonce' );
139
-
140
- // Get current post's id.
141
  $post_id = isset( $_GET['post'] ) ? $_GET['post'] : $GLOBALS['post']->ID;
142
-
143
  $options = get_option( 'fvp-settings' );
144
  $meta = get_post_meta( $post_id, '_fvp_video', true );
 
145
  $has_post_video = has_post_video( $post_id );
146
 
147
  $content = '';
@@ -187,12 +184,24 @@ class FVP_Backend extends Featured_Video_Plus {
187
  // Close media gallery wrapper.
188
  $content .= '</div>';
189
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  // 'Current theme does not support Featured Images' warning.
191
  if (
192
  ! current_theme_supports( 'post-thumbnails' ) &&
193
  'manual' !== $options['mode']
194
  ) {
195
- $content .= '<p class="fvp-warning description">';
196
  $content .= sprintf(
197
  '<span style="font-weight: bold;">%s</span>&nbsp;',
198
  esc_html__(
@@ -211,12 +220,13 @@ class FVP_Backend extends Featured_Video_Plus {
211
  '<a href="' . esc_attr( get_admin_url( null, '/options-media.php' ) ) . '">',
212
  '</a>'
213
  );
214
- '</p>';
215
  }
216
 
217
  echo "\n\n\n<!-- Featured Video Plus Metabox -->\n";
 
218
  echo $content;
219
- echo "<!-- Featured Video Plus Metabox End-->\n\n\n";
220
  }
221
 
222
 
@@ -228,10 +238,8 @@ class FVP_Backend extends Featured_Video_Plus {
228
  *
229
  * @param {int} $post_id
230
  */
231
- public function metabox_save( $post_id ){
232
- if ( ! self::has_valid_nonce( $_POST ) ) {
233
- return false;
234
- }
235
 
236
  if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
237
  ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ||
@@ -259,18 +267,22 @@ class FVP_Backend extends Featured_Video_Plus {
259
  * @uses $this->save()
260
  */
261
  public function metabox_save_ajax() {
262
- if ( ! self::has_valid_nonce( $_POST ) || empty( $_POST['id'] ) ) {
 
 
 
 
 
263
  wp_send_json_error();
264
  }
265
 
266
  $post = array(
267
- 'id' => (int) $_POST['id'],
268
  'fvp_video' => ! empty( $_POST['fvp_video'] ) ? $_POST['fvp_video'] : '',
269
  'fvp_set_featimg' =>
270
  ! empty( $_POST['fvp_set_featimg'] ) ? $_POST['fvp_set_featimg'] : '',
271
  );
272
 
273
- // this also verifies the nonce
274
  $meta = $this->save( $post );
275
 
276
  $img = _wp_post_thumbnail_html(
@@ -278,22 +290,13 @@ class FVP_Backend extends Featured_Video_Plus {
278
  $post['id']
279
  );
280
 
281
- if ( has_post_video( $post['id'] ) ) {
282
- $video = get_the_post_video( $post['id'], array( 256, 144 ) );
283
- $response = array(
284
- 'type' => 'update',
285
- 'valid' => isset( $meta['valid'] ) ? $meta['valid'] : null,
286
- 'video' => $video,
287
- 'img' => $img,
288
- 'provider' => isset( $meta['provider'] ) ? $meta['provider'] : null
289
- );
290
- } else {
291
- $response = array(
292
- 'task' => 'remove',
293
- 'valid' => isset( $meta['valid'] ) ? $meta['valid'] : null,
294
- 'img' => $img,
295
- );
296
- }
297
 
298
  wp_send_json_success( $response );
299
  }
@@ -312,7 +315,7 @@ class FVP_Backend extends Featured_Video_Plus {
312
  $meta = get_post_meta( $post['id'], '_fvp_video', true );
313
 
314
  // parse video url
315
- $url = ! empty( $post['fvp_video'] ) ? trim( $post['fvp_video'] ) : '';
316
 
317
  // Was this a force-auto-set featimg action?
318
  $setimg = ! empty ( $post['fvp_set_featimg'] ) && $post['fvp_set_featimg'];
@@ -320,14 +323,14 @@ class FVP_Backend extends Featured_Video_Plus {
320
  // Don't do anything if we are not setting the featured image AND the
321
  // URL is empty AND did not change.
322
  if ( ! $setimg && (
323
- ( ! empty( $meta['full'] ) && $url == $meta['full'] ) ||
324
- ( empty( $meta['full'] ) && empty( $url ) )
325
  ) ) {
326
  return false;
327
  }
328
 
329
  // there was a video and we want to delete it
330
- if ( ! empty( $meta['full'] ) && empty( $url ) ) {
331
  delete_post_meta( $post['id'], '_fvp_video' );
332
  if ( get_post_thumbnail_id( $post['id'] ) == $meta['img'] ) {
333
  $this->delete_featured_image( $post['id'], $meta );
@@ -335,7 +338,7 @@ class FVP_Backend extends Featured_Video_Plus {
335
  return false;
336
  }
337
 
338
- $data = $this->get_video_data( $url );
339
 
340
  // Do we have a screen capture to pull?
341
  if ( empty( $data['img_url'] ) ) {
@@ -355,10 +358,8 @@ class FVP_Backend extends Featured_Video_Plus {
355
  // Create the final _fvp_video meta data.
356
  $meta = array_merge(
357
  array(
358
- 'full' => $url,
359
- 'img' => ! empty( $img ) ? $img : null,
360
- 'valid' => 1, // can be overwritten by $data
361
- 'provider' => 'raw', // "
362
  ),
363
  $data
364
  );
@@ -373,75 +374,80 @@ class FVP_Backend extends Featured_Video_Plus {
373
  *
374
  * @since 1.5.0
375
  *
376
- * @param {string} $url The video URL
377
  * @return {assoc} Associative array containing the video information data
378
  */
379
- private function get_video_data( $url ) {
 
 
380
  $data = array();
381
 
382
  $local = wp_upload_dir();
383
- $islocal = strpos( $url, $local['baseurl'] );
384
-
385
- // handle local videos
386
  if ( false !== $islocal ) {
387
  $provider = 'local';
388
-
389
- // handle external videos
390
  } else {
391
- $raw = $this->oembed->request( $url );
392
-
393
- // If no provider is returned the URL is invalid
394
- if ( empty( $raw ) || empty( $raw->provider_name ) ) {
395
- return array( 'valid' => false );
396
- }
397
-
398
- $provider = strtolower( $raw->provider_name );
399
 
400
- $data = array(
401
- 'id' => null,
402
- 'provider' => $provider,
403
- 'title' => ! empty( $raw->title ) ? $raw->title : null,
404
- 'author' => ! empty( $raw->author_name ) ? $raw->author_name : null,
405
- 'description' => ! empty( $raw->description ) ? $raw->description : null,
406
- 'img_url' => ! empty( $raw->thumbnail_url ) ? $raw->thumbnail_url : null,
407
- 'filename' => ! empty( $raw->title ) ? $raw->title : null,
408
- );
409
-
410
- switch ( $provider ) {
411
- case 'dailymotion':
412
- $data['id'] = $this->oembed->get_video_id( $url );
413
- $img_url = $this->oembed->get_thumbnail_url( $provider, $data['id'] );
414
- if ( false !== $img_url ) {
415
- $data['img_url'] = $img_url;
416
- }
417
- break;
418
  }
419
  }
420
 
421
- $data['parameters'] = $this->oembed->get_args( $url, $provider );
422
-
423
- // provider specific handling
424
  switch ( $provider ) {
 
 
 
 
 
 
 
425
 
426
- // local video
427
  case 'local':
428
- $ext_legal = array( 'mp4', 'm4v', 'webm', 'ogv', 'wmv', 'flv' );
429
- $ext = pathinfo( $url, PATHINFO_EXTENSION );
430
-
431
  // check if extension is legal
 
 
432
  if ( empty( $ext ) || ! in_array( $ext, $ext_legal ) ) {
433
- return array( 'valid' => false );
 
 
434
  }
435
 
436
- $data = array(
437
- 'provider' => 'local',
438
- 'id' => self::get_post_by_url( $url ),
439
- 'url' => $url,
440
  );
441
- break;
442
- }
443
 
444
- return ! empty( $data ) ? $data : false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
445
  }
446
 
447
 
@@ -547,20 +553,21 @@ class FVP_Backend extends Featured_Video_Plus {
547
  * @since 1.7.0
548
  */
549
  public function ajax_get_embed() {
550
- if ( ! self::has_valid_nonce( $_POST ) || empty( $_POST['id'] ) ) {
 
 
 
 
551
  wp_send_json_error();
552
  }
553
 
554
- // Parse post id.
555
- $id = (int) $_POST['id'];
556
-
557
- if ( has_post_video( $id ) ) {
558
  // Return featured video html as requested.
559
- $video = $this->get_the_post_video( $id, null, true );
560
  wp_send_json_success( $video );
561
  } else {
562
  // Post has no video, return featured image html.
563
- $image = get_the_post_thumbnail( $id );
564
  wp_send_json_success( $image );
565
  }
566
  }
@@ -576,23 +583,23 @@ class FVP_Backend extends Featured_Video_Plus {
576
  * which was previously set by the plugin.
577
  */
578
  public function ajax_remove_img() {
579
- if ( ! self::has_valid_nonce( $_POST ) || empty( $_POST['id'] ) ) {
 
 
 
 
 
580
  wp_send_json_error();
581
  }
582
 
583
- // Retrieve post id and check user capabilities.
584
- $id = (int) $_POST['id'];
585
- if ( ! current_user_can( 'edit_post', $id ) ) {
586
- wp_send_json_error();
587
- }
588
 
589
  // Retrieve featured video metadata.
590
- $meta = get_post_meta( $id, '_fvp_video', true );
591
 
592
  // Delete the image from database if feasible. This also again tries to
593
  // remove the link of the featured image to the post although it will
594
  // probably already be unlinked by WordPress internal functionality.
595
- $this->delete_featured_image( $id, $meta );
596
 
597
  // Remember that we do not want to set a featured image automatically for
598
  // this post.
@@ -602,11 +609,12 @@ class FVP_Backend extends Featured_Video_Plus {
602
  $meta['img'] = null;
603
 
604
  // Save meta.
605
- update_post_meta( $id, '_fvp_video', $meta );
606
 
607
  // Respond to the client.
608
- $html = _wp_post_thumbnail_html( get_post_thumbnail_id( $id ), $id );
609
- wp_send_json_success( $html );
 
610
  }
611
 
612
 
@@ -631,7 +639,7 @@ class FVP_Backend extends Featured_Video_Plus {
631
  'Simply paste a URL into this input to add a bit extra life to your posts. %sTry an example%s.',
632
  'featured-video-plus'
633
  ),
634
- '<a href="#" onclick="jQuery(\'.fvp-video\').val(\'http://youtu.be/CfNHleTEpTI\').trigger(\'blur\'); return false;">',
635
  '</a>'
636
  ) . '</p><p>' . sprintf(
637
  esc_html__(
@@ -727,7 +735,7 @@ class FVP_Backend extends Featured_Video_Plus {
727
  /**
728
  * Gets post id by it's url / guid.
729
  *
730
- * @see http://codex.wordpress.org/Class_Reference/wpdb
731
  * @since 1.0
732
  *
733
  * @param {string} $url which url to look for
@@ -746,17 +754,25 @@ class FVP_Backend extends Featured_Video_Plus {
746
 
747
 
748
  /**
749
- * Check the given assoc array for a 'fvp_nonce' field and check if this
750
- * field contains a valid nonce.
751
  *
752
- * @param {assoc} $post_data
753
- * @return boolean
 
754
  */
755
- private static function has_valid_nonce( $post_data ) {
 
 
756
  if (
757
- ! isset( $post_data['fvp_nonce'] ) ||
758
- ! wp_verify_nonce( $post_data['fvp_nonce'], FVP_NAME . FVP_VERSION )
759
  ) {
 
 
 
 
 
760
  return false;
761
  }
762
 
@@ -764,6 +780,54 @@ class FVP_Backend extends Featured_Video_Plus {
764
  }
765
 
766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
767
  /**
768
  * exif_imagetype function is not available on all systems - fallback wrapper.
769
  *
135
  * @since 1.0.0
136
  */
137
  public function metabox_content() {
 
 
 
138
  $post_id = isset( $_GET['post'] ) ? $_GET['post'] : $GLOBALS['post']->ID;
 
139
  $options = get_option( 'fvp-settings' );
140
  $meta = get_post_meta( $post_id, '_fvp_video', true );
141
+ $has_invalid_video = isset( $meta['valid'] ) && $meta['valid'] === false;
142
  $has_post_video = has_post_video( $post_id );
143
 
144
  $content = '';
184
  // Close media gallery wrapper.
185
  $content .= '</div>';
186
 
187
+ // Illegal value warning
188
+ $content .= sprintf(
189
+ '<span class="fvp-notice-invalid notice notice-info visible"%s><p>%s</p><button type="button" class="notice-dismiss"/></span>',
190
+ FVP_HTML::inline_styles( array(
191
+ 'display' => $has_invalid_video ? 'block' : 'none',
192
+ ), true, true ),
193
+ esc_html__(
194
+ 'The inserted value is illegal. You might want to manually enable raw HTML embeds in the media settings.',
195
+ 'featured-video-plus'
196
+ )
197
+ );
198
+
199
  // 'Current theme does not support Featured Images' warning.
200
  if (
201
  ! current_theme_supports( 'post-thumbnails' ) &&
202
  'manual' !== $options['mode']
203
  ) {
204
+ $content .= '<span class="fvp-notice-theme notice notice-info visible"><p>';
205
  $content .= sprintf(
206
  '<span style="font-weight: bold;">%s</span>&nbsp;',
207
  esc_html__(
220
  '<a href="' . esc_attr( get_admin_url( null, '/options-media.php' ) ) . '">',
221
  '</a>'
222
  );
223
+ '</p></span>';
224
  }
225
 
226
  echo "\n\n\n<!-- Featured Video Plus Metabox -->\n";
227
+ wp_nonce_field( self::get_nonce_action( $post_id ), 'fvp_nonce' );
228
  echo $content;
229
+ echo "\n<!-- Featured Video Plus Metabox End-->\n\n\n";
230
  }
231
 
232
 
238
  *
239
  * @param {int} $post_id
240
  */
241
+ public function metabox_save( $post_id ) {
242
+ self::verify_nonce( $post_id );
 
 
243
 
244
  if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
245
  ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ||
267
  * @uses $this->save()
268
  */
269
  public function metabox_save_ajax() {
270
+ $post_id = ! empty( $_POST['id'] ) ? (int) $_POST['id'] : -1;
271
+ if (
272
+ $post_id === -1 ||
273
+ ! self::verify_nonce( $post_id, true ) ||
274
+ ! current_user_can( 'edit_post', $post_id )
275
+ ) {
276
  wp_send_json_error();
277
  }
278
 
279
  $post = array(
280
+ 'id' => $post_id,
281
  'fvp_video' => ! empty( $_POST['fvp_video'] ) ? $_POST['fvp_video'] : '',
282
  'fvp_set_featimg' =>
283
  ! empty( $_POST['fvp_set_featimg'] ) ? $_POST['fvp_set_featimg'] : '',
284
  );
285
 
 
286
  $meta = $this->save( $post );
287
 
288
  $img = _wp_post_thumbnail_html(
290
  $post['id']
291
  );
292
 
293
+ $response = array(
294
+ 'valid' => isset( $meta['valid'] ) ? $meta['valid'] : null,
295
+ 'video' => get_the_post_video( $post['id'], array( 256, 144 ) ),
296
+ 'img' => $img,
297
+ 'full' => $meta['full'],
298
+ 'provider' => isset( $meta['provider'] ) ? $meta['provider'] : null
299
+ );
 
 
 
 
 
 
 
 
 
300
 
301
  wp_send_json_success( $response );
302
  }
315
  $meta = get_post_meta( $post['id'], '_fvp_video', true );
316
 
317
  // parse video url
318
+ $video = ! empty( $post['fvp_video'] ) ? trim( $post['fvp_video'] ) : '';
319
 
320
  // Was this a force-auto-set featimg action?
321
  $setimg = ! empty ( $post['fvp_set_featimg'] ) && $post['fvp_set_featimg'];
323
  // Don't do anything if we are not setting the featured image AND the
324
  // URL is empty AND did not change.
325
  if ( ! $setimg && (
326
+ ( ! empty( $meta['full'] ) && $video == $meta['full'] ) ||
327
+ ( empty( $meta ) && empty( $video ) )
328
  ) ) {
329
  return false;
330
  }
331
 
332
  // there was a video and we want to delete it
333
+ if ( empty( $video ) ) {
334
  delete_post_meta( $post['id'], '_fvp_video' );
335
  if ( get_post_thumbnail_id( $post['id'] ) == $meta['img'] ) {
336
  $this->delete_featured_image( $post['id'], $meta );
338
  return false;
339
  }
340
 
341
+ $data = $this->get_video_data( $video );
342
 
343
  // Do we have a screen capture to pull?
344
  if ( empty( $data['img_url'] ) ) {
358
  // Create the final _fvp_video meta data.
359
  $meta = array_merge(
360
  array(
361
+ 'valid' => true, // can be overwritten by $data
362
+ 'img' => ! empty( $img ) ? $img : null,
 
 
363
  ),
364
  $data
365
  );
374
  *
375
  * @since 1.5.0
376
  *
377
+ * @param {string} $video The video URL
378
  * @return {assoc} Associative array containing the video information data
379
  */
380
+ private function get_video_data( $video ) {
381
+ $video = trim( self::kses_video( stripslashes( $video ) ) );
382
+ $provider = null;
383
  $data = array();
384
 
385
  $local = wp_upload_dir();
386
+ $islocal = strpos( $video, $local['baseurl'] );
 
 
387
  if ( false !== $islocal ) {
388
  $provider = 'local';
389
+ } elseif ( $video !== strip_tags( $video ) ) {
390
+ $provider = 'raw';
391
  } else {
392
+ $v = $this->oembed->request( $video );
393
+ if ( ! empty( $raw ) && ! empty( $raw->provider_name ) ) {
394
+ $provider = strtolower( $v->provider_name );
 
 
 
 
 
395
 
396
+ $data = array(
397
+ 'id' => null,
398
+ 'provider' => $provider,
399
+ 'title' => ! empty( $v->title ) ? $v->title : null,
400
+ 'author' => ! empty( $v->author_name ) ? $v->author_name : null,
401
+ 'description' => ! empty( $v->description ) ? $v->description : null,
402
+ 'img_url' => ! empty( $v->thumbnail_url ) ? $v->thumbnail_url : null,
403
+ 'filename' => ! empty( $v->title ) ? $v->title : null,
404
+ 'full' => $video,
405
+ 'parameters' => $this->oembed->get_args( $video, $provider ),
406
+ );
 
 
 
 
 
 
 
407
  }
408
  }
409
 
 
 
 
410
  switch ( $provider ) {
411
+ case 'dailymotion':
412
+ $id = $this->oembed->get_video_id( $video );
413
+ $img = $this->oembed->get_thumbnail_url( $provider, $id );
414
+ return array_merge( $data, array(
415
+ 'id' => $id,
416
+ 'img_url' => $img !== false ? $img : null,
417
+ ) );
418
 
 
419
  case 'local':
 
 
 
420
  // check if extension is legal
421
+ $ext_legal = array( 'mp4', 'm4v', 'webm', 'ogv', 'wmv', 'flv' );
422
+ $ext = pathinfo( $video, PATHINFO_EXTENSION );
423
  if ( empty( $ext ) || ! in_array( $ext, $ext_legal ) ) {
424
+ return array(
425
+ 'full' => $video,
426
+ );
427
  }
428
 
429
+ return array(
430
+ 'provider' => $provider,
431
+ 'id' => self::get_post_by_url( $video ),
432
+ 'full' => $video,
433
  );
 
 
434
 
435
+ case 'raw':
436
+ return array(
437
+ 'provider' => $provider,
438
+ 'full' => $video,
439
+ );
440
+
441
+ default:
442
+ if ( ! empty( $data ) ) {
443
+ return $data;
444
+ } else {
445
+ return array(
446
+ 'valid' => false,
447
+ 'full' => $video,
448
+ );
449
+ }
450
+ }
451
  }
452
 
453
 
553
  * @since 1.7.0
554
  */
555
  public function ajax_get_embed() {
556
+ $post_id = ! empty( $_POST['id'] ) ? (int) $_POST['id'] : -1;
557
+ if (
558
+ $post_id === -1 ||
559
+ ! self::verify_nonce( $post_id, true )
560
+ ) {
561
  wp_send_json_error();
562
  }
563
 
564
+ if ( has_post_video( $post_id ) ) {
 
 
 
565
  // Return featured video html as requested.
566
+ $video = $this->get_the_post_video( $post_id, null, true );
567
  wp_send_json_success( $video );
568
  } else {
569
  // Post has no video, return featured image html.
570
+ $image = get_the_post_thumbnail( $post_id );
571
  wp_send_json_success( $image );
572
  }
573
  }
583
  * which was previously set by the plugin.
584
  */
585
  public function ajax_remove_img() {
586
+ $post_id = ! empty( $_POST['id'] ) ? (int) $_POST['id'] : -1;
587
+ if (
588
+ $post_id === -1 ||
589
+ ! self::verify_nonce( $post_id ) ||
590
+ ! current_user_can( 'edit_post', $post_id )
591
+ ) {
592
  wp_send_json_error();
593
  }
594
 
 
 
 
 
 
595
 
596
  // Retrieve featured video metadata.
597
+ $meta = get_post_meta( $post_id, '_fvp_video', true );
598
 
599
  // Delete the image from database if feasible. This also again tries to
600
  // remove the link of the featured image to the post although it will
601
  // probably already be unlinked by WordPress internal functionality.
602
+ $this->delete_featured_image( $post_id, $meta );
603
 
604
  // Remember that we do not want to set a featured image automatically for
605
  // this post.
609
  $meta['img'] = null;
610
 
611
  // Save meta.
612
+ update_post_meta( $post_id, '_fvp_video', $meta );
613
 
614
  // Respond to the client.
615
+ wp_send_json_success(
616
+ _wp_post_thumbnail_html( get_post_thumbnail_id( $post_id ), $post_id )
617
+ );
618
  }
619
 
620
 
639
  'Simply paste a URL into this input to add a bit extra life to your posts. %sTry an example%s.',
640
  'featured-video-plus'
641
  ),
642
+ '<a href="#" onclick="jQuery(\'.fvp-video\').val(\'https://youtu.be/CfNHleTEpTI\').trigger(\'blur\'); return false;">',
643
  '</a>'
644
  ) . '</p><p>' . sprintf(
645
  esc_html__(
735
  /**
736
  * Gets post id by it's url / guid.
737
  *
738
+ * @see https://codex.wordpress.org/Class_Reference/wpdb
739
  * @since 1.0
740
  *
741
  * @param {string} $url which url to look for
754
 
755
 
756
  /**
757
+ * Verify the current request's nonce. Nonce is expected in the REQUEST
758
+ * object's `fvp_nonce` field.
759
  *
760
+ * @param int/string $identifier nonce identifier
761
+ * @param bool $bool whether to return a boolean or strictly exit
762
+ * @return bool/none Return bool if $bool is set to true
763
  */
764
+ private static function verify_nonce( $identifier, $bool = false ) {
765
+ $action = self::get_nonce_action( $identifier );
766
+
767
  if (
768
+ ! isset( $_REQUEST[ 'fvp_nonce' ] ) ||
769
+ ! wp_verify_nonce( $_REQUEST[ 'fvp_nonce' ], $action )
770
  ) {
771
+ if ( ! $bool ) {
772
+ wp_nonce_ays( $action );
773
+ exit;
774
+ }
775
+
776
  return false;
777
  }
778
 
780
  }
781
 
782
 
783
+ /**
784
+ * Filter video string to remove bad html. `embed`, `object` and `iframe`
785
+ * may explicitly whitelisted.
786
+ *
787
+ * @param string $video
788
+ * @return string
789
+ */
790
+ private static function kses_video( $video ) {
791
+ $opt = get_option( 'fvp-settings' );
792
+ $tag = ! empty( $opt['legal_html'] ) ? $opt['legal_html'] : array();
793
+
794
+ $legal_tags = array_merge(
795
+ wp_kses_allowed_html( 'post' ),
796
+ isset( $tag['embed'] ) && $tag['embed'] ? array(
797
+ 'embed' => array(
798
+ 'src' => true,
799
+ 'type' => true,
800
+ 'width' => true,
801
+ 'height' => true,
802
+ ),
803
+ ) : array(),
804
+ isset( $tag['object'] ) && $tag['object'] ? array(
805
+ 'object' => array(
806
+ 'width' => true,
807
+ 'height' => true,
808
+ 'data' => true,
809
+ 'form' => true,
810
+ 'name' => true,
811
+ 'type' => true,
812
+ 'usemap' => true,
813
+ ),
814
+ ) : array(),
815
+ isset( $tag['iframe'] ) && $tag['iframe'] ? array(
816
+ 'iframe' => array(
817
+ 'align' => true,
818
+ 'width' => true,
819
+ 'height' => true,
820
+ 'src' => true,
821
+ 'sandbox' => true,
822
+ 'frameborder' => true,
823
+ 'allowfullscreen' => true,
824
+ ),
825
+ ) : array()
826
+ );
827
+
828
+ return wp_kses( $video, $legal_tags, array( 'http', 'https' ) );
829
+ }
830
+
831
  /**
832
  * exif_imagetype function is not available on all systems - fallback wrapper.
833
  *
php/class-frontend.php CHANGED
@@ -87,7 +87,7 @@ class FVP_Frontend extends Featured_Video_Plus {
87
  // some context for JS
88
  wp_localize_script( 'fvp-frontend', 'fvpdata', array(
89
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
90
- 'nonce' => wp_create_nonce( FVP_NAME . FVP_VERSION ),
91
  'fitvids' => ! empty( $options['sizing']['responsive'] ) &&
92
  $options['sizing']['responsive'],
93
  'dynamic' => 'dynamic' === $mode,
87
  // some context for JS
88
  wp_localize_script( 'fvp-frontend', 'fvpdata', array(
89
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
90
+ 'nonce' => wp_create_nonce( self::get_nonce_action( 'frontend' ) ),
91
  'fitvids' => ! empty( $options['sizing']['responsive'] ) &&
92
  $options['sizing']['responsive'],
93
  'dynamic' => 'dynamic' === $mode,
php/class-help.php CHANGED
@@ -32,7 +32,7 @@ class FVP_Help {
32
  'Take a video url from one of the %ssupported oembed providers%s and paste it into the Featured Video input field.',
33
  'featured-video-plus'
34
  ),
35
- '<a href="https://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">',
36
  '</a>'
37
  ) );
38
 
@@ -59,7 +59,7 @@ class FVP_Help {
59
  'Read %sthis%s on how to increase the maximum file upload size.',
60
  'featured-video-plus'
61
  ),
62
- '<a href="http://goo.gl/yxov27" target="_blank">',
63
  '</a>'
64
  )
65
  );
@@ -116,14 +116,14 @@ class FVP_Help {
116
  'The functions are implemented corresponding to the original %sfunctions%s: They are intended to be used and to act the same way. Take a look into the WordPress Codex for further guidance:',
117
  'featured-video-plus'
118
  ),
119
- '<a href="http://codex.wordpress.org/Post_Thumbnails#Function_Reference" target="_blank">' . esc_html__( 'Featured Image' ) . '&nbsp;',
120
  '</a>'
121
  ) );
122
 
123
  // WordPress Featured Image functions
124
  $content[] = FVP_HTML::unordered_list( array(
125
- '<code><a href="https://developer.wordpress.org/reference/functions/the_post_thumbnail/" target="_blank">get_the_post_thumbnail</a></code>',
126
- '<code><a href="https://developer.wordpress.org/reference/functions/wp_get_attachment_image/" target="_blank">wp_get_attachment_image</a></code>',
127
  ) );
128
 
129
  // Register tab.
32
  'Take a video url from one of the %ssupported oembed providers%s and paste it into the Featured Video input field.',
33
  'featured-video-plus'
34
  ),
35
+ '<a href="https://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank" rel="noopener noreferrer">',
36
  '</a>'
37
  ) );
38
 
59
  'Read %sthis%s on how to increase the maximum file upload size.',
60
  'featured-video-plus'
61
  ),
62
+ '<a href="https://goo.gl/yxov27" target="_blank" rel="noopener noreferrer">',
63
  '</a>'
64
  )
65
  );
116
  'The functions are implemented corresponding to the original %sfunctions%s: They are intended to be used and to act the same way. Take a look into the WordPress Codex for further guidance:',
117
  'featured-video-plus'
118
  ),
119
+ '<a href="https://codex.wordpress.org/Post_Thumbnails#Function_Reference" target="_blank" rel="noopener noreferrer">' . esc_html__( 'Featured Image' ) . '&nbsp;',
120
  '</a>'
121
  ) );
122
 
123
  // WordPress Featured Image functions
124
  $content[] = FVP_HTML::unordered_list( array(
125
+ '<code><a href="https://developer.wordpress.org/reference/functions/the_post_thumbnail/" target="_blank" rel="noopener noreferrer">get_the_post_thumbnail</a></code>',
126
+ '<code><a href="https://developer.wordpress.org/reference/functions/wp_get_attachment_image/" target="_blank" rel="noopener noreferrer">wp_get_attachment_image</a></code>',
127
  ) );
128
 
129
  // Register tab.
php/class-main.php CHANGED
@@ -174,13 +174,11 @@ class Featured_Video_Plus {
174
  $size,
175
  $attr
176
  ) {
177
- $size = self::get_size();
178
-
179
  $options = get_option( 'fvp-settings' );
180
  $mode = ! empty( $options['mode'] ) ? $options['mode'] : null;
181
  $conditions = ! empty( $options['conditions'] ) ?
182
  $options['conditions'] : null;
183
- $single_replace = is_single() &&
184
  ! empty( $options['single_replace'] ) && $options['single_replace'];
185
 
186
  // Don't show a video.
@@ -280,8 +278,8 @@ class Featured_Video_Plus {
280
  protected static function get_size( $size = null, $original = null ) {
281
  $options = get_option( 'fvp-settings' );
282
 
283
- // fixed size requested as array( width => #, height => # ) or array( #, # )
284
  if ( is_array( $size ) ) {
 
285
  $width = isset( $size['width'] ) && is_numeric( $size['width'] ) ?
286
  $size['width'] :
287
  ( isset( $size[0] ) && is_numeric( $size[0] ) ? $size[0] : null );
@@ -289,8 +287,8 @@ class Featured_Video_Plus {
289
  $size['height'] :
290
  ( isset( $size[1] ) && is_numeric( $size[1] ) ? $size[1] : null );
291
 
292
- // size requested using a string pointing to a WordPress preset
293
  } elseif ( is_string( $size ) ) {
 
294
  global $_wp_additional_image_sizes;
295
  $presets = get_intermediate_image_sizes();
296
  foreach ( $presets as $preset ) {
@@ -305,8 +303,8 @@ class Featured_Video_Plus {
305
  }
306
  }
307
 
308
- // single number provided - use it for the width
309
  } elseif ( is_numeric( $size ) ) {
 
310
  $width = $size;
311
  }
312
 
@@ -316,7 +314,7 @@ class Featured_Video_Plus {
316
  }
317
 
318
  if ( empty( $height ) ) {
319
- // calculate height relative to width
320
  $height = ! empty( $original ) ?
321
  round( $original['height'] * ($width / $original['width']) ) :
322
  $height = $width / 16 * 9;
@@ -362,6 +360,17 @@ class Featured_Video_Plus {
362
  }
363
 
364
 
 
 
 
 
 
 
 
 
 
 
 
365
  /**
366
  * Check a given set of display conditions if one or more of them hold. If
367
  * an empty set is given, return true.
@@ -428,7 +437,7 @@ class Featured_Video_Plus {
428
  if (
429
  ! empty( $options['autoplay']['single'] ) &&
430
  $options['autoplay']['single'] &&
431
- is_single()
432
  ) {
433
  return true;
434
  }
174
  $size,
175
  $attr
176
  ) {
 
 
177
  $options = get_option( 'fvp-settings' );
178
  $mode = ! empty( $options['mode'] ) ? $options['mode'] : null;
179
  $conditions = ! empty( $options['conditions'] ) ?
180
  $options['conditions'] : null;
181
+ $single_replace = is_singular() &&
182
  ! empty( $options['single_replace'] ) && $options['single_replace'];
183
 
184
  // Don't show a video.
278
  protected static function get_size( $size = null, $original = null ) {
279
  $options = get_option( 'fvp-settings' );
280
 
 
281
  if ( is_array( $size ) ) {
282
+ // Fixed size as array( width => #, height => # ) or array( #, # ).
283
  $width = isset( $size['width'] ) && is_numeric( $size['width'] ) ?
284
  $size['width'] :
285
  ( isset( $size[0] ) && is_numeric( $size[0] ) ? $size[0] : null );
287
  $size['height'] :
288
  ( isset( $size[1] ) && is_numeric( $size[1] ) ? $size[1] : null );
289
 
 
290
  } elseif ( is_string( $size ) ) {
291
+ // Size as string pointing to a WordPress preset.
292
  global $_wp_additional_image_sizes;
293
  $presets = get_intermediate_image_sizes();
294
  foreach ( $presets as $preset ) {
303
  }
304
  }
305
 
 
306
  } elseif ( is_numeric( $size ) ) {
307
+ // Single number provided - use it for the width.
308
  $width = $size;
309
  }
310
 
314
  }
315
 
316
  if ( empty( $height ) ) {
317
+ // Calculate height relative to width.
318
  $height = ! empty( $original ) ?
319
  round( $original['height'] * ($width / $original['width']) ) :
320
  $height = $width / 16 * 9;
360
  }
361
 
362
 
363
+ /**
364
+ * Generate a standardized nonce action string.
365
+ *
366
+ * @param int/string $identifier
367
+ * @return string
368
+ */
369
+ protected static function get_nonce_action( $identifier ) {
370
+ return FVP_NAME . FVP_VERSION . $identifier;
371
+ }
372
+
373
+
374
  /**
375
  * Check a given set of display conditions if one or more of them hold. If
376
  * an empty set is given, return true.
437
  if (
438
  ! empty( $options['autoplay']['single'] ) &&
439
  $options['autoplay']['single'] &&
440
+ is_singular()
441
  ) {
442
  return true;
443
  }
php/class-oembed.php CHANGED
@@ -347,6 +347,10 @@ class FVP_oEmbed {
347
  */
348
  private function filter_legal_args( $provider, $args ) {
349
  $legals = array(
 
 
 
 
350
 
351
  // YouTube.com
352
  // https://developers.google.com/youtube/player_parameters
@@ -427,12 +431,11 @@ class FVP_oEmbed {
427
  $result = array();
428
 
429
  if ( ! empty( $legals[ $provider ] ) ) {
430
- foreach ( $legals[ $provider ] AS $key => $value ) {
431
- if ( array_key_exists( $value, $args ) &&
432
- ! is_null( $args[ $value ] )
433
- ) {
434
- $key = is_numeric( $key ) ? $value : $key;
435
- $result[ $key ] = urlencode( $args[ $value ] );
436
  }
437
  }
438
  }
347
  */
348
  private function filter_legal_args( $provider, $args ) {
349
  $legals = array(
350
+ 'default' => array(
351
+ 'width',
352
+ 'height',
353
+ ),
354
 
355
  // YouTube.com
356
  // https://developers.google.com/youtube/player_parameters
431
  $result = array();
432
 
433
  if ( ! empty( $legals[ $provider ] ) ) {
434
+ $combinedlegals = array_merge( $legals['default'], $legals[ $provider ] );
435
+ foreach ( $combinedlegals AS $key => $val ) {
436
+ if ( array_key_exists( $val, $args ) && ! is_null( $args[ $val ] ) ) {
437
+ $key = is_numeric( $key ) ? $val : $key;
438
+ $result[ $key ] = urlencode( $args[ $val ] );
 
439
  }
440
  }
441
  }
php/class-settings.php CHANGED
@@ -26,7 +26,7 @@ class FVP_Settings {
26
  /**
27
  * Initializes the plugin settings section, the settings fields and registers the options field and save function.
28
  *
29
- * @see http://codex.wordpress.org/Settings_API
30
  * @since 1.0
31
  */
32
  public function settings_init() {
@@ -80,6 +80,15 @@ class FVP_Settings {
80
  self::$section
81
  );
82
 
 
 
 
 
 
 
 
 
 
83
  // video default url argument options
84
  add_settings_field(
85
  'fvp-defaults',
@@ -157,10 +166,10 @@ class FVP_Settings {
157
  );
158
 
159
  echo FVP_HTML::description(
160
- sprintf( esc_html__( "Automatic integration (options 1-3) requires your theme to make use of WordPress' native %sfeatured image%s functionality.", 'featured-video-plus' ), '<a href="http://codex.wordpress.org/Post_Thumbnails" target="_blank">', '</a>' )
161
  );
162
 
163
- // Always replace on is_single() ?
164
  echo FVP_HTML::conditional(
165
  '<br />' .
166
  FVP_HTML::checkbox(
@@ -170,7 +179,7 @@ class FVP_Settings {
170
  'Always use replace mode when viewing %ssingle%s posts and pages.',
171
  'featured-video-plus'
172
  ),
173
- '<a href="http://codex.wordpress.org/Function_Reference/is_single" target="_blank">',
174
  '</a>'
175
  ),
176
  '1',
@@ -185,7 +194,7 @@ class FVP_Settings {
185
 
186
 
187
  /**
188
- * Video replace condition option like is_single or is_home.
189
  *
190
  * @since 2.0.0
191
  */
@@ -217,30 +226,30 @@ class FVP_Settings {
217
  array(
218
  'single' => sprintf(
219
  esc_html__( 'when viewing %ssingle%s posts and pages %s', 'featured-video-plus' ),
220
- '<a href="http://codex.wordpress.org/Function_Reference/is_single" target="_blank">',
221
  '</a>',
222
  $or
223
  ),
224
  'home' => sprintf(
225
  esc_html__( 'when on the %spost index page%s %s', 'featured-video-plus' ),
226
- '<a href="http://codex.wordpress.org/Function_Reference/is_home" target="_blank">',
227
  '</a>',
228
  $or
229
  ),
230
  'main_query' => sprintf(
231
  esc_html__( 'when inside the %smain query%s of each page %s', 'featured-video-plus' ),
232
- '<a href="https://developer.wordpress.org/reference/functions/is_main_query/" target="_blank">',
233
  '</a>',
234
  $or
235
  ),
236
  'sticky' => sprintf(
237
  esc_html__( 'when displaying %ssticky%s posts.', 'featured-video-plus' ),
238
- '<a href="http://codex.wordpress.org/Function_Reference/is_sticky" target="_blank">',
239
  '</a>'
240
  ),
241
  '!sticky' => sprintf(
242
  esc_html__( 'when displaying not %ssticky%s posts.', 'featured-video-plus' ),
243
- '<a href="http://codex.wordpress.org/Function_Reference/is_sticky" target="_blank">',
244
  '</a>'
245
  )
246
  ),
@@ -300,7 +309,6 @@ class FVP_Settings {
300
  ),
301
  array( 'fvp_warning' )
302
  );
303
-
304
  }
305
 
306
 
@@ -325,6 +333,36 @@ class FVP_Settings {
325
  }
326
 
327
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  /**
329
  * Default settings for video embeds. Can be altered on a per video basis
330
  * using video embed URL arguments.
@@ -368,7 +406,7 @@ class FVP_Settings {
368
  'lazy' => esc_html__( '... lazy loading videos.', 'featured-video-plus' ),
369
  'single' => sprintf(
370
  esc_html__( '... viewing %ssingle%s posts and pages.', 'featured-video-plus' ),
371
- '<a href="http://codex.wordpress.org/Function_Reference/is_single" target="_blank">', '</a>'
372
  ),
373
  ),
374
  ! empty( $autoplay ) ? $autoplay : array()
@@ -503,11 +541,11 @@ class FVP_Settings {
503
  'If you have found a bug or think a specific feature is missing, %slet me know%s in the support forum. Like this plugin? %sRate it%s or %sbuy me a cookie%s!',
504
  'featured-video-plus'
505
  ),
506
- '<a href="https://wordpress.org/support/plugin/featured-video-plus#plugin-title" title="Featured Video Plus Support Forum on WordPress.org" target="_blank" style="font-weight: bold;">',
507
  '</a>',
508
- '<a href="https://wordpress.org/support/view/plugin-reviews/featured-video-plus#plugin-title" title="Rate Featured Video Plus on WordPress.org" target="_blank" style="font-weight: bold;">',
509
  '</a>',
510
- '<a href="https://paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AD8UKMQW2DMM6" title="Gift to the developer!" target="_blank" style="font-weight: bold;">',
511
  '</a>'
512
  )
513
  );
@@ -544,11 +582,16 @@ class FVP_Settings {
544
  'sticky' => 'BOOLEAN',
545
  '!sticky' => 'BOOLEAN',
546
  ),
547
- 'alignment' => '(left|center|right)',
548
  'sizing' => array(
549
  'responsive' => 'BOOLEAN',
550
  'width' => $patterns['number'],
551
  ),
 
 
 
 
 
 
552
  'autoplay' => array(
553
  'always' => 'BOOLEAN',
554
  'lazy' => 'BOOLEAN',
26
  /**
27
  * Initializes the plugin settings section, the settings fields and registers the options field and save function.
28
  *
29
+ * @see https://codex.wordpress.org/Settings_API
30
  * @since 1.0
31
  */
32
  public function settings_init() {
80
  self::$section
81
  );
82
 
83
+ // video align options
84
+ add_settings_field(
85
+ 'fvp-legal_html',
86
+ esc_html__( 'Legal HTML', 'featured-video-plus' ),
87
+ array( $this, 'legal_html' ),
88
+ self::$page,
89
+ self::$section
90
+ );
91
+
92
  // video default url argument options
93
  add_settings_field(
94
  'fvp-defaults',
166
  );
167
 
168
  echo FVP_HTML::description(
169
+ sprintf( esc_html__( "Automatic integration (options 1-3) requires your theme to make use of WordPress' native %sfeatured image%s functionality.", 'featured-video-plus' ), '<a href="https://codex.wordpress.org/Post_Thumbnails" target="_blank" rel="noopener noreferrer">', '</a>' )
170
  );
171
 
172
+ // Always replace on is_singular() ?
173
  echo FVP_HTML::conditional(
174
  '<br />' .
175
  FVP_HTML::checkbox(
179
  'Always use replace mode when viewing %ssingle%s posts and pages.',
180
  'featured-video-plus'
181
  ),
182
+ '<a href="https://codex.wordpress.org/Function_Reference/is_singular" target="_blank" rel="noopener noreferrer">',
183
  '</a>'
184
  ),
185
  '1',
194
 
195
 
196
  /**
197
+ * Video replace condition option like is_singular or is_home.
198
  *
199
  * @since 2.0.0
200
  */
226
  array(
227
  'single' => sprintf(
228
  esc_html__( 'when viewing %ssingle%s posts and pages %s', 'featured-video-plus' ),
229
+ '<a href="https://codex.wordpress.org/Function_Reference/is_singular" target="_blank" rel="noopener noreferrer">',
230
  '</a>',
231
  $or
232
  ),
233
  'home' => sprintf(
234
  esc_html__( 'when on the %spost index page%s %s', 'featured-video-plus' ),
235
+ '<a href="https://codex.wordpress.org/Function_Reference/is_home" target="_blank" rel="noopener noreferrer">',
236
  '</a>',
237
  $or
238
  ),
239
  'main_query' => sprintf(
240
  esc_html__( 'when inside the %smain query%s of each page %s', 'featured-video-plus' ),
241
+ '<a href="https://developer.wordpress.org/reference/functions/is_main_query/" target="_blank" rel="noopener noreferrer">',
242
  '</a>',
243
  $or
244
  ),
245
  'sticky' => sprintf(
246
  esc_html__( 'when displaying %ssticky%s posts.', 'featured-video-plus' ),
247
+ '<a href="https://codex.wordpress.org/Function_Reference/is_sticky" target="_blank" rel="noopener noreferrer">',
248
  '</a>'
249
  ),
250
  '!sticky' => sprintf(
251
  esc_html__( 'when displaying not %ssticky%s posts.', 'featured-video-plus' ),
252
+ '<a href="https://codex.wordpress.org/Function_Reference/is_sticky" target="_blank" rel="noopener noreferrer">',
253
  '</a>'
254
  )
255
  ),
309
  ),
310
  array( 'fvp_warning' )
311
  );
 
312
  }
313
 
314
 
333
  }
334
 
335
 
336
+ /**
337
+ * Define which HTML is legal in the video input.
338
+ *
339
+ * @since 2.3
340
+ */
341
+ public function legal_html() {
342
+ $options = get_option( 'fvp-settings' );
343
+
344
+ echo FVP_HTML::description(
345
+ sprintf(
346
+ esc_html__(
347
+ 'By default the video input only accepts %soEmbed urls%s. If you want to insert raw embed codes you need to enable the unsecure HTML here first.',
348
+ 'featured-video-plus'
349
+ ),
350
+ '<a href="https://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank" rel="noopener noreferrer">', '</a>'
351
+ )
352
+ );
353
+
354
+ echo FVP_HTML::checkboxes(
355
+ 'fvp-settings[legal_html]',
356
+ array(
357
+ 'iframe' => 'iframe',
358
+ 'embed' => 'embed',
359
+ 'object' => 'object',
360
+ ),
361
+ ! empty( $options['legal_html'] ) ? $options['legal_html'] : array()
362
+ );
363
+ }
364
+
365
+
366
  /**
367
  * Default settings for video embeds. Can be altered on a per video basis
368
  * using video embed URL arguments.
406
  'lazy' => esc_html__( '... lazy loading videos.', 'featured-video-plus' ),
407
  'single' => sprintf(
408
  esc_html__( '... viewing %ssingle%s posts and pages.', 'featured-video-plus' ),
409
+ '<a href="https://codex.wordpress.org/Function_Reference/is_singular" target="_blank" rel="noopener noreferrer">', '</a>'
410
  ),
411
  ),
412
  ! empty( $autoplay ) ? $autoplay : array()
541
  'If you have found a bug or think a specific feature is missing, %slet me know%s in the support forum. Like this plugin? %sRate it%s or %sbuy me a cookie%s!',
542
  'featured-video-plus'
543
  ),
544
+ '<a href="https://wordpress.org/support/plugin/featured-video-plus#plugin-title" title="Featured Video Plus Support Forum on WordPress.org" target="_blank" rel="noopener noreferrer" style="font-weight: bold;">',
545
  '</a>',
546
+ '<a href="https://wordpress.org/support/view/plugin-reviews/featured-video-plus#plugin-title" title="Rate Featured Video Plus on WordPress.org" target="_blank" rel="noopener noreferrer" style="font-weight: bold;">',
547
  '</a>',
548
+ '<a href="https://paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AD8UKMQW2DMM6" title="Gift to the developer!" target="_blank" rel="noopener noreferrer" style="font-weight: bold;">',
549
  '</a>'
550
  )
551
  );
582
  'sticky' => 'BOOLEAN',
583
  '!sticky' => 'BOOLEAN',
584
  ),
 
585
  'sizing' => array(
586
  'responsive' => 'BOOLEAN',
587
  'width' => $patterns['number'],
588
  ),
589
+ 'alignment' => '(left|center|right)',
590
+ 'legal_html' => array(
591
+ 'iframe' => 'BOOLEAN',
592
+ 'embed' => 'BOOLEAN',
593
+ 'object' => 'BOOLEAN',
594
+ ),
595
  'autoplay' => array(
596
  'always' => 'BOOLEAN',
597
  'lazy' => 'BOOLEAN',
php/inc-upgrade.php CHANGED
@@ -220,6 +220,13 @@ switch ( $version ) {
220
  }
221
  unset( $options['default_args']['general']['autoplay'] );
222
 
 
 
 
 
 
 
 
223
 
224
  default:
225
  update_option( 'fvp-settings', $options );
220
  }
221
  unset( $options['default_args']['general']['autoplay'] );
222
 
223
+ case '2.3.0':
224
+ $options['legal_html'] = array(
225
+ 'iframe' => false,
226
+ 'embed' => false,
227
+ 'object' => false,
228
+ );
229
+
230
 
231
  default:
232
  update_option( 'fvp-settings', $options );
readme.txt CHANGED
@@ -5,12 +5,12 @@ Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/
5
  Tags: featured, post, video, videos, image, thumbnail, html5, flash, lazy, overlay, youtube, vimeo, dailymotion, soundcloud, spotify
6
  Author: Alexander Höreth
7
  Author URI: http://yrnxt.com/
8
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AD8UKMQW2DMM6
9
  License: GPL-2.0
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Requires at least: 3.7
12
- Tested up to: 4.5
13
- Stable tag: 2.2.3
14
 
15
  Add Featured Videos to your posts and pages. Works like magic with most themes which use Featured Images. Local Media, YouTube, Vimeo and many more.
16
 
@@ -27,6 +27,8 @@ There are three ways to get the videos onto your page:
27
  2. insert the `[featured-video-plus]`-__Shortcode__ in your posts or
28
  3. manually make use of the __PHP-functions__ in your theme's source files.
29
 
 
 
30
  > <strong>Theme compatibility</strong><br>
31
  > Sadly many themes do not follow the WordPress standards and implement their own fancy functions for displaying featured images - those very likely break this plugin. Check out the [FAQ](https://wordpress.org/plugins/featured-video-plus/faq/). Another common problem are sliders: Videos, in general, do not like sliders at all.
32
 
@@ -37,7 +39,7 @@ Besides **Local Videos** you can use videos from a whole lot of external provide
37
  After installing the plugin check your site's *Media Settings* (`Settings -> Media` in the administration interface): The plugin adds quite some little helper options there. Change to lazy or overlay mode, tweak video sizing, individualize the look of the most prominent providers' video players and turn on autoplay or video looping. By default videos try to dynamically fit their parent containers width and adjust their size responsively.
38
 
39
  > <strong>Support</strong><br>
40
- > I do read all support questions in the [forums](https://wordpress.org/support/plugin/featured-video-plus) but cannot reply to all of them. The plugin is an unpaid side project and full support would require more time than I can invest for free for over 10k active installs. If you really need help, consider [buying me a cookie](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AD8UKMQW2DMM6) - best way to attract my attention and to support future enhancements.
41
 
42
 
43
 
@@ -86,13 +88,13 @@ When editing your theme's sourcecode keep in mind that a future update through W
86
  == Frequently Asked Questions ==
87
 
88
  = Why do I just get text back after adding an URL to the Featured Video input? =
89
- If the plugin just displays the URL back as text it probably does not recognize that it comes from a video provider. Try inserting the raw embed code instead and [check the docs](http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F) to see which providers are supported.
90
 
91
  = How do I use my local videos? =
92
  Click the small media icon in the Featured Video input box on the post edit screen and upload your video or choose it from the media library. WordPress does not support all formats tho, [check this table](http://www.mediaelementjs.com/#devices) for details.
93
 
94
- = Why do I not see a featuerd video or image on the frontend at all? =
95
- For the videos to be automatically displayed you need to define a Featured Image. This image will never be shown if a video is available. If your theme does not support featured images the plugin also has no chance of working out of the box.
96
 
97
  = Why does the frontend still display the featured image although I added a featured video to the post? =
98
  Sadly not all themes work out of the box. Themes need to make use of WordPress' native [Post Thumbnail](http://codex.wordpress.org/Post_Thumbnails) functionality (specifically `get_the_post_thumbnail()` and/or `the_post_thumbnail()`) - these functions are where the plugin can hook into the theme and modify what is displayed. Consider contacting the theme's creator or modifying the theme's sourcecode in order to add the plugin's [PHP-functions](https://wordpress.org/plugins/featured-video-plus/installation/).
@@ -100,13 +102,23 @@ Sadly not all themes work out of the box. Themes need to make use of WordPress'
100
  = How can I make the videos fit into their designated space in my theme? =
101
  Take a look at your media settings and try using a fixed width instead of responsive sizing.
102
 
 
 
 
103
  = Can I help translating the plugin? =
104
- Yes, please! Check out the public [Featured Video Plus Translation Project](https://poeditor.com/join/project?hash=WlyLh0cFO3).
105
 
106
 
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
 
 
110
  = 2.2.3: 2016-07-19 =
111
  * Fix for bad iframe src attributes. ([*](https://wordpress.org/support/topic/fix-for-wordpress-442-for-youtube-video-error))
112
  * Fix a problem with image type detection. ([*](https://wordpress.org/support/topic/warning-and-no-featured-image-generated?replies=3), [*](https://wordpress.org/support/topic/plugin-is-not-supporting-by-wordpress-44))
5
  Tags: featured, post, video, videos, image, thumbnail, html5, flash, lazy, overlay, youtube, vimeo, dailymotion, soundcloud, spotify
6
  Author: Alexander Höreth
7
  Author URI: http://yrnxt.com/
8
+ Donate link: https://www.paypal.me/ahoereth
9
  License: GPL-2.0
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Requires at least: 3.7
12
+ Tested up to: 4.7
13
+ Stable tag: 2.3.0
14
 
15
  Add Featured Videos to your posts and pages. Works like magic with most themes which use Featured Images. Local Media, YouTube, Vimeo and many more.
16
 
27
  2. insert the `[featured-video-plus]`-__Shortcode__ in your posts or
28
  3. manually make use of the __PHP-functions__ in your theme's source files.
29
 
30
+ For more details, check the [installation](http://wordpress.org/plugins/featured-video-plus/installation/) page.
31
+
32
  > <strong>Theme compatibility</strong><br>
33
  > Sadly many themes do not follow the WordPress standards and implement their own fancy functions for displaying featured images - those very likely break this plugin. Check out the [FAQ](https://wordpress.org/plugins/featured-video-plus/faq/). Another common problem are sliders: Videos, in general, do not like sliders at all.
34
 
39
  After installing the plugin check your site's *Media Settings* (`Settings -> Media` in the administration interface): The plugin adds quite some little helper options there. Change to lazy or overlay mode, tweak video sizing, individualize the look of the most prominent providers' video players and turn on autoplay or video looping. By default videos try to dynamically fit their parent containers width and adjust their size responsively.
40
 
41
  > <strong>Support</strong><br>
42
+ > I do read all support questions in the [forums](http://wordpress.org/support/plugin/featured-video-plus) but cannot reply to all of them. The plugin is an unpaid side project and full support would require more time than I can invest for free for over 20k active installs. If you really need help, consider [buying me a cookie](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AD8UKMQW2DMM6) - best way to attract my attention and to support future enhancements.
43
 
44
 
45
 
88
  == Frequently Asked Questions ==
89
 
90
  = Why do I just get text back after adding an URL to the Featured Video input? =
91
+ If the plugin just returns text instead of the actual video the pasted url is probably not valid or not from a valid video provider. Try inserting the raw embed code instead or [check the docs](http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F) to see which providers are supported.
92
 
93
  = How do I use my local videos? =
94
  Click the small media icon in the Featured Video input box on the post edit screen and upload your video or choose it from the media library. WordPress does not support all formats tho, [check this table](http://www.mediaelementjs.com/#devices) for details.
95
 
96
+ = Why do I not see a featured video or image on the frontend at all? =
97
+ For the videos to be automatically displayed you need to define a Featured Image. Depending on your featured video settings this image will never be shown if a video is set. If your theme does not support featured images the plugin also has no chance of working out of the box.
98
 
99
  = Why does the frontend still display the featured image although I added a featured video to the post? =
100
  Sadly not all themes work out of the box. Themes need to make use of WordPress' native [Post Thumbnail](http://codex.wordpress.org/Post_Thumbnails) functionality (specifically `get_the_post_thumbnail()` and/or `the_post_thumbnail()`) - these functions are where the plugin can hook into the theme and modify what is displayed. Consider contacting the theme's creator or modifying the theme's sourcecode in order to add the plugin's [PHP-functions](https://wordpress.org/plugins/featured-video-plus/installation/).
102
  = How can I make the videos fit into their designated space in my theme? =
103
  Take a look at your media settings and try using a fixed width instead of responsive sizing.
104
 
105
+ = How can I make the plugin work with infinite scrolling? =
106
+ While the plugin tries to handle infinite scrolling automatically, it does not work for all configurations. In those cases you will want to manually call `initFeaturedVideoPlus()` using JavaScript everytime new articles have been loaded. Most infinite scroll plugins should have some kind of post-load hook.
107
+
108
  = Can I help translating the plugin? =
109
+ Yes, please! Check out the official [Featured Video Plus Translation Project](https://translate.wordpress.org/projects/wp-plugins/featured-video-plus).
110
 
111
 
112
 
113
  == Changelog ==
114
 
115
+ = 2.3.0: 2016-12-15 =
116
+ * Now compatible with [Video SEO](https://yoast.com/wordpress/plugins/video-seo/)! ([*](https://wordpress.org/support/topic/compatibility-with-video-seo), [*](https://wordpress.org/support/topic/video-seo-featured-video-plus-compatability), [*](https://wordpress.org/support/topic/fantastic-a-must-have-for-all-video-sites))
117
+ * Fix AJAX vulnerability reported by [@jamesgol](https://github.com/jamesgol).
118
+ * **Disallow raw embeds (`iframe`, `object`, `embed`) by default for new videos -- can be enabled in the settings.** Could have been misused if somebody had gained access to an editor account beforehand. Reported by [@jamesgol](https://github.com/jamesgol).
119
+ * "Single" now actually means single posts **and** pages. ([*](https://wordpress.org/support/topic/is_singular), [*](https://github.com/ahoereth/featured-video-plus/issues/7))
120
+ * Fix some problem with fixed size specifications. ([*](https://wordpress.org/support/topic/modifying-size-has-no-effect), [*](https://wordpress.org/support/topic/not-able-to-change-size-of-video), [*](https://wordpress.org/support/topic/width-function-on-featured-video-plus-width560-is-not-working), [*](https://wordpress.org/support/topic/the_post_video-is-the-wrong-size))
121
+
122
  = 2.2.3: 2016-07-19 =
123
  * Fix for bad iframe src attributes. ([*](https://wordpress.org/support/topic/fix-for-wordpress-442-for-youtube-video-error))
124
  * Fix a problem with image type detection. ([*](https://wordpress.org/support/topic/warning-and-no-featured-image-generated?replies=3), [*](https://wordpress.org/support/topic/plugin-is-not-supporting-by-wordpress-44))
styles/backend.css CHANGED
@@ -20,6 +20,11 @@
20
  border: 1px solid #808080;
21
  background-color: #fff;
22
  }
 
 
 
 
 
23
  #featured-video-plus-box .fvp-warning {
24
  -webkit-border-radius: 3px;
25
  -moz-border-radius: 3px;
20
  border: 1px solid #808080;
21
  background-color: #fff;
22
  }
23
+ #featured-video-plus-box .fvp-notice-invalid,
24
+ #featured-video-plus-box .fvp-notice-theme {
25
+ position: relative;
26
+ padding-right: 2em;
27
+ }
28
  #featured-video-plus-box .fvp-warning {
29
  -webkit-border-radius: 3px;
30
  -moz-border-radius: 3px;
styles/backend.less CHANGED
@@ -25,6 +25,11 @@
25
  background-color: #fff;
26
  }
27
 
 
 
 
 
 
28
  .fvp-warning {
29
  .fvp-notice();
30
  border: 1px solid #E6DB55;
25
  background-color: #fff;
26
  }
27
 
28
+ .fvp-notice-invalid, .fvp-notice-theme {
29
+ position: relative;
30
+ padding-right: 2em;
31
+ }
32
+
33
  .fvp-warning {
34
  .fvp-notice();
35
  border: 1px solid #E6DB55;
uninstall.php CHANGED
File without changes