Plugin Directory

Changeset 1181216

Timestamp:
06/15/2015 04:25:53 PM (9 years ago)
Author:
a.hoereth
Message:

Version 2.1.1

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  
    11# Changelog #
     2
     3
     4
     5
    26
    37## 2.1.0: 2015-06-11 ##
  • featured-video-plus/tags/2.1.1/featured-video-plus.php

    r1179150 r1181216  
    44Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/
    55Description: Add Featured Videos to your posts and pages.
    6 Version: 2.1.0
     6Version: 2.1.
    77Author: Alexander Höreth
    88Author URI: http://yrnxt.com
     
    3333// CONSTANTS
    3434if ( ! defined( 'FVP_VERSION' ) ) {
    35     define( 'FVP_VERSION', '2.1.0' );
     35    define( 'FVP_VERSION', '2.1.' );
    3636}
    3737
  • featured-video-plus/tags/2.1.1/js/frontend.js

    r1179150 r1181216  
    2626    $('.has-post-video .post-thumbnail>.post-thumbnail')
    2727      .removeClass('post-thumbnail');
     28
     29
     30
    2831  }
    2932
     
    7881   */
    7982  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);
    9696    } else if (bgState !== loadBg) {
    9797      $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  
    99  var mediaicon;
    1010  var loadingicon = 'url(' + context.loading_gif + ')';
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
    1129
    1230
     
    3957    }, function(response) {
    4058      if (response.success) {
    41         $('#postimagediv .inside').html(response.data);
     59        (response.data);
    4260        $media.css({ backgroundImage: mediaicon }); // Hide loading gif.
    4361      }
     
    92110      } else {
    93111        $container
    94           .css({height: 'auto'})
     112          .css({height: ''})
    95113          .html(data.video);
    96114      }
    97115
    98116      // update featured image
    99       $('#postimagediv .inside').html(data.img);
     117      (data.img);
    100118    }, 'json' );
    101119  }
     
    134152      .on('click', '.fvp-set-image', setFeatimg)
    135153      .on('click', '.fvp-remove-image', removeFeatimg);
     154
    136155
    137156    // 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  
    657657     */
    658658    public function featured_image_box( $content, $post_id ) {
     659
     660
     661
     662
     663
    659664        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>',
    662668                esc_html__( 'Remove featured image' )
    663669            );
    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;
    680681    }
    681682
  • featured-video-plus/tags/2.1.1/readme.txt

    r1179150 r1181216  
    1111Requires at least: 3.7
    1212Tested up to: 4.2.2
    13 Stable tag: 2.1.0
     13Stable tag: 2.1.
    1414
    1515Add Featured Videos to your posts and pages. Works like magic with most themes which use Featured Images. Local Media, YouTube, Vimeo and many more.
     
    115115
    116116== Changelog ==
     117
     118
     119
     120
    117121
    118122= 2.1.0: 2015-06-11 =
  • featured-video-plus/tags/2.1.1/styles/backend.css

    r1179150 r1181216  
    33}
    44#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 {
    67  width: 256px;
    78  height: auto;
     
    5455  right: 4px;
    5556}
    56 #postimagediv #remove-post-thumbnail {
    57   display: none !important;
    58 }
  • featured-video-plus/tags/2.1.1/styles/frontend.css

    r1179150 r1181216  
    4646.fvp-dynamic {
    4747  position: relative;
     48
    4849  height: auto;
    4950  width: auto;
     
    5354  background: transparent no-repeat scroll center center;
    5455  position: absolute;
    55   left: 50%;
    56   top: 50%;
    57   z-index: 10;
     56  ;
     57  ;
     58  z-index: ;
    5859  pointer-events: none;
    5960}
  • featured-video-plus/trunk/CHANGELOG.md

    r1179150 r1181216  
    11# Changelog #
     2
     3
     4
     5
    26
    37## 2.1.0: 2015-06-11 ##
  • featured-video-plus/trunk/featured-video-plus.php

    r1179150 r1181216  
    44Plugin URI: http://yrnxt.com/wordpress/featured-video-plus/
    55Description: Add Featured Videos to your posts and pages.
    6 Version: 2.1.0
     6Version: 2.1.
    77Author: Alexander Höreth
    88Author URI: http://yrnxt.com
     
    3333// CONSTANTS
    3434if ( ! defined( 'FVP_VERSION' ) ) {
    35     define( 'FVP_VERSION', '2.1.0' );
     35    define( 'FVP_VERSION', '2.1.' );
    3636}
    3737
  • featured-video-plus/trunk/js/frontend.js

    r1179150 r1181216  
    2626    $('.has-post-video .post-thumbnail>.post-thumbnail')
    2727      .removeClass('post-thumbnail');
     28
     29
     30
    2831  }
    2932
     
    7881   */
    7982  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);
    9696    } else if (bgState !== loadBg) {
    9797      $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  
    99  var mediaicon;
    1010  var loadingicon = 'url(' + context.loading_gif + ')';
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
    1129
    1230
     
    3957    }, function(response) {
    4058      if (response.success) {
    41         $('#postimagediv .inside').html(response.data);
     59        (response.data);
    4260        $media.css({ backgroundImage: mediaicon }); // Hide loading gif.
    4361      }
     
    92110      } else {
    93111        $container
    94           .css({height: 'auto'})
     112          .css({height: ''})
    95113          .html(data.video);
    96114      }
    97115
    98116      // update featured image
    99       $('#postimagediv .inside').html(data.img);
     117      (data.img);
    100118    }, 'json' );
    101119  }
     
    134152      .on('click', '.fvp-set-image', setFeatimg)
    135153      .on('click', '.fvp-remove-image', removeFeatimg);
     154
    136155
    137156    // 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  
    657657     */
    658658    public function featured_image_box( $content, $post_id ) {
     659
     660
     661
     662
     663
    659664        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>',
    662668                esc_html__( 'Remove featured image' )
    663669            );
    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;
    680681    }
    681682
  • featured-video-plus/trunk/readme.txt

    r1179150 r1181216  
    1111Requires at least: 3.7
    1212Tested up to: 4.2.2
    13 Stable tag: 2.1.0
     13Stable tag: 2.1.
    1414
    1515Add Featured Videos to your posts and pages. Works like magic with most themes which use Featured Images. Local Media, YouTube, Vimeo and many more.
     
    115115
    116116== Changelog ==
     117
     118
     119
     120
    117121
    118122= 2.1.0: 2015-06-11 =
  • featured-video-plus/trunk/styles/backend.css

    r1179150 r1181216  
    33}
    44#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 {
    67  width: 256px;
    78  height: auto;
     
    5455  right: 4px;
    5556}
    56 #postimagediv #remove-post-thumbnail {
    57   display: none !important;
    58 }
  • featured-video-plus/trunk/styles/frontend.css

    r1179150 r1181216  
    4646.fvp-dynamic {
    4747  position: relative;
     48
    4849  height: auto;
    4950  width: auto;
     
    5354  background: transparent no-repeat scroll center center;
    5455  position: absolute;
    55   left: 50%;
    56   top: 50%;
    57   z-index: 10;
     56  ;
     57  ;
     58  z-index: ;
    5859  pointer-events: none;
    5960}
Note: See TracChangeset for help on using the changeset viewer.