Feed Them Social – Facebook, Instagram, Twitter, YouTube, Pinterest - Version 2.4.1

Version Description

Download this release

Release Info

Developer slickremix
Plugin Icon 128x128 Feed Them Social – Facebook, Instagram, Twitter, YouTube, Pinterest
Version 2.4.1
Comparing to
See all releases

Code changes from version 2.4.0 to 2.4.1

SUPPORT.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Getting help with Feed Them Social or FTS extensions
2
+ ========================
3
+
4
+ We look forward to helping resolve any issues or relaying any feedback or ideas you have about Feed Them Social. To report an issue, receive support, give us feedback, or send us an idea please open a support ticket.
5
+
6
+ Support Ticket
7
+ ------
8
+
9
+ We recommend all users with support questions email us via the support form found at [SlickRemix.com/support/](https://www.slickremix.com/support/). GitHub is used for core development only, and is not the place to seek help or report non-developer issues for Feed Them Social or FTS extensions.
10
+
11
+ Before opening a support ticket, please also review our [Documentation](http://www.slickremix.com/feed-them-social/) for assistance with common issues and FAQs.
12
+
13
+ If reporting a bug, please be as descriptive as possible and include links to screenshots or screenshares that demonstrate the issue.
feed-them.php CHANGED
@@ -8,18 +8,18 @@
8
  * Plugin Name: Feed Them Social (Facebook, Instagram, Twitter, etc)
9
  * Plugin URI: http://feedthemsocial.com/
10
  * Description: Create and display custom feeds for Facebook Groups, Facebook Pages, Facebook Events, Facebook Photos, Facebook Album Covers, Twitter, Instagram, Pinterest and more.
11
- * Version: 2.4.0
12
  * Author: SlickRemix
13
  * Author URI: https://slickremix.com/
14
  * Text Domain: feed-them-social
15
  * Domain Path: /languages
16
  * Requires at least: wordpress 4.0.0
17
- * Tested up to: WordPress 4.9.5
18
- * Stable tag: 2.4.0
19
  * License: GPLv2 or later
20
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
21
  *
22
- * @version 2.4.0
23
  * @package FeedThemSocial/Core
24
  * @copyright Copyright (c) 2012-2018 SlickRemix
25
  *
8
  * Plugin Name: Feed Them Social (Facebook, Instagram, Twitter, etc)
9
  * Plugin URI: http://feedthemsocial.com/
10
  * Description: Create and display custom feeds for Facebook Groups, Facebook Pages, Facebook Events, Facebook Photos, Facebook Album Covers, Twitter, Instagram, Pinterest and more.
11
+ * Version: 2.4.1
12
  * Author: SlickRemix
13
  * Author URI: https://slickremix.com/
14
  * Text Domain: feed-them-social
15
  * Domain Path: /languages
16
  * Requires at least: wordpress 4.0.0
17
+ * Tested up to: WordPress 4.9.6
18
+ * Stable tag: 2.4.1
19
  * License: GPLv2 or later
20
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
21
  *
22
+ * @version 2.4.1
23
  * @package FeedThemSocial/Core
24
  * @copyright Copyright (c) 2012-2018 SlickRemix
25
  *
feeds/js/fts-global-full.js DELETED
@@ -1,66 +0,0 @@
1
- jQuery(document).ready(function() {
2
- jQuery.fn.ftsShare = function() {
3
- jQuery('.fts-share-wrap').each(function() {
4
- var $self = jQuery(this);
5
- //Share toolip function
6
- $self.find('.ft-gallery-link-popup').unbind().bind('click', function() {
7
- $self.find('.ft-gallery-share-wrap').toggle();
8
- });
9
- });
10
- };
11
- // return our share function after page has loaded to speed things up. Plus this way we can recall it in the loadmore areas of each feed instead of duplicating all the js.
12
- if (jQuery.fn.ftsShare) {
13
- jQuery.fn.ftsShare();
14
- }
15
-
16
- if (navigator.userAgent.indexOf("Firefox") > 0) {} else {
17
- jQuery(".fts-instagram-popup-half video, .fts-simple-fb-wrapper video, .fts-slicker-facebook-posts video").click(function() {
18
- jQuery(this).trigger(this.paused ? this.paused ? "play" : "play" : "pause")
19
- })
20
- }
21
- if (jQuery.fn.masonry) {
22
- jQuery(".fts-slicker-instagram").masonry({
23
- itemSelector: ".fts-masonry-option"
24
- })
25
- }
26
- });
27
- if (!jQuery.trim(jQuery('.fts-jal-fb-group-display').html()).length) {
28
- jQuery('.fts-jal-fb-group-display').append('<div class="fts-facebook-add-more-posts-notice"><p>Please go to the <strong>Facebook Options</strong> page of our plugin and look for the "<strong>Change Post Limit</strong>" option and add the number <strong>7</strong> or more. You can also hide this notice on the Facebook Options page if you want.</p>If you are trying to add a Personal Facebook feed and you are seeing this message too, please note: <strong>Personal Facebook Accounts generally do not work with our plugin.</strong></div>')
29
- }
30
- jQuery(window).load(function() {
31
- if (jQuery.fn.masonry) {
32
- setTimeout(function () {
33
- jQuery(".fts-pinterest-wrapper.masonry").masonry("layout");
34
- }, 200);
35
- }
36
- });
37
- var ftsMyMinSetWidth = '250';
38
- jQuery(document).ready(function() {
39
- if(jQuery('.fts-fb-photo-post-wrap').width() < ftsMyMinSetWidth) {
40
- jQuery('.fts-fb-thumbs-wrap').css({'max-width': '100%', 'margin-bottom': '1px', 'float': 'left'});
41
- }
42
- });
43
- jQuery(window).resize(function() {
44
- if(jQuery('.fts-fb-photo-post-wrap').width() < ftsMyMinSetWidth) {
45
- jQuery('.fts-fb-thumbs-wrap').css({'max-width': '100%', 'margin-bottom': '1px', 'float': 'left'});
46
- }
47
- if(jQuery('.fts-fb-photo-post-wrap').width() > ftsMyMinSetWidth){
48
- jQuery('.fts-fb-thumbs-wrap').removeAttr( 'style' );
49
- }
50
- });
51
-
52
-
53
- var ftsMyMinSetWidthInstagram = '250';
54
- jQuery(document).ready(function() {
55
- if(jQuery('.fts-instagram-inline-block-centered').width() < ftsMyMinSetWidthInstagram) {
56
- jQuery('.slicker-instagram-placeholder').css({'max-width': '100%', 'margin-bottom': '1px', 'float': 'left'});
57
- }
58
- });
59
- jQuery(window).resize(function() {
60
- if(jQuery('.fts-instagram-inline-block-centered').width() < ftsMyMinSetWidthInstagram) {
61
- jQuery('.slicker-instagram-placeholder').css({'max-width': '100%', 'margin-bottom': '1px', 'float': 'left'});
62
- }
63
- if(jQuery('.fts-instagram-inline-block-centered').width() > ftsMyMinSetWidthInstagram){
64
- jQuery('.slicker-instagram-placeholder').removeAttr( 'style' );
65
- }
66
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
feeds/js/fts-global.js CHANGED
@@ -1 +1 @@
1
- function slickremixImageResizing(){var e=jQuery(".fts-instagram-inline-block-centered"),t=jQuery(".slicker-instagram-placeholder"),s=e.attr("data-ftsi-columns"),a=e.attr("data-ftsi-margin"),r=2*parseFloat(a),o=e.width(),i=e.attr("data-ftsi-force-columns");if("1"===s||"2"===s||"3"===s||"4"===s||"5"===s||"6"===s||"7"===s||"8"===s){if(o<="376"&&"no"===i)var l="calc(100% - "+r+"px)";else if(o<="736"&&"no"===i)l="calc(50% - "+r+"px)";else if("8"===s)l="calc(12.5% - "+r+"px)";else if("7"===s)l="calc(14.28571428571429% - "+r+"px)";else if("6"===s)l="calc(16.66666666666667% - "+r+"px)";else if("5"===s)l="calc(20% - "+r+"px)";else if("4"===s)l="calc(25% - "+r+"px)";else if("3"===s)l="calc(33.33333333333333% - "+r+"px)";else if("2"===s)l="calc(50% - "+r+"px)";else if("1"===s)l="calc(100% - "+r+"px)";t.css({width:l});var u=t.width();t.css({width:l,height:u,margin:a})}else{var n=e.attr("data-ftsi-width")?e.attr("data-ftsi-width"):"325px";t.css({width:n,height:n,margin:a})}t.width()<180?(jQuery(".fts-instagram-inline-block-centered .slicker-date, .fts-instagram-inline-block-centered .fts-insta-likes-comments-grab-popup").hide(),jQuery(".slicker-instagram-placeholder").addClass("fts-smallerthan-180")):(jQuery(".fts-instagram-inline-block-centered .slicker-date, .fts-instagram-inline-block-centered .fts-insta-likes-comments-grab-popup").show(),jQuery(".slicker-instagram-placeholder, .slicker-youtube-placeholder").removeClass("fts-smallerthan-180"))}function slickremixImageResizingFacebook2(){var e=jQuery(".fts-more-photos-2-or-3-photos a"),t="calc(49.88888888% - 1px)";e.css({width:t});var s=e.width();e.css({width:t,height:s,margin:"1px"})}function slickremixImageResizingFacebook3(){var e=jQuery(".fts-more-photos-4-photos a"),t="calc(33.192222222% - 1px)";e.css({width:t});var s=e.width();e.css({width:t,height:s,margin:"1px"})}function slickremixImageResizingYouTube(){var e=jQuery(".fts-youtube-inline-block-centered"),t=jQuery(".slicker-youtube-placeholder"),s=jQuery(".fts-youtube-popup-gallery"),a=jQuery(".fts-yt-large"),r=jQuery(".fts-youtube-scrollable.fts-youtube-thumbs-wrap, .fts-youtube-scrollable.fts-youtube-thumbs-wrap-left, .youtube-comments-wrap-premium, .youtube-comments-wrap.fts-youtube-thumbs-wrap-right, .youtube-comments-wrap.fts-youtube-thumbs-wrap-left"),o=e.attr("data-ftsi-columns"),i=e.attr("data-ftsi-margin"),l=2*parseFloat(i),u=e.width(),n=e.attr("data-ftsi-force-columns");if("1"===o||"2"===o||"3"===o||"4"===o||"5"===o||"6"===o){if(u<="376"&&"no"===n)var c="calc(100% - "+l+"px)";else if(u<="736"&&"no"===n)c="calc(50% - "+l+"px)";else if("6"===o)c="calc(16.66666666666667% - "+l+"px)";else if("5"===o)c="calc(20% - "+l+"px)";else if("4"===o)c="calc(25% - "+l+"px)";else if("3"===o)c="calc(33.33333333333333% - "+l+"px)";else if("2"===o)c="calc(50% - "+l+"px)";else if("1"===o)c="calc(100% - "+l+"px)";var f=a.height();r.css({height:f+"px"}),t.css({width:c}),s.css({padding:i});var m=t.width()-"150";t.css({width:c,height:m,margin:i})}t.width()<180?(jQuery(".slicker-youtube-placeholder").addClass("fts-youtube-smallerthan-180"),jQuery(".fts-yt-large, .fts-youtube-scrollable").css("width","100% !important")):jQuery(".slicker-youtube-placeholder").removeClass("fts-youtube-smallerthan-180"),jQuery(".fts-master-youtube-wrap").width()<550?jQuery(".fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap").addClass("fts-youtube-smallerthan-550-stack"):jQuery(".fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap").removeClass("fts-youtube-smallerthan-550-stack")}jQuery(document).ready(function(){jQuery(".fts-youtube-scrollable, .youtube-comments-wrap-premium, .youtube-comments-thumbs").hover(function(){jQuery("body").css("overflow","hidden")},function(){jQuery("body").css("overflow","auto")}),jQuery(document).on("keydown",function(e){27===e.keyCode&&(jQuery(".fts-youtube-scrollable").removeClass("fts-scrollable-function"),jQuery(".youtube-comments-thumbs").hide(),jQuery(".fts-youtube-scrollable, .fts-fb-autoscroll-loader").show(),jQuery(".fts-youtube-thumbs-gallery-master .youtube-comments-thumbs").html(""),slickremixImageResizing())}),jQuery.fn.ftsShare=function(){jQuery(".fts-share-wrap").each(function(){var e=jQuery(this);e.find(".ft-gallery-link-popup").unbind().bind("click",function(){e.find(".ft-gallery-share-wrap").toggle()})})},jQuery.fn.ftsShare&&jQuery.fn.ftsShare(),navigator.userAgent.indexOf("Firefox")>0||jQuery(".fts-instagram-popup-half video, .fts-simple-fb-wrapper video, .fts-slicker-facebook-posts video").click(function(){jQuery(this).trigger(this.paused?(this.paused,"play"):"pause")}),jQuery.fn.masonry&&jQuery(".fts-slicker-instagram").masonry({itemSelector:".fts-masonry-option"})}),jQuery.trim(jQuery(".fts-jal-fb-group-display").html()).length||jQuery(".fts-jal-fb-group-display").append('<div class="fts-facebook-add-more-posts-notice"><p>Please go to the <strong>Facebook Options</strong> page of our plugin and look for the "<strong>Change Post Limit</strong>" option and add the number <strong>7</strong> or more. You can also hide this notice on the Facebook Options page if you want.</p>If you are trying to add a Personal Facebook feed and you are seeing this message too, please note: <strong>Personal Facebook Accounts generally do not work with our plugin.</strong></div>'),jQuery(window).load(function(){jQuery.fn.masonry&&setTimeout(function(){jQuery(".fts-pinterest-wrapper.masonry").masonry("layout")},200)}),jQuery(document).ready(slickremixImageResizing),jQuery(window).on("resize",slickremixImageResizing),jQuery(document).ready(slickremixImageResizingFacebook2),jQuery(window).on("resize",slickremixImageResizingFacebook2),jQuery(document).ready(slickremixImageResizingFacebook3),jQuery(window).on("resize",slickremixImageResizingFacebook3),jQuery(document).ready(slickremixImageResizingYouTube),jQuery(window).on("resize",slickremixImageResizingYouTube);
1
+ function slickremixImageResizing(){var e=jQuery(".fts-instagram-inline-block-centered"),t=jQuery(".slicker-instagram-placeholder"),s=e.attr("data-ftsi-columns"),a=e.attr("data-ftsi-margin"),r=2*parseFloat(a),o=e.width(),i=e.attr("data-ftsi-force-columns");if("1"===s||"2"===s||"3"===s||"4"===s||"5"===s||"6"===s||"7"===s||"8"===s){if(o<="376"&&"no"===i)var l="calc(100% - "+r+"px)";else if(o<="736"&&"no"===i)l="calc(50% - "+r+"px)";else if("8"===s)l="calc(12.5% - "+r+"px)";else if("7"===s)l="calc(14.28571428571429% - "+r+"px)";else if("6"===s)l="calc(16.66666666666667% - "+r+"px)";else if("5"===s)l="calc(20% - "+r+"px)";else if("4"===s)l="calc(25% - "+r+"px)";else if("3"===s)l="calc(33.33333333333333% - "+r+"px)";else if("2"===s)l="calc(50% - "+r+"px)";else if("1"===s)l="calc(100% - "+r+"px)";t.css({width:l});var c=t.width();t.css({width:l,height:c,margin:a})}else{var n=e.attr("data-ftsi-width")?e.attr("data-ftsi-width"):"325px";t.css({width:n,height:n,margin:a})}t.width()<180?(jQuery(".fts-instagram-inline-block-centered .slicker-date, .fts-instagram-inline-block-centered .fts-insta-likes-comments-grab-popup").hide(),jQuery(".slicker-instagram-placeholder").addClass("fts-smallerthan-180")):(jQuery(".fts-instagram-inline-block-centered .slicker-date, .fts-instagram-inline-block-centered .fts-insta-likes-comments-grab-popup").show(),jQuery(".slicker-instagram-placeholder, .slicker-youtube-placeholder").removeClass("fts-smallerthan-180"))}function slickremixImageResizingFacebook(){var e=jQuery(".fts-facebook-inline-block-centered"),t=jQuery(".slicker-facebook-placeholder"),s=e.attr("data-ftsi-columns"),a=e.attr("data-ftsi-margin"),r=1*parseFloat(a);e.width();if("2"===s||"3"===s){if("3"===s)var o="calc(33.0777777% - "+r+"px)";else if("2"===s)o="calc(49.777777% - "+r+"px)";t.css({width:o});var i=t.width();t.css({width:o,height:i,margin:a})}else{var l=e.attr("data-ftsi-width")?e.attr("data-ftsi-width"):"325px";t.css({width:l,height:l,margin:a})}t.width()<180?(jQuery(".fts-facebook-inline-block-centered .slicker-date, .fts-facebook-inline-block-centered .fts-insta-likes-comments-grab-popup").hide(),jQuery(".slicker-facebook-placeholder").addClass("fts-smallerthan-180")):(jQuery(".fts-facebook-inline-block-centered .slicker-date, .fts-facebook-inline-block-centered .fts-insta-likes-comments-grab-popup").show(),jQuery(".slicker-facebook-placeholder, .slicker-youtube-placeholder").removeClass("fts-smallerthan-180"))}function slickremixImageResizingYouTube(){var e=jQuery(".fts-youtube-inline-block-centered"),t=jQuery(".slicker-youtube-placeholder"),s=jQuery(".fts-youtube-popup-gallery"),a=jQuery(".fts-yt-large"),r=jQuery(".fts-youtube-scrollable.fts-youtube-thumbs-wrap, .fts-youtube-scrollable.fts-youtube-thumbs-wrap-left, .youtube-comments-wrap-premium, .youtube-comments-wrap.fts-youtube-thumbs-wrap-right, .youtube-comments-wrap.fts-youtube-thumbs-wrap-left"),o=e.attr("data-ftsi-columns"),i=e.attr("data-ftsi-margin"),l=2*parseFloat(i),c=e.width(),n=e.attr("data-ftsi-force-columns");if("1"===o||"2"===o||"3"===o||"4"===o||"5"===o||"6"===o){if(c<="376"&&"no"===n)var u="calc(100% - "+l+"px)";else if(c<="736"&&"no"===n)u="calc(50% - "+l+"px)";else if("6"===o)u="calc(16.66666666666667% - "+l+"px)";else if("5"===o)u="calc(20% - "+l+"px)";else if("4"===o)u="calc(25% - "+l+"px)";else if("3"===o)u="calc(33.33333333333333% - "+l+"px)";else if("2"===o)u="calc(50% - "+l+"px)";else if("1"===o)u="calc(100% - "+l+"px)";var f=a.height();r.css({height:f+"px"}),t.css({width:u}),s.css({padding:i});var d=t.width()-"150";t.css({width:u,height:d,margin:i})}t.width()<180?(jQuery(".slicker-youtube-placeholder").addClass("fts-youtube-smallerthan-180"),jQuery(".fts-yt-large, .fts-youtube-scrollable").css("width","100% !important")):jQuery(".slicker-youtube-placeholder").removeClass("fts-youtube-smallerthan-180"),jQuery(".fts-master-youtube-wrap").width()<550?jQuery(".fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap").addClass("fts-youtube-smallerthan-550-stack"):jQuery(".fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap").removeClass("fts-youtube-smallerthan-550-stack")}jQuery(document).ready(function(){jQuery(".fts-youtube-scrollable, .youtube-comments-wrap-premium, .youtube-comments-thumbs").hover(function(){jQuery("body").css("overflow","hidden")},function(){jQuery("body").css("overflow","auto")}),jQuery(document).on("keydown",function(e){27===e.keyCode&&(jQuery(".fts-youtube-scrollable").removeClass("fts-scrollable-function"),jQuery(".youtube-comments-thumbs").hide(),jQuery(".fts-youtube-scrollable, .fts-fb-autoscroll-loader").show(),jQuery(".fts-youtube-thumbs-gallery-master .youtube-comments-thumbs").html(""),slickremixImageResizing())}),jQuery.fn.ftsShare=function(){jQuery(".fts-share-wrap").each(function(){var e=jQuery(this);e.find(".ft-gallery-link-popup").unbind().bind("click",function(){e.find(".ft-gallery-share-wrap").toggle()})})},jQuery.fn.ftsShare&&jQuery.fn.ftsShare(),navigator.userAgent.indexOf("Firefox")>0||jQuery(".fts-instagram-popup-half video, .fts-simple-fb-wrapper video, .fts-slicker-facebook-posts video, .fts-slicker-facebook-posts video").click(function(){jQuery(this).trigger(this.paused?(this.paused,"play"):"pause")}),jQuery.fn.masonry&&jQuery(".fts-slicker-instagram").masonry({itemSelector:".fts-masonry-option"})}),jQuery.trim(jQuery(".fts-jal-fb-group-display").html()).length||jQuery(".fts-jal-fb-group-display").append('<div class="fts-facebook-add-more-posts-notice"><p>Please go to the <strong>Facebook Options</strong> page of our plugin and look for the "<strong>Change Post Limit</strong>" option and add the number <strong>7</strong> or more. You can also hide this notice on the Facebook Options page if you want.</p>If you are trying to add a Personal Facebook feed and you are seeing this message too, please note: <strong>Personal Facebook Accounts generally do not work with our plugin.</strong></div>'),jQuery(window).load(function(){jQuery.fn.masonry&&setTimeout(function(){jQuery(".fts-pinterest-wrapper.masonry").masonry("layout")},200)}),jQuery(document).ready(slickremixImageResizing),jQuery(window).on("resize",slickremixImageResizing),jQuery(document).ready(slickremixImageResizingFacebook),jQuery(window).on("resize",slickremixImageResizingFacebook),jQuery(document).ready(slickremixImageResizingYouTube),jQuery(window).on("resize",slickremixImageResizingYouTube);
feeds/js/magnific-popup-full.js DELETED
@@ -1,608 +0,0 @@
1
- /*! Magnific Popup - v1.1.0 - 2016-02-20
2
- * http://dimsemenov.com/plugins/magnific-popup/
3
- * Copyright (c) 2016 Dmitry Semenov; */
4
- !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
5
-
6
- //SLICKREMIX START OUR CUSTOM POPUPS
7
- jQuery(document).ready(function() {
8
-
9
- // Twitter Posts
10
- jQuery('.popup-gallery-twitter').each(function() { // the containers for all your galleries
11
- jQuery(this).magnificPopup({
12
- delegate: 'a.fts-twitter-link-image',
13
- type: 'image',
14
- tLoading: 'Loading image #%curr%...',
15
- mainClass: 'fts-instagram-img-mobile',
16
- // Delay in milliseconds before popup is removed
17
- removalDelay: 100,
18
-
19
- // Class that is added to popup wrapper and background
20
- // make it unique to apply your CSS animations just to this exact popup
21
- mainClass: 'fts-instagram-fade',
22
- gallery: {
23
- enabled: true,
24
- navigateByImgClick: true,
25
- preload: [0,1] // Will preload 0 - before current, and 1 after the current image
26
- },
27
- image: {
28
- tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
29
- titleSrc: function(item) {
30
- return item.el.parents('.fts-tweeter-wrap, .fts-feed-type-twitter').find('.fts-twitter-text, .fts-mashup-description-wrap').html();
31
- }
32
- }
33
- });
34
- });
35
-
36
- // Twitter Posts
37
- jQuery('.fts-master-youtube-wrap').each(function() { // the containers for all your galleries
38
- jQuery(this).magnificPopup({
39
- delegate: 'a.fts-yt-popup-open',
40
- type: 'image',
41
- tLoading: 'Loading image #%curr%...',
42
- mainClass: 'fts-instagram-img-mobile',
43
- // Delay in milliseconds before popup is removed
44
- removalDelay: 100,
45
-
46
- // Class that is added to popup wrapper and background
47
- // make it unique to apply your CSS animations just to this exact popup
48
- mainClass: 'fts-instagram-fade',
49
- gallery: {
50
- enabled: true,
51
- navigateByImgClick: true,
52
- preload: [0,1] // Will preload 0 - before current, and 1 after the current image
53
- },
54
- image: {
55
- tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
56
- titleSrc: function(item) {
57
- return item.el.parents('.fts-master-youtube-wrap .slicker-instagram-placeholder').find('.entriestitle').html();
58
- }
59
- }
60
- });
61
- });
62
-
63
- var magnificPopup = jQuery.magnificPopup.instance;
64
-
65
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO ADJUST THE HEIGHT OF THE POPUP
66
- // When clicked on, it will only adjust the height of the popup based on if the image is higher than the last, otherwise we just leave it and hoz. and vert. align the image.
67
-
68
- jQuery('body').on('click', '#fts-photo-prev', function() {
69
- magnificPopup.prev();
70
- if(jQuery(".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).height() < jQuery( ".mfp-img" ).height()){
71
- jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
72
- // alert('ok don\'t change');
73
- }
74
- else {
75
- jQuery( ".fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".fts-popup-image-position" ).height());
76
- // alert('change');
77
- }
78
- // alert('change');
79
- });
80
-
81
- jQuery('body').on('click', '#fts-photo-next', function() {
82
- magnificPopup.next();
83
- if(jQuery(".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).height() < jQuery( ".mfp-img" ).height()){
84
- jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
85
- // alert('ok don\'t change');
86
- }
87
- else {
88
- jQuery( ".fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".fts-popup-image-position" ).height());
89
- // alert('change');
90
- }
91
- });
92
-
93
- jQuery('body').on('click', '.fts-facebook-popup .mfp-image-holder .fts-popup-image-position', function() {
94
- magnificPopup.next();
95
- if(jQuery(".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).height() < jQuery( ".mfp-img" ).height()){
96
- jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
97
- // alert('ok don\'t change');
98
- }
99
- else {
100
- jQuery( ".fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".fts-popup-image-position" ).height());
101
- // alert('change');
102
- }
103
- });
104
-
105
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO BE ABLE TO CHECK WHAT KIND OF VIDEOS ARE BEING CLICKED ON
106
- jQuery('body').on('click', '#fts-photo-prev, #fts-photo-next, .fts-facebook-popup .mfp-image-holder .fts-popup-image-position', function(e) {
107
- // alert('test');
108
- jQuery("body").addClass("fts-using-arrows");
109
-
110
- setTimeout(function(){
111
-
112
- // Reload the share each funcion otherwise you can't open share option.
113
- jQuery.fn.ftsShare();
114
-
115
- if (/fbcdn.net/i.test(jQuery(".fts-iframe-popup-element").attr("src")) || /scontent.cdninstagram.com/i.test(jQuery(".fts-iframe-popup-element").attr("src"))) {
116
-
117
- // alert(jQuery(".fts-iframe-popup-element").attr("src"));
118
- jQuery("body").addClass("fts-video-iframe-choice");
119
- jQuery(".fts-video-popup-element").show();
120
- jQuery(".fts-iframe-popup-element").attr("src", "").hide();
121
-
122
- }
123
- else {
124
- // alert('wtf');
125
- jQuery("body").removeClass("fts-video-iframe-choice, .fts-using-arrows");
126
- jQuery(".fts-video-popup-element").attr("src", "").hide();
127
- jQuery(".fts-iframe-popup-element").show();
128
- }
129
- }, 10);
130
- });
131
- // CLOSE SLICKREMIX
132
-
133
-
134
- // Facebook Posts
135
- jQuery.fn.slickFacebookPopUpFunction = function() {
136
-
137
- jQuery('.popup-gallery-fb-posts, .popup-gallery-fb, .popup-video-gallery-fb').each(function () {
138
- var $container = jQuery(this);
139
- var $imageLinks = $container.find('a.fts-facebook-link-target, a.fts-fb-large-photo, a.fts-view-album-photos-large, a.fts-view-fb-videos-large, a.fts-view-fb-videos-btn');
140
-
141
- var items = [];
142
- $imageLinks.each(function () {
143
- var $item = jQuery(this);
144
- var type = 'image';
145
- if ($item.hasClass('fts-jal-fb-vid-image')) {
146
- type = 'iframe';
147
- }
148
- var magItem = {
149
- src: $item.attr('href'),
150
- type: type,
151
- };
152
-
153
- // SLICKREMIX: THIS ADDS THE LIKES, COMMENTS, DESCRIPTION, DATES ETC TO THE POPUP
154
- magItem.title = jQuery(this).parents('.fts-fb-photo-post-wrap, .fts-events-list-wrap, .fts-jal-single-fb-post').find('.fts-jal-fb-top-wrap').html() + jQuery(this).parents('.fts-fb-photo-post-wrap, .fts-events-list-wrap, .fts-jal-single-fb-post').find('.fts-likes-shares-etc-wrap').html() + jQuery(this).parents('.fts-fb-photo-post-wrap, .fts-events-list-wrap, .fts-jal-single-fb-post').find('.fts-fb-comments-wrap').html();
155
-
156
- items.push(magItem);
157
- });
158
-
159
- $imageLinks.magnificPopup({
160
- mainClass: 'fts-facebook-popup fts-facebook-styles-popup',
161
- items: items,
162
- removalDelay: 150,
163
- preloader: false,
164
- closeOnContentClick: false,
165
- closeOnBgClick: true,
166
- closeBtnInside: true,
167
- showCloseBtn: false,
168
- enableEscapeKey: true,
169
- autoFocusLast: false,
170
- gallery:{
171
- enabled: true,
172
- navigateByImgClick: false,
173
- tCounter: '<span class="mfp-counter">%curr% of %total%</span>', // markup of counter
174
- preload: [0,1], // Will preload 0 - before current, and 1 after the current
175
- arrowMarkup: '', // markup of an arrow button (slickremix = leave blank so we can show our custom buttons inside the framework)
176
- },
177
- type: 'image',
178
- callbacks: {
179
- beforeOpen: function() {
180
- var index = $imageLinks.index(this.st.el);
181
- if (-1 !== index) {
182
- this.goTo(index);
183
- }
184
- },
185
- open: function() {
186
- console.log('Popup is opened');
187
-
188
- // Reload the share each funcion otherwise you can't open share option.
189
- jQuery.fn.ftsShare();
190
-
191
- if(jQuery(".fts-popup-half .mfp-iframe-scaler")[0]){
192
- jQuery( ".fts-popup-image-position" ).css("height", '591px');
193
- }
194
- jQuery(window).resize(function() {
195
-
196
- jQuery( ".fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".fts-popup-image-position" ).height());
197
-
198
- jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
199
- });
200
- jQuery(window).trigger('resize');
201
-
202
- // slickremix trick to get the poster url from a tag we are clicking and pass it to the video player.
203
- // We only want to load the poster if the size is mobile because tablets and desktops can/will play video automatically on popup
204
- if (matchMedia('only screen and (max-device-width: 736px)').matches) {
205
- var atagvideo = event.target.id;
206
- var videoposter = jQuery('#'+atagvideo).data('poster');
207
- var video = jQuery('.fts-fb-vid-popup video');
208
- video.attr('poster', videoposter);
209
- // alert(videoposter);
210
- console.log(videoposter);
211
- }
212
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO BE ABLE TO ADD THE CLASS TO BODY SO WE CAN DO ACTIONS ON OUR CUSTOM PREV AND NEXT BUTTONS
213
- // alert('added fts-using-arrows class on popup open')
214
- jQuery("body").addClass("fts-using-arrows");
215
-
216
-
217
- },
218
- change: function() {
219
-
220
-
221
- // Reload the share each funcion otherwise you can't open share option.
222
- jQuery.fn.ftsShare();
223
-
224
- console.log('Content changed');
225
- console.log(this.content); // Direct reference to your popup element
226
- if(jQuery("body").hasClass("fts-using-arrows")) {
227
-
228
-
229
- if(jQuery(".fts-popup-half .mfp-iframe-scaler")[0]){
230
- jQuery( ".fts-popup-image-position" ).css("height", '591px');
231
- // alert('iframe-scaler');
232
- }
233
- else{
234
- if(jQuery(".fts-popup-image-position" ).css("height") == "auto"){
235
- jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
236
- alert('image');
237
-
238
- }
239
- }
240
-
241
-
242
- }
243
-
244
- },
245
-
246
- imageLoadComplete: function() {
247
- // fires when image in current popup finished loading
248
- // avaiable since v0.9.0
249
-
250
-
251
- if(jQuery(".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).height() < jQuery( ".mfp-img" ).height()){
252
- jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
253
- // alert('image');
254
-
255
- }
256
- else {
257
- jQuery( ".fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".fts-popup-image-position" ).height());
258
- // alert('change');
259
- }
260
-
261
- },
262
- markupParse: function(template, values, item) {
263
- // Triggers each time when content of popup changes

264
- console.log('Parsing:', template, values, item);
265
-
266
-
267
-
268
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO BE ABLE TO CHECK WHAT KIND OF VIDEOS ARE BEING CLICKED ON
269
- if(!jQuery("body").hasClass("fts-using-arrows")) {
270
-
271
- var ftsLinkCheck = item.src;
272
-
273
- if (/fbcdn.net/i.test(ftsLinkCheck) && item.type !== 'image') {
274
- // alert('FB Video Change photo Trigger from MP');
275
- jQuery("body").addClass("fts-video-iframe-choice");
276
- }
277
- else if (!jQuery("body").hasClass("fts-using-arrows")) {
278
- // alert('Not using arrows open photo Trigger from MP');
279
- jQuery("body").removeClass("fts-video-iframe-choice");
280
- }
281
-
282
- }
283
- // CLOSE SLICKREMIX
284
-
285
- },
286
- afterClose: function() {
287
- jQuery("body").removeClass("fts-using-arrows");
288
- console.log('Popup is completely closed');
289
- },
290
- },
291
- image: {
292
- markup: '' +
293
- '<div class="mfp-figure"><div class="mfp-close">X</div>'+
294
- '<div class="fts-popup-wrap">' +
295
- ' <div class="fts-popup-half ">' +
296
- ' <button title="previous" type="button" id="fts-photo-prev" class="mfp-arrow mfp-arrow-left mfp-prevent-close"></button>' +
297
- ' <div class="fts-popup-image-position" style="height:591px;">' +
298
- ' <span class="fts-position-helper"></span><div class="mfp-img"></div>' +
299
- ' </div>' +
300
- ' <button title="next" type="button" id="fts-photo-next" class="mfp-arrow mfp-arrow-right mfp-prevent-close"></button>' +
301
- ' </div>'+
302
- '<div class="fts-popup-second-half">' +
303
- '<div class="mfp-bottom-bar">'+
304
- '<div class="mfp-title"></div>' +
305
- '<a class="fts-powered-by-text" href="https://slickremix.com" target="_blank">Powered by Feed Them Social</a>'+
306
- '<div class="mfp-counter"></div>'+
307
- '</div>' +
308
- '</div>' +
309
- '</div>'+
310
- '</div>', // Popup HTML markup. `.mfp-img` div will be replaced with img tag, `.mfp-close` by close button
311
-
312
- tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
313
-
314
- },
315
- iframe: {
316
- markup: '' +
317
- '<div class="mfp-figure"><div class="mfp-close">X</div>'+
318
- '<div class="fts-popup-wrap">' +
319
- ' <div class="fts-popup-half ">' +
320
- ' <button title="previous" type="button" id="fts-photo-prev" class="mfp-arrow mfp-arrow-left mfp-prevent-close"></button>' +
321
- ' <div class="fts-popup-image-position">' +
322
- ' <div class="mfp-iframe-scaler"><iframe class="mfp-iframe fts-iframe-popup-element" frameborder="0" allowfullscreen></iframe><video class="mfp-iframe fts-video-popup-element" allowfullscreen autoplay controls></video>' +
323
- ' </div>' +
324
- ' <button title="next" type="button" id="fts-photo-next" class="mfp-arrow mfp-arrow-right mfp-prevent-close"></button>' +
325
- '<script>' +
326
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO BE ABLE TO CHECK WHAT KIND OF VIDEOS ARE BEING CLICKED ON WHEN FIRST LOADED, AFTER THEY ARE LOADED REFER TO THE CLICK FUNCTION FOR THE ERRORS ABOVE
327
- 'if(jQuery("body").hasClass("fts-video-iframe-choice")){jQuery(".fts-iframe-popup-element").attr("src", "").hide(); } else if(!jQuery("body").hasClass("fts-using-arrows")){jQuery(".fts-video-popup-element").attr("src", "").hide(); }; jQuery(".fts-facebook-popup video").click(function(){jQuery(this).trigger(this.paused ? this.paused ? "play" : "play" : "pause")}); </script>' +
328
- ' </div>' +
329
- ' </div>'+
330
- '<div class="fts-popup-second-half">' +
331
- '<div class="mfp-bottom-bar">'+
332
- '<div class="mfp-title"></div>' +
333
- '<a class="fts-powered-by-text" href="https://slickremix.com" target="_blank">Powered by Feed Them Social</a>'+
334
- '<div class="mfp-counter"></div>'+
335
- '</div>' +
336
- '</div>' +
337
- '</div>'+
338
- '</div>', // Popup HTML markup. `.mfp-img` div will be replaced with img tag, `.mfp-close` by close button
339
-
340
- srcAction: 'iframe_src', // Templating object key. First part defines CSS selector, second attribute. "iframe_src" means: find "iframe" and set attribute "src".


341
- }
342
- });
343
-
344
- });
345
- }
346
- //Return the function right away
347
- jQuery.fn.slickFacebookPopUpFunction();
348
-
349
- // TEST POPUP WITH ALERTS FOR DEBUGGIN
350
- // 'if(jQuery("body").hasClass("fts-video-iframe-choice")){alert("fts-video-choice not using arrows"); jQuery(".fts-iframe-popup-element").attr("src", "").hide(); } else if(!jQuery("body").hasClass("fts-using-arrows")){alert("fts-iframe-choice not using arrows"); jQuery(".fts-video-popup-element").attr("src", "").hide(); }; jQuery(".fts-facebook-popup video").click(function(){jQuery(this).trigger(this.paused ? this.paused ? "play" : "play" : "pause")});</script>' +
351
-
352
-
353
-
354
-
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
-
389
- // Facebook Posts
390
- jQuery.fn.slickInstagramPopUpFunction = function() {
391
-
392
- jQuery('.popup-gallery').each(function () {
393
- var $container = jQuery(this);
394
- var $imageLinks = $container.find('.fts-instagram-link-target');
395
-
396
- var items = [];
397
- $imageLinks.each(function () {
398
- var $item = jQuery(this);
399
- var type = 'image';
400
- if ($item.hasClass('fts-instagram-video-link')) {
401
- type = 'iframe';
402
- }
403
- var magItem = {
404
- src: $item.attr('href'),
405
- type: type,
406
- };
407
- // SLICKREMIX: THIS ADDS THE LIKES, COMMENTS, DESCRIPTION, DATES ETC TO THE POPUP
408
- magItem.title = jQuery(this).parents('.fts-instagram-wrapper').find('.fts-instagram-popup-profile-wrap').html() + jQuery(this).parents('.fts-instagram-wrapper').find('.slicker-date').html() + jQuery(this).parents('.fts-instagram-wrapper').find('.fts-insta-likes-comments-grab-popup').html() + jQuery(this).parents('.fts-instagram-wrapper').find('.fts-instagram-caption').html();
409
-
410
- items.push(magItem);
411
- });
412
-
413
- $imageLinks.magnificPopup({
414
- mainClass: 'fts-facebook-popup fts-instagram-styles-popup',
415
- items: items,
416
- removalDelay: 150,
417
- preloader: false,
418
- closeOnContentClick: false,
419
- closeOnBgClick: true,
420
- closeBtnInside: true,
421
- showCloseBtn: false,
422
- enableEscapeKey: true,
423
- autoFocusLast: false,
424
- gallery:{
425
- enabled: true,
426
- navigateByImgClick: false,
427
- tCounter: '<span class="mfp-counter">%curr% of %total%</span>', // markup of counter
428
- preload: [0,1], // Will preload 0 - before current, and 1 after the current
429
- arrowMarkup: '', // markup of an arrow button (slickremix = leave blank so we can show our custom buttons inside the framework)
430
-
431
- },
432
- type: 'image',
433
- callbacks: {
434
- beforeOpen: function() {
435
- var index = $imageLinks.index(this.st.el);
436
- if (-1 !== index) {
437
- this.goTo(index);
438
- }
439
- },
440
- open: function() {
441
- console.log('Popup is opened');
442
-
443
- // Reload the share each funcion otherwise you can't open share option.
444
- jQuery.fn.ftsShare();
445
-
446
- // if(jQuery(".fts-popup-half .mfp-iframe-scaler")[0]){
447
- // jQuery( ".fts-popup-image-position" ).css("height", '471px');
448
- // }
449
- jQuery(window).resize(function() {
450
-
451
- jQuery( ".fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".fts-popup-image-position" ).height());
452
-
453
- // jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
454
- });
455
- jQuery(window).trigger('resize');
456
-
457
-
458
- // slickremix trick to get the poster url from a tag we are clicking and pass it to the video player.
459
- // We only want to load the poster if the size is mobile because tablets and desktops can/will play video automatically on popup
460
- if (matchMedia('only screen and (max-device-width: 736px)').matches) {
461
- var atagvideo = event.target.id;
462
- var videoposter = jQuery('#'+atagvideo).data('poster');
463
- var video = jQuery('.fts-fb-vid-popup video');
464
- video.attr('poster', videoposter);
465
- // alert(videoposter);
466
- console.log(videoposter);
467
- }
468
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO BE ABLE TO ADD THE CLASS TO BODY SO WE CAN DO ACTIONS ON OUR CUSTOM PREV AND NEXT BUTTONS
469
- // alert('added fts-using-arrows class on popup open')
470
- jQuery("body").addClass("fts-using-arrows");
471
-
472
-
473
- },
474
- change: function() {
475
- console.log('Content changed');
476
- console.log(this.content); // Direct reference to your popup element
477
-
478
-
479
- // Reload the share each funcion otherwise you can't open share option.
480
- jQuery.fn.ftsShare();
481
-
482
-
483
- if(jQuery("body").hasClass("fts-using-arrows")) {
484
-
485
- }
486
-
487
- },
488
-
489
- imageLoadComplete: function() {
490
- // fires when image in current popup finished loading
491
- // avaiable since v0.9.0
492
-
493
- // Reload the share each funcion otherwise you can't open share option.
494
- jQuery.fn.ftsShare();
495
-
496
- if(jQuery(".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).height() < jQuery( ".mfp-img" ).height()){
497
- jQuery( ".fts-popup-image-position, .fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".mfp-img" ).height());
498
- // alert('image');
499
-
500
- }
501
- else {
502
- jQuery( ".fts-popup-second-half .mfp-bottom-bar" ).css("height", jQuery( ".fts-popup-image-position" ).height());
503
- // alert('change');
504
- }
505
-
506
- },
507
- markupParse: function(template, values, item) {
508
- // Triggers each time when content of popup changes

509
- console.log('Parsing:', template, values, item);
510
-
511
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO BE ABLE TO CHECK WHAT KIND OF VIDEOS ARE BEING CLICKED ON
512
- if(!jQuery("body").hasClass("fts-using-arrows")) {
513
-
514
- var ftsLinkCheck = item.src;
515
-
516
- if (/fbcdn.net/i.test(ftsLinkCheck) && item.type !== 'image') {
517
- // alert('FB Video Change photo Trigger from MP');
518
- jQuery("body").addClass("fts-video-iframe-choice");
519
- }
520
- else if (!jQuery("body").hasClass("fts-using-arrows")) {
521
- // alert('Not using arrows open photo Trigger from MP');
522
- jQuery("body").removeClass("fts-video-iframe-choice");
523
- }
524
-
525
- }
526
- // CLOSE SLICKREMIX
527
-
528
- },
529
- afterClose: function() {
530
- jQuery("body").removeClass("fts-using-arrows");
531
- console.log('Popup is completely closed');
532
- },
533
- },
534
- image: {
535
- markup: '' +
536
- '<div class="mfp-figure"><div class="mfp-close">X</div>'+
537
- '<div class="fts-popup-wrap">' +
538
- ' <div class="fts-popup-half fts-instagram-popup-half">' +
539
- ' <button title="previous" type="button" id="fts-photo-prev" class="mfp-arrow mfp-arrow-left mfp-prevent-close"></button>' +
540
- ' <div class="fts-popup-image-position">' +
541
- ' <span class="fts-position-helper"></span><div class="mfp-img"></div>' +
542
- ' </div>' +
543
- ' <button title="next" type="button" id="fts-photo-next" class="mfp-arrow mfp-arrow-right mfp-prevent-close"></button>' +
544
- ' </div>'+
545
- '<div class="fts-popup-second-half fts-instagram-popup-second-half">' +
546
- '<div class="mfp-bottom-bar">'+
547
- '<div class="mfp-title"></div>' +
548
- '<a class="fts-powered-by-text" href="http://feedthemsocial.com" target="_blank">Powered by Feed Them Social</a>'+
549
- '<div class="mfp-counter"></div>'+
550
- '</div>' +
551
- '</div>' +
552
- '</div>'+
553
- '</div>', // Popup HTML markup. `.mfp-img` div will be replaced with img tag, `.mfp-close` by close button
554
-
555
- tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
556
-
557
- },
558
- iframe: {
559
- markup: '' +
560
- '<div class="mfp-figure"><div class="mfp-close">X</div>'+
561
- '<div class="fts-popup-wrap">' +
562
- ' <div class="fts-popup-half fts-instagram-popup-half">' +
563
- ' <button title="previous" type="button" id="fts-photo-prev" class="mfp-arrow mfp-arrow-left mfp-prevent-close"></button>' +
564
- ' <div class="fts-popup-image-position">' +
565
- ' <div class="mfp-iframe-scaler"><iframe class="mfp-iframe fts-iframe-popup-element" frameborder="0" allowfullscreen></iframe><video class="mfp-iframe fts-video-popup-element" allowfullscreen autoplay controls></video>' +
566
- ' </div>' +
567
- ' <button title="next" type="button" id="fts-photo-next" class="mfp-arrow mfp-arrow-right mfp-prevent-close"></button>' +
568
- '<script>' +
569
- // SLICKREMIX: MUST HAVE THIS IN PLACE TO BE ABLE TO CHECK WHAT KIND OF VIDEOS ARE BEING CLICKED ON WHEN FIRST LOADED, AFTER THEY ARE LOADED REFER TO THE CLICK FUNCTION FOR THE ERRORS ABOVE
570
- 'if(jQuery("body").hasClass("fts-video-iframe-choice")){jQuery(".fts-iframe-popup-element").attr("src", "").hide(); } else if(!jQuery("body").hasClass("fts-using-arrows")){jQuery(".fts-video-popup-element").attr("src", "").hide(); }; jQuery(".fts-facebook-popup video").click(function(){jQuery(this).trigger(this.paused ? this.paused ? "play" : "play" : "pause")});</script>' +
571
- ' </div>' +
572
- ' </div>'+
573
- '<div class="fts-popup-second-half fts-instagram-popup-second-half">' +
574
- '<div class="mfp-bottom-bar">'+
575
- '<div class="mfp-title"></div>' +
576
- '<a class="fts-powered-by-text" href="http://feedthemsocial.com" target="_blank">Powered by Feed Them Social</a>'+
577
- '<div class="mfp-counter"></div>'+
578
- '</div>' +
579
- '</div>' +
580
- '</div>'+
581
- '</div>', // Popup HTML markup. `.mfp-img` div will be replaced with img tag, `.mfp-close` by close button
582
-
583
- srcAction: 'iframe_src', // Templating object key. First part defines CSS selector, second attribute. "iframe_src" means: find "iframe" and set attribute "src".


584
- }
585
- });
586
-
587
- });
588
- }
589
- //Return the function right away
590
- jQuery.fn.slickInstagramPopUpFunction();
591
-
592
- // Vine Videos
593
- jQuery('.fts-vine-wrapper').each(function() { // the containers for all your galleries
594
- jQuery(this).magnificPopup({
595
- delegate: 'a.fts-vine-thumbnail',
596
- tLoading: 'Loading image #%curr%...',
597
- mainClass: 'fts-vine-vid-popup',
598
- type:'inline',
599
- removalDelay: 100,
600
- midClick: true, // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source.
601
- gallery: {
602
- enabled: true,
603
- navigateByImgClick: true,
604
- preload: [0,1] // Will preload 0 - before current, and 1 after the current image
605
- }
606
- });
607
- });
608
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
feeds/twitter/twitter-feed.php CHANGED
@@ -40,13 +40,15 @@ class FTS_Twitter_Feed extends feed_them_social_functions {
40
 
41
  if (isset($post_data->quoted_status->entities->media[0]->type)) {
42
  $tFinal = isset($post_data->quoted_status->entities->media[0]->expanded_url) ? $post_data->quoted_status->entities->media[0]->expanded_url : "";
43
- $post_data->id = isset($post_data->quoted_status->id) ? $post_data->quoted_status->id : "";
44
  } else {
45
  $tFinal = isset($post_data->entities->urls[0]->expanded_url) ? $post_data->entities->urls[0]->expanded_url : "";
46
  }
 
 
 
47
 
48
 
49
- $tFinal_retweet_video = isset($post_data->retweeted_status->entities->media[0]->expanded_url) ? $post_data->retweeted_status->entities->media[0]->expanded_url : "";
50
 
51
 
52
  //strip Vimeo URL then ouput Iframe
@@ -62,16 +64,18 @@ class FTS_Twitter_Feed extends feed_them_social_functions {
62
  // echo $vimeoURLfinal;
63
  }
64
 
 
65
  // echo $vimeoURLfinal;
66
  return '<div class="fts-fluid-videoWrapper"><iframe src="http://player.vimeo.com/video/' . $vimeoURLfinal . '?autoplay=0" class="video" height="390" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>';
67
  } //strip Vimeo Staffpics URL then ouput Iframe
68
 
69
 
70
- elseif (strpos($tFinal, 'vine') > 0 && !strpos($tFinal, '-vine') > 0) {
71
  // $pattern = str_replace( array( 'https://vine.co/v/', '/', 'http://vine.co/v/'), '', $tFinal);
72
  // $vineURLfinal = $pattern;
73
- return '<div class="fts-fluid-videoWrapper"><iframe height="281" class="fts-vine-embed" src="' . $tFinal . '/embed/simple" frameborder="0"></iframe></div>';
74
- } //strip Youtube URL then ouput Iframe and script
 
75
  elseif (strpos($tFinal, 'youtube') > 0 && !strpos($tFinal, '-youtube') > 0) {
76
  $pattern = '#^(?:https?://)?(?:www\.)?(?:youtu\.be/|youtube\.com(?:/embed/|/v/|/watch\?v=|/watch\?.+&v=))([\w-]{11})(?:.+)?$#x';
77
  preg_match($pattern, $tFinal, $matches);
@@ -95,75 +99,90 @@ class FTS_Twitter_Feed extends feed_them_social_functions {
95
  $jsonObj = json_decode($decodeiFrame);
96
 
97
  return '<div class="fts-fluid-videoWrapper">' . $jsonObj->html . '</div>';
98
- } else {
99
- include_once(WP_CONTENT_DIR . '/plugins/feed-them-social/feeds/twitter/twitteroauth/twitteroauth.php');
100
 
101
- $fts_twitter_custom_consumer_key = get_option('fts_twitter_custom_consumer_key');
102
- $fts_twitter_custom_consumer_secret = get_option('fts_twitter_custom_consumer_secret');
103
 
104
- $test_fts_twitter_custom_consumer_key = '35mom6axGlf60ppHJYz1dsShc';
105
- $test_fts_twitter_custom_consumer_secret = '7c2TJvUT7lS2EkCULpK6RGHrgXN1BA4oUi396pQEdRj3OEq5QQ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
- $fts_twitter_custom_consumer_key = isset($fts_twitter_custom_consumer_key) && $fts_twitter_custom_consumer_key !== '' ? $fts_twitter_custom_consumer_key : $test_fts_twitter_custom_consumer_key;
108
- $fts_twitter_custom_consumer_secret = isset($fts_twitter_custom_consumer_secret) && $fts_twitter_custom_consumer_secret !== '' ? $fts_twitter_custom_consumer_secret : $test_fts_twitter_custom_consumer_secret;
109
 
110
- $fts_twitter_custom_access_token = get_option('fts_twitter_custom_access_token');
111
- $fts_twitter_custom_access_token_secret = get_option('fts_twitter_custom_access_token_secret');
112
 
113
- //Use custom api info
114
- if (!empty($fts_twitter_custom_access_token) && !empty($fts_twitter_custom_access_token_secret)) {
115
- $connection = new TwitterOAuthFTS(
116
- //Consumer Key
117
- $fts_twitter_custom_consumer_key,
118
- //Consumer Secret
119
- $fts_twitter_custom_consumer_secret,
120
- //Access Token
121
- $fts_twitter_custom_access_token,
122
- //Access Token Secret
123
- $fts_twitter_custom_access_token_secret
124
- );
125
- } //else use default info
126
- else {
127
- $connection = new TwitterOAuthFTS(
128
- //Consumer Key
129
- '4UUpTLglrsvQMjmrfdgdtHEEJ',
130
- //Consumer Secret
131
- 'ngtRtVKRvcY4e2lZHHkKNc63JPMn8SnOw1bM0jd6Fv8H5C3phP',
132
- //Access Token
133
- '1561334624-CSmnb3JqhKctSGzYfB5ouf3GmR9Pne1fR2q9PzY',
134
- //Access Token Secret
135
- 'CH2Ojl5G4sgn8kUaBIEhy6M0UUvBWs1CrYW8sh1fpCQXT'
136
- );
137
- }
138
- // if (strpos($tFinal, 'amp.twimg.com') > 0) {
139
-
140
- $reg_video = $post_data->id;
141
- // bug about mixed content made by srl
142
- // https://twittercommunity.com/t/bug-with-mixed-content-in-embedded-tweet-with-video/77507
143
- $videosDecode = $reg_video;
144
- $fetchedTweets2 = $connection->get(
145
- 'statuses/oembed',
146
- array(
147
- 'id' => $videosDecode,
148
- 'widget_type' => 'video',
149
- 'hide_tweet' => true,
150
- 'hide_thread' => true,
151
- 'hide_media' => false,
152
- 'omit_script' => false,
153
- )
154
- );
155
 
156
 
157
- // print $tFinal;
158
 
159
- return $fetchedTweets2->html;
160
- // } else {
 
 
 
 
 
 
 
 
 
 
 
 
161
  // exit('That is not allowed. FTS!');
162
  // }
163
- } //strip Vine URL then ouput Iframe and script
164
-
165
 
166
- // } // end main else
 
167
  // die();
168
  } // end function
169
 
@@ -206,8 +225,6 @@ class FTS_Twitter_Feed extends feed_them_social_functions {
206
  $media_url = $post_data->retweeted_status->entities->media[0]->media_url_https;
207
  } elseif (!empty($post_data->quoted_status->entities->media[0]->media_url_https)) {
208
  $media_url = $post_data->quoted_status->entities->media[0]->media_url_https;
209
- } elseif (!empty($post_data->quoted_status->entities->media[0]->media_url_https)) {
210
- $media_url = $post_data->quoted_status->entities->media[0]->media_url_https;
211
  } else {
212
  $media_url = '';
213
  }
@@ -446,9 +463,11 @@ class FTS_Twitter_Feed extends feed_them_social_functions {
446
  } else {
447
  $fetchedTweets = $fetchedTweets;
448
  }
449
- // echo'<pre>';
450
- // print_r($fetchedTweets);
451
- // echo'</pre>';
 
 
452
  // get the count based on $exclude_replies
453
  $limitToDisplay = min($numTweets, count($fetchedTweets));
454
  for ($i = 0; $i < $limitToDisplay; $i++) {
@@ -693,74 +712,83 @@ class FTS_Twitter_Feed extends feed_them_social_functions {
693
  </span>
694
 
695
  <?php
 
 
 
 
 
 
 
696
  // Regular Posted Videos
697
  $twitter_video_reg = isset($post_data->extended_entities->media[0]->type) && $post_data->extended_entities->media[0]->type == 'video';
698
 
699
- // Retweeted video urls
700
- $twitter_video_retweeted = isset($post_data->retweeted_status->extended_entities->media[0]->type) ? $post_data->retweeted_status->extended_entities->media[0]->type : '';
701
 
702
  // Quoted status which is when people retweet or copy paste video tweet link to there tweet. why people do this instead of retweeting is beyond me.
703
- $twitter_video_quoted_status = isset($post_data->quoted_status->extended_entities->media[0]->type) ? $post_data->quoted_status->extended_entities->media[0]->type : '';
704
-
705
 
706
- // Quoted status which is when people retweet or copy paste video tweet link to there tweet. why people do this instead of retweeting is beyond me.
707
  $twitter_image_quoted_status = isset($post_data->quoted_status->extended_entities->media[0]->type) && $post_data->quoted_status->extended_entities->media[0]->type == 'photo';
708
 
709
-
710
  $twitter_is_video_allowed = get_option('twitter_allow_videos');
711
  $twitter_allow_videos = !empty($twitter_is_video_allowed) ? $twitter_is_video_allowed : 'yes';
712
 
713
-
714
- if ($twitter_video_quoted_status == 'video') { ?>
715
- <div class="fts-twitter-quoted-text-wrap fts-twitter-quoted-video">
716
- <?php }
717
-
718
- //Print our video if one is available
719
- print $this->fts_twitter_load_videos($post_data);
720
-
721
-
 
 
722
  if ($twitter_video_quoted_status == 'video') { ?>
 
723
 
724
- <div class="fts-twitter-quoted-text">
725
- <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-full-name"><?php print $post_data->quoted_status->user->name; ?></a>
726
- <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-at-name">@<?php print $post_data->quoted_status->user->screen_name; ?></a><br />
727
- <?php print $this->fts_twitter_quote_description($post_data) ?>
728
- </div>
729
-
730
- <?php }
731
 
732
- if ($twitter_video_quoted_status == 'video') { ?>
733
- </div>
734
- <?php }
735
 
736
- //Print our IMAGE if one is available
737
- if ($twitter_video_quoted_status !== 'video' && $twitter_video_retweeted !== 'video') {
738
- //Print our IMAGE if one is available
739
- $popup = isset($popup) ? $popup : '';
 
740
 
 
741
 
742
- if ($twitter_image_quoted_status == 'photo') { ?>
743
- <div class="fts-twitter-quoted-text-wrap fts-twitter-quoted-image">
744
  <?php }
 
 
 
 
745
 
 
 
 
746
 
747
- print $this->fts_twitter_image($post_data, $popup);
748
-
749
- if ($twitter_image_quoted_status == 'photo') { ?>
750
 
751
- <div class="fts-twitter-quoted-text">
752
- <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-full-name"><?php print $post_data->quoted_status->user->name; ?></a>
753
- <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-at-name">@<?php print $post_data->quoted_status->user->screen_name; ?></a><br />
754
- <?php print $this->fts_twitter_quote_description($post_data) ?>
755
- </div>
756
 
757
- <?php }
 
 
 
 
758
 
759
- if ($twitter_image_quoted_status == 'photo') { ?>
760
- </div>
761
- <?php }
762
 
763
- } ?>
 
 
 
764
  </div>
765
  <div class="fts-twitter-reply-wrap <?php if ($fts_twitter_full_width == 'yes') { ?>fts-twitter-full-width<?php } else { ?>fts-twitter-no-margin-left<?php } ?>"><?php
766
  // twitter permalink per post
40
 
41
  if (isset($post_data->quoted_status->entities->media[0]->type)) {
42
  $tFinal = isset($post_data->quoted_status->entities->media[0]->expanded_url) ? $post_data->quoted_status->entities->media[0]->expanded_url : "";
 
43
  } else {
44
  $tFinal = isset($post_data->entities->urls[0]->expanded_url) ? $post_data->entities->urls[0]->expanded_url : "";
45
  }
46
+ // echo '<pre>';
47
+ // print_r($post_data);
48
+ // echo '</pre>';
49
 
50
 
51
+ // $tFinal_retweet_video = isset($post_data->retweeted_status->entities->media[0]->expanded_url) ? $post_data->retweeted_status->entities->media[0]->expanded_url : "";
52
 
53
 
54
  //strip Vimeo URL then ouput Iframe
64
  // echo $vimeoURLfinal;
65
  }
66
 
67
+
68
  // echo $vimeoURLfinal;
69
  return '<div class="fts-fluid-videoWrapper"><iframe src="http://player.vimeo.com/video/' . $vimeoURLfinal . '?autoplay=0" class="video" height="390" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>';
70
  } //strip Vimeo Staffpics URL then ouput Iframe
71
 
72
 
73
+ // elseif (strpos($tFinal, 'vine') > 0 && !strpos($tFinal, '-vine') > 0) {
74
  // $pattern = str_replace( array( 'https://vine.co/v/', '/', 'http://vine.co/v/'), '', $tFinal);
75
  // $vineURLfinal = $pattern;
76
+ // return '<div class="fts-fluid-videoWrapper"><iframe height="281" class="fts-vine-embed" src="' . $tFinal . '/embed/simple" frameborder="0"></iframe></div>';
77
+ // } //strip Youtube URL then ouput Iframe and script
78
+
79
  elseif (strpos($tFinal, 'youtube') > 0 && !strpos($tFinal, '-youtube') > 0) {
80
  $pattern = '#^(?:https?://)?(?:www\.)?(?:youtu\.be/|youtube\.com(?:/embed/|/v/|/watch\?v=|/watch\?.+&v=))([\w-]{11})(?:.+)?$#x';
81
  preg_match($pattern, $tFinal, $matches);
99
  $jsonObj = json_decode($decodeiFrame);
100
 
101
  return '<div class="fts-fluid-videoWrapper">' . $jsonObj->html . '</div>';
102
+ }
 
103
 
104
+ // if(strpos($tFinal, 'pbs.twimg.com') > 0)
 
105
 
106
+ else{
107
+ //**************************************************
108
+ // START VIDEO POST
109
+ //**************************************************
110
+
111
+ // Check through the different video options availalbe. For some reson the varaints which are the atcual video urls vary at times in quality so we are going to shoot for 4 first then 2, 3 and 1
112
+ if(isset($post_data->extended_entities->media[0]->video_info->variants[4]->content_type) && $post_data->extended_entities->media[0]->video_info->variants[4]->content_type == 'video/mp4' ) {
113
+ $tFinal = isset($post_data->extended_entities->media[0]->video_info->variants[4]->url) ? $post_data->extended_entities->media[0]->video_info->variants[4]->url : "";
114
+ }
115
+ elseif(isset($post_data->extended_entities->media[0]->video_info->variants[2]->content_type) && $post_data->extended_entities->media[0]->video_info->variants[2]->content_type == 'video/mp4' ) {
116
+ $tFinal = isset($post_data->extended_entities->media[0]->video_info->variants[2]->url) ? $post_data->extended_entities->media[0]->video_info->variants[2]->url : "";
117
+ }
118
+ elseif(isset($post_data->extended_entities->media[0]->video_info->variants[3]->content_type) && $post_data->extended_entities->media[0]->video_info->variants[3]->content_type == 'video/mp4' ) {
119
+ $tFinal = isset($post_data->extended_entities->media[0]->video_info->variants[3]->url) ? $post_data->extended_entities->media[0]->video_info->variants[3]->url : "";
120
+ }
121
+ elseif(isset($post_data->extended_entities->media[0]->video_info->variants[1]->content_type) && $post_data->extended_entities->media[0]->video_info->variants[1]->content_type == 'video/mp4' ) {
122
+ $tFinal = isset($post_data->extended_entities->media[0]->video_info->variants[1]->url) ? $post_data->extended_entities->media[0]->video_info->variants[1]->url : "";
123
+ }
124
+
125
+ // The only difference in these lines is the "quoted_status" These are twitter videos from Tweet link people post, the ones above are direct videos users post to there timeline
126
+ elseif (isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[4]->content_type) && $post_data->quoted_status->extended_entities->media[0]->video_info->variants[4]->content_type == 'video/mp4' ) {
127
+ $tFinal = isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[4]->url) ? $post_data->quoted_status->extended_entities->media[0]->video_info->variants[4]->url : "";
128
+ }
129
+ elseif (isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[2]->content_type) && $post_data->quoted_status->extended_entities->media[0]->video_info->variants[2]->content_type == 'video/mp4' ) {
130
+ $tFinal = isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[2]->url) ? $post_data->quoted_status->extended_entities->media[0]->video_info->variants[2]->url : "";
131
+ }
132
+ elseif (isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[3]->content_type) && $post_data->quoted_status->extended_entities->media[0]->video_info->variants[3]->content_type == 'video/mp4' ) {
133
+ $tFinal = isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[3]->url) ? $post_data->quoted_status->extended_entities->media[0]->video_info->variants[3]->url : "";
134
+ }
135
+ elseif (isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[1]->content_type) && $post_data->quoted_status->extended_entities->media[0]->video_info->variants[1]->content_type == 'video/mp4' ) {
136
+ $tFinal = isset($post_data->quoted_status->extended_entities->media[0]->video_info->variants[1]->url) ? $post_data->quoted_status->extended_entities->media[0]->video_info->variants[1]->url : "";
137
+ }
138
+ // Check to see if there is a poster image available
139
+ if(isset($post_data->extended_entities->media[0]->media_url_https)) {
140
+
141
+ $tFinalPoster = isset($post_data->extended_entities->media[0]->media_url_https) ? $post_data->extended_entities->media[0]->media_url_https : "";
142
+ }
143
+ elseif(isset($post_data->quoted_status->extended_entities->media[0]->media_url_https)) {
144
+
145
+ $tFinalPoster = isset($post_data->quoted_status->extended_entities->media[0]->media_url_https) ? $post_data->quoted_status->extended_entities->media[0]->media_url_https : "";
146
+ }
147
+
148
+ // }
149
+
150
+ $FTS_FB_OUTPUT = '<div class="fts-jal-fb-vid-wrap">';
151
+ //This line is here so we can fetch the source to feed into the popup since some html 5 videos can be displayed without the need for a button.
152
+ $FTS_FB_OUTPUT .= '<a href="' . $tFinal . '" style="display:none !important" class="fts-facebook-link-target fts-jal-fb-vid-image fts-video-type"></a>';
153
+ $FTS_FB_OUTPUT .= '<div class="fts-fluid-videoWrapper-html5">';
154
+ $FTS_FB_OUTPUT .= '<video controls poster="' . $tFinalPoster . '" width="100%;" style="max-width:100%;">';
155
+ $FTS_FB_OUTPUT .= '<source src="' . $tFinal . '" type="video/mp4">';
156
+ $FTS_FB_OUTPUT .= '</video>';
157
+ $FTS_FB_OUTPUT .= '</div>';
158
+
159
+ $FTS_FB_OUTPUT .= '</div>';
160
 
 
 
161
 
 
 
162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
 
164
 
 
165
 
166
+
167
+
168
+ // return '<div class="fts-fluid-videoWrapper"><iframe src="' . $tFinal_video . '" class="video" height="390" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>';
169
+
170
+ // print $tFinal;
171
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
172
+ //////////////////////// REMOVING THIS TWITTER VID OPTION TILL WE GET SOME ANSWERS ////////////////////////
173
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////
174
+ // https://twittercommunity.com/t/twitter-statuses-oembed-parameters-not-working/105868
175
+ // https://stackoverflow.com/questions/50419158/twitter-statuses-oembed-parameters-not-working
176
+
177
+ return $FTS_FB_OUTPUT;
178
+ // }
179
+ // else {
180
  // exit('That is not allowed. FTS!');
181
  // }
182
+ // } //strip Vine URL then ouput Iframe and script
 
183
 
184
+ }
185
+ // end main else
186
  // die();
187
  } // end function
188
 
225
  $media_url = $post_data->retweeted_status->entities->media[0]->media_url_https;
226
  } elseif (!empty($post_data->quoted_status->entities->media[0]->media_url_https)) {
227
  $media_url = $post_data->quoted_status->entities->media[0]->media_url_https;
 
 
228
  } else {
229
  $media_url = '';
230
  }
463
  } else {
464
  $fetchedTweets = $fetchedTweets;
465
  }
466
+ // usually the one I look at
467
+ // echo'<pre>';
468
+ // print_r($fetchedTweets);
469
+ // echo'</pre>';
470
+
471
  // get the count based on $exclude_replies
472
  $limitToDisplay = min($numTweets, count($fetchedTweets));
473
  for ($i = 0; $i < $limitToDisplay; $i++) {
712
  </span>
713
 
714
  <?php
715
+
716
+ if (isset($post_data->quoted_status->entities->media[0]->type)) {
717
+ $tFinal = isset($post_data->quoted_status->entities->media[0]->expanded_url) && $post_data->quoted_status->entities->media[0]->expanded_url == 'video';;
718
+ } else {
719
+ $tFinal = isset($post_data->entities->urls[0]->expanded_url) ? $post_data->entities->urls[0]->expanded_url : "";
720
+ }
721
+
722
  // Regular Posted Videos
723
  $twitter_video_reg = isset($post_data->extended_entities->media[0]->type) && $post_data->extended_entities->media[0]->type == 'video';
724
 
725
+ // Retweeted video urls // NOTE I HAVE NOT COMPLETED THIS OPTION COMPLETELY BECAUSE I CANNOT FIND AN EXAMPLE
726
+ $twitter_video_retweeted = isset($post_data->retweeted_status->extended_entities->media[0]->type) && $post_data->retweeted_status->extended_entities->media[0]->type == 'video';
727
 
728
  // Quoted status which is when people retweet or copy paste video tweet link to there tweet. why people do this instead of retweeting is beyond me.
729
+ $twitter_video_quoted_status = isset($post_data->quoted_status->extended_entities->media[0]->type) && $post_data->quoted_status->extended_entities->media[0]->type == 'video';
 
730
 
731
+ // Quoted status which is when people retweet or copy paste image tweet link to there tweet. why people do this instead of retweeting is beyond me.
732
  $twitter_image_quoted_status = isset($post_data->quoted_status->extended_entities->media[0]->type) && $post_data->quoted_status->extended_entities->media[0]->type == 'photo';
733
 
 
734
  $twitter_is_video_allowed = get_option('twitter_allow_videos');
735
  $twitter_allow_videos = !empty($twitter_is_video_allowed) ? $twitter_is_video_allowed : 'yes';
736
 
737
+ if (// These first 4 are the different types of actual twitter videos that can come about
738
+ $twitter_allow_videos == 'yes' && $tFinal == 'video' ||
739
+ $twitter_allow_videos == 'yes' && $twitter_video_reg == 'video' ||
740
+ $twitter_allow_videos == 'yes' && $twitter_video_quoted_status == 'video' ||
741
+ $twitter_allow_videos == 'yes' && $twitter_video_retweeted == 'video' ||
742
+ // 3rd party videos/music we are checking for; youtube, vimeo and soudcloud
743
+ $twitter_allow_videos == 'yes' && strpos($tFinal, 'vimeo') > 0 ||
744
+ $twitter_allow_videos == 'yes' && strpos($tFinal, 'youtube') > 0 && !strpos($tFinal, '-youtube') > 0 ||
745
+ $twitter_allow_videos == 'yes' && strpos($tFinal, 'youtu.be') > 0 ||
746
+ $twitter_allow_videos == 'yes' && strpos($tFinal, 'soundcloud') > 0)
747
+ {
748
  if ($twitter_video_quoted_status == 'video') { ?>
749
+ <div class="fts-twitter-quoted-text-wrap fts-twitter-quoted-video"><?php }
750
 
751
+ //Print our video if one is available
752
+ print $this->fts_twitter_load_videos($post_data);
 
 
 
 
 
753
 
754
+ if ($twitter_video_quoted_status == 'video') { ?>
 
 
755
 
756
+ <div class="fts-twitter-quoted-text">
757
+ <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-full-name"><?php print $post_data->quoted_status->user->name; ?></a>
758
+ <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-at-name">@<?php print $post_data->quoted_status->user->screen_name; ?></a><br />
759
+ <?php print $this->fts_twitter_quote_description($post_data) ?>
760
+ </div>
761
 
762
+ <?php }
763
 
764
+ if ($twitter_video_quoted_status == 'video') { ?>
765
+ </div>
766
  <?php }
767
+ }
768
+ else {
769
+ //Print our IMAGE if one is available
770
+ $popup = isset($popup) ? $popup : '';
771
 
772
+ if ($twitter_image_quoted_status == 'photo') { ?>
773
+ <div class="fts-twitter-quoted-text-wrap fts-twitter-quoted-image">
774
+ <?php }
775
 
776
+ print $this->fts_twitter_image($post_data, $popup);
 
 
777
 
778
+ if ($twitter_image_quoted_status == 'photo') { ?>
 
 
 
 
779
 
780
+ <div class="fts-twitter-quoted-text">
781
+ <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-full-name"><?php print $post_data->quoted_status->user->name; ?></a>
782
+ <a href="<?php print $user_retweet_permalink ?>" target="_blank" class="fts-twitter-at-name">@<?php print $post_data->quoted_status->user->screen_name; ?></a><br />
783
+ <?php print $this->fts_twitter_quote_description($post_data) ?>
784
+ </div>
785
 
786
+ <?php }
 
 
787
 
788
+ if ($twitter_image_quoted_status == 'photo') { ?>
789
+ </div>
790
+ <?php }
791
+ } ?>
792
  </div>
793
  <div class="fts-twitter-reply-wrap <?php if ($fts_twitter_full_width == 'yes') { ?>fts-twitter-full-width<?php } else { ?>fts-twitter-no-margin-left<?php } ?>"><?php
794
  // twitter permalink per post
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: slickremix
3
  Tags: Facebook, Instagram, Twitter, YouTube, Feed
4
  Requires at least: 3.6.0
5
- Tested up to: 4.9.5
6
- Stable tag: 2.4.0
7
  License: GPLv2 or later
8
 
9
  Custom feeds for Facebook Pages, Groups, Events, Album Photos, Videos & Covers, Instagram, Twitter, Pinterest & YouTube on pages, posts or widgets.
@@ -78,6 +78,10 @@ Feed Them Social was Developed By SlickRemix --> [https://www.slickremix.com/](h
78
  * Log into WordPress dashboard then click **Plugins** > **Add new** > Then under the title "Install Plugins" click **Upload** > **choose the zip** > **Activate the plugin!**
79
 
80
  == Changelog ==
 
 
 
 
81
  = Version 2.4.0 Tuesday, April 10th, 2018 =
82
  * REMOVE: Facebook Group Feed and Specific Events Posts: These feed types have been disabled by Facebook at this time. We'll post changes as we receive them from Facebook. [Read More](https://www.slickremix.com/facebook-api-changes-on-april-4th-2018/).
83
  * NOTE: Facebook Event Feed: Facebook now requires you use a page access token to view this feed type. The page access token must be for that facebook page for it to work. An APP ID will not work anymore.
@@ -86,9 +90,8 @@ Feed Them Social was Developed By SlickRemix --> [https://www.slickremix.com/](h
86
  * FIX: Instagram Feed: To create additional Instragram Feeds we have now added access_token= to the shortcode generator on the Settings page of our plugin.
87
  * FIX: Settings Page: View Extensions and Demo link not working properly.
88
  * FIX: Plugins Page: Settings link not working properly.
89
- * IMPROVE: Plugin License Page is now only takes 1 click to save ALL license keys and activate them. (Backwards Compatible)
90
- * IMPROVE: Convert old License key fields in database to single option array on license key. (Backwards Compatible)
91
- * REMOVE: Screenshots for Feed Them Social are no longer in Plugin but moved to the assets folder on wordpress.org repository.
92
 
93
  = Version 2.3.8 - 2.3.9 Wednesday, March 15th, 2018 =
94
  * FIX: Facebook Feed: Extra Images not appearing. We will work on the image slideshow post types in the next update.
2
  Contributors: slickremix
3
  Tags: Facebook, Instagram, Twitter, YouTube, Feed
4
  Requires at least: 3.6.0
5
+ Tested up to: 4.9.6
6
+ Stable tag: 2.4.1
7
  License: GPLv2 or later
8
 
9
  Custom feeds for Facebook Pages, Groups, Events, Album Photos, Videos & Covers, Instagram, Twitter, Pinterest & YouTube on pages, posts or widgets.
78
  * Log into WordPress dashboard then click **Plugins** > **Add new** > Then under the title "Install Plugins" click **Upload** > **choose the zip** > **Activate the plugin!**
79
 
80
  == Changelog ==
81
+ = Version 2.4.1 Friday, May 25th, 2018 =
82
+ * FIX: Twitter Feed: Twitter cards started displaying because twitters oembed option for displaying twitter videos and removing the tweet info is failing. Now Twitter videos are in a video element instead, which also fixes the issue you may be seeing duplicate images, text, etc.
83
+ * FIX: Twitter Options: The option to hide videos
84
+
85
  = Version 2.4.0 Tuesday, April 10th, 2018 =
86
  * REMOVE: Facebook Group Feed and Specific Events Posts: These feed types have been disabled by Facebook at this time. We'll post changes as we receive them from Facebook. [Read More](https://www.slickremix.com/facebook-api-changes-on-april-4th-2018/).
87
  * NOTE: Facebook Event Feed: Facebook now requires you use a page access token to view this feed type. The page access token must be for that facebook page for it to work. An APP ID will not work anymore.
90
  * FIX: Instagram Feed: To create additional Instragram Feeds we have now added access_token= to the shortcode generator on the Settings page of our plugin.
91
  * FIX: Settings Page: View Extensions and Demo link not working properly.
92
  * FIX: Plugins Page: Settings link not working properly.
93
+ * IMPROVED: Plugin License Page is now only takes 1 click to save ALL license keys and activate them. (Backwards Compatible)
94
+ * IMPROVED: Convert old License key fields in database to single option array on license key. (Backwards Compatible)
 
95
 
96
  = Version 2.3.8 - 2.3.9 Wednesday, March 15th, 2018 =
97
  * FIX: Facebook Feed: Extra Images not appearing. We will work on the image slideshow post types in the next update.