Changeset 1181216
- Timestamp:
- 06/15/2015 04:25:53 PM (11 years ago)
- Location:
- featured-video-plus
- Files:
-
- 16 deleted
- 10 edited
- 24 copied
-
tags/2.1.1 (copied) (copied from featured-video-plus/trunk)
-
tags/2.1.1/CHANGELOG.md (copied) (copied from featured-video-plus/trunk/CHANGELOG.md) (1 diff)
-
tags/2.1.1/README.md (copied) (copied from featured-video-plus/trunk/README.md)
-
tags/2.1.1/css (deleted)
-
tags/2.1.1/featured-video-plus.php (copied) (copied from featured-video-plus/trunk/featured-video-plus.php) (2 diffs)
-
tags/2.1.1/js/backend.js (deleted)
-
tags/2.1.1/js/backend.min.js (deleted)
-
tags/2.1.1/js/backend_35.js (deleted)
-
tags/2.1.1/js/backend_pre35.js (deleted)
-
tags/2.1.1/js/frontend.js (copied) (copied from featured-video-plus/trunk/js/frontend.js) (2 diffs)
-
tags/2.1.1/js/frontend.min.js (copied) (copied from featured-video-plus/trunk/js/frontend.min.js) (1 diff)
-
tags/2.1.1/js/html.js (copied) (copied from featured-video-plus/trunk/js/html.js)
-
tags/2.1.1/js/html.min.js (copied) (copied from featured-video-plus/trunk/js/html.min.js)
-
tags/2.1.1/js/jquery.domwindow.min.js (copied) (copied from featured-video-plus/trunk/js/jquery.domwindow.min.js)
-
tags/2.1.1/js/post.js (copied) (copied from featured-video-plus/trunk/js/post.js) (4 diffs)
-
tags/2.1.1/js/post.min.js (copied) (copied from featured-video-plus/trunk/js/post.min.js) (1 diff)
-
tags/2.1.1/js/settings.js (deleted)
-
tags/2.1.1/lng/featured-video-plus-de_DE.mo (copied) (copied from featured-video-plus/trunk/lng/featured-video-plus-de_DE.mo)
-
tags/2.1.1/lng/featured-video-plus-de_DE.po (copied) (copied from featured-video-plus/trunk/lng/featured-video-plus-de_DE.po)
-
tags/2.1.1/lng/featured-video-plus.pot (copied) (copied from featured-video-plus/trunk/lng/featured-video-plus.pot)
-
tags/2.1.1/php/backend.php (deleted)
-
tags/2.1.1/php/class-backend.php (copied) (copied from featured-video-plus/trunk/php/class-backend.php) (1 diff)
-
tags/2.1.1/php/class-frontend.php (copied) (copied from featured-video-plus/trunk/php/class-frontend.php)
-
tags/2.1.1/php/class-html.php (copied) (copied from featured-video-plus/trunk/php/class-html.php)
-
tags/2.1.1/php/class-main.php (copied) (copied from featured-video-plus/trunk/php/class-main.php)
-
tags/2.1.1/php/class-settings.php (copied) (copied from featured-video-plus/trunk/php/class-settings.php)
-
tags/2.1.1/php/frontend.php (deleted)
-
tags/2.1.1/php/general.php (deleted)
-
tags/2.1.1/php/inc-upgrade.php (copied) (copied from featured-video-plus/trunk/php/inc-upgrade.php)
-
tags/2.1.1/php/settings.php (deleted)
-
tags/2.1.1/php/somatic_attach_external_image.php (deleted)
-
tags/2.1.1/php/upgrade.php (deleted)
-
tags/2.1.1/readme.txt (copied) (copied from featured-video-plus/trunk/readme.txt) (2 diffs)
-
tags/2.1.1/styles/_variables.less (deleted)
-
tags/2.1.1/styles/backend.css (copied) (copied from featured-video-plus/trunk/styles/backend.css) (2 diffs)
-
tags/2.1.1/styles/backend.less (deleted)
-
tags/2.1.1/styles/frontend.css (copied) (copied from featured-video-plus/trunk/styles/frontend.css) (2 diffs)
-
tags/2.1.1/styles/frontend.less (deleted)
-
tags/2.1.1/styles/html.css (copied) (copied from featured-video-plus/trunk/styles/html.css)
-
tags/2.1.1/styles/html.less (deleted)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/featured-video-plus.php (modified) (2 diffs)
-
trunk/js/frontend.js (modified) (2 diffs)
-
trunk/js/frontend.min.js (modified) (1 diff)
-
trunk/js/post.js (modified) (4 diffs)
-
trunk/js/post.min.js (modified) (1 diff)
-
trunk/php/class-backend.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/styles/backend.css (modified) (2 diffs)
-
trunk/styles/frontend.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
featured-video-plus/tags/2.1.1/CHANGELOG.md
r1179150 r1181216 1 1 # Changelog # 2 3 ## 2.1.1: 2015-06-xx ## 4 * Fix play and loading featured image overlay for some themes ([*](https://wordpress.org/support/topic/play-icon-missing)). 5 * Fix broken `remove featured image` link. ([*](https://wordpress.org/support/topic/cant-remove-featured-image-2), [*](https://wordpress.org/support/topic/version-210-conflict-with-wp-featured-image), [*](https://wordpress.org/support/topic/fvp-not-working-after-210-update)) 2 6 3 7 ## 2.1.0: 2015-06-11 ## -
featured-video-plus/tags/2.1.1/featured-video-plus.php
r1179150 r1181216 4 4 Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/ 5 5 Description: Add Featured Videos to your posts and pages. 6 Version: 2.1. 06 Version: 2.1.1 7 7 Author: Alexander Höreth 8 8 Author URI: http://yrnxt.com … … 33 33 // CONSTANTS 34 34 if ( ! defined( 'FVP_VERSION' ) ) { 35 define( 'FVP_VERSION', '2.1. 0' );35 define( 'FVP_VERSION', '2.1.1' ); 36 36 } 37 37 -
featured-video-plus/tags/2.1.1/js/frontend.js
r1179150 r1181216 26 26 $('.has-post-video .post-thumbnail>.post-thumbnail') 27 27 .removeClass('post-thumbnail'); 28 29 // There might still be some empty .post-thumbnail links to be removed. 30 $('a.post-thumbnail').not('.fvp-dynamic, .fvp-overlay').remove(); 28 31 } 29 32 … … 78 81 */ 79 82 function hover(event) { 80 var $elem = $(event.currentTarget); 81 var $img = $elem.children('img'); 82 83 if (0 === $elem.find('.fvp-loader').length) { 84 $img.animate({ opacity: fvpdata.opacity }); 85 $elem 86 .css({ position: 'relative' }) 87 .prepend( 88 $loader 89 .css({ 90 height : $img.height(), 91 width : $img.width(), 92 marginTop : -$img.height()/2, 93 marginLeft: -$img.width()/2 94 }) 95 ); 83 var $img = $(event.currentTarget).children('img'); 84 85 // Is the overlay displayed currently? 86 if (0 === $img.siblings('.fvp-loader').length) { 87 // Copy classes and css styles onto the play icon overlay. 88 $loader.addClass($img.attr('class')).css({ 89 height: $img.height(), 90 width: $img.width(), 91 margin: $img.css('margin') 92 }); 93 94 // Fade out image and insert overlay. 95 $img.animate({ opacity: fvpdata.opacity }).before($loader); 96 96 } else if (bgState !== loadBg) { 97 97 $img.animate({ opacity: 1 }); -
featured-video-plus/tags/2.1.1/js/frontend.min.js
r1179150 r1181216 1 !function( t){"use strict";function a(){t(".has-post-video a>.featured-video-plus,.has-post-video a>.fvp-dynamic,.has-post-video a>.fvp-overlay,.has-post-video a>.wp-video,.has-post-video a>.wp-video-shortcode").unwrap(),t(".has-post-video .post-thumbnail>.post-thumbnail").removeClass("post-thumbnail")}function e(){fvpdata.fitvids&&t(".featured-video-plus.fvp-responsive").fitVids({customSelector:["iframe","object","embed"]})}function i(){if(fvpdata.width&&!fvpdata.fitvids){t(".fvp-local .wp-video").css({width:fvpdata.width,height:"auto"});var a=t(".fvp-local .wp-video .wp-video-shortcode");a.attr({width:fvpdata.width,height:fvpdata.width/a.attr("width")*a.attr("heigth")})}}function o(){void 0===r&&[fvpdata.playicon,fvpdata.loadicon].forEach(function(a){t("body").append(t("<img/>",{src:a}).hide())}),r=r===c?s:c,v.css({backgroundImage:r})}function d(a){var e=t(a.currentTarget),i=e.children("img");0===e.find(".fvp-loader").length?(i.animate({opacity:fvpdata.opacity}),e.css({position:"relative"}).prepend(v.css({height:i.height(),width:i.width(),marginTop:-i.height()/2,marginLeft:-i.width()/2}))):r!==s&&(i.animate({opacity:1}),v.remove())}function n(i){i.preventDefault();var d=t(i.currentTarget),n=parseInt(d.attr("data-id"),10);o(),t.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:n},function(t){if(t.success){var i=d.parent();d.replaceWith(t.data),i.find(".wp-audio-shortcode, .wp-video-shortcode").mediaelementplayer(),e(),a()}o()})}function p(a){a.preventDefault();var e=t(a.currentTarget),o=parseInt(e.attr("data-id"),10);e.openDOMWindow({eventType:null,windowPadding:0,borderSize:0,windowBGColor:"transparent",overlayOpacity:100*fvpdata.opacity,width:"100%",height:"100%"}),t("#DOMWindow").css({backgroundImage:s});var d=t("#fvp-cache-"+o);0===d.html().length?t.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:o},function(a){a.success&&(d.html(a.data),t("#DOMWindow").html(a.data),i(),t(window).trigger("scroll"))}):(t("#DOMWindow").html(d.html()),t(window).trigger("scroll"))}var r,v=t("<div />").addClass("fvp-loader"),c="url('"+fvpdata.playicon+"')",s="url('"+fvpdata.loadicon+"')";t(document).ready(function(){a(),setTimeout(a,1e3),e(),i(),t(".fvp-overlay, .fvp-dynamic").hover(d,d),o(),t(".fvp-dynamic").click(n),t(".fvp-overlay").click(p)})}(jQuery);1 !function(a){"use strict";function t(){a(".has-post-video a>.featured-video-plus,.has-post-video a>.fvp-dynamic,.has-post-video a>.fvp-overlay,.has-post-video a>.wp-video,.has-post-video a>.wp-video-shortcode").unwrap(),a(".has-post-video .post-thumbnail>.post-thumbnail").removeClass("post-thumbnail"),a("a.post-thumbnail").not(".fvp-dynamic, .fvp-overlay").remove()}function e(){fvpdata.fitvids&&a(".featured-video-plus.fvp-responsive").fitVids({customSelector:["iframe","object","embed"]})}function i(){if(fvpdata.width&&!fvpdata.fitvids){a(".fvp-local .wp-video").css({width:fvpdata.width,height:"auto"});var t=a(".fvp-local .wp-video .wp-video-shortcode");t.attr({width:fvpdata.width,height:fvpdata.width/t.attr("width")*t.attr("heigth")})}}function o(){void 0===r&&[fvpdata.playicon,fvpdata.loadicon].forEach(function(t){a("body").append(a("<img/>",{src:t}).hide())}),r=r===c?s:c,v.css({backgroundImage:r})}function d(t){var e=a(t.currentTarget).children("img");0===e.siblings(".fvp-loader").length?(v.addClass(e.attr("class")).css({height:e.height(),width:e.width(),margin:e.css("margin")}),e.animate({opacity:fvpdata.opacity}).before(v)):r!==s&&(e.animate({opacity:1}),v.remove())}function n(i){i.preventDefault();var d=a(i.currentTarget),n=parseInt(d.attr("data-id"),10);o(),a.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:n},function(a){if(a.success){var i=d.parent();d.replaceWith(a.data),i.find(".wp-audio-shortcode, .wp-video-shortcode").mediaelementplayer(),e(),t()}o()})}function p(t){t.preventDefault();var e=a(t.currentTarget),o=parseInt(e.attr("data-id"),10);e.openDOMWindow({eventType:null,windowPadding:0,borderSize:0,windowBGColor:"transparent",overlayOpacity:100*fvpdata.opacity,width:"100%",height:"100%"}),a("#DOMWindow").css({backgroundImage:s});var d=a("#fvp-cache-"+o);0===d.html().length?a.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:o},function(t){t.success&&(d.html(t.data),a("#DOMWindow").html(t.data),i(),a(window).trigger("scroll"))}):(a("#DOMWindow").html(d.html()),a(window).trigger("scroll"))}var r,v=a("<div />").addClass("fvp-loader"),c="url('"+fvpdata.playicon+"')",s="url('"+fvpdata.loadicon+"')";a(document).ready(function(){t(),setTimeout(t,1e3),e(),i(),a(".fvp-overlay, .fvp-dynamic").hover(d,d),o(),a(".fvp-dynamic").click(n),a(".fvp-overlay").click(p)})}(jQuery); -
featured-video-plus/tags/2.1.1/js/post.js
r1179150 r1181216 9 9 var mediaicon; 10 10 var loadingicon = 'url(' + context.loading_gif + ')'; 11 12 13 /** 14 * Update the featured image box content with fresh html and show/hide the 15 * required remove post thumbnail links accordingly. 16 * 17 * @param {string} html 18 */ 19 function updateImageDiv(html) { 20 var $container = $('#postimagediv .inside'); 21 html = html || $container.html(); 22 $container.html(html); 23 24 if (0 < $container.find('.fvp-remove-image').length) { 25 $container.find('#remove-post-thumbnail').parent('p').hide(); 26 $container.find('.fvp-remove-image').parent('p').show(); 27 } 28 } 11 29 12 30 … … 39 57 }, function(response) { 40 58 if (response.success) { 41 $('#postimagediv .inside').html(response.data);59 updateImageDiv(response.data); 42 60 $media.css({ backgroundImage: mediaicon }); // Hide loading gif. 43 61 } … … 92 110 } else { 93 111 $container 94 .css({height: ' auto'})112 .css({height: ''}) 95 113 .html(data.video); 96 114 } 97 115 98 116 // update featured image 99 $('#postimagediv .inside').html(data.img);117 updateImageDiv(data.img); 100 118 }, 'json' ); 101 119 } … … 134 152 .on('click', '.fvp-set-image', setFeatimg) 135 153 .on('click', '.fvp-remove-image', removeFeatimg); 154 updateImageDiv(); 136 155 137 156 // WordPress 3.5 Media Manager -
featured-video-plus/tags/2.1.1/js/post.min.js
r1179150 r1181216 1 !function(e){"use strict";function t( e){a(e,!0)}function i(t){t.preventDefault(),o.css({backgroundImage:v}),e.post(ajaxurl,{action:"fvp_remove_img",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val()},function(t){t.success&&(e("#postimagediv .inside").html(t.data),o.css({backgroundImage:r}))},"json")}function a(t,i){if(t.preventDefault(),i=i||!1,n.val(e.trim(n.val())).trigger("autosize"),s!==n.val()||i){o.css({backgroundImage:v}),s=n.val();var a={action:"fvp_save",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val(),fvp_video:n.val(),fvp_set_featimg:i};e.post(ajaxurl,a,function(t){if(!t.success)return!1;var i=t.data,a=e(".fvp-current-video");o.css({backgroundImage:r}),"remove"===i.task?a.css({height:a.height()}).html("").animate({height:0}):a.css({height:"auto"}).html(i.video),e("#postimagediv .inside").html(i.img)},"json")}}var n,o,s,r,c=fvpPost,v="url("+c.loading_gif+")";e(document).ready(function(){n=e(".fvp-video"),o=n.siblings(".fvp-video-choose").children(".fvp-media-icon"),s=n.val(),r=o.css("backgroundImage"),n.blur(a),n.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",t).on("click",".fvp-remove-image",i);var c,v={frame:function(){return this._frame?this._frame:(this._frame=wp.media({title:c.data("title"),library:{type:"video"},button:{text:c.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=c.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(),c=e(this).closest(".fvp-input-wrapper"),v.frame().open()})}};v.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(),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}):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); -
featured-video-plus/tags/2.1.1/php/class-backend.php
r1179150 r1181216 657 657 */ 658 658 public function featured_image_box( $content, $post_id ) { 659 if ( ! has_post_video( $post_id ) ) { 660 // Has no featured video so the plugin does not interfere. 661 return $content; 662 } 663 659 664 if ( has_post_thumbnail( $post_id ) ) { 660 $link = sprintf( 661 '<p class="hide-if-no-js"><a href="#" class="fvp-remove-image">%s</a></p>', 665 // Has featured video and featured image. 666 return $content . sprintf( 667 '<p class="hidden"><a href="#" class="fvp-remove-image">%s</a></p>', 662 668 esc_html__( 'Remove featured image' ) 663 669 ); 664 665 return $content . $link; 666 } elseif ( has_post_video( $post_id ) ) { 667 $notice = sprintf( 668 '<p class="fvp-notice">%s <a href="#" class="fvp-set-image hide-if-no-js">%s</a></p>', 669 esc_html__( 670 'Featured Videos require a Featured Image for automatic replacement.', 671 'featured-video-plus' 672 ), 673 esc_html__( 'Auto set', 'featured-video-plus' ) 674 ); 675 676 return $notice . $content; 677 } 678 679 return $content; 670 } 671 672 // Has featured video but not featured image. 673 return sprintf( 674 '<p class="fvp-notice">%s <a href="#" class="fvp-set-image hide-if-no-js">%s</a></p>', 675 esc_html__( 676 'Featured Videos require a Featured Image for automatic replacement.', 677 'featured-video-plus' 678 ), 679 esc_html__( 'Auto set', 'featured-video-plus' ) 680 ) . $content; 680 681 } 681 682 -
featured-video-plus/tags/2.1.1/readme.txt
r1179150 r1181216 11 11 Requires at least: 3.7 12 12 Tested up to: 4.2.2 13 Stable tag: 2.1. 013 Stable tag: 2.1.1 14 14 15 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. … … 115 115 116 116 == Changelog == 117 118 = 2.1.1: 2015-06-xx = 119 * Fix play and loading featured image overlay for some themes ([*](https://wordpress.org/support/topic/play-icon-missing)). 120 * Fix broken `remove featured image` link. ([*](https://wordpress.org/support/topic/cant-remove-featured-image-2), [*](https://wordpress.org/support/topic/version-210-conflict-with-wp-featured-image), [*](https://wordpress.org/support/topic/fvp-not-working-after-210-update)) 117 121 118 122 = 2.1.0: 2015-06-11 = -
featured-video-plus/tags/2.1.1/styles/backend.css
r1179150 r1181216 3 3 } 4 4 #featured-video-plus-box .fvp-current-video, 5 #featured-video-plus-box iframe { 5 #featured-video-plus-box .fvp-current-video iframe, 6 #featured-video-plus-box .fvp-current-video video { 6 7 width: 256px; 7 8 height: auto; … … 54 55 right: 4px; 55 56 } 56 #postimagediv #remove-post-thumbnail {57 display: none !important;58 } -
featured-video-plus/tags/2.1.1/styles/frontend.css
r1179150 r1181216 46 46 .fvp-dynamic { 47 47 position: relative; 48 display: block; 48 49 height: auto; 49 50 width: auto; … … 53 54 background: transparent no-repeat scroll center center; 54 55 position: absolute; 55 left: 50%;56 top: 50%;57 z-index: 10;56 top: 0; 57 left: 0; 58 z-index: 999; 58 59 pointer-events: none; 59 60 } -
featured-video-plus/trunk/CHANGELOG.md
r1179150 r1181216 1 1 # Changelog # 2 3 ## 2.1.1: 2015-06-xx ## 4 * Fix play and loading featured image overlay for some themes ([*](https://wordpress.org/support/topic/play-icon-missing)). 5 * Fix broken `remove featured image` link. ([*](https://wordpress.org/support/topic/cant-remove-featured-image-2), [*](https://wordpress.org/support/topic/version-210-conflict-with-wp-featured-image), [*](https://wordpress.org/support/topic/fvp-not-working-after-210-update)) 2 6 3 7 ## 2.1.0: 2015-06-11 ## -
featured-video-plus/trunk/featured-video-plus.php
r1179150 r1181216 4 4 Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/ 5 5 Description: Add Featured Videos to your posts and pages. 6 Version: 2.1. 06 Version: 2.1.1 7 7 Author: Alexander Höreth 8 8 Author URI: http://yrnxt.com … … 33 33 // CONSTANTS 34 34 if ( ! defined( 'FVP_VERSION' ) ) { 35 define( 'FVP_VERSION', '2.1. 0' );35 define( 'FVP_VERSION', '2.1.1' ); 36 36 } 37 37 -
featured-video-plus/trunk/js/frontend.js
r1179150 r1181216 26 26 $('.has-post-video .post-thumbnail>.post-thumbnail') 27 27 .removeClass('post-thumbnail'); 28 29 // There might still be some empty .post-thumbnail links to be removed. 30 $('a.post-thumbnail').not('.fvp-dynamic, .fvp-overlay').remove(); 28 31 } 29 32 … … 78 81 */ 79 82 function hover(event) { 80 var $elem = $(event.currentTarget); 81 var $img = $elem.children('img'); 82 83 if (0 === $elem.find('.fvp-loader').length) { 84 $img.animate({ opacity: fvpdata.opacity }); 85 $elem 86 .css({ position: 'relative' }) 87 .prepend( 88 $loader 89 .css({ 90 height : $img.height(), 91 width : $img.width(), 92 marginTop : -$img.height()/2, 93 marginLeft: -$img.width()/2 94 }) 95 ); 83 var $img = $(event.currentTarget).children('img'); 84 85 // Is the overlay displayed currently? 86 if (0 === $img.siblings('.fvp-loader').length) { 87 // Copy classes and css styles onto the play icon overlay. 88 $loader.addClass($img.attr('class')).css({ 89 height: $img.height(), 90 width: $img.width(), 91 margin: $img.css('margin') 92 }); 93 94 // Fade out image and insert overlay. 95 $img.animate({ opacity: fvpdata.opacity }).before($loader); 96 96 } else if (bgState !== loadBg) { 97 97 $img.animate({ opacity: 1 }); -
featured-video-plus/trunk/js/frontend.min.js
r1179150 r1181216 1 !function( t){"use strict";function a(){t(".has-post-video a>.featured-video-plus,.has-post-video a>.fvp-dynamic,.has-post-video a>.fvp-overlay,.has-post-video a>.wp-video,.has-post-video a>.wp-video-shortcode").unwrap(),t(".has-post-video .post-thumbnail>.post-thumbnail").removeClass("post-thumbnail")}function e(){fvpdata.fitvids&&t(".featured-video-plus.fvp-responsive").fitVids({customSelector:["iframe","object","embed"]})}function i(){if(fvpdata.width&&!fvpdata.fitvids){t(".fvp-local .wp-video").css({width:fvpdata.width,height:"auto"});var a=t(".fvp-local .wp-video .wp-video-shortcode");a.attr({width:fvpdata.width,height:fvpdata.width/a.attr("width")*a.attr("heigth")})}}function o(){void 0===r&&[fvpdata.playicon,fvpdata.loadicon].forEach(function(a){t("body").append(t("<img/>",{src:a}).hide())}),r=r===c?s:c,v.css({backgroundImage:r})}function d(a){var e=t(a.currentTarget),i=e.children("img");0===e.find(".fvp-loader").length?(i.animate({opacity:fvpdata.opacity}),e.css({position:"relative"}).prepend(v.css({height:i.height(),width:i.width(),marginTop:-i.height()/2,marginLeft:-i.width()/2}))):r!==s&&(i.animate({opacity:1}),v.remove())}function n(i){i.preventDefault();var d=t(i.currentTarget),n=parseInt(d.attr("data-id"),10);o(),t.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:n},function(t){if(t.success){var i=d.parent();d.replaceWith(t.data),i.find(".wp-audio-shortcode, .wp-video-shortcode").mediaelementplayer(),e(),a()}o()})}function p(a){a.preventDefault();var e=t(a.currentTarget),o=parseInt(e.attr("data-id"),10);e.openDOMWindow({eventType:null,windowPadding:0,borderSize:0,windowBGColor:"transparent",overlayOpacity:100*fvpdata.opacity,width:"100%",height:"100%"}),t("#DOMWindow").css({backgroundImage:s});var d=t("#fvp-cache-"+o);0===d.html().length?t.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:o},function(a){a.success&&(d.html(a.data),t("#DOMWindow").html(a.data),i(),t(window).trigger("scroll"))}):(t("#DOMWindow").html(d.html()),t(window).trigger("scroll"))}var r,v=t("<div />").addClass("fvp-loader"),c="url('"+fvpdata.playicon+"')",s="url('"+fvpdata.loadicon+"')";t(document).ready(function(){a(),setTimeout(a,1e3),e(),i(),t(".fvp-overlay, .fvp-dynamic").hover(d,d),o(),t(".fvp-dynamic").click(n),t(".fvp-overlay").click(p)})}(jQuery);1 !function(a){"use strict";function t(){a(".has-post-video a>.featured-video-plus,.has-post-video a>.fvp-dynamic,.has-post-video a>.fvp-overlay,.has-post-video a>.wp-video,.has-post-video a>.wp-video-shortcode").unwrap(),a(".has-post-video .post-thumbnail>.post-thumbnail").removeClass("post-thumbnail"),a("a.post-thumbnail").not(".fvp-dynamic, .fvp-overlay").remove()}function e(){fvpdata.fitvids&&a(".featured-video-plus.fvp-responsive").fitVids({customSelector:["iframe","object","embed"]})}function i(){if(fvpdata.width&&!fvpdata.fitvids){a(".fvp-local .wp-video").css({width:fvpdata.width,height:"auto"});var t=a(".fvp-local .wp-video .wp-video-shortcode");t.attr({width:fvpdata.width,height:fvpdata.width/t.attr("width")*t.attr("heigth")})}}function o(){void 0===r&&[fvpdata.playicon,fvpdata.loadicon].forEach(function(t){a("body").append(a("<img/>",{src:t}).hide())}),r=r===c?s:c,v.css({backgroundImage:r})}function d(t){var e=a(t.currentTarget).children("img");0===e.siblings(".fvp-loader").length?(v.addClass(e.attr("class")).css({height:e.height(),width:e.width(),margin:e.css("margin")}),e.animate({opacity:fvpdata.opacity}).before(v)):r!==s&&(e.animate({opacity:1}),v.remove())}function n(i){i.preventDefault();var d=a(i.currentTarget),n=parseInt(d.attr("data-id"),10);o(),a.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:n},function(a){if(a.success){var i=d.parent();d.replaceWith(a.data),i.find(".wp-audio-shortcode, .wp-video-shortcode").mediaelementplayer(),e(),t()}o()})}function p(t){t.preventDefault();var e=a(t.currentTarget),o=parseInt(e.attr("data-id"),10);e.openDOMWindow({eventType:null,windowPadding:0,borderSize:0,windowBGColor:"transparent",overlayOpacity:100*fvpdata.opacity,width:"100%",height:"100%"}),a("#DOMWindow").css({backgroundImage:s});var d=a("#fvp-cache-"+o);0===d.html().length?a.post(fvpdata.ajaxurl,{action:"fvp_get_embed",fvp_nonce:fvpdata.nonce,id:o},function(t){t.success&&(d.html(t.data),a("#DOMWindow").html(t.data),i(),a(window).trigger("scroll"))}):(a("#DOMWindow").html(d.html()),a(window).trigger("scroll"))}var r,v=a("<div />").addClass("fvp-loader"),c="url('"+fvpdata.playicon+"')",s="url('"+fvpdata.loadicon+"')";a(document).ready(function(){t(),setTimeout(t,1e3),e(),i(),a(".fvp-overlay, .fvp-dynamic").hover(d,d),o(),a(".fvp-dynamic").click(n),a(".fvp-overlay").click(p)})}(jQuery); -
featured-video-plus/trunk/js/post.js
r1179150 r1181216 9 9 var mediaicon; 10 10 var loadingicon = 'url(' + context.loading_gif + ')'; 11 12 13 /** 14 * Update the featured image box content with fresh html and show/hide the 15 * required remove post thumbnail links accordingly. 16 * 17 * @param {string} html 18 */ 19 function updateImageDiv(html) { 20 var $container = $('#postimagediv .inside'); 21 html = html || $container.html(); 22 $container.html(html); 23 24 if (0 < $container.find('.fvp-remove-image').length) { 25 $container.find('#remove-post-thumbnail').parent('p').hide(); 26 $container.find('.fvp-remove-image').parent('p').show(); 27 } 28 } 11 29 12 30 … … 39 57 }, function(response) { 40 58 if (response.success) { 41 $('#postimagediv .inside').html(response.data);59 updateImageDiv(response.data); 42 60 $media.css({ backgroundImage: mediaicon }); // Hide loading gif. 43 61 } … … 92 110 } else { 93 111 $container 94 .css({height: ' auto'})112 .css({height: ''}) 95 113 .html(data.video); 96 114 } 97 115 98 116 // update featured image 99 $('#postimagediv .inside').html(data.img);117 updateImageDiv(data.img); 100 118 }, 'json' ); 101 119 } … … 134 152 .on('click', '.fvp-set-image', setFeatimg) 135 153 .on('click', '.fvp-remove-image', removeFeatimg); 154 updateImageDiv(); 136 155 137 156 // WordPress 3.5 Media Manager -
featured-video-plus/trunk/js/post.min.js
r1179150 r1181216 1 !function(e){"use strict";function t( e){a(e,!0)}function i(t){t.preventDefault(),o.css({backgroundImage:v}),e.post(ajaxurl,{action:"fvp_remove_img",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val()},function(t){t.success&&(e("#postimagediv .inside").html(t.data),o.css({backgroundImage:r}))},"json")}function a(t,i){if(t.preventDefault(),i=i||!1,n.val(e.trim(n.val())).trigger("autosize"),s!==n.val()||i){o.css({backgroundImage:v}),s=n.val();var a={action:"fvp_save",id:e("#post_ID").val(),fvp_nonce:e("#fvp_nonce").val(),fvp_video:n.val(),fvp_set_featimg:i};e.post(ajaxurl,a,function(t){if(!t.success)return!1;var i=t.data,a=e(".fvp-current-video");o.css({backgroundImage:r}),"remove"===i.task?a.css({height:a.height()}).html("").animate({height:0}):a.css({height:"auto"}).html(i.video),e("#postimagediv .inside").html(i.img)},"json")}}var n,o,s,r,c=fvpPost,v="url("+c.loading_gif+")";e(document).ready(function(){n=e(".fvp-video"),o=n.siblings(".fvp-video-choose").children(".fvp-media-icon"),s=n.val(),r=o.css("backgroundImage"),n.blur(a),n.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",t).on("click",".fvp-remove-image",i);var c,v={frame:function(){return this._frame?this._frame:(this._frame=wp.media({title:c.data("title"),library:{type:"video"},button:{text:c.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=c.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(),c=e(this).closest(".fvp-input-wrapper"),v.frame().open()})}};v.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(),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}):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); -
featured-video-plus/trunk/php/class-backend.php
r1179150 r1181216 657 657 */ 658 658 public function featured_image_box( $content, $post_id ) { 659 if ( ! has_post_video( $post_id ) ) { 660 // Has no featured video so the plugin does not interfere. 661 return $content; 662 } 663 659 664 if ( has_post_thumbnail( $post_id ) ) { 660 $link = sprintf( 661 '<p class="hide-if-no-js"><a href="#" class="fvp-remove-image">%s</a></p>', 665 // Has featured video and featured image. 666 return $content . sprintf( 667 '<p class="hidden"><a href="#" class="fvp-remove-image">%s</a></p>', 662 668 esc_html__( 'Remove featured image' ) 663 669 ); 664 665 return $content . $link; 666 } elseif ( has_post_video( $post_id ) ) { 667 $notice = sprintf( 668 '<p class="fvp-notice">%s <a href="#" class="fvp-set-image hide-if-no-js">%s</a></p>', 669 esc_html__( 670 'Featured Videos require a Featured Image for automatic replacement.', 671 'featured-video-plus' 672 ), 673 esc_html__( 'Auto set', 'featured-video-plus' ) 674 ); 675 676 return $notice . $content; 677 } 678 679 return $content; 670 } 671 672 // Has featured video but not featured image. 673 return sprintf( 674 '<p class="fvp-notice">%s <a href="#" class="fvp-set-image hide-if-no-js">%s</a></p>', 675 esc_html__( 676 'Featured Videos require a Featured Image for automatic replacement.', 677 'featured-video-plus' 678 ), 679 esc_html__( 'Auto set', 'featured-video-plus' ) 680 ) . $content; 680 681 } 681 682 -
featured-video-plus/trunk/readme.txt
r1179150 r1181216 11 11 Requires at least: 3.7 12 12 Tested up to: 4.2.2 13 Stable tag: 2.1. 013 Stable tag: 2.1.1 14 14 15 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. … … 115 115 116 116 == Changelog == 117 118 = 2.1.1: 2015-06-xx = 119 * Fix play and loading featured image overlay for some themes ([*](https://wordpress.org/support/topic/play-icon-missing)). 120 * Fix broken `remove featured image` link. ([*](https://wordpress.org/support/topic/cant-remove-featured-image-2), [*](https://wordpress.org/support/topic/version-210-conflict-with-wp-featured-image), [*](https://wordpress.org/support/topic/fvp-not-working-after-210-update)) 117 121 118 122 = 2.1.0: 2015-06-11 = -
featured-video-plus/trunk/styles/backend.css
r1179150 r1181216 3 3 } 4 4 #featured-video-plus-box .fvp-current-video, 5 #featured-video-plus-box iframe { 5 #featured-video-plus-box .fvp-current-video iframe, 6 #featured-video-plus-box .fvp-current-video video { 6 7 width: 256px; 7 8 height: auto; … … 54 55 right: 4px; 55 56 } 56 #postimagediv #remove-post-thumbnail {57 display: none !important;58 } -
featured-video-plus/trunk/styles/frontend.css
r1179150 r1181216 46 46 .fvp-dynamic { 47 47 position: relative; 48 display: block; 48 49 height: auto; 49 50 width: auto; … … 53 54 background: transparent no-repeat scroll center center; 54 55 position: absolute; 55 left: 50%;56 top: 50%;57 z-index: 10;56 top: 0; 57 left: 0; 58 z-index: 999; 58 59 pointer-events: none; 59 60 }
Note: See TracChangeset
for help on using the changeset viewer.