Version Description
- Fix: Fixed a compatibility issue with the Complianz Cookie Consent plugin integration.
- Fix: Removed the limit to the number of sources shown at one time when creating a feed.
- Fix: When using a narrow screen, modals inside the feed creator in the backend would be cut off.
- Fix: Fixed an issue where settings were not preserved even when using the preserve settings option and deleting the plugin.
- Fix: Improved security hardening.
- Fix: Fixed some options and tables not being removed from the WordPress database on uninstall.
- Fix: Locations of feeds sorted by source would not work if the source ID was not a number.
- Fix: Fixed PHP warnings when viewing dashboard notifications.
- Fix: Fixed locale setting causing a PHP warning if not set.
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 4.0.1 |
Comparing to | |
See all releases |
Code changes from version 4.0 to 4.0.1
- README.txt +19 -7
- admin/assets/img/post-style.png +0 -0
- admin/assets/js/oembeds.js +3 -0
- admin/assets/js/settings.js +10 -0
- admin/builder/assets/css/global.css +6 -1
- assets/js/cff-scripts.js +13 -9
- assets/js/cff-scripts.min.js +1 -1
- custom-facebook-feed.php +2 -2
- inc/Admin/CFF_Global_Settings.php +15 -0
- inc/Admin/CFF_New_User.php +3 -0
- inc/Admin/CFF_Notifications.php +4 -2
- inc/Admin/CFF_Support.php +1 -0
- inc/Admin/CFF_oEmbeds.php +6 -0
- inc/Builder/CFF_Db.php +8 -8
- inc/Builder/CFF_Feed_Builder.php +20 -1
- inc/Builder/CFF_Feed_Saver_Manager.php +22 -0
- inc/Builder/CFF_Source.php +10 -0
- inc/Builder/CFF_Tooltip_Wizard.php +4 -4
- inc/CFF_Shortcode.php +1 -1
- inc/Custom_Facebook_Feed.php +69 -32
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: Facebook, Facebook feed, Facebook posts, Facebook group, Facebook page
|
|
4 |
Requires at least: 4.1
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 4.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -253,14 +253,26 @@ The most common reason for this is that an add-on or extension you have installe
|
|
253 |
|
254 |
1. By default the Facebook feed inherits your theme's default styles and the Facebook feed is completely responsive
|
255 |
2. Completely customize the way your Facebook feed looks to perfectly match your site
|
256 |
-
3.
|
257 |
-
4.
|
258 |
-
5.
|
259 |
-
6.
|
260 |
-
7.
|
261 |
-
8.
|
|
|
262 |
|
263 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
= 4.0 =
|
265 |
* Important: Minimum supported WordPress version has been raised from 3.0 to 4.1.
|
266 |
* 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 Facebook feeds.
|
4 |
Requires at least: 4.1
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 4.0.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
253 |
|
254 |
1. By default the Facebook feed inherits your theme's default styles and the Facebook feed is completely responsive
|
255 |
2. Completely customize the way your Facebook feed looks to perfectly match your site
|
256 |
+
3. Use custom CSS to customize every part of the Facebook feed
|
257 |
+
4. Display Facebook events in your Facebook feed
|
258 |
+
5. Configuring the Custom Facebook Feed plugin
|
259 |
+
6. General Facebook Feed options - Custom Facebook Feed Layout and Style page
|
260 |
+
7. Facebook Feed Typography options - Custom Facebook Feed Layout and Style page
|
261 |
+
8. Misc Facebook Feed options - Custom Facebook Feed Layout and Style page
|
262 |
+
9. It's super easy to display your Facebook feed in any page or post
|
263 |
|
264 |
== Changelog ==
|
265 |
+
= 4.0.1 =
|
266 |
+
* Fix: Fixed a compatibility issue with the Complianz Cookie Consent plugin integration.
|
267 |
+
* Fix: Removed the limit to the number of sources shown at one time when creating a feed.
|
268 |
+
* Fix: When using a narrow screen, modals inside the feed creator in the backend would be cut off.
|
269 |
+
* Fix: Fixed an issue where settings were not preserved even when using the preserve settings option and deleting the plugin.
|
270 |
+
* Fix: Improved security hardening.
|
271 |
+
* Fix: Fixed some options and tables not being removed from the WordPress database on uninstall.
|
272 |
+
* Fix: Locations of feeds sorted by source would not work if the source ID was not a number.
|
273 |
+
* Fix: Fixed PHP warnings when viewing dashboard notifications.
|
274 |
+
* Fix: Fixed locale setting causing a PHP warning if not set.
|
275 |
+
|
276 |
= 4.0 =
|
277 |
* Important: Minimum supported WordPress version has been raised from 3.0 to 4.1.
|
278 |
* 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 Facebook feeds.
|
admin/assets/img/post-style.png
DELETED
Binary file
|
admin/assets/js/oembeds.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
var oembeds_data = {
|
|
|
2 |
genericText: cff_oembeds.genericText,
|
3 |
images: cff_oembeds.images,
|
4 |
modal: cff_oembeds.modal,
|
@@ -95,6 +96,7 @@ var cffoEmbeds = new Vue({
|
|
95 |
this.fboEmbedLoader = true;
|
96 |
let data = new FormData();
|
97 |
data.append( 'action', 'disable_facebook_oembed' );
|
|
|
98 |
fetch(cff_oembeds.ajax_handler, {
|
99 |
method: "POST",
|
100 |
credentials: 'same-origin',
|
@@ -115,6 +117,7 @@ var cffoEmbeds = new Vue({
|
|
115 |
this.instaoEmbedLoader = true;
|
116 |
let data = new FormData();
|
117 |
data.append( 'action', 'disable_instagram_oembed' );
|
|
|
118 |
fetch(cff_oembeds.ajax_handler, {
|
119 |
method: "POST",
|
120 |
credentials: 'same-origin',
|
1 |
var oembeds_data = {
|
2 |
+
nonce: cff_oembeds.nonce,
|
3 |
genericText: cff_oembeds.genericText,
|
4 |
images: cff_oembeds.images,
|
5 |
modal: cff_oembeds.modal,
|
96 |
this.fboEmbedLoader = true;
|
97 |
let data = new FormData();
|
98 |
data.append( 'action', 'disable_facebook_oembed' );
|
99 |
+
data.append( 'nonce', this.nonce );
|
100 |
fetch(cff_oembeds.ajax_handler, {
|
101 |
method: "POST",
|
102 |
credentials: 'same-origin',
|
117 |
this.instaoEmbedLoader = true;
|
118 |
let data = new FormData();
|
119 |
data.append( 'action', 'disable_instagram_oembed' );
|
120 |
+
data.append( 'nonce', this.nonce );
|
121 |
fetch(cff_oembeds.ajax_handler, {
|
122 |
method: "POST",
|
123 |
credentials: 'same-origin',
|
admin/assets/js/settings.js
CHANGED
@@ -236,6 +236,7 @@ var cffSettings = new Vue({
|
|
236 |
let data = new FormData();
|
237 |
data.append( 'action', 'cff_activate_license' );
|
238 |
data.append( 'license_key', this.licenseKey );
|
|
|
239 |
fetch(this.ajaxHandler, {
|
240 |
method: "POST",
|
241 |
credentials: 'same-origin',
|
@@ -305,6 +306,7 @@ var cffSettings = new Vue({
|
|
305 |
this.pressedBtnName = 'cff';
|
306 |
let data = new FormData();
|
307 |
data.append( 'action', 'cff_deactivate_license' );
|
|
|
308 |
fetch(this.ajaxHandler, {
|
309 |
method: "POST",
|
310 |
credentials: 'same-origin',
|
@@ -343,6 +345,7 @@ var cffSettings = new Vue({
|
|
343 |
data.append( 'license_key', licenseKey );
|
344 |
data.append( 'extension_name', extension.name );
|
345 |
data.append( 'extension_item_name', extension.itemName );
|
|
|
346 |
fetch(this.ajaxHandler, {
|
347 |
method: "POST",
|
348 |
credentials: 'same-origin',
|
@@ -410,6 +413,7 @@ var cffSettings = new Vue({
|
|
410 |
data.append( 'action', 'cff_deactivate_extension_license' );
|
411 |
data.append( 'extension_name', extension.name );
|
412 |
data.append( 'extension_item_name', extension.itemName );
|
|
|
413 |
fetch(this.ajaxHandler, {
|
414 |
method: "POST",
|
415 |
credentials: 'same-origin',
|
@@ -442,6 +446,7 @@ var cffSettings = new Vue({
|
|
442 |
this.testConnectionStatus = 'loading';
|
443 |
let data = new FormData();
|
444 |
data.append( 'action', 'cff_test_connection' );
|
|
|
445 |
fetch(this.ajaxHandler, {
|
446 |
method: "POST",
|
447 |
credentials: 'same-origin',
|
@@ -479,6 +484,7 @@ var cffSettings = new Vue({
|
|
479 |
let file = this.$refs.file.files[0];
|
480 |
let data = new FormData();
|
481 |
data.append( 'action', 'cff_import_settings_json' );
|
|
|
482 |
data.append( 'file', file );
|
483 |
fetch(this.ajaxHandler, {
|
484 |
method: "POST",
|
@@ -522,6 +528,7 @@ var cffSettings = new Vue({
|
|
522 |
this.btnStatus = 'loading';
|
523 |
let data = new FormData();
|
524 |
data.append( 'action', 'cff_save_settings' );
|
|
|
525 |
data.append( 'model', JSON.stringify( this.model ) );
|
526 |
data.append( 'cff_license_key', this.licenseKey );
|
527 |
data.append( 'extensions_license_key', JSON.stringify( this.extensionsLicenseKey ) );
|
@@ -549,6 +556,7 @@ var cffSettings = new Vue({
|
|
549 |
let data = new FormData();
|
550 |
data.append( 'action', 'cff_clear_cache' );
|
551 |
data.append( 'model', JSON.stringify( this.model ) );
|
|
|
552 |
fetch(this.ajaxHandler, {
|
553 |
method: "POST",
|
554 |
credentials: 'same-origin',
|
@@ -584,6 +592,7 @@ var cffSettings = new Vue({
|
|
584 |
this.optimizeCacheStatus = 'loading';
|
585 |
let data = new FormData();
|
586 |
data.append( 'action', 'cff_clear_image_resize_cache' );
|
|
|
587 |
fetch(this.ajaxHandler, {
|
588 |
method: "POST",
|
589 |
credentials: 'same-origin',
|
@@ -672,6 +681,7 @@ var cffSettings = new Vue({
|
|
672 |
var self = this;
|
673 |
let data = new FormData();
|
674 |
data.append( 'action', 'cff_feed_saver_manager_delete_source' );
|
|
|
675 |
data.append( 'source_id', sourceToDelete.id);
|
676 |
fetch(self.ajaxHandler, {
|
677 |
method: "POST",
|
236 |
let data = new FormData();
|
237 |
data.append( 'action', 'cff_activate_license' );
|
238 |
data.append( 'license_key', this.licenseKey );
|
239 |
+
data.append( 'nonce', this.nonce );
|
240 |
fetch(this.ajaxHandler, {
|
241 |
method: "POST",
|
242 |
credentials: 'same-origin',
|
306 |
this.pressedBtnName = 'cff';
|
307 |
let data = new FormData();
|
308 |
data.append( 'action', 'cff_deactivate_license' );
|
309 |
+
data.append( 'nonce', this.nonce );
|
310 |
fetch(this.ajaxHandler, {
|
311 |
method: "POST",
|
312 |
credentials: 'same-origin',
|
345 |
data.append( 'license_key', licenseKey );
|
346 |
data.append( 'extension_name', extension.name );
|
347 |
data.append( 'extension_item_name', extension.itemName );
|
348 |
+
data.append( 'nonce', this.nonce );
|
349 |
fetch(this.ajaxHandler, {
|
350 |
method: "POST",
|
351 |
credentials: 'same-origin',
|
413 |
data.append( 'action', 'cff_deactivate_extension_license' );
|
414 |
data.append( 'extension_name', extension.name );
|
415 |
data.append( 'extension_item_name', extension.itemName );
|
416 |
+
data.append( 'nonce', this.nonce );
|
417 |
fetch(this.ajaxHandler, {
|
418 |
method: "POST",
|
419 |
credentials: 'same-origin',
|
446 |
this.testConnectionStatus = 'loading';
|
447 |
let data = new FormData();
|
448 |
data.append( 'action', 'cff_test_connection' );
|
449 |
+
data.append( 'nonce', this.nonce );
|
450 |
fetch(this.ajaxHandler, {
|
451 |
method: "POST",
|
452 |
credentials: 'same-origin',
|
484 |
let file = this.$refs.file.files[0];
|
485 |
let data = new FormData();
|
486 |
data.append( 'action', 'cff_import_settings_json' );
|
487 |
+
data.append( 'nonce', this.nonce );
|
488 |
data.append( 'file', file );
|
489 |
fetch(this.ajaxHandler, {
|
490 |
method: "POST",
|
528 |
this.btnStatus = 'loading';
|
529 |
let data = new FormData();
|
530 |
data.append( 'action', 'cff_save_settings' );
|
531 |
+
data.append( 'nonce', this.nonce );
|
532 |
data.append( 'model', JSON.stringify( this.model ) );
|
533 |
data.append( 'cff_license_key', this.licenseKey );
|
534 |
data.append( 'extensions_license_key', JSON.stringify( this.extensionsLicenseKey ) );
|
556 |
let data = new FormData();
|
557 |
data.append( 'action', 'cff_clear_cache' );
|
558 |
data.append( 'model', JSON.stringify( this.model ) );
|
559 |
+
data.append( 'nonce', this.nonce );
|
560 |
fetch(this.ajaxHandler, {
|
561 |
method: "POST",
|
562 |
credentials: 'same-origin',
|
592 |
this.optimizeCacheStatus = 'loading';
|
593 |
let data = new FormData();
|
594 |
data.append( 'action', 'cff_clear_image_resize_cache' );
|
595 |
+
data.append( 'nonce', this.nonce );
|
596 |
fetch(this.ajaxHandler, {
|
597 |
method: "POST",
|
598 |
credentials: 'same-origin',
|
681 |
var self = this;
|
682 |
let data = new FormData();
|
683 |
data.append( 'action', 'cff_feed_saver_manager_delete_source' );
|
684 |
+
data.append( 'nonce', this.nonce );
|
685 |
data.append( 'source_id', sourceToDelete.id);
|
686 |
fetch(self.ajaxHandler, {
|
687 |
method: "POST",
|
admin/builder/assets/css/global.css
CHANGED
@@ -791,7 +791,11 @@
|
|
791 |
font-weight: 500;
|
792 |
color: #777;
|
793 |
}
|
794 |
-
|
|
|
|
|
|
|
|
|
795 |
.cff-fb-srcs-item-type{
|
796 |
color: #434960;
|
797 |
font-weight: 600;
|
@@ -2377,6 +2381,7 @@
|
|
2377 |
}
|
2378 |
.cff-fb-extensions-pp-ctn.cff-fb-center-boss .cff-fb-popup-inside{
|
2379 |
top: 50px;
|
|
|
2380 |
}
|
2381 |
.cff-extension-bullet-list {
|
2382 |
grid-template-columns: 100%;
|
791 |
font-weight: 500;
|
792 |
color: #777;
|
793 |
}
|
794 |
+
.cff-fb-source-list .cff-fb-srcs-item-name .sb-bold {
|
795 |
+
line-height: 1.1;
|
796 |
+
display: block;
|
797 |
+
padding-bottom: 5px;
|
798 |
+
}
|
799 |
.cff-fb-srcs-item-type{
|
800 |
color: #434960;
|
801 |
font-weight: 600;
|
2381 |
}
|
2382 |
.cff-fb-extensions-pp-ctn.cff-fb-center-boss .cff-fb-popup-inside{
|
2383 |
top: 50px;
|
2384 |
+
left: 0;
|
2385 |
}
|
2386 |
.cff-extension-bullet-list {
|
2387 |
grid-template-columns: 100%;
|
assets/js/cff-scripts.js
CHANGED
@@ -421,7 +421,7 @@ if(!cff_js_exists){
|
|
421 |
consentGiven = (val === 'true');
|
422 |
}
|
423 |
} else if (typeof window.cookieconsent !== 'undefined') { // Complianz by Really Simple Plugins
|
424 |
-
consentGiven = cffCmplzGetCookie('
|
425 |
} else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
|
426 |
consentGiven = Cookiebot.consented;
|
427 |
} else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
|
@@ -553,17 +553,21 @@ if(!cff_js_exists){
|
|
553 |
});
|
554 |
|
555 |
// Complianz by Really Simple Plugins
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
|
|
|
|
560 |
});
|
561 |
|
562 |
// Complianz by Really Simple Plugins
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
|
|
|
|
567 |
});
|
568 |
|
569 |
// Borlabs Cookie by Borlabs
|
421 |
consentGiven = (val === 'true');
|
422 |
}
|
423 |
} else if (typeof window.cookieconsent !== 'undefined') { // Complianz by Really Simple Plugins
|
424 |
+
consentGiven = cffCmplzGetCookie('cmplz_consent_status') === 'allow';
|
425 |
} else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
|
426 |
consentGiven = Cookiebot.consented;
|
427 |
} else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
|
553 |
});
|
554 |
|
555 |
// Complianz by Really Simple Plugins
|
556 |
+
$(document).on('cmplzEnableScripts', function (event) {
|
557 |
+
if ( event.detail === 'marketing' ) {
|
558 |
+
jQuery('.cff-wrapper').each(function (index) {
|
559 |
+
afterConsentToggled(true, jQuery(this));
|
560 |
+
});
|
561 |
+
}
|
562 |
});
|
563 |
|
564 |
// Complianz by Really Simple Plugins
|
565 |
+
$(document).on('cmplzFireCategories', function (event) {
|
566 |
+
if ( event.detail.category === 'marketing' ) {
|
567 |
+
jQuery('.cff-wrapper').each(function (index) {
|
568 |
+
afterConsentToggled(false, jQuery(this));
|
569 |
+
});
|
570 |
+
}
|
571 |
});
|
572 |
|
573 |
// Borlabs Cookie by Borlabs
|
assets/js/cff-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var cff_js_exists=void 0!==cff_js_exists;if(!cff_js_exists){if(jQuery("#cff.cff-masonry-js").length){function cffAddMasonry(t){var e=jQuery.Event("cffbeforemasonry");if(e.$self=t,jQuery(window).trigger(e),"function"==typeof t.masonry){var i=jQuery(window).width(),n=!1;if(i>800?t.hasClass("masonry-1-desktop")?t.addClass("cff-disable-masonry"):(n=!0,t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry")):i>480?t.hasClass("masonry-2-tablet")||t.hasClass("masonry-3-tablet")||t.hasClass("masonry-4-tablet")||t.hasClass("masonry-5-tablet")||t.hasClass("masonry-6-tablet")?(n=!0,t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry")):t.addClass("cff-disable-masonry"):t.hasClass("masonry-2-mobile")||t.hasClass("masonry-3-mobile")?(n=!0,t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry")):t.addClass("cff-disable-masonry"),n&&t.find(".cff-item").length){t.masonry({itemSelector:".cff-new, .cff-item, .cff-likebox"}),t.find(".cff-item").each(function(){jQuery(this).css("margin-bottom","15px")})}}}!function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(e,i){t.fn[e]=function(o){if("string"==typeof o){for(var u=n.call(arguments,1),s=0,a=this.length;a>s;s++){var f=this[s],c=t.data(f,e);if(c)if(t.isFunction(c[o])&&"_"!==o.charAt(0)){var h=c[o].apply(c,u);if(void 0!==h)return h}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; attempted to call '"+o+"'")}return this}return this.each(function(){var n=t.data(this,e);n?(n.option(o),n._init()):(n=new i(this,o),t.data(this,e,n))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),o(t,e)},t.bridget}}var n=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i("object"==typeof exports?require("jquery"):t.jQuery)}(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,n=function(){};i.addEventListener?n=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(n=function(t,i,n){t[i+n]=n.handleEvent?function(){var i=e(t);n.handleEvent.call(n,i)}:function(){var i=e(t);n.call(t,i)},t.attachEvent("on"+i,t[i+n])});var o=function(){};i.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(o=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var r={bind:n,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype,o=this,r=o.EventEmitter;n.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},n.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},n.addListener=function(t,i){var n,o=this.getListenersAsObject(t),r="object"==typeof i;for(n in o)o.hasOwnProperty(n)&&-1===e(o[n],i)&&o[n].push(r?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,i){var n,o,r=this.getListenersAsObject(t);for(o in r)r.hasOwnProperty(o)&&(-1!==(n=e(r[o],i))&&r[o].splice(n,1));return this},n.off=i("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,u=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):u.call(this,n,o));return this},n.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(t,e){var i,n,o,r=this.getListenersAsObject(t);for(o in r)if(r.hasOwnProperty(o))for(n=r[o].length;n--;)!0===(i=r[o][n]).once&&this.removeListener(t,i.listener),i.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return o.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:o.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof n[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,o=0,r=i.length;r>o;o++)if(e=i[o]+t,"string"==typeof n[e])return e}}var i="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t);return-1===t.indexOf("%")&&!isNaN(e)&&e}function i(i){function r(){if(!c){c=!0;var o=t.getComputedStyle;if(s=function(){var t=o?function(t){return o(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||n("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),i}}(),a=i("boxSizing")){var r=document.createElement("div");r.style.width="200px",r.style.padding="1px 2px 3px 4px",r.style.borderStyle="solid",r.style.borderWidth="1px 2px 3px 4px",r.style[a]="border-box";var u=document.body||document.documentElement;u.appendChild(r);var h=s(r);f=200===e(h.width),u.removeChild(r)}}}function u(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var n=e.style,o=n.left,r=e.runtimeStyle,u=r&&r.left;return u&&(r.left=e.currentStyle.left),n.left=i,i=n.pixelLeft,n.left=o,u&&(r.left=u),i}var s,a,f,c=!1;return function(t){if(r(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var i=s(t);if("none"===i.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=o.length;i>e;e++)t[o[e]]=0;return t}();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var c=n.isBorderBox=!(!a||!i[a]||"border-box"!==i[a]),h=0,d=o.length;d>h;h++){var l=o[h],p=i[l];p=u(t,p);var m=parseFloat(p);n[l]=isNaN(m)?0:m}var y=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,A=n.marginTop+n.marginBottom,C=n.borderLeftWidth+n.borderRightWidth,F=n.borderTopWidth+n.borderBottomWidth,E=c&&f,B=e(i.width);!1!==B&&(n.width=B+(E?0:y+C));var b=e(i.height);return!1!==b&&(n.height=b+(E?0:g+F)),n.innerWidth=n.width-(y+C),n.innerHeight=n.height-(g+F),n.outerWidth=n.width+v,n.outerHeight=n.height+A,n}}}var n="undefined"==typeof console?function(){}:function(t){console.error(t)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],i):"object"==typeof exports?module.exports=i(require("desandro-get-style-property")):t.getSize=i(t.getStyleProperty)}(window),function(t){function e(t){"function"==typeof t&&(e.isReady?t():u.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||n()}function n(){e.isReady=!0;for(var t=0,i=u.length;i>t;t++){(0,u[t])()}}function o(o){return"complete"===r.readyState?n():(o.bind(r,"DOMContentLoaded",i),o.bind(r,"readystatechange",i),o.bind(t,"load",i)),e}var r=t.document,u=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],o):"object"==typeof exports?module.exports=o(require("eventie")):t.docReady=o(t.eventie)}(window),function(t){function e(t,e){return t[o](e)}function i(t){t.parentNode||document.createDocumentFragment().appendChild(t)}var n,o=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,n=e.length;n>i;i++){var o=e[i]+"MatchesSelector";if(t[o])return o}}();if(o){var r=e(document.createElement("div"),"div");n=r?e:function(t,n){return i(t),e(t,n)}}else n=function(t,e){i(t);for(var n=t.parentNode.querySelectorAll(e),o=0,r=n.length;r>o;o++)if(n[o]===t)return!0;return!1};"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return n}):"object"==typeof exports?module.exports=n:window.matchesSelector=n}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,i){var n={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},o=Object.prototype.toString;n.isArray=function(t){return"[object Array]"==o.call(t)},n.makeArray=function(t){var e=[];if(n.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,o=t.length;o>i;i++)e.push(t[i]);else e.push(t);return e},n.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},n.removeFrom=function(t,e){var i=n.indexOf(t,e);-1!=i&&t.splice(i,1)},n.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},n.setText=function(){var t;return function(e,i){e[t=t||(void 0!==document.documentElement.textContent?"textContent":"innerText")]=i}}(),n.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,i(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,e){for(var o=[],r=0,u=(t=n.makeArray(t)).length;u>r;r++){var s=t[r];if(n.isElement(s))if(e){i(s,e)&&o.push(s);for(var a=s.querySelectorAll(e),f=0,c=a.length;c>f;f++)o.push(a[f])}else o.push(s)}return o},n.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return n.htmlInit=function(i,o){e(function(){for(var e=n.toDashed(o),u=document.querySelectorAll(".js-"+e),s="data-"+e+"-options",a=0,f=u.length;f>a;a++){var c,h=u[a],d=h.getAttribute(s);try{c=d&&JSON.parse(d)}catch(t){r&&r.error("Error parsing "+s+" on "+h.nodeName.toLowerCase()+(h.id?"#"+h.id:"")+": "+t);continue}var l=new i(h,c),p=t.jQuery;p&&p.data(h,o,l)}})},n}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Outlayer={},t.Outlayer.Item=e(t,t.EventEmitter,t.getSize,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,i,n,o){function r(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=t.getComputedStyle,s=u?function(t){return u(t,null)}:function(t){return t.currentStyle},a=n("transition"),f=n("transform"),c=a&&f,h=!!n("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[a],l=["transform","transition","transitionDuration","transitionProperty"],p=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],r=n(o);r&&r!==o&&(t[o]=r)}return t}();o.extend(r.prototype,e.prototype),r.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.getSize=function(){this.size=i(this.element)},r.prototype.css=function(t){var e=this.element.style;for(var i in t){e[p[i]||i]=t[i]}},r.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,n=e.isOriginTop,o=parseInt(t[i?"left":"right"],10),r=parseInt(t[n?"top":"bottom"],10);o=isNaN(o)?0:o,r=isNaN(r)?0:r;var u=this.layout.size;o-=i?u.paddingLeft:u.paddingRight,r-=n?u.paddingTop:u.paddingBottom,this.position.x=o,this.position.y=r},r.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={},n=e.isOriginLeft?"paddingLeft":"paddingRight",o=e.isOriginLeft?"left":"right",r=e.isOriginLeft?"right":"left",u=this.position.x+t[n];u=e.percentPosition&&!e.isHorizontal?u/t.width*100+"%":u+"px",i[o]=u,i[r]="";var s=e.isOriginTop?"paddingTop":"paddingBottom",a=e.isOriginTop?"top":"bottom",f=e.isOriginTop?"bottom":"top",c=this.position.y+t[s];c=e.percentPosition&&e.isHorizontal?c/t.height*100+"%":c+"px",i[a]=c,i[f]="",this.css(i),this.emitEvent("layout",[this])};var m=h?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};r.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),u=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),!u||this.isTransitioning){var s=t-i,a=e-n,f={},c=this.layout.options;s=c.isOriginLeft?s:-s,a=c.isOriginTop?a:-a,f.transform=m(s,a),this.transition({to:f,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},r.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},r.prototype.moveTo=c?r.prototype._transitionTo:r.prototype.goTo,r.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},r.prototype._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},r.prototype._transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);this.element.offsetHeight;null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var y=f&&o.toDashed(f)+",opacity";r.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:y,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},r.prototype.transition=r.prototype[a?"_transition":"_nonTransition"],r.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},r.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};r.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd)e.onEnd[i].call(this),delete e.onEnd[i];this.emitEvent("transitionEnd",[this])}},r.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},r.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return r.prototype.removeTransitionStyles=function(){this.css(v)},r.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},r.prototype.remove=function(){if(a&&parseFloat(this.layout.options.transitionDuration)){var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()}else this.removeElem()},r.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},r.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},r.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},r.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},r.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},r.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},r}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r,u){return e(t,i,n,o,r,u)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.eventie,t.EventEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o,r){function u(t,e){var i=o.getQueryElement(t);if(i){this.element=i,a&&(this.$element=a(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++c;this.element.outlayerGUID=n,h[n]=this,this._create(),this.options.isInitLayout&&this.layout()}else s&&s.error("Bad element for "+this.constructor.namespace+": "+(i||t))}var s=t.console,a=t.jQuery,f=function(){},c=0,h={};return u.namespace="outlayer",u.Item=r,u.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},o.extend(u.prototype,i.prototype),u.prototype.option=function(t){o.extend(this.options,t)},u.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},u.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},u.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0,r=e.length;r>o;o++){var u=new i(e[o],this);n.push(u)}return n},u.prototype._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},u.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},u.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},u.prototype._init=u.prototype.layout,u.prototype._resetLayout=function(){this.getSize()},u.prototype.getSize=function(){this.size=n(this.element)},u.prototype._getMeasurement=function(t,e){var i,r=this.options[t];r?("string"==typeof r?i=this.element.querySelector(r):o.isElement(r)&&(i=r),this[t]=i?n(i)[e]:r):this[t]=0},u.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},u.prototype._getItemsForLayout=function(t){for(var e=[],i=0,n=t.length;n>i;i++){var o=t[i];o.isIgnored||e.push(o)}return e},u.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var i=[],n=0,o=t.length;o>n;n++){var r=t[n],u=this._getItemLayoutPosition(r);u.item=r,u.isInstant=e||r.isLayoutInstant,i.push(u)}this._processLayoutQueue(i)}},u.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},u.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var n=t[e];this._positionItem(n.item,n.x,n.y,n.isInstant)}},u.prototype._positionItem=function(t,e,i,n){n?t.goTo(e,i):t.moveTo(e,i)},u.prototype._postLayout=function(){this.resizeContainer()},u.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},u.prototype._getContainerSize=f,u.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},u.prototype._emitCompleteOnItems=function(t,e){function i(){o.emitEvent(t+"Complete",[e])}function n(){++u===r&&i()}var o=this,r=e.length;if(e&&r)for(var u=0,s=0,a=e.length;a>s;s++){e[s].once(t,n)}else i()},u.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},u.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},u.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var n=t[e];this.ignore(n)}}},u.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var n=t[e];o.removeFrom(this.stamps,n),this.unignore(n)}},u.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)):void 0},u.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},u.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},u.prototype._manageStamp=f,u.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=n(t);return{left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom}},u.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},u.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},u.prototype.onresize=function(){this.resizeTimeout&&clearTimeout(this.resizeTimeout);var t=this;this.resizeTimeout=setTimeout(function(){t.resize(),delete t.resizeTimeout},100)},u.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},u.prototype.needsResizeLayout=function(){var t=n(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},u.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},u.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},u.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},u.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&e>i;i++){t[i].reveal()}},u.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&e>i;i++){t[i].hide()}},u.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},u.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},u.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e];if(n.element===t)return n}},u.prototype.getItems=function(t){for(var e=[],i=0,n=(t=o.makeArray(t)).length;n>i;i++){var r=t[i],u=this.getItem(r);u&&e.push(u)}return e},u.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var i=0,n=e.length;n>i;i++){var r=e[i];r.remove(),o.removeFrom(this.items,r)}},u.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){this.items[e].destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete h[n],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},u.data=function(t){var e=(t=o.getQueryElement(t))&&t.outlayerGUID;return e&&h[e]},u.create=function(t,e){function i(){u.apply(this,arguments)}return Object.create?i.prototype=Object.create(u.prototype):o.extend(i.prototype,u.prototype),i.prototype.constructor=i,i.defaults=o.extend({},u.defaults),o.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=u.data,i.Item=function(){r.apply(this,arguments)},i.Item.prototype=new r,o.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i},u.Item=r,u}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):t.Masonry=e(t.Outlayer,t.getSize,t.fizzyUIUtils)}(window,function(t,e,i){var n=t.create("masonry");return n.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},n.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,u=n-o%n;r=Math[u&&1>u?"round":"floor"](r),this.cols=Math.max(r,1)},n.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},n.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,n=Math[e&&1>e?"round":"ceil"](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),r=Math.min.apply(Math,o),u=i.indexOf(o,r),s={x:this.columnWidth*u,y:r},a=r+t.size.outerHeight,f=this.cols+1-o.length,c=0;f>c;c++)this.colYs[u+c]=a;return s},n.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},n.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this.options.isOriginLeft?n.left:n.right,r=o+i.outerWidth,u=Math.floor(o/this.columnWidth);u=Math.max(0,u);var s=Math.floor(r/this.columnWidth);s-=r%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var a=(this.options.isOriginTop?n.top:n.bottom)+i.outerHeight,f=u;s>=f;f++)this.colYs[f]=Math.max(a,this.colYs[f])},n.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},n.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},n})}function cff_init(){function t(){jQuery(".cff-visual-header.cff-has-cover").each(function(){var t=jQuery(this).find(".cff-header-hero").innerHeight(),e=jQuery(this).find(".cff-header-hero img").innerHeight(),i=jQuery(this).find(".cff-header-hero").innerWidth(),n=jQuery(this).find(".cff-header-hero img").innerWidth()/e,o=i/t<n?t*n+"px":"100%",r=e-t,u=Math.max(0,Math.round(r/2)),s="100%"!==o?Math.max(0,Math.round((t*n-i)/2)):0;jQuery(this).find(".cff-header-hero img").css({opacity:1,display:"block",visibility:"visible","max-width":"none","max-height":"none","margin-top":-u+"px","margin-left":-s+"px",width:o})})}jQuery("#cff .cff-item").each(function(){var t=jQuery(this);t.find(".cff-viewpost-facebook").parent("p").length&&t.find(".cff-viewpost-facebook").unwrap("p"),t.find(".cff-author").parent("p").length&&(t.find(".cff-author").eq(1).unwrap("p"),t.find(".cff-author").eq(1).remove()),t.find("#cff .cff-link").parent("p").length&&t.find("#cff .cff-link").unwrap("p");var e=!1,i=t.find(".cff-post-text .cff-text"),n=t.closest("#cff").attr("data-char");void 0!==n&&""!=n||(n=99999);var o=i.html();null==o&&(o="");var r=new RegExp(/(<[^>]*>)/g),u=0;full_text_arr=o.split(r);for(var s=0,a=full_text_arr.length;s<a;s++)if(!r.test(full_text_arr[s])){if(u==n){full_text_arr.splice(s,1);continue}if((u+=full_text_arr[s].length)>n){var f=u-n;full_text_arr[s]=full_text_arr[s].slice(0,-f),u=n,o.length>n&&t.find(".cff-expand").show()}}var c=full_text_arr.join("");function h(){var e=t.find(".cff-text").html(),i=t.find(".cff-post-desc").html(),n=/(^|\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,o=t.find(".cff-text").attr("data-color");function r(t){var e=jQuery.trim(t);return/^#[0-9A-F]{6}$/i.test(e)?e:' <a href="https://www.facebook.com/hashtag/'+e.substring(1)+'" target="_blank" rel="nofollow" style="color:#'+o+'">'+e+"</a>"}if("undefined"==typeof cfflinkhashtags&&(cfflinkhashtags="true"),"true"==cfflinkhashtags){var u=t.find(".cff-text");u.length>0&&0==u.find(".cff-post-text-link").length&&(e=e.replace(/<br>/g,"<br> "),u.html(e.replace(n,r)))}t.find(".cff-post-desc").length>0&&t.find(".cff-post-desc").html(i.replace(n,r))}"<"==(c=c.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g,"")).substr(c.length-1)&&(c=c.substring(0,c.length-1)),c=(c=c.replace(/(<br>\s*)+$/,"")).replace(/(<img class="cff-linebreak">\s*)+$/,""),i.html(c),t.find(".cff-expand").on("click",function(n){n.preventDefault();var r=jQuery(this),u=r.find(".cff-more"),s=r.find(".cff-less");0==e?(i.html(o),e=!0,u.hide(),s.show()):(i.html(c),e=!1,u.show(),s.hide()),h(),i.find("a").attr("target","_blank"),t.closest(".cff").hasClass("cff-masonry-js")&&!t.closest(".cff").hasClass("cff-masonry-css")&&cffAddMasonry(t.closest(".cff"))}),i.find("a").add(t.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow"}),$sharedLink=t.find(".cff-shared-link"),""==$sharedLink.text()&&$sharedLink.remove(),h(),t.find(".cff-text a").add(t.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow noopener noreferrer"}),t.find(".cff-share-link").on("click",function(e){e.preventDefault();var i=t.find(".cff-share-tooltip");if(i.is(":visible"))i.hide().find("a").removeClass("cff-show");else{i.show();var n=0;i.find("a").each(function(){var t=jQuery(this);setTimeout(function(){t.addClass("cff-show")},n),n+=20})}})}),jQuery(".cff-wrapper").each(function(){var t=jQuery(this).find("#cff"),e=jQuery(this);if(setTimeout(function(){checkConsent(e)?addFullFeatures(e):(jQuery(".cff-gdpr-notice").css({display:"inline-block"}),e.find(".cff-visual-header").length&&e.find(".cff-header-text").closest(".cff-visual-header").addClass("cff-no-consent"))},250),void 0!==t.attr("data-nummobile")){var i=void 0!==t.attr("data-pag-num")&&""!==t.attr("data-pag-num")?parseInt(t.attr("data-pag-num")):1,n=void 0!==t.attr("data-nummobile")&&""!==t.attr("data-nummobile")?parseInt(t.attr("data-nummobile")):i,o=t.find(".cff-item").length?".cff-item":".cff-album-item";jQuery(window).width()<480?n<t.find(o).length&&t.find(o).slice(n-t.find(o).length).addClass("cff-num-diff-hide"):i<t.find(o).length&&t.find(o).slice(i-t.find(o).length).addClass("cff-num-diff-hide"),t.removeAttr("data-nummobile")}t.hasClass("cff-masonry-js")&&(cffAddMasonry(t),setTimeout(function(){cffAddMasonry(t)},500),jQuery(window).on("resize",function(){setTimeout(function(){cffAddMasonry(t)},500)}),t.find(".cff-credit").length&&t.css("padding-bottom",30))}),setTimeout(t,200),jQuery(window).on("resize",function(){setTimeout(function(){t()},500)})}function checkConsent(t){var e=void 0!==(t=t.find(".cff-list-container")).attr("data-cff-flags")?t.attr("data-cff-flags").split(","):[],i=e.indexOf("gdpr")>-1,n=(e.indexOf("overrideBlockCDN"),!1);if(n||!i)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(n="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(n="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var o=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===o.length)n="true"===o.pop().split(";").shift()}else void 0!==window.cookieconsent?n="allow"===cffCmplzGetCookie("complianz_consent_status"):void 0!==window.Cookiebot?n=Cookiebot.consented:void 0!==window.BorlabsCookie&&(n=window.BorlabsCookie.checkCookieConsent("facebook"));return n}function cffCmplzGetCookie(t){for(var e=t+"=",i=window.document.cookie.split(";"),n=0;n<i.length;n++){var o=i[n].trim();if(0==o.indexOf(e))return o.substring(e.length,o.length)}return""}function addFullFeatures(t){t=jQuery(t),jQuery(".cff-gdpr-notice").remove(),t.find(".cff-author-img").each(function(){jQuery(this).find("img").attr("src",jQuery(this).attr("data-avatar")),jQuery(this).removeClass("cff-no-consent")}),t.find(".cff-likebox iframe").each(function(){var t=jQuery(this),e=t.attr("data-likebox-width"),i=t.parent().width();""==e&&(e=340),i<e&&(e=i),t.attr("src","https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F"+t.attr("data-likebox-id")+"%2F&tabs&width="+Math.floor(e)+"&small_header="+t.attr("data-likebox-header")+"&adapt_container_width=true&hide_cover="+t.attr("data-hide-cover")+"&hide_cta="+t.attr("data-hide-cta")+"&show_facepile="+t.attr("data-likebox-faces")+"&locale="+t.attr("data-locale"))}),jQuery(".cff-visual-header").length&&jQuery(".cff-visual-header").each(function(){jQuery(this).removeClass("cff-no-consent"),jQuery(this).find(".cff-header-hero").length&&jQuery(this).find(".cff-header-hero").find("img").attr("src",jQuery(this).find(".cff-header-hero").find("img").attr("data-cover-url")),jQuery(this).find(".cff-header-img").length&&jQuery(this).find(".cff-header-img").find("img").attr("src",jQuery(this).find(".cff-header-img").find("img").attr("data-avatar"))})}function afterConsentToggled(t,e){t&&addFullFeatures(e)}function cffGetFeedLocatorDataArray(){var t=[];return jQuery(".cff-list-container").each(function(){$cffPagUrl=jQuery(this).find(".cff-pag-url");var e={feedID:$cffPagUrl.attr("data-feed-id"),postID:$cffPagUrl.attr("data-post-id"),shortCodeAtts:""==jQuery.trim($cffPagUrl.attr("data-cff-shortcode"))?null:JSON.parse($cffPagUrl.attr("data-cff-shortcode")),location:locationGuess(jQuery(this))};t.push(e)}),t}function locationGuess(t=!1){var e=0==t?jQuery(this.el):t,i="content";return e.closest("footer").length?i="footer":e.closest(".header").length||e.closest("header").length?i="header":(e.closest(".sidebar").length||e.closest("aside").length)&&(i="sidebar"),i}cff_init(),jQuery(document).ready(function(){var t=jQuery;if(t("#cookie-notice a").on("click",function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(checkConsent(jQuery(this)),jQuery(this))})},1e3)}),t("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(checkConsent(jQuery(this)),jQuery(this))})},1e3)}),t(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!1,jQuery(this))})},1e3)}),t(window).on("CookiebotOnAccept",function(t){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!0,jQuery(this))})}),t(document).on("cmplzAcceptAll",function(t){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!0,jQuery(this))})}),t(document).on("cmplzRevoke",function(t){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!1,jQuery(this))})}),t(document).on("borlabs-cookie-consent-saved",function(t){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!0,jQuery(this))})}),t(".cff-list-container").length){var e=cffGetFeedLocatorDataArray();t.ajax({url:cffajaxurl,type:"POST",data:{action:"feed_locator",feedLocatorData:e}})}})}
|
1 |
+
var cff_js_exists=void 0!==cff_js_exists;if(!cff_js_exists){if(jQuery("#cff.cff-masonry-js").length){function cffAddMasonry(t){var e=jQuery.Event("cffbeforemasonry");if(e.$self=t,jQuery(window).trigger(e),"function"==typeof t.masonry){var i=jQuery(window).width(),n=!1;if(i>800?t.hasClass("masonry-1-desktop")?t.addClass("cff-disable-masonry"):(n=!0,t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry")):i>480?t.hasClass("masonry-2-tablet")||t.hasClass("masonry-3-tablet")||t.hasClass("masonry-4-tablet")||t.hasClass("masonry-5-tablet")||t.hasClass("masonry-6-tablet")?(n=!0,t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry")):t.addClass("cff-disable-masonry"):t.hasClass("masonry-2-mobile")||t.hasClass("masonry-3-mobile")?(n=!0,t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry")):t.addClass("cff-disable-masonry"),n&&t.find(".cff-item").length){t.masonry({itemSelector:".cff-new, .cff-item, .cff-likebox"}),t.find(".cff-item").each(function(){jQuery(this).css("margin-bottom","15px")})}}}!function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(e,i){t.fn[e]=function(o){if("string"==typeof o){for(var u=n.call(arguments,1),s=0,a=this.length;a>s;s++){var f=this[s],c=t.data(f,e);if(c)if(t.isFunction(c[o])&&"_"!==o.charAt(0)){var h=c[o].apply(c,u);if(void 0!==h)return h}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; attempted to call '"+o+"'")}return this}return this.each(function(){var n=t.data(this,e);n?(n.option(o),n._init()):(n=new i(this,o),t.data(this,e,n))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),o(t,e)},t.bridget}}var n=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i("object"==typeof exports?require("jquery"):t.jQuery)}(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,n=function(){};i.addEventListener?n=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(n=function(t,i,n){t[i+n]=n.handleEvent?function(){var i=e(t);n.handleEvent.call(n,i)}:function(){var i=e(t);n.call(t,i)},t.attachEvent("on"+i,t[i+n])});var o=function(){};i.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(o=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var r={bind:n,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype,o=this,r=o.EventEmitter;n.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},n.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},n.addListener=function(t,i){var n,o=this.getListenersAsObject(t),r="object"==typeof i;for(n in o)o.hasOwnProperty(n)&&-1===e(o[n],i)&&o[n].push(r?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,i){var n,o,r=this.getListenersAsObject(t);for(o in r)r.hasOwnProperty(o)&&(-1!==(n=e(r[o],i))&&r[o].splice(n,1));return this},n.off=i("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,u=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):u.call(this,n,o));return this},n.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(t,e){var i,n,o,r=this.getListenersAsObject(t);for(o in r)if(r.hasOwnProperty(o))for(n=r[o].length;n--;)!0===(i=r[o][n]).once&&this.removeListener(t,i.listener),i.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return o.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:o.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof n[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,o=0,r=i.length;r>o;o++)if(e=i[o]+t,"string"==typeof n[e])return e}}var i="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t);return-1===t.indexOf("%")&&!isNaN(e)&&e}function i(i){function r(){if(!c){c=!0;var o=t.getComputedStyle;if(s=function(){var t=o?function(t){return o(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||n("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),i}}(),a=i("boxSizing")){var r=document.createElement("div");r.style.width="200px",r.style.padding="1px 2px 3px 4px",r.style.borderStyle="solid",r.style.borderWidth="1px 2px 3px 4px",r.style[a]="border-box";var u=document.body||document.documentElement;u.appendChild(r);var h=s(r);f=200===e(h.width),u.removeChild(r)}}}function u(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var n=e.style,o=n.left,r=e.runtimeStyle,u=r&&r.left;return u&&(r.left=e.currentStyle.left),n.left=i,i=n.pixelLeft,n.left=o,u&&(r.left=u),i}var s,a,f,c=!1;return function(t){if(r(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var i=s(t);if("none"===i.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=o.length;i>e;e++)t[o[e]]=0;return t}();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var c=n.isBorderBox=!(!a||!i[a]||"border-box"!==i[a]),h=0,d=o.length;d>h;h++){var l=o[h],p=i[l];p=u(t,p);var m=parseFloat(p);n[l]=isNaN(m)?0:m}var y=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,A=n.marginTop+n.marginBottom,C=n.borderLeftWidth+n.borderRightWidth,F=n.borderTopWidth+n.borderBottomWidth,E=c&&f,B=e(i.width);!1!==B&&(n.width=B+(E?0:y+C));var b=e(i.height);return!1!==b&&(n.height=b+(E?0:g+F)),n.innerWidth=n.width-(y+C),n.innerHeight=n.height-(g+F),n.outerWidth=n.width+v,n.outerHeight=n.height+A,n}}}var n="undefined"==typeof console?function(){}:function(t){console.error(t)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],i):"object"==typeof exports?module.exports=i(require("desandro-get-style-property")):t.getSize=i(t.getStyleProperty)}(window),function(t){function e(t){"function"==typeof t&&(e.isReady?t():u.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||n()}function n(){e.isReady=!0;for(var t=0,i=u.length;i>t;t++){(0,u[t])()}}function o(o){return"complete"===r.readyState?n():(o.bind(r,"DOMContentLoaded",i),o.bind(r,"readystatechange",i),o.bind(t,"load",i)),e}var r=t.document,u=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],o):"object"==typeof exports?module.exports=o(require("eventie")):t.docReady=o(t.eventie)}(window),function(t){function e(t,e){return t[o](e)}function i(t){t.parentNode||document.createDocumentFragment().appendChild(t)}var n,o=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,n=e.length;n>i;i++){var o=e[i]+"MatchesSelector";if(t[o])return o}}();if(o){var r=e(document.createElement("div"),"div");n=r?e:function(t,n){return i(t),e(t,n)}}else n=function(t,e){i(t);for(var n=t.parentNode.querySelectorAll(e),o=0,r=n.length;r>o;o++)if(n[o]===t)return!0;return!1};"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return n}):"object"==typeof exports?module.exports=n:window.matchesSelector=n}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,i){var n={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},o=Object.prototype.toString;n.isArray=function(t){return"[object Array]"==o.call(t)},n.makeArray=function(t){var e=[];if(n.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,o=t.length;o>i;i++)e.push(t[i]);else e.push(t);return e},n.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},n.removeFrom=function(t,e){var i=n.indexOf(t,e);-1!=i&&t.splice(i,1)},n.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},n.setText=function(){var t;return function(e,i){e[t=t||(void 0!==document.documentElement.textContent?"textContent":"innerText")]=i}}(),n.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,i(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,e){for(var o=[],r=0,u=(t=n.makeArray(t)).length;u>r;r++){var s=t[r];if(n.isElement(s))if(e){i(s,e)&&o.push(s);for(var a=s.querySelectorAll(e),f=0,c=a.length;c>f;f++)o.push(a[f])}else o.push(s)}return o},n.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return n.htmlInit=function(i,o){e(function(){for(var e=n.toDashed(o),u=document.querySelectorAll(".js-"+e),s="data-"+e+"-options",a=0,f=u.length;f>a;a++){var c,h=u[a],d=h.getAttribute(s);try{c=d&&JSON.parse(d)}catch(t){r&&r.error("Error parsing "+s+" on "+h.nodeName.toLowerCase()+(h.id?"#"+h.id:"")+": "+t);continue}var l=new i(h,c),p=t.jQuery;p&&p.data(h,o,l)}})},n}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Outlayer={},t.Outlayer.Item=e(t,t.EventEmitter,t.getSize,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,i,n,o){function r(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=t.getComputedStyle,s=u?function(t){return u(t,null)}:function(t){return t.currentStyle},a=n("transition"),f=n("transform"),c=a&&f,h=!!n("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[a],l=["transform","transition","transitionDuration","transitionProperty"],p=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],r=n(o);r&&r!==o&&(t[o]=r)}return t}();o.extend(r.prototype,e.prototype),r.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.getSize=function(){this.size=i(this.element)},r.prototype.css=function(t){var e=this.element.style;for(var i in t){e[p[i]||i]=t[i]}},r.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,n=e.isOriginTop,o=parseInt(t[i?"left":"right"],10),r=parseInt(t[n?"top":"bottom"],10);o=isNaN(o)?0:o,r=isNaN(r)?0:r;var u=this.layout.size;o-=i?u.paddingLeft:u.paddingRight,r-=n?u.paddingTop:u.paddingBottom,this.position.x=o,this.position.y=r},r.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={},n=e.isOriginLeft?"paddingLeft":"paddingRight",o=e.isOriginLeft?"left":"right",r=e.isOriginLeft?"right":"left",u=this.position.x+t[n];u=e.percentPosition&&!e.isHorizontal?u/t.width*100+"%":u+"px",i[o]=u,i[r]="";var s=e.isOriginTop?"paddingTop":"paddingBottom",a=e.isOriginTop?"top":"bottom",f=e.isOriginTop?"bottom":"top",c=this.position.y+t[s];c=e.percentPosition&&e.isHorizontal?c/t.height*100+"%":c+"px",i[a]=c,i[f]="",this.css(i),this.emitEvent("layout",[this])};var m=h?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};r.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),u=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),!u||this.isTransitioning){var s=t-i,a=e-n,f={},c=this.layout.options;s=c.isOriginLeft?s:-s,a=c.isOriginTop?a:-a,f.transform=m(s,a),this.transition({to:f,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},r.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},r.prototype.moveTo=c?r.prototype._transitionTo:r.prototype.goTo,r.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},r.prototype._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},r.prototype._transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);this.element.offsetHeight;null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var y=f&&o.toDashed(f)+",opacity";r.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:y,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},r.prototype.transition=r.prototype[a?"_transition":"_nonTransition"],r.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},r.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};r.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd)e.onEnd[i].call(this),delete e.onEnd[i];this.emitEvent("transitionEnd",[this])}},r.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},r.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return r.prototype.removeTransitionStyles=function(){this.css(v)},r.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},r.prototype.remove=function(){if(a&&parseFloat(this.layout.options.transitionDuration)){var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()}else this.removeElem()},r.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},r.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},r.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},r.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},r.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},r.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},r}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r,u){return e(t,i,n,o,r,u)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.eventie,t.EventEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o,r){function u(t,e){var i=o.getQueryElement(t);if(i){this.element=i,a&&(this.$element=a(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++c;this.element.outlayerGUID=n,h[n]=this,this._create(),this.options.isInitLayout&&this.layout()}else s&&s.error("Bad element for "+this.constructor.namespace+": "+(i||t))}var s=t.console,a=t.jQuery,f=function(){},c=0,h={};return u.namespace="outlayer",u.Item=r,u.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},o.extend(u.prototype,i.prototype),u.prototype.option=function(t){o.extend(this.options,t)},u.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},u.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},u.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0,r=e.length;r>o;o++){var u=new i(e[o],this);n.push(u)}return n},u.prototype._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},u.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},u.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},u.prototype._init=u.prototype.layout,u.prototype._resetLayout=function(){this.getSize()},u.prototype.getSize=function(){this.size=n(this.element)},u.prototype._getMeasurement=function(t,e){var i,r=this.options[t];r?("string"==typeof r?i=this.element.querySelector(r):o.isElement(r)&&(i=r),this[t]=i?n(i)[e]:r):this[t]=0},u.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},u.prototype._getItemsForLayout=function(t){for(var e=[],i=0,n=t.length;n>i;i++){var o=t[i];o.isIgnored||e.push(o)}return e},u.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var i=[],n=0,o=t.length;o>n;n++){var r=t[n],u=this._getItemLayoutPosition(r);u.item=r,u.isInstant=e||r.isLayoutInstant,i.push(u)}this._processLayoutQueue(i)}},u.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},u.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var n=t[e];this._positionItem(n.item,n.x,n.y,n.isInstant)}},u.prototype._positionItem=function(t,e,i,n){n?t.goTo(e,i):t.moveTo(e,i)},u.prototype._postLayout=function(){this.resizeContainer()},u.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},u.prototype._getContainerSize=f,u.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},u.prototype._emitCompleteOnItems=function(t,e){function i(){o.emitEvent(t+"Complete",[e])}function n(){++u===r&&i()}var o=this,r=e.length;if(e&&r)for(var u=0,s=0,a=e.length;a>s;s++){e[s].once(t,n)}else i()},u.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},u.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},u.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var n=t[e];this.ignore(n)}}},u.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var n=t[e];o.removeFrom(this.stamps,n),this.unignore(n)}},u.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)):void 0},u.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},u.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},u.prototype._manageStamp=f,u.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=n(t);return{left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom}},u.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},u.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},u.prototype.onresize=function(){this.resizeTimeout&&clearTimeout(this.resizeTimeout);var t=this;this.resizeTimeout=setTimeout(function(){t.resize(),delete t.resizeTimeout},100)},u.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},u.prototype.needsResizeLayout=function(){var t=n(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},u.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},u.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},u.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},u.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&e>i;i++){t[i].reveal()}},u.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&e>i;i++){t[i].hide()}},u.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},u.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},u.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e];if(n.element===t)return n}},u.prototype.getItems=function(t){for(var e=[],i=0,n=(t=o.makeArray(t)).length;n>i;i++){var r=t[i],u=this.getItem(r);u&&e.push(u)}return e},u.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var i=0,n=e.length;n>i;i++){var r=e[i];r.remove(),o.removeFrom(this.items,r)}},u.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){this.items[e].destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete h[n],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},u.data=function(t){var e=(t=o.getQueryElement(t))&&t.outlayerGUID;return e&&h[e]},u.create=function(t,e){function i(){u.apply(this,arguments)}return Object.create?i.prototype=Object.create(u.prototype):o.extend(i.prototype,u.prototype),i.prototype.constructor=i,i.defaults=o.extend({},u.defaults),o.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=u.data,i.Item=function(){r.apply(this,arguments)},i.Item.prototype=new r,o.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i},u.Item=r,u}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):t.Masonry=e(t.Outlayer,t.getSize,t.fizzyUIUtils)}(window,function(t,e,i){var n=t.create("masonry");return n.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},n.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,u=n-o%n;r=Math[u&&1>u?"round":"floor"](r),this.cols=Math.max(r,1)},n.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},n.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,n=Math[e&&1>e?"round":"ceil"](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),r=Math.min.apply(Math,o),u=i.indexOf(o,r),s={x:this.columnWidth*u,y:r},a=r+t.size.outerHeight,f=this.cols+1-o.length,c=0;f>c;c++)this.colYs[u+c]=a;return s},n.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},n.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this.options.isOriginLeft?n.left:n.right,r=o+i.outerWidth,u=Math.floor(o/this.columnWidth);u=Math.max(0,u);var s=Math.floor(r/this.columnWidth);s-=r%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var a=(this.options.isOriginTop?n.top:n.bottom)+i.outerHeight,f=u;s>=f;f++)this.colYs[f]=Math.max(a,this.colYs[f])},n.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},n.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},n})}function cff_init(){function t(){jQuery(".cff-visual-header.cff-has-cover").each(function(){var t=jQuery(this).find(".cff-header-hero").innerHeight(),e=jQuery(this).find(".cff-header-hero img").innerHeight(),i=jQuery(this).find(".cff-header-hero").innerWidth(),n=jQuery(this).find(".cff-header-hero img").innerWidth()/e,o=i/t<n?t*n+"px":"100%",r=e-t,u=Math.max(0,Math.round(r/2)),s="100%"!==o?Math.max(0,Math.round((t*n-i)/2)):0;jQuery(this).find(".cff-header-hero img").css({opacity:1,display:"block",visibility:"visible","max-width":"none","max-height":"none","margin-top":-u+"px","margin-left":-s+"px",width:o})})}jQuery("#cff .cff-item").each(function(){var t=jQuery(this);t.find(".cff-viewpost-facebook").parent("p").length&&t.find(".cff-viewpost-facebook").unwrap("p"),t.find(".cff-author").parent("p").length&&(t.find(".cff-author").eq(1).unwrap("p"),t.find(".cff-author").eq(1).remove()),t.find("#cff .cff-link").parent("p").length&&t.find("#cff .cff-link").unwrap("p");var e=!1,i=t.find(".cff-post-text .cff-text"),n=t.closest("#cff").attr("data-char");void 0!==n&&""!=n||(n=99999);var o=i.html();null==o&&(o="");var r=new RegExp(/(<[^>]*>)/g),u=0;full_text_arr=o.split(r);for(var s=0,a=full_text_arr.length;s<a;s++)if(!r.test(full_text_arr[s])){if(u==n){full_text_arr.splice(s,1);continue}if((u+=full_text_arr[s].length)>n){var f=u-n;full_text_arr[s]=full_text_arr[s].slice(0,-f),u=n,o.length>n&&t.find(".cff-expand").show()}}var c=full_text_arr.join("");function h(){var e=t.find(".cff-text").html(),i=t.find(".cff-post-desc").html(),n=/(^|\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,o=t.find(".cff-text").attr("data-color");function r(t){var e=jQuery.trim(t);return/^#[0-9A-F]{6}$/i.test(e)?e:' <a href="https://www.facebook.com/hashtag/'+e.substring(1)+'" target="_blank" rel="nofollow" style="color:#'+o+'">'+e+"</a>"}if("undefined"==typeof cfflinkhashtags&&(cfflinkhashtags="true"),"true"==cfflinkhashtags){var u=t.find(".cff-text");u.length>0&&0==u.find(".cff-post-text-link").length&&(e=e.replace(/<br>/g,"<br> "),u.html(e.replace(n,r)))}t.find(".cff-post-desc").length>0&&t.find(".cff-post-desc").html(i.replace(n,r))}"<"==(c=c.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g,"")).substr(c.length-1)&&(c=c.substring(0,c.length-1)),c=(c=c.replace(/(<br>\s*)+$/,"")).replace(/(<img class="cff-linebreak">\s*)+$/,""),i.html(c),t.find(".cff-expand").on("click",function(n){n.preventDefault();var r=jQuery(this),u=r.find(".cff-more"),s=r.find(".cff-less");0==e?(i.html(o),e=!0,u.hide(),s.show()):(i.html(c),e=!1,u.show(),s.hide()),h(),i.find("a").attr("target","_blank"),t.closest(".cff").hasClass("cff-masonry-js")&&!t.closest(".cff").hasClass("cff-masonry-css")&&cffAddMasonry(t.closest(".cff"))}),i.find("a").add(t.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow"}),$sharedLink=t.find(".cff-shared-link"),""==$sharedLink.text()&&$sharedLink.remove(),h(),t.find(".cff-text a").add(t.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow noopener noreferrer"}),t.find(".cff-share-link").on("click",function(e){e.preventDefault();var i=t.find(".cff-share-tooltip");if(i.is(":visible"))i.hide().find("a").removeClass("cff-show");else{i.show();var n=0;i.find("a").each(function(){var t=jQuery(this);setTimeout(function(){t.addClass("cff-show")},n),n+=20})}})}),jQuery(".cff-wrapper").each(function(){var t=jQuery(this).find("#cff"),e=jQuery(this);if(setTimeout(function(){checkConsent(e)?addFullFeatures(e):(jQuery(".cff-gdpr-notice").css({display:"inline-block"}),e.find(".cff-visual-header").length&&e.find(".cff-header-text").closest(".cff-visual-header").addClass("cff-no-consent"))},250),void 0!==t.attr("data-nummobile")){var i=void 0!==t.attr("data-pag-num")&&""!==t.attr("data-pag-num")?parseInt(t.attr("data-pag-num")):1,n=void 0!==t.attr("data-nummobile")&&""!==t.attr("data-nummobile")?parseInt(t.attr("data-nummobile")):i,o=t.find(".cff-item").length?".cff-item":".cff-album-item";jQuery(window).width()<480?n<t.find(o).length&&t.find(o).slice(n-t.find(o).length).addClass("cff-num-diff-hide"):i<t.find(o).length&&t.find(o).slice(i-t.find(o).length).addClass("cff-num-diff-hide"),t.removeAttr("data-nummobile")}t.hasClass("cff-masonry-js")&&(cffAddMasonry(t),setTimeout(function(){cffAddMasonry(t)},500),jQuery(window).on("resize",function(){setTimeout(function(){cffAddMasonry(t)},500)}),t.find(".cff-credit").length&&t.css("padding-bottom",30))}),setTimeout(t,200),jQuery(window).on("resize",function(){setTimeout(function(){t()},500)})}function checkConsent(t){var e=void 0!==(t=t.find(".cff-list-container")).attr("data-cff-flags")?t.attr("data-cff-flags").split(","):[],i=e.indexOf("gdpr")>-1,n=(e.indexOf("overrideBlockCDN"),!1);if(n||!i)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(n="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(n="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var o=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===o.length)n="true"===o.pop().split(";").shift()}else void 0!==window.cookieconsent?n="allow"===cffCmplzGetCookie("cmplz_consent_status"):void 0!==window.Cookiebot?n=Cookiebot.consented:void 0!==window.BorlabsCookie&&(n=window.BorlabsCookie.checkCookieConsent("facebook"));return n}function cffCmplzGetCookie(t){for(var e=t+"=",i=window.document.cookie.split(";"),n=0;n<i.length;n++){var o=i[n].trim();if(0==o.indexOf(e))return o.substring(e.length,o.length)}return""}function addFullFeatures(t){t=jQuery(t),jQuery(".cff-gdpr-notice").remove(),t.find(".cff-author-img").each(function(){jQuery(this).find("img").attr("src",jQuery(this).attr("data-avatar")),jQuery(this).removeClass("cff-no-consent")}),t.find(".cff-likebox iframe").each(function(){var t=jQuery(this),e=t.attr("data-likebox-width"),i=t.parent().width();""==e&&(e=340),i<e&&(e=i),t.attr("src","https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F"+t.attr("data-likebox-id")+"%2F&tabs&width="+Math.floor(e)+"&small_header="+t.attr("data-likebox-header")+"&adapt_container_width=true&hide_cover="+t.attr("data-hide-cover")+"&hide_cta="+t.attr("data-hide-cta")+"&show_facepile="+t.attr("data-likebox-faces")+"&locale="+t.attr("data-locale"))}),jQuery(".cff-visual-header").length&&jQuery(".cff-visual-header").each(function(){jQuery(this).removeClass("cff-no-consent"),jQuery(this).find(".cff-header-hero").length&&jQuery(this).find(".cff-header-hero").find("img").attr("src",jQuery(this).find(".cff-header-hero").find("img").attr("data-cover-url")),jQuery(this).find(".cff-header-img").length&&jQuery(this).find(".cff-header-img").find("img").attr("src",jQuery(this).find(".cff-header-img").find("img").attr("data-avatar"))})}function afterConsentToggled(t,e){t&&addFullFeatures(e)}function cffGetFeedLocatorDataArray(){var t=[];return jQuery(".cff-list-container").each(function(){$cffPagUrl=jQuery(this).find(".cff-pag-url");var e={feedID:$cffPagUrl.attr("data-feed-id"),postID:$cffPagUrl.attr("data-post-id"),shortCodeAtts:""==jQuery.trim($cffPagUrl.attr("data-cff-shortcode"))?null:JSON.parse($cffPagUrl.attr("data-cff-shortcode")),location:locationGuess(jQuery(this))};t.push(e)}),t}function locationGuess(t=!1){var e=0==t?jQuery(this.el):t,i="content";return e.closest("footer").length?i="footer":e.closest(".header").length||e.closest("header").length?i="header":(e.closest(".sidebar").length||e.closest("aside").length)&&(i="sidebar"),i}cff_init(),jQuery(document).ready(function(){var t=jQuery;if(t("#cookie-notice a").on("click",function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(checkConsent(jQuery(this)),jQuery(this))})},1e3)}),t("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(checkConsent(jQuery(this)),jQuery(this))})},1e3)}),t(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!1,jQuery(this))})},1e3)}),t(window).on("CookiebotOnAccept",function(t){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!0,jQuery(this))})}),t(document).on("cmplzEnableScripts",function(t){"marketing"===t.detail&&jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!0,jQuery(this))})}),t(document).on("cmplzFireCategories",function(t){"marketing"===t.detail.category&&jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!1,jQuery(this))})}),t(document).on("borlabs-cookie-consent-saved",function(t){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(!0,jQuery(this))})}),t(".cff-list-container").length){var e=cffGetFeedLocatorDataArray();t.ajax({url:cffajaxurl,type:"POST",data:{action:"feed_locator",feedLocatorData:e}})}})}
|
custom-facebook-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Smash Balloon Custom Facebook Feed
|
4 |
Plugin URI: https://smashballoon.com/custom-facebook-feed
|
5 |
Description: Add completely customizable Facebook feeds to your WordPress site
|
6 |
-
Version: 4.0
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
25 |
*/
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
27 |
|
28 |
-
define('CFFVER', '4.0');
|
29 |
define( 'WPW_SL_STORE_URL', 'https://smashballoon.com/' );
|
30 |
define( 'WPW_SL_ITEM_NAME', 'Custom Facebook Feed WordPress Plugin Personal' ); //*!*Update Plugin Name at top of file*!*
|
31 |
|
3 |
Plugin Name: Smash Balloon Custom Facebook Feed
|
4 |
Plugin URI: https://smashballoon.com/custom-facebook-feed
|
5 |
Description: Add completely customizable Facebook feeds to your WordPress site
|
6 |
+
Version: 4.0.1
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
25 |
*/
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
27 |
|
28 |
+
define('CFFVER', '4.0.1');
|
29 |
define( 'WPW_SL_STORE_URL', 'https://smashballoon.com/' );
|
30 |
define( 'WPW_SL_ITEM_NAME', 'Custom Facebook Feed WordPress Plugin Personal' ); //*!*Update Plugin Name at top of file*!*
|
31 |
|
inc/Admin/CFF_Global_Settings.php
CHANGED
@@ -86,6 +86,8 @@ class CFF_Global_Settings {
|
|
86 |
* @return CFF_Response
|
87 |
*/
|
88 |
public function cff_save_settings() {
|
|
|
|
|
89 |
$data = $_POST;
|
90 |
$model = isset( $data[ 'model' ] ) ? $data['model'] : null;
|
91 |
|
@@ -216,6 +218,8 @@ class CFF_Global_Settings {
|
|
216 |
* @return CFF_Response
|
217 |
*/
|
218 |
public function cff_activate_license() {
|
|
|
|
|
219 |
// do the form validation to check if license_key is not empty
|
220 |
if ( empty( $_POST[ 'license_key' ] ) ) {
|
221 |
new CFF_Response( false, array(
|
@@ -253,6 +257,8 @@ class CFF_Global_Settings {
|
|
253 |
* @return CFF_Response
|
254 |
*/
|
255 |
public function cff_deactivate_license() {
|
|
|
|
|
256 |
$license_key = trim( get_option( 'cff_license_key' ) );
|
257 |
$cff_license_data = $this->get_license_data( $license_key, 'deactivate_license', WPW_SL_ITEM_NAME );
|
258 |
// update the license data
|
@@ -280,6 +286,8 @@ class CFF_Global_Settings {
|
|
280 |
* @return CFF_Response
|
281 |
*/
|
282 |
public function cff_activate_extension_license() {
|
|
|
|
|
283 |
// do the form validation to check if license_key is not empty
|
284 |
if ( empty( $_POST[ 'license_key' ] ) ) {
|
285 |
new CFF_Response( false, array(
|
@@ -313,6 +321,8 @@ class CFF_Global_Settings {
|
|
313 |
* @return CFF_Response
|
314 |
*/
|
315 |
public function cff_deactivate_extension_license() {
|
|
|
|
|
316 |
$extension_name = sanitize_text_field( $_POST[ 'extension_name' ] );
|
317 |
$extension_item_name = sanitize_text_field( $_POST[ 'extension_item_name' ] );
|
318 |
$license_key = get_option( 'cff_license_key_' . $extension_name );
|
@@ -342,6 +352,7 @@ class CFF_Global_Settings {
|
|
342 |
* @return CFF_Response
|
343 |
*/
|
344 |
public function cff_test_connection() {
|
|
|
345 |
$license_key = get_option( 'cff_license_key' );
|
346 |
$cff_api_params = array(
|
347 |
'edd_action'=> 'check_license',
|
@@ -375,6 +386,7 @@ class CFF_Global_Settings {
|
|
375 |
* @return CFF_Response
|
376 |
*/
|
377 |
public function cff_import_settings_json() {
|
|
|
378 |
$filename = $_FILES['file']['name'];
|
379 |
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
380 |
if ( 'json' !== $ext ) {
|
@@ -413,6 +425,7 @@ class CFF_Global_Settings {
|
|
413 |
* @return CFF_Response
|
414 |
*/
|
415 |
public function cff_export_settings_json() {
|
|
|
416 |
if ( ! isset( $_GET['feed_id'] ) ) {
|
417 |
return;
|
418 |
}
|
@@ -437,6 +450,7 @@ class CFF_Global_Settings {
|
|
437 |
* @since 4.0
|
438 |
*/
|
439 |
public function cff_clear_cache() {
|
|
|
440 |
// Get the settings model data
|
441 |
$model = isset( $_POST[ 'model' ] ) ? $_POST['model'] : null;
|
442 |
|
@@ -543,6 +557,7 @@ class CFF_Global_Settings {
|
|
543 |
* @since 4.0
|
544 |
*/
|
545 |
public function cff_clear_image_resize_cache() {
|
|
|
546 |
// Caching option is a Pro only feature
|
547 |
if ( !CFF_Utils::cff_is_pro_version() ) {
|
548 |
return;
|
86 |
* @return CFF_Response
|
87 |
*/
|
88 |
public function cff_save_settings() {
|
89 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
90 |
+
|
91 |
$data = $_POST;
|
92 |
$model = isset( $data[ 'model' ] ) ? $data['model'] : null;
|
93 |
|
218 |
* @return CFF_Response
|
219 |
*/
|
220 |
public function cff_activate_license() {
|
221 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
222 |
+
|
223 |
// do the form validation to check if license_key is not empty
|
224 |
if ( empty( $_POST[ 'license_key' ] ) ) {
|
225 |
new CFF_Response( false, array(
|
257 |
* @return CFF_Response
|
258 |
*/
|
259 |
public function cff_deactivate_license() {
|
260 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
261 |
+
|
262 |
$license_key = trim( get_option( 'cff_license_key' ) );
|
263 |
$cff_license_data = $this->get_license_data( $license_key, 'deactivate_license', WPW_SL_ITEM_NAME );
|
264 |
// update the license data
|
286 |
* @return CFF_Response
|
287 |
*/
|
288 |
public function cff_activate_extension_license() {
|
289 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
290 |
+
|
291 |
// do the form validation to check if license_key is not empty
|
292 |
if ( empty( $_POST[ 'license_key' ] ) ) {
|
293 |
new CFF_Response( false, array(
|
321 |
* @return CFF_Response
|
322 |
*/
|
323 |
public function cff_deactivate_extension_license() {
|
324 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
325 |
+
|
326 |
$extension_name = sanitize_text_field( $_POST[ 'extension_name' ] );
|
327 |
$extension_item_name = sanitize_text_field( $_POST[ 'extension_item_name' ] );
|
328 |
$license_key = get_option( 'cff_license_key_' . $extension_name );
|
352 |
* @return CFF_Response
|
353 |
*/
|
354 |
public function cff_test_connection() {
|
355 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
356 |
$license_key = get_option( 'cff_license_key' );
|
357 |
$cff_api_params = array(
|
358 |
'edd_action'=> 'check_license',
|
386 |
* @return CFF_Response
|
387 |
*/
|
388 |
public function cff_import_settings_json() {
|
389 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
390 |
$filename = $_FILES['file']['name'];
|
391 |
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
392 |
if ( 'json' !== $ext ) {
|
425 |
* @return CFF_Response
|
426 |
*/
|
427 |
public function cff_export_settings_json() {
|
428 |
+
CFF_Feed_Builder::check_privilege( false );
|
429 |
if ( ! isset( $_GET['feed_id'] ) ) {
|
430 |
return;
|
431 |
}
|
450 |
* @since 4.0
|
451 |
*/
|
452 |
public function cff_clear_cache() {
|
453 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
454 |
// Get the settings model data
|
455 |
$model = isset( $_POST[ 'model' ] ) ? $_POST['model'] : null;
|
456 |
|
557 |
* @since 4.0
|
558 |
*/
|
559 |
public function cff_clear_image_resize_cache() {
|
560 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_admin_nonce' );
|
561 |
// Caching option is a Pro only feature
|
562 |
if ( !CFF_Utils::cff_is_pro_version() ) {
|
563 |
return;
|
inc/Admin/CFF_New_User.php
CHANGED
@@ -97,6 +97,9 @@ class CFF_New_User extends CFF_Notifications {
|
|
97 |
}
|
98 |
|
99 |
$cff_statuses_option = get_option( 'cff_statuses', array() );
|
|
|
|
|
|
|
100 |
$current_time = cff_get_current_time();
|
101 |
|
102 |
// rating notice logic
|
97 |
}
|
98 |
|
99 |
$cff_statuses_option = get_option( 'cff_statuses', array() );
|
100 |
+
if ( empty( $cff_statuses_option ) ) {
|
101 |
+
return array();
|
102 |
+
}
|
103 |
$current_time = cff_get_current_time();
|
104 |
|
105 |
// rating notice logic
|
inc/Admin/CFF_Notifications.php
CHANGED
@@ -157,9 +157,8 @@ class CFF_Notifications {
|
|
157 |
|
158 |
$current_screen = get_current_screen();
|
159 |
// if we are one single feed page then return
|
160 |
-
if ( $current_screen->base == "facebook-feed_page_cff-feed-builder" && isset( $_GET['feed_id'] ) ) {
|
161 |
$access = false;
|
162 |
-
return;
|
163 |
}
|
164 |
|
165 |
return apply_filters( 'cff_admin_notifications_has_access', $access );
|
@@ -517,6 +516,9 @@ class CFF_Notifications {
|
|
517 |
if ( ! empty( $btn['attr'] ) ) {
|
518 |
$btn['target'] = '_blank';
|
519 |
}
|
|
|
|
|
|
|
520 |
$buttons_html .= sprintf(
|
521 |
'<a href="%1$s" class="cff-btn %2$s %3$s"%4$s>%5$s</a>',
|
522 |
! empty( $btn['url'] ) ? esc_url( $this->replace_merge_fields( $btn['url'], $notification ) ) : '',
|
157 |
|
158 |
$current_screen = get_current_screen();
|
159 |
// if we are one single feed page then return
|
160 |
+
if ( is_object( $current_screen ) && $current_screen->base == "facebook-feed_page_cff-feed-builder" && isset( $_GET['feed_id'] ) ) {
|
161 |
$access = false;
|
|
|
162 |
}
|
163 |
|
164 |
return apply_filters( 'cff_admin_notifications_has_access', $access );
|
516 |
if ( ! empty( $btn['attr'] ) ) {
|
517 |
$btn['target'] = '_blank';
|
518 |
}
|
519 |
+
if ( empty( $btn['class'] ) ) {
|
520 |
+
$btn['class'] = '';
|
521 |
+
}
|
522 |
$buttons_html .= sprintf(
|
523 |
'<a href="%1$s" class="cff-btn %2$s %3$s"%4$s>%5$s</a>',
|
524 |
! empty( $btn['url'] ) ? esc_url( $this->replace_merge_fields( $btn['url'], $notification ) ) : '',
|
inc/Admin/CFF_Support.php
CHANGED
@@ -657,6 +657,7 @@ class CFF_Support {
|
|
657 |
* @return CFF_Response
|
658 |
*/
|
659 |
public function cff_export_settings_json() {
|
|
|
660 |
if ( ! isset( $_GET['feed_id'] ) ) {
|
661 |
return;
|
662 |
}
|
657 |
* @return CFF_Response
|
658 |
*/
|
659 |
public function cff_export_settings_json() {
|
660 |
+
\CustomFacebookFeed\Builder\CFF_Feed_Builder::check_privilege( false );
|
661 |
if ( ! isset( $_GET['feed_id'] ) ) {
|
662 |
return;
|
663 |
}
|
inc/Admin/CFF_oEmbeds.php
CHANGED
@@ -76,6 +76,8 @@ class CFF_oEmbeds {
|
|
76 |
* @return CFF_Response
|
77 |
*/
|
78 |
public function disable_facebook_oembed () {
|
|
|
|
|
79 |
$oembed_settings = get_option( 'cff_oembed_token', array() );
|
80 |
$oembed_settings['access_token'] = '';
|
81 |
$oembed_settings['disabled'] = true;
|
@@ -94,6 +96,8 @@ class CFF_oEmbeds {
|
|
94 |
* @return CFF_Response
|
95 |
*/
|
96 |
public function disable_instagram_oembed () {
|
|
|
|
|
97 |
$oembed_settings = get_option( 'sbi_oembed_token', array() );
|
98 |
$oembed_settings['access_token'] = '';
|
99 |
$oembed_settings['disabled'] = true;
|
@@ -221,6 +225,7 @@ class CFF_oEmbeds {
|
|
221 |
} elseif ( ! empty( $newly_retrieved_oembed_connection_data ) ) {
|
222 |
$return['newOembedData'] = $newly_retrieved_oembed_connection_data;
|
223 |
}
|
|
|
224 |
$return['connectionURL'] = $this->get_connection_url();
|
225 |
$return['tokenData'] = $oembed_token_settings;
|
226 |
|
@@ -292,6 +297,7 @@ class CFF_oEmbeds {
|
|
292 |
$return = get_option( 'sbi_oembed_token', array() );
|
293 |
|
294 |
$return['access_token'] = $sbi_oembed_token;
|
|
|
295 |
return $return;
|
296 |
}
|
297 |
} if ( isset( $_GET['cff_access_token'] ) ) {
|
76 |
* @return CFF_Response
|
77 |
*/
|
78 |
public function disable_facebook_oembed () {
|
79 |
+
\CustomFacebookFeed\Builder\CFF_Feed_Builder::check_privilege( 'nonce' );
|
80 |
+
|
81 |
$oembed_settings = get_option( 'cff_oembed_token', array() );
|
82 |
$oembed_settings['access_token'] = '';
|
83 |
$oembed_settings['disabled'] = true;
|
96 |
* @return CFF_Response
|
97 |
*/
|
98 |
public function disable_instagram_oembed () {
|
99 |
+
\CustomFacebookFeed\Builder\CFF_Feed_Builder::check_privilege( 'nonce' );
|
100 |
+
|
101 |
$oembed_settings = get_option( 'sbi_oembed_token', array() );
|
102 |
$oembed_settings['access_token'] = '';
|
103 |
$oembed_settings['disabled'] = true;
|
225 |
} elseif ( ! empty( $newly_retrieved_oembed_connection_data ) ) {
|
226 |
$return['newOembedData'] = $newly_retrieved_oembed_connection_data;
|
227 |
}
|
228 |
+
|
229 |
$return['connectionURL'] = $this->get_connection_url();
|
230 |
$return['tokenData'] = $oembed_token_settings;
|
231 |
|
297 |
$return = get_option( 'sbi_oembed_token', array() );
|
298 |
|
299 |
$return['access_token'] = $sbi_oembed_token;
|
300 |
+
$return['disabled'] = false;
|
301 |
return $return;
|
302 |
}
|
303 |
} if ( isset( $_GET['cff_access_token'] ) ) {
|
inc/Builder/CFF_Db.php
CHANGED
@@ -37,7 +37,7 @@ class CFF_Db {
|
|
37 |
|
38 |
if ( empty( $args ) ) {
|
39 |
|
40 |
-
$limit =
|
41 |
$sql = "SELECT s.id, s.account_id, s.account_type, s.privilege, s.access_token, s.username, s.info, s.error, s.expires, count(f.id) as used_in
|
42 |
FROM $sources_table_name s
|
43 |
LEFT JOIN $feeds_table_name f ON f.settings LIKE CONCAT('%', s.account_id, '%')
|
@@ -55,7 +55,7 @@ class CFF_Db {
|
|
55 |
$i = 0;
|
56 |
foreach ( $results as $result ) {
|
57 |
if ( (int)$result['used_in'] > 0 ) {
|
58 |
-
$account_id = esc_sql( $result['account_id'] );
|
59 |
$sql = "SELECT *
|
60 |
FROM $feeds_table_name
|
61 |
WHERE settings LIKE CONCAT('%', $account_id, '%')
|
@@ -593,7 +593,7 @@ class CFF_Db {
|
|
593 |
settings longtext NOT NULL default '',
|
594 |
author bigint(20) unsigned NOT NULL default '1',
|
595 |
status varchar(255) NOT NULL default '',
|
596 |
-
last_modified datetime NOT NULL
|
597 |
PRIMARY KEY (id),
|
598 |
KEY author (author)
|
599 |
) $charset_collate;
|
@@ -623,7 +623,7 @@ class CFF_Db {
|
|
623 |
cache_key varchar(255) NOT NULL default '',
|
624 |
cache_value longtext NOT NULL default '',
|
625 |
cron_update varchar(20) NOT NULL default 'yes',
|
626 |
-
last_updated datetime NOT NULL
|
627 |
PRIMARY KEY (id),
|
628 |
KEY feed_id (feed_id)
|
629 |
) $charset_collate;";
|
@@ -655,8 +655,8 @@ class CFF_Db {
|
|
655 |
username varchar(255) NOT NULL default '',
|
656 |
info text NOT NULL default '',
|
657 |
error text NOT NULL default '',
|
658 |
-
expires datetime NOT NULL
|
659 |
-
last_updated datetime NOT NULL
|
660 |
author bigint(20) unsigned NOT NULL default '1',
|
661 |
PRIMARY KEY (id),
|
662 |
KEY account_type (account_type($max_index_length)),
|
@@ -707,8 +707,8 @@ class CFF_Db {
|
|
707 |
username varchar(255) NOT NULL default '',
|
708 |
info text NOT NULL default '',
|
709 |
error text NOT NULL default '',
|
710 |
-
expires datetime NOT NULL
|
711 |
-
last_updated datetime NOT NULL
|
712 |
author bigint(20) unsigned NOT NULL default '1',
|
713 |
PRIMARY KEY (id),
|
714 |
KEY account_type (account_type($max_index_length)),
|
37 |
|
38 |
if ( empty( $args ) ) {
|
39 |
|
40 |
+
$limit = 200;
|
41 |
$sql = "SELECT s.id, s.account_id, s.account_type, s.privilege, s.access_token, s.username, s.info, s.error, s.expires, count(f.id) as used_in
|
42 |
FROM $sources_table_name s
|
43 |
LEFT JOIN $feeds_table_name f ON f.settings LIKE CONCAT('%', s.account_id, '%')
|
55 |
$i = 0;
|
56 |
foreach ( $results as $result ) {
|
57 |
if ( (int)$result['used_in'] > 0 ) {
|
58 |
+
$account_id = "'" . esc_sql( $result['account_id'] ) . "'";
|
59 |
$sql = "SELECT *
|
60 |
FROM $feeds_table_name
|
61 |
WHERE settings LIKE CONCAT('%', $account_id, '%')
|
593 |
settings longtext NOT NULL default '',
|
594 |
author bigint(20) unsigned NOT NULL default '1',
|
595 |
status varchar(255) NOT NULL default '',
|
596 |
+
last_modified datetime NOT NULL,
|
597 |
PRIMARY KEY (id),
|
598 |
KEY author (author)
|
599 |
) $charset_collate;
|
623 |
cache_key varchar(255) NOT NULL default '',
|
624 |
cache_value longtext NOT NULL default '',
|
625 |
cron_update varchar(20) NOT NULL default 'yes',
|
626 |
+
last_updated datetime NOT NULL,
|
627 |
PRIMARY KEY (id),
|
628 |
KEY feed_id (feed_id)
|
629 |
) $charset_collate;";
|
655 |
username varchar(255) NOT NULL default '',
|
656 |
info text NOT NULL default '',
|
657 |
error text NOT NULL default '',
|
658 |
+
expires datetime NOT NULL,
|
659 |
+
last_updated datetime NOT NULL,
|
660 |
author bigint(20) unsigned NOT NULL default '1',
|
661 |
PRIMARY KEY (id),
|
662 |
KEY account_type (account_type($max_index_length)),
|
707 |
username varchar(255) NOT NULL default '',
|
708 |
info text NOT NULL default '',
|
709 |
error text NOT NULL default '',
|
710 |
+
expires datetime NOT NULL,
|
711 |
+
last_updated datetime NOT NULL,
|
712 |
author bigint(20) unsigned NOT NULL default '1',
|
713 |
PRIMARY KEY (id),
|
714 |
KEY account_type (account_type($max_index_length)),
|
inc/Builder/CFF_Feed_Builder.php
CHANGED
@@ -50,6 +50,23 @@ class CFF_Feed_Builder {
|
|
50 |
add_action( 'wp_ajax_sb_other_plugins_modal', array( 'CustomFacebookFeed\Builder\CFF_Feed_Builder', 'sb_other_plugins_modal' ) );
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
/**
|
54 |
* Used to dismiss onboarding using AJAX
|
55 |
*
|
@@ -75,6 +92,8 @@ class CFF_Feed_Builder {
|
|
75 |
* @since 4.0
|
76 |
*/
|
77 |
public static function sb_other_plugins_modal() {
|
|
|
|
|
78 |
$plugin = isset( $_POST['plugin'] ) ? sanitize_text_field( $_POST['plugin'] ) : '';
|
79 |
$sb_other_plugins = self::install_plugins_popup();
|
80 |
$plugin = $sb_other_plugins[ $plugin ];
|
@@ -1100,7 +1119,7 @@ class CFF_Feed_Builder {
|
|
1100 |
],
|
1101 |
'appMemberInstructions' => sprintf( __( 'To display a feed form this group, Facebook requires the admin to add the Smash Balloon app in the group settings. Please ask an admin to follow the %sdirections here%s to add the app.', 'custom-facebook-feed' ), '<a href="https://smashballoon.com/doc/display-facebook-group-feed/" target="_blank" rel="noopener noreferrer">', '</a>' ) . '<br><br>' . __( 'Once this is done, you will be able to display a feed from this group.', 'custom-facebook-feed' ),
|
1102 |
'notAdmin' => __( 'For groups you are not an administrator of', 'custom-facebook-feed' ),
|
1103 |
-
'disclaimer' => sprintf( __( 'Please note:
|
1104 |
'noGroupTooltip' => __( 'Due to Facebook limitations, it\'s not possible to display photo feeds from a Group, only a Page.', 'custom-facebook-feed' )
|
1105 |
),
|
1106 |
'footer' => array(
|
50 |
add_action( 'wp_ajax_sb_other_plugins_modal', array( 'CustomFacebookFeed\Builder\CFF_Feed_Builder', 'sb_other_plugins_modal' ) );
|
51 |
}
|
52 |
|
53 |
+
public static function check_privilege( $check_nonce, $action = 'cff-admin' ) {
|
54 |
+
$cap = current_user_can( 'manage_custom_facebook_feed_options' ) ? 'manage_custom_facebook_feed_options' : 'manage_options';
|
55 |
+
$cap = apply_filters( 'cff_settings_pages_capability', $cap );
|
56 |
+
|
57 |
+
if ( ! current_user_can( $cap ) ) {
|
58 |
+
wp_die ( 'You did not do this the right way!' );
|
59 |
+
}
|
60 |
+
|
61 |
+
if ( $check_nonce ) {
|
62 |
+
$nonce = ! empty( $_POST[ $check_nonce ] ) ? $_POST[ $check_nonce ] : false;
|
63 |
+
|
64 |
+
if ( ! wp_verify_nonce( $nonce, $action ) ) {
|
65 |
+
wp_die ( 'You did not do this the right way!' );
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
/**
|
71 |
* Used to dismiss onboarding using AJAX
|
72 |
*
|
92 |
* @since 4.0
|
93 |
*/
|
94 |
public static function sb_other_plugins_modal() {
|
95 |
+
CFF_Feed_Builder::check_privilege( 'nonce', 'cff_nonce' );
|
96 |
+
|
97 |
$plugin = isset( $_POST['plugin'] ) ? sanitize_text_field( $_POST['plugin'] ) : '';
|
98 |
$sb_other_plugins = self::install_plugins_popup();
|
99 |
$plugin = $sb_other_plugins[ $plugin ];
|
1119 |
],
|
1120 |
'appMemberInstructions' => sprintf( __( 'To display a feed form this group, Facebook requires the admin to add the Smash Balloon app in the group settings. Please ask an admin to follow the %sdirections here%s to add the app.', 'custom-facebook-feed' ), '<a href="https://smashballoon.com/doc/display-facebook-group-feed/" target="_blank" rel="noopener noreferrer">', '</a>' ) . '<br><br>' . __( 'Once this is done, you will be able to display a feed from this group.', 'custom-facebook-feed' ),
|
1121 |
'notAdmin' => __( 'For groups you are not an administrator of', 'custom-facebook-feed' ),
|
1122 |
+
'disclaimer' => sprintf( __( 'Please note: There are Facebook limitations to displaying group content which may prevent older posts from being displayed. Please %ssee here%s for more information.', 'custom-facebook-feed' ), '<a href="https://smashballoon.com/doc/facebook-api-change-limits-groups-to-90-days/" target="_blank" rel="noopener noreferrer">', '</a>' ),
|
1123 |
'noGroupTooltip' => __( 'Due to Facebook limitations, it\'s not possible to display photo feeds from a Group, only a Page.', 'custom-facebook-feed' )
|
1124 |
),
|
1125 |
'footer' => array(
|
inc/Builder/CFF_Feed_Saver_Manager.php
CHANGED
@@ -35,6 +35,8 @@ class CFF_Feed_Saver_Manager {
|
|
35 |
* @since 4.0
|
36 |
*/
|
37 |
public static function builder_update() {
|
|
|
|
|
38 |
$settings_data = $_POST;
|
39 |
|
40 |
$feed_id = false;
|
@@ -145,6 +147,8 @@ class CFF_Feed_Saver_Manager {
|
|
145 |
* @since 4.0
|
146 |
*/
|
147 |
public static function retrieve_comments() {
|
|
|
|
|
148 |
if ( empty( $_POST['feed_id'] )) {
|
149 |
echo '{}';
|
150 |
wp_die();
|
@@ -175,6 +179,8 @@ class CFF_Feed_Saver_Manager {
|
|
175 |
* @since 4.0
|
176 |
*/
|
177 |
public static function delete_feed() {
|
|
|
|
|
178 |
if ( ! empty( $_POST['feeds_ids'] ) && is_array( $_POST['feeds_ids'] )) {
|
179 |
CFF_Db::delete_feeds_query( $_POST['feeds_ids'] );
|
180 |
}
|
@@ -188,6 +194,8 @@ class CFF_Feed_Saver_Manager {
|
|
188 |
* @since 4.0
|
189 |
*/
|
190 |
public static function delete_source() {
|
|
|
|
|
191 |
if ( ! empty( $_POST['source_id'] ) ) {
|
192 |
CFF_Db::delete_source_query( $_POST['source_id'] );
|
193 |
}
|
@@ -200,6 +208,7 @@ class CFF_Feed_Saver_Manager {
|
|
200 |
* @since 4.0
|
201 |
*/
|
202 |
public static function clear_single_feed_cache() {
|
|
|
203 |
|
204 |
$feed_id = sanitize_text_field( $_POST['feedID'] );
|
205 |
|
@@ -230,6 +239,8 @@ class CFF_Feed_Saver_Manager {
|
|
230 |
* @since 4.0
|
231 |
*/
|
232 |
public static function duplicate_feed() {
|
|
|
|
|
233 |
if ( ! empty( $_POST['feed_id'] ) ) {
|
234 |
CFF_Db::duplicate_feed_query( $_POST['feed_id'] );
|
235 |
}
|
@@ -242,6 +253,8 @@ class CFF_Feed_Saver_Manager {
|
|
242 |
* @since 4.0
|
243 |
*/
|
244 |
public static function importer() {
|
|
|
|
|
245 |
if ( ! empty( $_POST['feed_json'] ) && strpos( $_POST['feed_json'], '{' ) === 0 ) {
|
246 |
echo json_encode( CFF_Feed_Saver_Manager::import_feed( stripslashes( $_POST['feed_json'] ) ) );
|
247 |
} else {
|
@@ -262,6 +275,8 @@ class CFF_Feed_Saver_Manager {
|
|
262 |
* @since 4.0
|
263 |
*/
|
264 |
public static function maybe_feed_customizer_data( $include_comments = false ) {
|
|
|
|
|
265 |
if ( isset( $_GET['feed_id'] ) ){
|
266 |
$feed_id = $_GET['feed_id'];
|
267 |
$feed_saver = new CFF_Feed_Saver( $feed_id );
|
@@ -316,6 +331,8 @@ class CFF_Feed_Saver_Manager {
|
|
316 |
* @since 4.0
|
317 |
*/
|
318 |
public static function feed_customizer_fly_preview() {
|
|
|
|
|
319 |
if( isset( $_POST['feedID'] ) && isset( $_POST['previewSettings'] ) ){
|
320 |
$return = array(
|
321 |
'posts' => array()
|
@@ -351,6 +368,7 @@ class CFF_Feed_Saver_Manager {
|
|
351 |
* @since 4.0
|
352 |
*/
|
353 |
public static function get_feed_settings() {
|
|
|
354 |
|
355 |
$feed_id = ! empty( $_POST['feed_id'] ) ? $_POST['feed_id'] : false;
|
356 |
|
@@ -412,6 +430,8 @@ class CFF_Feed_Saver_Manager {
|
|
412 |
* @since 4.0
|
413 |
*/
|
414 |
public static function get_feed_list_page() {
|
|
|
|
|
415 |
$args = array( 'page' => (int)$_POST['page'] );
|
416 |
$feeds_data = CFF_Feed_Builder::get_feed_list($args);
|
417 |
|
@@ -426,6 +446,8 @@ class CFF_Feed_Saver_Manager {
|
|
426 |
* @since 4.0
|
427 |
*/
|
428 |
public static function get_locations_page() {
|
|
|
|
|
429 |
$args = array( 'page' => (int)$_POST['page'] );
|
430 |
|
431 |
if ( ! empty( $_POST['is_legacy'] ) ) {
|
35 |
* @since 4.0
|
36 |
*/
|
37 |
public static function builder_update() {
|
38 |
+
CFF_Feed_Builder::check_privilege( false );
|
39 |
+
|
40 |
$settings_data = $_POST;
|
41 |
|
42 |
$feed_id = false;
|
147 |
* @since 4.0
|
148 |
*/
|
149 |
public static function retrieve_comments() {
|
150 |
+
CFF_Feed_Builder::check_privilege( false );
|
151 |
+
|
152 |
if ( empty( $_POST['feed_id'] )) {
|
153 |
echo '{}';
|
154 |
wp_die();
|
179 |
* @since 4.0
|
180 |
*/
|
181 |
public static function delete_feed() {
|
182 |
+
CFF_Feed_Builder::check_privilege( false );
|
183 |
+
|
184 |
if ( ! empty( $_POST['feeds_ids'] ) && is_array( $_POST['feeds_ids'] )) {
|
185 |
CFF_Db::delete_feeds_query( $_POST['feeds_ids'] );
|
186 |
}
|
194 |
* @since 4.0
|
195 |
*/
|
196 |
public static function delete_source() {
|
197 |
+
CFF_Feed_Builder::check_privilege( false );
|
198 |
+
|
199 |
if ( ! empty( $_POST['source_id'] ) ) {
|
200 |
CFF_Db::delete_source_query( $_POST['source_id'] );
|
201 |
}
|
208 |
* @since 4.0
|
209 |
*/
|
210 |
public static function clear_single_feed_cache() {
|
211 |
+
CFF_Feed_Builder::check_privilege( false );
|
212 |
|
213 |
$feed_id = sanitize_text_field( $_POST['feedID'] );
|
214 |
|
239 |
* @since 4.0
|
240 |
*/
|
241 |
public static function duplicate_feed() {
|
242 |
+
CFF_Feed_Builder::check_privilege( false );
|
243 |
+
|
244 |
if ( ! empty( $_POST['feed_id'] ) ) {
|
245 |
CFF_Db::duplicate_feed_query( $_POST['feed_id'] );
|
246 |
}
|
253 |
* @since 4.0
|
254 |
*/
|
255 |
public static function importer() {
|
256 |
+
CFF_Feed_Builder::check_privilege( false );
|
257 |
+
|
258 |
if ( ! empty( $_POST['feed_json'] ) && strpos( $_POST['feed_json'], '{' ) === 0 ) {
|
259 |
echo json_encode( CFF_Feed_Saver_Manager::import_feed( stripslashes( $_POST['feed_json'] ) ) );
|
260 |
} else {
|
275 |
* @since 4.0
|
276 |
*/
|
277 |
public static function maybe_feed_customizer_data( $include_comments = false ) {
|
278 |
+
CFF_Feed_Builder::check_privilege( false );
|
279 |
+
|
280 |
if ( isset( $_GET['feed_id'] ) ){
|
281 |
$feed_id = $_GET['feed_id'];
|
282 |
$feed_saver = new CFF_Feed_Saver( $feed_id );
|
331 |
* @since 4.0
|
332 |
*/
|
333 |
public static function feed_customizer_fly_preview() {
|
334 |
+
CFF_Feed_Builder::check_privilege( false );
|
335 |
+
|
336 |
if( isset( $_POST['feedID'] ) && isset( $_POST['previewSettings'] ) ){
|
337 |
$return = array(
|
338 |
'posts' => array()
|
368 |
* @since 4.0
|
369 |
*/
|
370 |
public static function get_feed_settings() {
|
371 |
+
CFF_Feed_Builder::check_privilege( false );
|
372 |
|
373 |
$feed_id = ! empty( $_POST['feed_id'] ) ? $_POST['feed_id'] : false;
|
374 |
|
430 |
* @since 4.0
|
431 |
*/
|
432 |
public static function get_feed_list_page() {
|
433 |
+
CFF_Feed_Builder::check_privilege( false );
|
434 |
+
|
435 |
$args = array( 'page' => (int)$_POST['page'] );
|
436 |
$feeds_data = CFF_Feed_Builder::get_feed_list($args);
|
437 |
|
446 |
* @since 4.0
|
447 |
*/
|
448 |
public static function get_locations_page() {
|
449 |
+
CFF_Feed_Builder::check_privilege( false );
|
450 |
+
|
451 |
$args = array( 'page' => (int)$_POST['page'] );
|
452 |
|
453 |
if ( ! empty( $_POST['is_legacy'] ) ) {
|
inc/Builder/CFF_Source.php
CHANGED
@@ -33,6 +33,8 @@ class CFF_Source {
|
|
33 |
* @since 4.0
|
34 |
*/
|
35 |
public static function builder_update() {
|
|
|
|
|
36 |
$source_data = array(
|
37 |
'access_token' => sanitize_text_field( $_POST['access_token'] ),
|
38 |
'id' => sanitize_text_field( $_POST['id'] ),
|
@@ -114,6 +116,8 @@ class CFF_Source {
|
|
114 |
* @since 4.0
|
115 |
*/
|
116 |
public static function builder_update_multiple() {
|
|
|
|
|
117 |
if(isset($_POST['sourcesList']) && !empty($_POST['sourcesList']) && is_array($_POST['sourcesList'])){
|
118 |
foreach ($_POST['sourcesList'] as $single_source):
|
119 |
$source_data = array(
|
@@ -148,6 +152,8 @@ class CFF_Source {
|
|
148 |
* @since 4.0
|
149 |
*/
|
150 |
public static function get_page() {
|
|
|
|
|
151 |
$args = array( 'page' => $_POST['page'] );
|
152 |
$source_data = CFF_Db::source_query( $args );
|
153 |
|
@@ -162,6 +168,8 @@ class CFF_Source {
|
|
162 |
* @since 4.0
|
163 |
*/
|
164 |
public static function get_featured_post_preview() {
|
|
|
|
|
165 |
$query_args = array(
|
166 |
'id' => sanitize_text_field( $_POST['source_id'] )
|
167 |
);
|
@@ -196,6 +204,8 @@ class CFF_Source {
|
|
196 |
* @since 4.0
|
197 |
*/
|
198 |
public static function get_playlist_post_preview() {
|
|
|
|
|
199 |
$query_args = array(
|
200 |
'id' => sanitize_text_field( $_POST['source_id'] )
|
201 |
);
|
33 |
* @since 4.0
|
34 |
*/
|
35 |
public static function builder_update() {
|
36 |
+
CFF_Feed_Builder::check_privilege( false );
|
37 |
+
|
38 |
$source_data = array(
|
39 |
'access_token' => sanitize_text_field( $_POST['access_token'] ),
|
40 |
'id' => sanitize_text_field( $_POST['id'] ),
|
116 |
* @since 4.0
|
117 |
*/
|
118 |
public static function builder_update_multiple() {
|
119 |
+
CFF_Feed_Builder::check_privilege( false );
|
120 |
+
|
121 |
if(isset($_POST['sourcesList']) && !empty($_POST['sourcesList']) && is_array($_POST['sourcesList'])){
|
122 |
foreach ($_POST['sourcesList'] as $single_source):
|
123 |
$source_data = array(
|
152 |
* @since 4.0
|
153 |
*/
|
154 |
public static function get_page() {
|
155 |
+
CFF_Feed_Builder::check_privilege( false );
|
156 |
+
|
157 |
$args = array( 'page' => $_POST['page'] );
|
158 |
$source_data = CFF_Db::source_query( $args );
|
159 |
|
168 |
* @since 4.0
|
169 |
*/
|
170 |
public static function get_featured_post_preview() {
|
171 |
+
CFF_Feed_Builder::check_privilege( false );
|
172 |
+
|
173 |
$query_args = array(
|
174 |
'id' => sanitize_text_field( $_POST['source_id'] )
|
175 |
);
|
204 |
* @since 4.0
|
205 |
*/
|
206 |
public static function get_playlist_post_preview() {
|
207 |
+
CFF_Feed_Builder::check_privilege( false );
|
208 |
+
|
209 |
$query_args = array(
|
210 |
'id' => sanitize_text_field( $_POST['source_id'] )
|
211 |
);
|
inc/Builder/CFF_Tooltip_Wizard.php
CHANGED
@@ -57,17 +57,17 @@ class CFF_Tooltip_Wizard {
|
|
57 |
public function enqueues() {
|
58 |
|
59 |
wp_enqueue_style(
|
60 |
-
'tooltipster',
|
61 |
CFF_PLUGIN_URL . 'admin/builder/assets/css/tooltipster.css',
|
62 |
null,
|
63 |
-
|
64 |
);
|
65 |
|
66 |
wp_enqueue_script(
|
67 |
-
'tooltipster',
|
68 |
CFF_PLUGIN_URL . 'admin/builder/assets/js/jquery.tooltipster.min.js',
|
69 |
[ 'jquery' ],
|
70 |
-
|
71 |
true
|
72 |
);
|
73 |
|
57 |
public function enqueues() {
|
58 |
|
59 |
wp_enqueue_style(
|
60 |
+
'cff-tooltipster-css',
|
61 |
CFF_PLUGIN_URL . 'admin/builder/assets/css/tooltipster.css',
|
62 |
null,
|
63 |
+
CFFVER
|
64 |
);
|
65 |
|
66 |
wp_enqueue_script(
|
67 |
+
'cff-tooltipster-js',
|
68 |
CFF_PLUGIN_URL . 'admin/builder/assets/js/jquery.tooltipster.min.js',
|
69 |
[ 'jquery' ],
|
70 |
+
CFFVER,
|
71 |
true
|
72 |
);
|
73 |
|
inc/CFF_Shortcode.php
CHANGED
@@ -1756,7 +1756,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
|
|
1756 |
} else {
|
1757 |
$settings['ajax'] = get_option( 'cff_ajax', '' );
|
1758 |
}
|
1759 |
-
$settings['locale'] = get_option( 'cff_locale', 'en_US' );
|
1760 |
|
1761 |
// Default Timezone
|
1762 |
$defaults = array(
|
1756 |
} else {
|
1757 |
$settings['ajax'] = get_option( 'cff_ajax', '' );
|
1758 |
}
|
1759 |
+
$settings['locale'] = ( isset( $feed_options['locale'] ) ) ? $feed_options['locale'] : get_option( 'cff_locale', 'en_US' );
|
1760 |
|
1761 |
// Default Timezone
|
1762 |
$defaults = array(
|
inc/Custom_Facebook_Feed.php
CHANGED
@@ -633,7 +633,36 @@ final class Custom_Facebook_Feed{
|
|
633 |
* @access public
|
634 |
*/
|
635 |
function cff_activate() {
|
636 |
-
$options = get_option('cff_style_settings');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
|
638 |
//Show all post types
|
639 |
$options[ 'cff_show_links_type' ] = true;
|
@@ -663,30 +692,6 @@ final class Custom_Facebook_Feed{
|
|
663 |
get_option('cff_show_access_token');
|
664 |
update_option( 'cff_show_access_token', true );
|
665 |
|
666 |
-
//Run cron twice daily when plugin is first activated for new users
|
667 |
-
if ( ! wp_next_scheduled( 'cff_cron_job' ) ) {
|
668 |
-
wp_schedule_event( time(), 'twicedaily', 'cff_cron_job' );
|
669 |
-
}
|
670 |
-
if ( ! wp_next_scheduled( 'cff_feed_issue_email' ) ) {
|
671 |
-
CFF_Utils::cff_schedule_report_email();
|
672 |
-
}
|
673 |
-
// set usage tracking to false if fresh install.
|
674 |
-
$usage_tracking = get_option( 'cff_usage_tracking', false );
|
675 |
-
|
676 |
-
if ( ! is_array( $usage_tracking ) ) {
|
677 |
-
$usage_tracking = array(
|
678 |
-
'enabled' => false,
|
679 |
-
'last_send' => 0
|
680 |
-
);
|
681 |
-
update_option( 'cff_usage_tracking', $usage_tracking, false );
|
682 |
-
}
|
683 |
-
|
684 |
-
if ( ! wp_next_scheduled( 'cff_notification_update' ) ) {
|
685 |
-
$timestamp = strtotime( 'next monday' );
|
686 |
-
$timestamp = $timestamp + (3600 * 24 * 7);
|
687 |
-
$six_am_local = $timestamp + CFF_Utils::cff_get_utc_offset() + (6*60*60);
|
688 |
-
wp_schedule_event( $six_am_local, 'cffweekly', 'cff_notification_update' );
|
689 |
-
}
|
690 |
}
|
691 |
|
692 |
|
@@ -699,8 +704,10 @@ final class Custom_Facebook_Feed{
|
|
699 |
* @access public
|
700 |
*/
|
701 |
function cff_deactivate() {
|
702 |
-
wp_clear_scheduled_hook('cff_cron_job');
|
703 |
-
wp_clear_scheduled_hook('cff_notification_update');
|
|
|
|
|
704 |
}
|
705 |
|
706 |
|
@@ -717,8 +724,10 @@ final class Custom_Facebook_Feed{
|
|
717 |
return;
|
718 |
}
|
719 |
//If the user is preserving the settings then don't delete them
|
720 |
-
$cff_preserve_settings = get_option('cff_preserve_settings');
|
721 |
-
if($cff_preserve_settings)
|
|
|
|
|
722 |
|
723 |
//Settings
|
724 |
delete_option( 'cff_show_access_token' );
|
@@ -737,8 +746,6 @@ final class Custom_Facebook_Feed{
|
|
737 |
delete_option( 'cff_body_length' );
|
738 |
delete_option('cff_style_settings');
|
739 |
|
740 |
-
wp_clear_scheduled_hook( 'cff_feed_issue_email' );
|
741 |
-
|
742 |
delete_option( 'cff_usage_tracking_config' );
|
743 |
delete_option( 'cff_usage_tracking' );
|
744 |
|
@@ -749,9 +756,39 @@ final class Custom_Facebook_Feed{
|
|
749 |
delete_option( 'cff_newuser_notifications' );
|
750 |
delete_option( 'cff_notifications' );
|
751 |
|
|
|
|
|
|
|
|
|
|
|
752 |
global $wp_roles;
|
753 |
$wp_roles->remove_cap( 'administrator', 'manage_custom_facebook_feed_options' );
|
754 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
}
|
756 |
|
757 |
|
633 |
* @access public
|
634 |
*/
|
635 |
function cff_activate() {
|
636 |
+
$options = get_option( 'cff_style_settings' );
|
637 |
+
|
638 |
+
//Run cron twice daily when plugin is first activated for new users
|
639 |
+
if ( ! wp_next_scheduled( 'cff_cron_job' ) ) {
|
640 |
+
wp_schedule_event( time(), 'twicedaily', 'cff_cron_job' );
|
641 |
+
}
|
642 |
+
if ( ! wp_next_scheduled( 'cff_feed_issue_email' ) ) {
|
643 |
+
CFF_Utils::cff_schedule_report_email();
|
644 |
+
}
|
645 |
+
// set usage tracking to false if fresh install.
|
646 |
+
$usage_tracking = get_option( 'cff_usage_tracking', false );
|
647 |
+
|
648 |
+
if ( ! is_array( $usage_tracking ) ) {
|
649 |
+
$usage_tracking = array(
|
650 |
+
'enabled' => false,
|
651 |
+
'last_send' => 0
|
652 |
+
);
|
653 |
+
update_option( 'cff_usage_tracking', $usage_tracking, false );
|
654 |
+
}
|
655 |
+
|
656 |
+
if ( ! wp_next_scheduled( 'cff_notification_update' ) ) {
|
657 |
+
$timestamp = strtotime( 'next monday' );
|
658 |
+
$timestamp = $timestamp + (3600 * 24 * 7);
|
659 |
+
$six_am_local = $timestamp + CFF_Utils::cff_get_utc_offset() + (6*60*60);
|
660 |
+
wp_schedule_event( $six_am_local, 'cffweekly', 'cff_notification_update' );
|
661 |
+
}
|
662 |
+
|
663 |
+
if ( ! empty( $options ) ) {
|
664 |
+
return;
|
665 |
+
}
|
666 |
|
667 |
//Show all post types
|
668 |
$options[ 'cff_show_links_type' ] = true;
|
692 |
get_option('cff_show_access_token');
|
693 |
update_option( 'cff_show_access_token', true );
|
694 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
}
|
696 |
|
697 |
|
704 |
* @access public
|
705 |
*/
|
706 |
function cff_deactivate() {
|
707 |
+
wp_clear_scheduled_hook( 'cff_cron_job');
|
708 |
+
wp_clear_scheduled_hook( 'cff_notification_update');
|
709 |
+
wp_clear_scheduled_hook( 'cff_feed_issue_email' );
|
710 |
+
wp_clear_scheduled_hook( 'cff_usage_tracking_cron' );
|
711 |
}
|
712 |
|
713 |
|
724 |
return;
|
725 |
}
|
726 |
//If the user is preserving the settings then don't delete them
|
727 |
+
$cff_preserve_settings = get_option( 'cff_preserve_settings' );
|
728 |
+
if ( ! empty( $cff_preserve_settings ) ){
|
729 |
+
return;
|
730 |
+
}
|
731 |
|
732 |
//Settings
|
733 |
delete_option( 'cff_show_access_token' );
|
746 |
delete_option( 'cff_body_length' );
|
747 |
delete_option('cff_style_settings');
|
748 |
|
|
|
|
|
749 |
delete_option( 'cff_usage_tracking_config' );
|
750 |
delete_option( 'cff_usage_tracking' );
|
751 |
|
756 |
delete_option( 'cff_newuser_notifications' );
|
757 |
delete_option( 'cff_notifications' );
|
758 |
|
759 |
+
delete_option( 'cff_legacy_feed_settings' );
|
760 |
+
delete_option( 'cff_theme_styles' );
|
761 |
+
delete_option( 'cff_caching_type' );
|
762 |
+
delete_option( 'cff_oembed_token' );
|
763 |
+
|
764 |
global $wp_roles;
|
765 |
$wp_roles->remove_cap( 'administrator', 'manage_custom_facebook_feed_options' );
|
766 |
+
|
767 |
+
global $wpdb;
|
768 |
+
$locator_table_name = $wpdb->prefix . CFF_FEED_LOCATOR;
|
769 |
+
$wpdb->query( "DROP TABLE IF EXISTS $locator_table_name" );
|
770 |
+
|
771 |
+
$feeds_table_name = $wpdb->prefix . 'cff_feeds';
|
772 |
+
$wpdb->query( "DROP TABLE IF EXISTS $feeds_table_name" );
|
773 |
+
|
774 |
+
$feed_caches_table_name = $wpdb->prefix . 'cff_feed_caches';
|
775 |
+
$wpdb->query( "DROP TABLE IF EXISTS $feed_caches_table_name" );
|
776 |
+
|
777 |
+
$sources_table_name = $wpdb->prefix . 'cff_sources';
|
778 |
+
$wpdb->query( "DROP TABLE IF EXISTS $sources_table_name" );
|
779 |
+
|
780 |
+
$table_name = esc_sql( $wpdb->prefix . "postmeta" );
|
781 |
+
$result = $wpdb->query("
|
782 |
+
DELETE
|
783 |
+
FROM $table_name
|
784 |
+
WHERE meta_key = '_cff_oembed_done_checking';");
|
785 |
+
|
786 |
+
$usermeta_table_name = $wpdb->prefix . "usermeta";
|
787 |
+
$result = $wpdb->query( "
|
788 |
+
DELETE
|
789 |
+
FROM $usermeta_table_name
|
790 |
+
WHERE meta_key LIKE ('cff\_%')
|
791 |
+
" );
|
792 |
}
|
793 |
|
794 |
|