Custom Twitter Feeds - Version 2.0.1

Version Description

  • Fix: When GDPR features were active, avatars would not display even after consent had been given.
  • Fix: Fixed a PHP error that would occur with specific kinds of tweets being displayed.
  • Fix: Not all data was cleared after uninstalling the plugin.
Download this release

Release Info

Developer Craig at Smash Balloon
Plugin Icon 128x128 Custom Twitter Feeds
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

README.txt CHANGED
@@ -5,7 +5,7 @@ Support Website: http://smashballoon/custom-twitter-feeds/
5
  Tags: Twitter, Twitter feed, Twitter Tweets, Twitter widget, Custom Twitter Feed
6
  Requires at least: 4.1
7
  Tested up to: 6.0
8
- Stable tag: 2.0
9
  Requires PHP: 5.6
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -234,6 +234,11 @@ If you're still having trouble displaying your Tweets after trying the common is
234
  7. To display a Twitter feed just copy and paste the shortcode into a Twitter widget or page
235
 
236
  == Changelog ==
 
 
 
 
 
237
  = 2.0 =
238
  * Important: Minimum supported WordPress version has been raised from 3.5 to 4.1.
239
  * New: Our biggest update ever! We've completely redesigned the plugin settings from head to toe to make it easier to create, manage, and customize your Twitter feeds.
5
  Tags: Twitter, Twitter feed, Twitter Tweets, Twitter widget, Custom Twitter Feed
6
  Requires at least: 4.1
7
  Tested up to: 6.0
8
+ Stable tag: 2.0.1
9
  Requires PHP: 5.6
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
234
  7. To display a Twitter feed just copy and paste the shortcode into a Twitter widget or page
235
 
236
  == Changelog ==
237
+ = 2.0.1 =
238
+ * Fix: When GDPR features were active, avatars would not display even after consent had been given.
239
+ * Fix: Fixed a PHP error that would occur with specific kinds of tweets being displayed.
240
+ * Fix: Not all data was cleared after uninstalling the plugin.
241
+
242
  = 2.0 =
243
  * Important: Minimum supported WordPress version has been raised from 3.5 to 4.1.
244
  * New: Our biggest update ever! We've completely redesigned the plugin settings from head to toe to make it easier to create, manage, and customize your Twitter feeds.
custom-twitter-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Twitter Feeds
4
  Plugin URI: http://smashballoon.com/custom-twitter-feeds
5
  Description: Customizable Twitter feeds for your website
6
- Version: 2.0
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  Text Domain: custom-twitter-feeds
@@ -23,7 +23,7 @@ along with this program; if not, write to the Free Software
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
26
- define( 'CTF_VERSION', '2.0' );
27
  define( 'CTF_TITLE', 'Custom Twitter Feeds' );
28
  define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.min.js?ver=' . CTF_VERSION , __FILE__ ) );
29
  define( 'OAUTH_PROCESSOR_URL', 'https://api.smashballoon.com/twitter-login.php?return_uri=' );
3
  Plugin Name: Custom Twitter Feeds
4
  Plugin URI: http://smashballoon.com/custom-twitter-feeds
5
  Description: Customizable Twitter feeds for your website
6
+ Version: 2.0.1
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  Text Domain: custom-twitter-feeds
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
26
+ define( 'CTF_VERSION', '2.0.1' );
27
  define( 'CTF_TITLE', 'Custom Twitter Feeds' );
28
  define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.min.js?ver=' . CTF_VERSION , __FILE__ ) );
29
  define( 'OAUTH_PROCESSOR_URL', 'https://api.smashballoon.com/twitter-login.php?return_uri=' );
inc/CTF_Feed.php CHANGED
@@ -1105,6 +1105,9 @@ class CTF_Feed
1105
  }
1106
 
1107
  public static function maybeGetTwitterCardData( $url, $id ) {
 
 
 
1108
  $url_key = str_replace('&','038',$url);
1109
  $url_key = preg_replace( '~[^a-zA-Z0-9]+~', '', $url_key );
1110
 
1105
  }
1106
 
