Changeset 1181216
- Timestamp:
- 06/15/2015 04:25:53 PM (9 years ago)
- Location:
- featured-video-plus
- Files:
-
- 16 deleted
- 10 edited
- 24 copied
Legend:
- Unmodified
- Added
- Removed
-
featured-video-plus/tags/2.1.1/CHANGELOG.md
r1179150 r1181216 1 1 # Changelog # 2 3 4 5 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. 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.' ); 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 30 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((".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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 11 29 12 30 … … 39 57 }, function(response) { 40 58 if (response.success) { 41 $('#postimagediv .inside').html(response.data);59 (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 (data.img); 100 118 }, 'json' ); 101 119 } … … 134 152 .on('click', '.fvp-set-image', setFeatimg) 135 153 .on('click', '.fvp-remove-image', removeFeatimg); 154 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(.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 660 661 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. 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 119 120 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 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 ; 57 ; 58 z-index: ; 58 59 pointer-events: none; 59 60 } -
featured-video-plus/trunk/CHANGELOG.md
r1179150 r1181216 1 1 # Changelog # 2 3 4 5 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. 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.' ); 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 30 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((".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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 11 29 12 30 … … 39 57 }, function(response) { 40 58 if (response.success) { 41 $('#postimagediv .inside').html(response.data);59 (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 (data.img); 100 118 }, 'json' ); 101 119 } … … 134 152 .on('click', '.fvp-set-image', setFeatimg) 135 153 .on('click', '.fvp-remove-image', removeFeatimg); 154 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(.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 660 661 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. 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 119 120 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 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 ; 57 ; 58 z-index: ; 58 59 pointer-events: none; 59 60 }
Note: See TracChangeset
for help on using the changeset viewer.