1107
  public static function maybeGetTwitterCardData( $url, $id ) {
1108
+ if ( ! ctf_is_pro_version() ) {
1109
+ return false;
1110
+ }
1111
  $url_key = str_replace('&','038',$url);
1112
  $url_key = preg_replace( '~[^a-zA-Z0-9]+~', '', $url_key );
1113
 
js/ctf-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var ctf_js_exists=void 0!==ctf_js_exists;ctf_js_exists||function(o){function e(){if(window.ctfObject.consentGiven||!window.ctfObject.gdpr)return 1;var u;"undefined"!=typeof CLI_Cookie?null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary"))):void 0!==window.cnArgs?2===(u=("; "+document.cookie).split("; cookie_notice_accepted=")).length&&(t=u.pop().split(";").shift(),window.ctfObject.consentGiven="true"===t):void 0!==window.cookieconsent?window.ctfObject.consentGiven="allow"===function(u){for(var t=u+"=",e=window.document.cookie.split(";"),n=0;n<e.length;n++){var a=e[n].trim();if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""}("cmplz_consent_status")||jQuery("body").hasClass("cmplz-status-marketing"):void 0!==window.Cookiebot?window.ctfObject.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(window.ctfObject.consentGiven=window.BorlabsCookie.checkCookieConsent("twitter"));var t=jQuery.Event("ctfcheckconsent");return t.feed=this,jQuery(window).trigger(t),window.ctfObject.consentGiven}function s(u){u.find(".ctf-hide-avatar").length&&!u.find(".ctf-hide-avatar.ctf-no-consent").length||u.find(".ctf-item").addClass("ctf-hide-avatar ctf-no-consent"),o(".ctf-header-img span").length&&o(".ctf-header-img").addClass("ctf-no-consent")}function r(t){a(),t.find(".ctf-item.ctf-no-consent").removeClass("ctf-hide-avatar"),t.find(".ctf-author-avatar").each(function(){o(this).find("span").replaceWith('<img src="'+o(this).find("span").attr("data-avatar")+'" alt="'+o(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-header-img").each(function(){o(this).find("span").replaceWith('<img src="'+o(this).find("span").attr("data-avatar")+'" alt="'+o(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-no-consent").removeClass("ctf-no-consent"),t.find(".ctf-header .ctf-header-link").on("mouseenter mouseleave",function(u){switch(u.type){case"mouseenter":t.find(".ctf-header .ctf-header-img-hover").fadeIn(200);break;case"mouseleave":t.find(".ctf-header .ctf-header-img-hover").stop().fadeOut(600)}})}function n(){e()&&o(".ctf").each(function(){r(o(this))})}function a(){void 0===window.ctfObject.intentsIncluded&&(window.ctfObject.intentsIncluded=!1),o(".ctf").each(function(){function u(u){for(var t,e,n=(u=u||window.event).target||u.srcElement;n&&"a"!==n.nodeName.toLowerCase();)n=n.parentNode;n&&"a"===n.nodeName.toLowerCase()&&n.href&&n.href.match(a)&&(t=Math.round(i/2-275),e=0,420<c&&(e=Math.round(c/2-210)),window.open(n.href,"intent","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left="+t+",top="+e),u.returnValue=!1,u.preventDefault&&u.preventDefault())}var a,c,i;window.ctfObject.intentsIncluded||void 0===o(this).attr("data-ctfintents")||(window.ctfObject.intentsIncluded=!0,window.__twitterIntentHandler||(a=/twitter\.com\/intent\/(\w+)/,c=screen.height,i=screen.width,document.addEventListener?document.addEventListener("click",u,!1):document.attachEvent&&document.attachEvent("onclick",u),window.__twitterIntentHandler=!0))})}function f(u){var t="content";return u.closest("footer").length?t="footer":u.closest(".header").length||u.closest("header").length?t="header":(u.closest(".sidebar").length||u.closest("aside").length)&&(t="sidebar"),t}window.ctf_init=function(){var u;function d(i){var u,t;i.addClass("ctf_is_initialized"),window.ctfObject.locator&&(i.attr("data-feed-id"),u=i.attr("data-feed-id"),i.attr("data-postid"),t=i.attr("data-postid"),jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_do_locator",atts:i.attr("data-ctfshortcode"),feed_id:u,location:f(i),post_id:t},success:function(u){}})),(e()?r:s)(i),i.find(".ctf-item.ctf-new").each(function(){var u,t,l,F,h,m,C,e=o(this),n=e.find(".ctf-tweet-text-media-wrap"),a=e.find(".ctf-tweet-text").remove(".ctf-tweet-text-media-wrap"),c=" "+a.html();"true"==i.attr("data-ctfdisablelinks")||void 0===c||i.find(".ctf-tweet-text-link").length||(u="",(t=i.attr("data-ctflinktextcolor"))&&(u=t.replace(";","").split("#")[1]),window.ctfLinkify=(t="[a-z\\d.-]+://",l="mailto:",F=new RegExp("(?:\\b[a-z\\d.-]+://[^<>\\s]+|\\b(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:[;/][^#?<>\\s]*)?(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w)|(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w))","ig"),h=new RegExp("^"+t,"i"),m={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},C={callback:function(u,t){return t?'<a href="'+t+'" title="'+t+'" target="_blank">'+u+"</a>":u},punct_regexp:/(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/},function(u,t){t=t||{};var e,n,a,c,i,o,s,d,r,f="",A=[];for(e in C)void 0===t[e]&&(t[e]=C[e]);for(;a=F.exec(u);)if(n=a[0],o=(i=F.lastIndex)-n.length,!/[\/:]/.test(u.charAt(o-1))){for(;r=(s=n).substr(-1),(d=m[r])&&(d=n.match(new RegExp("\\"+d+"(?!$)","g")),r=n.match(new RegExp("\\"+r,"g")),(d?d.length:0)<(r?r.length:0)&&(n=n.substr(0,n.length-1),i--)),t.punct_regexp&&(n=n.replace(t.punct_regexp,function(u){return i-=u.length,""})),n.length&&n!==s;);a=n,h.test(a)||(a=(-1!==a.indexOf("@")?a.indexOf(l)?l:"":a.indexOf("irc.")?a.indexOf("ftp.")?"http://":"ftp://":"irc://")+a),c!=o&&(A.push([u.slice(c,o)]),c=i),A.push([n,a])}for(A.push([u.substr(c)]),e=0;e<A.length;e++)f+=t.callback.apply(window,A[e]);return f||u}),a.find("a").length||(a.find(".emoji").each(function(){o(this).replaceWith(o(this).attr("alt"))}),c=" "+a.html(),c=ctfLinkify(c)),0<c.length&&(c=(c=c.replace(/<br>/g,"<br> ")).replace(/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi,function(u){return u=u.trim(),/^#[0-9A-F]{6}$/i.test(u)?u:' <a href="https://twitter.com/hashtag/'+u.substring(1)+'" target="_blank" rel="nofollow noopener">'+u+"</a>"})),c=c.replace(/[\s][@]+[A-Za-z0-9-_]+/g,function(u){return' <a href="https://twitter.com/'+(u=u.trim()).substring(1)+'" target="_blank" rel="nofollow noopener">'+u+"</a>"}),a.html(c.trim()),a.append(n),a.find("a").css("color","#"+u),n.css("color","#"+u)),e.find(".ctf-tweet-text a").each(function(){-1<jQuery(this).text().indexOf("http")&&63<jQuery(this).text().length&&jQuery(this).text(jQuery(this).text().substring(0,60)+"...")})}),i.find(".ctf-author-name, .ctf-tweet-date, .ctf-author-screenname, .ctf-twitterlink, .ctf-author-box-link, .ctf-retweet-text, .ctf-quoted-tweet").css("color",i.find(".ctf-tweet-text").css("color")),i.find(".ctf_more").off("click").on("click",function(u){u.preventDefault(),o(this).hide().next(".ctf_remaining").show()}),"function"==typeof ctf_custom_js&&ctf_custom_js(o),i.find(".ctf-author-box-link p:empty").remove()}function c(t,u,e,n,a,c){n.addClass("ctf-loading").append('<div class="ctf-loader"></div>'),n.find(".ctf-loader").css("background-color",n.css("color"));var i=(e.attr("data-feedid"),e.attr("data-feedid")),o=(e.attr("data-postid"),e.attr("data-postid")),s=(e.attr("data-feed"),e.attr("data-feed"));jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_get_more_posts",last_id_data:t,shortcode_data:u,num_needed:a,persistent_index:c,feed_id:i,location:f(e),post_id:o,v2feed:s},success:function(u){""!==t?(-1==u.indexOf("<meta charset")&&e.find(".ctf-item").removeClass("ctf-new").last().after(u),e.find(".ctf-out-of-tweets").length&&(n.hide(),e.find(".ctf-out-of-tweets p").eq(0).fadeIn().end().eq(1).delay(500).fadeIn())):e.find(".ctf-tweets").append(u),n.removeClass("ctf-loading").find(".ctf-loader").remove(),d(e)}})}window.ctfObject={},o(".ctf").length&&void 0!==o(".ctf").first().attr("data-ctf-flags")?(-1<(u=o(".ctf").first().attr("data-ctf-flags").split(",")).indexOf("gdpr")?(window.ctfObject.consentGiven=!1,window.ctfObject.gdpr=!0):(window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1),-1<u.indexOf("locator")?(u=Math.floor(Math.random()*o(".ctf").length),window.ctfObject.locator=1===o(".ctf").length||1===u):window.ctfObject.locator=!1):(window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1,window.ctfObject.locator=!1),o(".ctf").length<=o(".ctf_is_initialized").length||(window.ctfObject.consentGiven&&a(),o(".ctf").each(function(){var n=o(this),a=parseInt(n.attr("data-ctfneeded"));n.width()<=480&&n.addClass("ctf-narrow"),n.width()<=320&&n.addClass("ctf-super-narrow"),o(this).hasClass("ctf_is_initialized")||d(n),setTimeout(function(){var u,t,e;0<a&&(u=n.find(".ctf-more"),t=n.find(".ctf-item").last().attr("id"),e=n.find(".ctf-item").length,c(t,n.attr("data-ctfshortcode"),n,u,a,e))},500),n.find(".ctf-more").on("click",function(){var u=o(this),t=n.find(".ctf-item").last().attr("id"),e=n.find(".ctf-item").length;c(t,n.attr("data-ctfshortcode"),n,u,0,e)}),n.find(".ctf-author-box-link p:empty").remove(),setTimeout(function(){(e()?r:s)(n)},500)}))},jQuery(document).ready(function(t){ctf_init(),t("#cookie-notice a").on("click",function(){setTimeout(function(){n()},1e3)}),t("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){n()},1e3)}),t(".cli-user-preference-checkbox").on("click",function(){n()}),t(window).on("CookiebotOnAccept",function(u){n()}),t(document).on("cmplzEnableScripts",function(u){"marketing"===u.detail&&t(".ctf").each(function(){window.ctfObject.consentGiven=!0,n()})}),t(document).on("cmplzFireCategories",function(u){"marketing"===u.detail.category&&t(".ctf").each(function(){window.ctfObject.consentGiven=!0,n()})}),t(document).on("borlabs-cookie-consent-saved",function(u){n()})})}(jQuery);
1
+ var ctf_js_exists=void 0!==ctf_js_exists;ctf_js_exists||function(o){function e(){if(window.ctfObject.consentGiven||!window.ctfObject.gdpr)return 1;var u;"undefined"!=typeof CLI_Cookie?null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary"))):void 0!==window.cnArgs?2===(u=("; "+document.cookie).split("; cookie_notice_accepted=")).length&&(t=u.pop().split(";").shift(),window.ctfObject.consentGiven="true"===t):void 0!==window.cookieconsent?window.ctfObject.consentGiven="allow"===function(u){for(var t=u+"=",e=window.document.cookie.split(";"),n=0;n<e.length;n++){var a=e[n].trim();if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""}("cmplz_consent_status")||jQuery("body").hasClass("cmplz-status-marketing"):void 0!==window.Cookiebot?window.ctfObject.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(window.ctfObject.consentGiven=window.BorlabsCookie.checkCookieConsent("twitter"));var t=jQuery.Event("ctfcheckconsent");return t.feed=this,jQuery(window).trigger(t),window.ctfObject.consentGiven}function s(u){u.find(".ctf-hide-avatar").length&&!u.find(".ctf-hide-avatar.ctf-no-consent").length||u.find(".ctf-item").addClass("ctf-hide-avatar ctf-no-consent"),o(".ctf-header-img span").length&&o(".ctf-header-img").addClass("ctf-no-consent")}function r(t){a(),t.find(".ctf-item.ctf-no-consent").removeClass("ctf-hide-avatar"),t.find(".ctf-author-avatar").each(function(){o(this).find("span").replaceWith('<img src="'+o(this).find("span").attr("data-avatar")+'" alt="'+o(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-header-img").each(function(){o(this).find("span").replaceWith('<img src="'+o(this).find("span").attr("data-avatar")+'" alt="'+o(this).find("span").attr("data-alt")+'" width="48" height="48">')}),t.find(".ctf-no-consent").removeClass("ctf-no-consent"),t.find(".ctf-header .ctf-header-link").on("mouseenter mouseleave",function(u){switch(u.type){case"mouseenter":t.find(".ctf-header .ctf-header-img-hover").fadeIn(200);break;case"mouseleave":t.find(".ctf-header .ctf-header-img-hover").stop().fadeOut(600)}})}function n(){e()&&o(".ctf").each(function(){r(o(this))})}function a(){void 0===window.ctfObject.intentsIncluded&&(window.ctfObject.intentsIncluded=!1),o(".ctf").each(function(){function u(u){for(var t,e,n=(u=u||window.event).target||u.srcElement;n&&"a"!==n.nodeName.toLowerCase();)n=n.parentNode;n&&"a"===n.nodeName.toLowerCase()&&n.href&&n.href.match(a)&&(t=Math.round(i/2-275),e=0,420<c&&(e=Math.round(c/2-210)),window.open(n.href,"intent","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left="+t+",top="+e),u.returnValue=!1,u.preventDefault&&u.preventDefault())}var a,c,i;window.ctfObject.intentsIncluded||void 0===o(this).attr("data-ctfintents")||(window.ctfObject.intentsIncluded=!0,window.__twitterIntentHandler||(a=/twitter\.com\/intent\/(\w+)/,c=screen.height,i=screen.width,document.addEventListener?document.addEventListener("click",u,!1):document.attachEvent&&document.attachEvent("onclick",u),window.__twitterIntentHandler=!0))})}function f(u){var t="content";return u.closest("footer").length?t="footer":u.closest(".header").length||u.closest("header").length?t="header":(u.closest(".sidebar").length||u.closest("aside").length)&&(t="sidebar"),t}window.ctf_init=function(){var u;function d(i){var u,t;i.addClass("ctf_is_initialized"),window.ctfObject.locator&&(i.attr("data-feed-id"),u=i.attr("data-feed-id"),i.attr("data-postid"),t=i.attr("data-postid"),jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_do_locator",atts:i.attr("data-ctfshortcode"),feed_id:u,location:f(i),post_id:t},success:function(u){}})),(e()?r:s)(i),i.find(".ctf-item.ctf-new").each(function(){var u,t,l,F,h,m,C,e=o(this),n=e.find(".ctf-tweet-text-media-wrap"),a=e.find(".ctf-tweet-text").remove(".ctf-tweet-text-media-wrap"),c=" "+a.html();"true"==i.attr("data-ctfdisablelinks")||void 0===c||i.find(".ctf-tweet-text-link").length||(u="",(t=i.attr("data-ctflinktextcolor"))&&(u=t.replace(";","").split("#")[1]),window.ctfLinkify=(t="[a-z\\d.-]+://",l="mailto:",F=new RegExp("(?:\\b[a-z\\d.-]+://[^<>\\s]+|\\b(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:[;/][^#?<>\\s]*)?(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w)|(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w))","ig"),h=new RegExp("^"+t,"i"),m={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},C={callback:function(u,t){return t?'<a href="'+t+'" title="'+t+'" target="_blank">'+u+"</a>":u},punct_regexp:/(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/},function(u,t){t=t||{};var e,n,a,c,i,o,s,d,r,f="",A=[];for(e in C)void 0===t[e]&&(t[e]=C[e]);for(;a=F.exec(u);)if(n=a[0],o=(i=F.lastIndex)-n.length,!/[\/:]/.test(u.charAt(o-1))){for(;r=(s=n).substr(-1),(d=m[r])&&(d=n.match(new RegExp("\\"+d+"(?!$)","g")),r=n.match(new RegExp("\\"+r,"g")),(d?d.length:0)<(r?r.length:0)&&(n=n.substr(0,n.length-1),i--)),t.punct_regexp&&(n=n.replace(t.punct_regexp,function(u){return i-=u.length,""})),n.length&&n!==s;);a=n,h.test(a)||(a=(-1!==a.indexOf("@")?a.indexOf(l)?l:"":a.indexOf("irc.")?a.indexOf("ftp.")?"http://":"ftp://":"irc://")+a),c!=o&&(A.push([u.slice(c,o)]),c=i),A.push([n,a])}for(A.push([u.substr(c)]),e=0;e<A.length;e++)f+=t.callback.apply(window,A[e]);return f||u}),a.find("a").length||(a.find(".emoji").each(function(){o(this).replaceWith(o(this).attr("alt"))}),c=" "+a.html(),c=ctfLinkify(c)),0<c.length&&(c=(c=c.replace(/<br>/g,"<br> ")).replace(/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi,function(u){return u=u.trim(),/^#[0-9A-F]{6}$/i.test(u)?u:' <a href="https://twitter.com/hashtag/'+u.substring(1)+'" target="_blank" rel="nofollow noopener">'+u+"</a>"})),c=c.replace(/[\s][@]+[A-Za-z0-9-_]+/g,function(u){return' <a href="https://twitter.com/'+(u=u.trim()).substring(1)+'" target="_blank" rel="nofollow noopener">'+u+"</a>"}),a.html(c.trim()),a.append(n),a.find("a").css("color","#"+u),n.css("color","#"+u)),e.find(".ctf-tweet-text a").each(function(){-1<jQuery(this).text().indexOf("http")&&63<jQuery(this).text().length&&jQuery(this).text(jQuery(this).text().substring(0,60)+"...")})}),i.find(".ctf-author-name, .ctf-tweet-date, .ctf-author-screenname, .ctf-twitterlink, .ctf-author-box-link, .ctf-retweet-text, .ctf-quoted-tweet").css("color",i.find(".ctf-tweet-text").css("color")),i.find(".ctf_more").off("click").on("click",function(u){u.preventDefault(),o(this).hide().next(".ctf_remaining").show()}),"function"==typeof ctf_custom_js&&ctf_custom_js(o),i.find(".ctf-author-box-link p:empty").remove()}function c(t,u,e,n,a,c){n.addClass("ctf-loading").append('<div class="ctf-loader"></div>'),n.find(".ctf-loader").css("background-color",n.css("color"));var i=(e.attr("data-feedid"),e.attr("data-feedid")),o=(e.attr("data-postid"),e.attr("data-postid")),s=(e.attr("data-feed"),e.attr("data-feed"));jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_get_more_posts",last_id_data:t,shortcode_data:u,num_needed:a,persistent_index:c,feed_id:i,location:f(e),post_id:o,v2feed:s},success:function(u){""!==t?(-1==u.indexOf("<meta charset")&&e.find(".ctf-item").removeClass("ctf-new").last().after(u),e.find(".ctf-out-of-tweets").length&&(n.hide(),e.find(".ctf-out-of-tweets p").eq(0).fadeIn().end().eq(1).delay(500).fadeIn())):e.find(".ctf-tweets").append(u),n.removeClass("ctf-loading").find(".ctf-loader").remove(),d(e)}})}window.ctfObject={},o(".ctf").length&&void 0!==o(".ctf").first().attr("data-ctf-flags")?(-1<(u=o(".ctf").first().attr("data-ctf-flags").split(",")).indexOf("gdpr")?(window.ctfObject.consentGiven=!1,window.ctfObject.gdpr=!0):(window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1),-1<u.indexOf("locator")?(u=Math.floor(Math.random()*o(".ctf").length),window.ctfObject.locator=1===o(".ctf").length||1===u):window.ctfObject.locator=!1):(window.ctfObject.consentGiven=!0,window.ctfObject.gdpr=!1,window.ctfObject.locator=!1),o(".ctf").length<=o(".ctf_is_initialized").length||(window.ctfObject.consentGiven&&a(),o(".ctf").each(function(){var n=o(this),a=parseInt(n.attr("data-ctfneeded"));n.width()<=480&&n.addClass("ctf-narrow"),n.width()<=320&&n.addClass("ctf-super-narrow"),o(this).hasClass("ctf_is_initialized")||d(n),setTimeout(function(){var u,t,e;0<a&&(u=n.find(".ctf-more"),t=n.find(".ctf-item").last().attr("id"),e=n.find(".ctf-item").length,c(t,n.attr("data-ctfshortcode"),n,u,a,e))},500),n.find(".ctf-more").on("click",function(){var u=o(this),t=n.find(".ctf-item").last().attr("id"),e=n.find(".ctf-item").length;c(t,n.attr("data-ctfshortcode"),n,u,0,e)}),n.find(".ctf-author-box-link p:empty").remove(),setTimeout(function(){(e()?r:s)(n)},500)}))},jQuery(document).ready(function(t){ctf_init(),t("#cookie-notice a").on("click",function(){setTimeout(function(){n()},1e3)}),t("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){n()},1e3)}),t(".cli-user-preference-checkbox").on("click",function(){n()}),t(window).on("CookiebotOnAccept",function(u){n()}),t(document).on("cmplzEnableScripts",function(u){"marketing"===u.detail&&t(".ctf").each(function(){window.ctfObject.consentGiven=!0,n()})}),t(document).on("cmplzFireCategories",function(u){"marketing"===u.detail.category&&t(".ctf").each(function(){window.ctfObject.consentGiven=!0,n()})}),t(document).on("borlabs-cookie-consent-saved",function(u){n()})})}(jQuery);
templates/author.php CHANGED
@@ -50,8 +50,8 @@ if ( isset( $retweeter ) && ctf_show( 'retweeter', $feed_options ) ) :
50
  <?php if( ctf_show( 'avatar', $feed_options ) ): ?>
51
  <!--style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '"-->
52
  <a href="https://twitter.com/<?php echo $author_screen_name ?>" class="ctf-author-avatar" target="_blank" rel="noopener noreferrer" <?php echo $avatar_attr ?>>
53
- <?php if( CTF_GDPR_Integrations::doing_gdpr( $feed_options ) ): ?>
54
- <span data-avatar="<?php echo esc_url( $avatar_src ) ?>" data-alt="<?php echo $author_screen_name ?>">Avatar</span>
55
  <?php else: ?>
56
  <img src="<?php echo esc_url( $avatar_src ) ?>" alt="<?php echo $author_screen_name ?>" width="48" height="48">
57
  <?php endif; ?>
50
  <?php if( ctf_show( 'avatar', $feed_options ) ): ?>
51
  <!--style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '"-->
52
  <a href="https://twitter.com/<?php echo $author_screen_name ?>" class="ctf-author-avatar" target="_blank" rel="noopener noreferrer" <?php echo $avatar_attr ?>>
53
+ <?php if ( CTF_GDPR_Integrations::doing_gdpr( $feed_options ) ) : ?>
54
+ <span data-avatar="<?php echo esc_url( CTF_Parse::get_avatar( $post ) ) ?>" data-alt="<?php echo $author_screen_name ?>">Avatar</span>
55
  <?php else: ?>
56
  <img src="<?php echo esc_url( $avatar_src ) ?>" alt="<?php echo $author_screen_name ?>" width="48" height="48">
57
  <?php endif; ?>
templates/header.php CHANGED
@@ -8,7 +8,7 @@
8
  */
9
  use TwitterFeed\CTF_Parse;
10
  use TwitterFeed\CTF_Display_Elements;
11
-
12
  // Don't load directly
13
  if ( ! defined( 'ABSPATH' ) ) {
14
  die( '-1' );
@@ -49,7 +49,11 @@ $avatar = CTF_Parse::get_header_avatar( $header_info, $feed_options );
49
 
50
  <div class="ctf-header-img">
51
  <div class="ctf-header-img-hover"><?php echo ctf_get_fa_el( 'fa-twitter' ) ?></div>
52
- <img src="<?php echo esc_url( $avatar ); ?>" alt="<?php echo esc_attr( $username ); ?>" width="48" height="48">
 
 
 
 
53
  </div>
54
  </a>
55
  </div>
8
  */
9
  use TwitterFeed\CTF_Parse;
10
  use TwitterFeed\CTF_Display_Elements;
11
+ use TwitterFeed\CTF_GDPR_Integrations;
12
  // Don't load directly
13
  if ( ! defined( 'ABSPATH' ) ) {
14
  die( '-1' );
49
 
50
  <div class="ctf-header-img">
51
  <div class="ctf-header-img-hover"><?php echo ctf_get_fa_el( 'fa-twitter' ) ?></div>
52
+ <?php if ( CTF_GDPR_Integrations::doing_gdpr( $feed_options ) ) : ?>
53
+ <span data-avatar="<?php echo esc_url( CTF_Parse::get_avatar( $header_info ) ) ?>" data-alt="<?php echo esc_attr( $username ); ?>" style="display: none;">Avatar</span>
54
+ <?php else : ?>
55
+ <img src="<?php echo esc_url( $avatar ); ?>" alt="<?php echo esc_attr( $username ); ?>" width="48" height="48">
56
+ <?php endif; ?>
57
  </div>
58
  </a>
59
  </div>
uninstall.php CHANGED
@@ -1,34 +1,34 @@
1
  <?php
2
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3
- exit();
4
  }
5
 
6
  //If the user is preserving the settings then don't delete them
7
  $options = get_option( 'ctf_options' );
8
- $ctf_preserve_settings = isset( $options[ 'preserve_settings' ] ) ? $options[ 'preserve_settings' ] : false;
9
 
10
  // allow the user to preserve their settings in case they are upgrading
11
  if ( ! $ctf_preserve_settings ) {
12
- // clean up options from the database
13
- delete_option( 'ctf_configure' );
14
- delete_option( 'ctf_customize' );
15
- delete_option( 'ctf_style' );
16
- delete_option( 'ctf_options' );
17
- delete_option( 'ctf_version' );
18
- delete_option( 'ctf_rating_notice' );
19
- delete_transient( 'custom_twitter_feeds_rating_notice_waiting' );
20
  delete_option( 'ctf_notifications' );
21
- delete_option( 'ctf_newuser_notifications' );
22
 
23
- // delete tweet cache in transients
24
- global $wpdb;
25
- $table_name = $wpdb->prefix . "options";
26
- $wpdb->query( "
27
  DELETE
28
  FROM $table_name
29
  WHERE `option_name` LIKE ('%\_transient\_ctf\_%')
30
  " );
31
- $wpdb->query( "
32
  DELETE
33
  FROM $table_name
34
  WHERE `option_name` LIKE ('%\_transient\_timeout\_ctf\_%')
@@ -44,17 +44,39 @@ if ( ! $ctf_preserve_settings ) {
44
  ");
45
  delete_option( 'ctf_cache_list' );
46
 
47
- // remove any scheduled cron jobs
48
- wp_clear_scheduled_hook( 'ctf_cron_job' );
49
 
50
  delete_option( 'ctf_usage_tracking_config' );
51
  delete_option( 'ctf_usage_tracking' );
 
52
  wp_clear_scheduled_hook( 'ctf_usage_tracking_cron' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
- $feed_caches_table_name = $wpdb->prefix . 'ctf_feed_caches';
55
- $wpdb->query( "DROP TABLE IF EXISTS $feed_caches_table_name" );
56
 
57
- $feeds_table_name = $wpdb->prefix . 'ctf_feeds';
58
- $wpdb->query( "DROP TABLE IF EXISTS $feeds_table_name" );
59
  }
60
 
1
  <?php
2
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3
+ exit();
4
  }
5
 
6
  //If the user is preserving the settings then don't delete them
7
  $options = get_option( 'ctf_options' );
8
+ $ctf_preserve_settings = isset( $options['preserve_settings'] ) ? $options['preserve_settings'] : false;
9
 
10
  // allow the user to preserve their settings in case they are upgrading
11
  if ( ! $ctf_preserve_settings ) {
12
+ // clean up options from the database
13
+ delete_option( 'ctf_options' );
14
+ delete_option( 'ctf_configure' );
15
+ delete_option( 'ctf_customize' );
16
+ delete_option( 'ctf_style' );
17
+ delete_option( 'ctf_statuses' );
18
+
19
+ delete_option( 'ctf_rating_notice' );
20
  delete_option( 'ctf_notifications' );
21
+ delete_option( 'ctf_local_avatars' );
22
 
23
+ // delete tweet cache in transients
24
+ global $wpdb;
25
+ $table_name = $wpdb->prefix . "options";
26
+ $wpdb->query( "
27
  DELETE
28
  FROM $table_name
29
  WHERE `option_name` LIKE ('%\_transient\_ctf\_%')
30
  " );
31
+ $wpdb->query( "
32
  DELETE
33
  FROM $table_name
34
  WHERE `option_name` LIKE ('%\_transient\_timeout\_ctf\_%')
44
  ");
45
  delete_option( 'ctf_cache_list' );
46
 
47
+ // remove any scheduled cron jobs
48
+ wp_clear_scheduled_hook( 'ctf_cron_job' );
49
 
50
  delete_option( 'ctf_usage_tracking_config' );
51
  delete_option( 'ctf_usage_tracking' );
52
+
53
  wp_clear_scheduled_hook( 'ctf_usage_tracking_cron' );
54
+ wp_clear_scheduled_hook( 'ctf_feed_update' );
55
+
56
+ delete_option( 'ctf_db_version' );
57
+ delete_option( 'ctf_ver' );
58
+ delete_option( 'ctf_welcome_seen' );
59
+ delete_option( 'ctf_rating_notice' );
60
+ delete_option( 'ctf_notifications' );
61
+ delete_option( 'ctf_newuser_notifications' );
62
+ delete_option( 'ctf_statuses' );
63
+ delete_option( 'ctf_cron_report' );
64
+ delete_option( 'ctf_legacy_feed_settings' );
65
+ delete_option( 'ctf_check_license_api_when_expires' );
66
+ delete_option( 'ctf_license_last_check_timestamp' );
67
+ delete_option( 'ctf_license_data' );
68
+ delete_option( 'ctf_license_key' );
69
+ delete_option( 'ctf_license_status' );
70
+
71
+ global $wpdb;
72
+
73
+ $locator_table_name = $wpdb->prefix . 'ctf_feed_locator';
74
+ $wpdb->query( "DROP TABLE IF EXISTS $locator_table_name" );
75
 
76
+ $feed_caches_table_name = $wpdb->prefix . 'ctf_feed_caches';
77
+ $wpdb->query( "DROP TABLE IF EXISTS $feed_caches_table_name" );
78
 
79
+ $feeds_table_name = $wpdb->prefix . 'ctf_feeds';
80
+ $wpdb->query( "DROP TABLE IF EXISTS $feeds_table_name" );
81
  }
82