Custom Facebook Feed - Version 2.18.3

Version Description

  • Tweak: Updated deprecated jQuery functions to prevent potential issues with newer versions.
  • Tweak: Due to an API bug which Facebook hasn't resolved yet that affects buy/sell posts in groups, we have added a 'salesposts' shortcode option which will work around the issue until they fix it. If you are displaying posts from a group and receiving an "API Error 100" notice then adding salesposts=true to your shortcode and clearing the plugin cache should resolve the issue.
  • Fix: When displaying the feed in multiple columns, clicking the "See more" link in the post text wouldn't correctly reconfigure the layout.
  • Fix: Fixed a layout issue with the posts and Like Box which occurred when using a multi-column layout and applying feed padding.
  • Fix: Fixed an issue with the background color not being applied correctly when set to be black.
Download this release

Release Info

Developer smashballoon
Plugin Icon 128x128 Custom Facebook Feed
Version 2.18.3
Comparing to
See all releases

Code changes from version 2.18.2 to 2.18.3

README.txt CHANGED
@@ -4,7 +4,7 @@ Tags: Facebook, Facebook feed, Facebook posts, Facebook group, Facebook page
4
  Requires at least: 3.0
5
  Requires PHP: 5.6
6
  Tested up to: 5.6
7
- Stable tag: 2.18.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -171,7 +171,7 @@ The Custom Facebook Feed plugin doesn't currently have a slideshow feature built
171
  3) Add the following to the plugin's **Custom JavaScript** section, which is under the 'Misc' tab on the plugin's 'Customize' page. Please note, if you change the class option in the shortcode above to be anything but "slideshow" then make sure to change that on the first line of the snippet below:
172
 
173
  `var shortcodeClass = 'slideshow',
174
- cffSpeed = 5000,
175
  $cff = $('#cff.'+ shortcodeClass);
176
  $cffItem = $cff.find('.cff-item'),
177
  cffNum = $cffItem.length,
@@ -262,6 +262,13 @@ The most common reason for this is that an add-on or extension you have installe
262
  9. It's super easy to display your Facebook feed in any page or post
263
 
264
  == Changelog ==
 
 
 
 
 
 
 
265
  = 2.18.2 =
266
  * Tweak: Now displays a notice to logged-in admins which lets you know if the Like Box or header cover photo is being intentionally hidden due to the GDPR setting.
267
  * Fix: Fixed an error which occurred when deleting the plugin.
4
  Requires at least: 3.0
5
  Requires PHP: 5.6
6
  Tested up to: 5.6
7
+ Stable tag: 2.18.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
171
  3) Add the following to the plugin's **Custom JavaScript** section, which is under the 'Misc' tab on the plugin's 'Customize' page. Please note, if you change the class option in the shortcode above to be anything but "slideshow" then make sure to change that on the first line of the snippet below:
172
 
173
  `var shortcodeClass = 'slideshow',
174
+ cffSpeed = 5000,
175
  $cff = $('#cff.'+ shortcodeClass);
176
  $cffItem = $cff.find('.cff-item'),
177
  cffNum = $cffItem.length,
262
  9. It's super easy to display your Facebook feed in any page or post
263
 
264
  == Changelog ==
265
+ = 2.18.3 =
266
+ * Tweak: Updated deprecated jQuery functions to prevent potential issues with newer versions.
267
+ * Tweak: Due to an API bug which Facebook hasn't resolved yet that affects buy/sell posts in groups, we have added a 'salesposts' shortcode option which will work around the issue until they fix it. If you are displaying posts from a group and receiving an "API Error 100" notice then adding `salesposts=true` to your shortcode and clearing the plugin cache should resolve the issue.
268
+ * Fix: When displaying the feed in multiple columns, clicking the "See more" link in the post text wouldn't correctly reconfigure the layout.
269
+ * Fix: Fixed a layout issue with the posts and Like Box which occurred when using a multi-column layout and applying feed padding.
270
+ * Fix: Fixed an issue with the background color not being applied correctly when set to be black.
271
+
272
  = 2.18.2 =
273
  * Tweak: Now displays a notice to logged-in admins which lets you know if the Like Box or header cover photo is being intentionally hidden due to the GDPR setting.
274
  * Fix: Fixed an error which occurred when deleting the plugin.
admin/assets/js/cff-admin-scripts.js CHANGED
@@ -1,12 +1,12 @@
1
  jQuery(document).ready(function($) {
2
  //Tooltips
3
- jQuery('#cff-admin .cff-tooltip-link').click(function(){
4
  jQuery(this).closest('tr, h3, div').find('.cff-tooltip').slideToggle();
5
  });
6
 
7
  //Toggle Access Token field
8
  if( jQuery('#cff_show_access_token').is(':checked') ) jQuery('.cff-access-token-hidden').show();
9
- jQuery('#cff_show_access_token').change(function(){
10
  jQuery('.cff-access-token-hidden').fadeToggle();
11
  });
12
 
@@ -87,7 +87,7 @@ jQuery(document).ready(function($) {
87
  if(cff_page_type == 'group') $cff_group_error.show();
88
 
89
  //When page type is changed show the relevant item
90
- jQuery('.cff-page-type').change(function(){
91
  cff_page_type = jQuery('.cff-page-type select').val();
92
 
93
  if( cff_page_type !== 'page' ) {
@@ -102,7 +102,7 @@ jQuery(document).ready(function($) {
102
  $cff_group_error.hide();
103
  $cff_profile_error.hide();
104
  }
105
-
106
  } else {
107
  $cff_page_type_options.show();
108
  $cff_profile_error.hide();
@@ -124,7 +124,7 @@ jQuery(document).ready(function($) {
124
  jQuery('#cff_limit_setting').val('manual');
125
  }
126
 
127
- jQuery('#cff_limit_setting').change(function(){
128
  cff_limit_setting = jQuery('#cff_limit_setting').val();
129
 
130
  if(cff_limit_setting == 'auto'){
@@ -145,7 +145,7 @@ jQuery(document).ready(function($) {
145
  if(cff_header_type !== 'text') $cff_text_header_options.hide();
146
 
147
  //When Header type is changed show the relevant item
148
- jQuery('.cff-header-type').change(function(){
149
  cff_header_type = jQuery('.cff-header-type select').val();
150
 
151
  if( cff_header_type !== 'visual' ) {
@@ -162,7 +162,7 @@ jQuery(document).ready(function($) {
162
  //Check the saved icon type on page load and display it
163
  jQuery('#cff-header-icon-example').removeClass().addClass('fa fa-' + jQuery('#cff-header-icon').val() );
164
  //Change the header icon when selected from the list
165
- jQuery('#cff-header-icon').change(function() {
166
  var $self = jQuery(this);
167
 
168
  jQuery('#cff-header-icon-example').removeClass().addClass('fa fa-' + $self.val() );
@@ -170,19 +170,19 @@ jQuery(document).ready(function($) {
170
 
171
 
172
  //Test Facebook API connection button
173
- jQuery('#cff-api-test').click(function(e){
174
  e.preventDefault();
175
  //Show the JSON
176
  jQuery('#cff-api-test-result textarea').css('display', 'block');
177
  });
178
-
179
 
180
  //If '__ days ago' date is selected then show 'Translate this'
181
  var $cffTranslateDate = jQuery('#cff-translate-date');
182
 
183
  if ( jQuery("#cff-date-formatting option:selected").val() == '1' ) $cffTranslateDate.show();
184
-
185
- jQuery("#cff-date-formatting").change(function() {
186
  if ( jQuery("#cff-date-formatting option:selected").val() == '1' ) {
187
  $cffTranslateDate.fadeIn();
188
  } else {
@@ -191,7 +191,7 @@ jQuery(document).ready(function($) {
191
  });
192
 
193
  //Selecting a post style
194
- jQuery('.cff-post-style').click(function(){
195
  var $self = jQuery(this);
196
  $('.cff_post_style').trigger('change');
197
  $self.addClass('cff-layout-selected').find('#cff_post_style').attr('checked', 'checked');
@@ -204,7 +204,7 @@ jQuery(document).ready(function($) {
204
  }, 1);
205
  }
206
  cffChangePostStyleSettings();
207
- jQuery('.cff_post_style').change(cffChangePostStyleSettings);
208
 
209
  //Add the color picker
210
  if( jQuery('.cff-colorpicker').length > 0 ) jQuery('.cff-colorpicker').wpColorPicker();
@@ -218,11 +218,11 @@ jQuery(document).ready(function($) {
218
  //Show initially if a width is set
219
  if(cff_feed_width.length > 1 && cff_feed_width !== '100%') $cff_width_options.show();
220
 
221
- jQuery('#cff_feed_width').change(function(){
222
  cff_feed_width = jQuery(this).val();
223
 
224
  if( cff_feed_width.length < 2 || cff_feed_width == '100%' ) {
225
- $cff_width_options.slideUp();
226
  } else {
227
  $cff_width_options.slideDown();
228
  }
@@ -230,7 +230,7 @@ jQuery(document).ready(function($) {
230
  }
231
 
232
  //Scroll to hash for quick links
233
- jQuery('#cff-admin a').click(function() {
234
  if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
235
  var target = jQuery(this.hash);
236
  target = target.length ? target : this.hash.slice(1);
@@ -244,23 +244,23 @@ jQuery(document).ready(function($) {
244
  });
245
 
246
  //Shortcode tooltips
247
- jQuery('#cff-admin label').click(function(){
248
  var $el = jQuery(this);
249
  var $cff_shortcode = $el.siblings('.cff_shortcode');
250
  if($cff_shortcode.is(':visible')){
251
  $el.siblings('.cff_shortcode').css('display','none');
252
  } else {
253
  $el.siblings('.cff_shortcode').css('display','block');
254
- }
255
  });
256
- jQuery('#cff-admin th').hover(function(){
257
  if( jQuery(this).find('.cff_shortcode').length > 0 ){
258
  jQuery(this).find('label').append('<code class="cff_shortcode_symbol">[]</code>');
259
  }
260
  }, function(){
261
  jQuery(this).find('.cff_shortcode_symbol').remove();
262
  });
263
- jQuery('#cff-admin label').hover(function(){
264
  if( jQuery(this).siblings('.cff_shortcode').length > 0 ){
265
  jQuery(this).attr('title', 'Click for shortcode option');
266
  }
@@ -289,7 +289,7 @@ jQuery(document).ready(function($) {
289
  }
290
  }
291
  cffToggleNummobile();
292
- jQuery('#cff_show_num_mobile').change(cffToggleNummobile);
293
 
294
  //Facebook login
295
  $('#cff_fb_login').on('click', function(){
@@ -320,7 +320,7 @@ jQuery(document).ready(function($) {
320
  }
321
  });
322
 
323
-
324
 
325
 
326
 
@@ -419,7 +419,7 @@ jQuery(document).ready(function($) {
419
  $('#cff_manual_account_step_2').hide();
420
  });
421
  //Step 2
422
- jQuery("#cff_manual_account_type").change(function() {
423
  cff_go_to_step_2();
424
  });
425
  $('#cff-admin .cff_manual_forward').on('click', function(){
@@ -490,7 +490,7 @@ jQuery(document).ready(function($) {
490
  createAccountHTML(cff_connected_accounts);
491
  }
492
 
493
- function removeConnectedAccount($account){
494
  //Remove account from array
495
  delete cff_connected_accounts[$account.attr('data-page-id')];
496
 
@@ -654,7 +654,7 @@ jQuery(document).ready(function($) {
654
 
655
  //Remove ID/token from fields
656
  if( $selected_account.hasClass('cff_account_active') ){
657
-
658
  removePrimaryAcount($selected_account);
659
 
660
  //Add ID/token to fields
@@ -693,7 +693,7 @@ jQuery(document).ready(function($) {
693
  });
694
 
695
  }
696
-
697
 
698
  }
699
  }
@@ -751,7 +751,7 @@ jQuery(document).ready(function($) {
751
  }
752
 
753
  //Switch Page/Group app button in modal
754
- jQuery("#cff_login_type").change(function() {
755
  if ( jQuery("#cff_login_type option:selected").val() == 'group' ) {
756
  jQuery('#cff_page_app').hide();
757
  jQuery('#cff_group_app').css('display', 'inline-block');
@@ -772,7 +772,7 @@ jQuery(document).ready(function($) {
772
  });
773
 
774
  //Group app setup screenshot
775
- jQuery('#cff-group-app-tooltip').hover(function(){
776
  jQuery('#cff-group-app-screenshot').fadeIn(100);
777
  }, function(){
778
  jQuery('#cff-group-app-screenshot').fadeOut(100);
@@ -795,7 +795,7 @@ jQuery(document).ready(function($) {
795
  $cff_mobile_col_settings.show();
796
  }
797
 
798
- jQuery('#cff_cols').change(function(){
799
  cff_cols_num = parseInt( jQuery('#cff_cols').val() );
800
 
801
  if(cff_cols_num > 1){
@@ -814,7 +814,7 @@ jQuery(document).ready(function($) {
814
  jQuery('#cff-notice-bar').show();
815
  }
816
 
817
- jQuery('#cff-notice-bar .dismiss').click(function(e) {
818
  e.preventDefault();
819
  jQuery('#cff-notice-bar').remove();
820
  jQuery.ajax({
@@ -829,7 +829,7 @@ jQuery(document).ready(function($) {
829
  });
830
  });
831
 
832
- jQuery('#cff-oembed-disable').click(function(e) {
833
  e.preventDefault();
834
  jQuery(this).addClass( 'loading' ).html('<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');
835
  jQuery.ajax({
@@ -843,7 +843,7 @@ jQuery(document).ready(function($) {
843
  jQuery('#cff-oembed-disable').closest('p').html(data);
844
  }
845
  });
846
-
847
  });
848
 
849
  jQuery('.cff_show_gdpr_list').on('click', function(){
@@ -878,7 +878,7 @@ jQuery(document).ready(function($) {
878
  jQuery('#cff_enable_email_report').closest('td').find('.cff_box').slideUp();
879
  }
880
  }cffToggleEmail();
881
- jQuery('#cff_enable_email_report').change(cffToggleEmail);
882
  if (jQuery('#cff-goto').length) {
883
  jQuery('#cff-goto').closest('tr').addClass('cff-goto');
884
  $('html, body').animate({
@@ -886,11 +886,11 @@ jQuery(document).ready(function($) {
886
  }, 500);
887
  }
888
 
889
- jQuery('.cff-error-directions .cff-reconnect').click(function(){
890
  event.preventDefault();
891
  jQuery('.cff_admin_btn').trigger('click');
892
  });
893
- jQuery('.cff-clear-errors-visit-page').click(function(event) {
894
  event.preventDefault();
895
  var $btn = jQuery(this);
896
  $btn.prop( 'disabled', true ).addClass( 'loading' ).html('<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');
@@ -914,7 +914,7 @@ jQuery(document).ready(function($) {
914
  jQuery('#wpcontent').css('padding', 0);
915
  }
916
 
917
- $('.cff-opt-in').click(function(event) {
918
  event.preventDefault();
919
 
920
  var $btn = jQuery(this);
@@ -923,7 +923,7 @@ jQuery(document).ready(function($) {
923
  cffSubmitOptIn(true);
924
  }); // clear_comment_cache click
925
 
926
- $('.cff-no-usage-opt-out').click(function(event) {
927
  event.preventDefault();
928
 
929
  var $btn = jQuery(this);
1
  jQuery(document).ready(function($) {
2
  //Tooltips
3
+ jQuery('#cff-admin .cff-tooltip-link').on('click', function(){
4
  jQuery(this).closest('tr, h3, div').find('.cff-tooltip').slideToggle();
5
  });
6
 
7
  //Toggle Access Token field
8
  if( jQuery('#cff_show_access_token').is(':checked') ) jQuery('.cff-access-token-hidden').show();
9
+ jQuery('#cff_show_access_token').on('change', function(){
10
  jQuery('.cff-access-token-hidden').fadeToggle();
11
  });
12
 
87
  if(cff_page_type == 'group') $cff_group_error.show();
88
 
89
  //When page type is changed show the relevant item
90
+ jQuery('.cff-page-type').on('change', function(){
91
  cff_page_type = jQuery('.cff-page-type select').val();
92
 
93
  if( cff_page_type !== 'page' ) {
102
  $cff_group_error.hide();
103
  $cff_profile_error.hide();
104
  }
105
+
106
  } else {
107
  $cff_page_type_options.show();
108
  $cff_profile_error.hide();
124
  jQuery('#cff_limit_setting').val('manual');
125
  }
126
 
127
+ jQuery('#cff_limit_setting').on('change', function(){
128
  cff_limit_setting = jQuery('#cff_limit_setting').val();
129
 
130
  if(cff_limit_setting == 'auto'){
145
  if(cff_header_type !== 'text') $cff_text_header_options.hide();
146
 
147
  //When Header type is changed show the relevant item
148
+ jQuery('.cff-header-type').on('change', function(){
149
  cff_header_type = jQuery('.cff-header-type select').val();
150
 
151
  if( cff_header_type !== 'visual' ) {
162
  //Check the saved icon type on page load and display it
163
  jQuery('#cff-header-icon-example').removeClass().addClass('fa fa-' + jQuery('#cff-header-icon').val() );
164
  //Change the header icon when selected from the list
165
+ jQuery('#cff-header-icon').on('change', function() {
166
  var $self = jQuery(this);
167
 
168
  jQuery('#cff-header-icon-example').removeClass().addClass('fa fa-' + $self.val() );
170
 
171
 
172
  //Test Facebook API connection button
173
+ jQuery('#cff-api-test').on('click', function(e){
174
  e.preventDefault();
175
  //Show the JSON
176
  jQuery('#cff-api-test-result textarea').css('display', 'block');
177
  });
178
+
179
 
180
  //If '__ days ago' date is selected then show 'Translate this'
181
  var $cffTranslateDate = jQuery('#cff-translate-date');
182
 
183
  if ( jQuery("#cff-date-formatting option:selected").val() == '1' ) $cffTranslateDate.show();
184
+
185
+ jQuery("#cff-date-formatting").on('change', function() {
186
  if ( jQuery("#cff-date-formatting option:selected").val() == '1' ) {
187
  $cffTranslateDate.fadeIn();
188
  } else {
191
  });
192
 
193
  //Selecting a post style
194
+ jQuery('.cff-post-style').on('click', function(){
195
  var $self = jQuery(this);
196
  $('.cff_post_style').trigger('change');
197
  $self.addClass('cff-layout-selected').find('#cff_post_style').attr('checked', 'checked');
204
  }, 1);
205
  }
206
  cffChangePostStyleSettings();
207
+ jQuery('.cff_post_style').on('change', cffChangePostStyleSettings);
208
 
209
  //Add the color picker
210
  if( jQuery('.cff-colorpicker').length > 0 ) jQuery('.cff-colorpicker').wpColorPicker();
218
  //Show initially if a width is set
219
  if(cff_feed_width.length > 1 && cff_feed_width !== '100%') $cff_width_options.show();
220
 
221
+ jQuery('#cff_feed_width').on('change', function(){
222
  cff_feed_width = jQuery(this).val();
223
 
224
  if( cff_feed_width.length < 2 || cff_feed_width == '100%' ) {
225
+ $cff_width_options.slideUp();
226
  } else {
227
  $cff_width_options.slideDown();
228
  }
230
  }
231
 
232
  //Scroll to hash for quick links
233
+ jQuery('#cff-admin a').on('click', function() {
234
  if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
235
  var target = jQuery(this.hash);
236
  target = target.length ? target : this.hash.slice(1);
244
  });
245
 
246
  //Shortcode tooltips
247
+ jQuery('#cff-admin label').on('click', function(){
248
  var $el = jQuery(this);
249
  var $cff_shortcode = $el.siblings('.cff_shortcode');
250
  if($cff_shortcode.is(':visible')){
251
  $el.siblings('.cff_shortcode').css('display','none');
252
  } else {
253
  $el.siblings('.cff_shortcode').css('display','block');
254
+ }
255
  });
256
+ jQuery('#cff-admin th').on('hover', function(){
257
  if( jQuery(this).find('.cff_shortcode').length > 0 ){
258
  jQuery(this).find('label').append('<code class="cff_shortcode_symbol">[]</code>');
259
  }
260
  }, function(){
261
  jQuery(this).find('.cff_shortcode_symbol').remove();
262
  });
263
+ jQuery('#cff-admin label').on('hover', function(){
264
  if( jQuery(this).siblings('.cff_shortcode').length > 0 ){
265
  jQuery(this).attr('title', 'Click for shortcode option');
266
  }
289
  }
290
  }
291
  cffToggleNummobile();
292
+ jQuery('#cff_show_num_mobile').on('change', cffToggleNummobile);
293
 
294
  //Facebook login
295
  $('#cff_fb_login').on('click', function(){
320
  }
321
  });
322
 
323
+
324
 
325
 
326
 
419
  $('#cff_manual_account_step_2').hide();
420
  });
421
  //Step 2
422
+ jQuery("#cff_manual_account_type").on('change', function() {
423
  cff_go_to_step_2();
424
  });
425
  $('#cff-admin .cff_manual_forward').on('click', function(){
490
  createAccountHTML(cff_connected_accounts);
491
  }
492
 
493
+ function removeConnectedAccount($account){
494
  //Remove account from array
495
  delete cff_connected_accounts[$account.attr('data-page-id')];
496
 
654
 
655
  //Remove ID/token from fields
656
  if( $selected_account.hasClass('cff_account_active') ){
657
+
658
  removePrimaryAcount($selected_account);
659
 
660
  //Add ID/token to fields
693
  });
694
 
695
  }
696
+
697
 
698
  }
699
  }
751
  }
752
 
753
  //Switch Page/Group app button in modal
754
+ jQuery("#cff_login_type").on('change', function() {
755
  if ( jQuery("#cff_login_type option:selected").val() == 'group' ) {
756
  jQuery('#cff_page_app').hide();
757
  jQuery('#cff_group_app').css('display', 'inline-block');
772
  });
773
 
774
  //Group app setup screenshot
775
+ jQuery('#cff-group-app-tooltip').on('hover', function(){
776
  jQuery('#cff-group-app-screenshot').fadeIn(100);
777
  }, function(){
778
  jQuery('#cff-group-app-screenshot').fadeOut(100);
795
  $cff_mobile_col_settings.show();
796
  }
797
 
798
+ jQuery('#cff_cols').on('change', function(){
799
  cff_cols_num = parseInt( jQuery('#cff_cols').val() );
800
 
801
  if(cff_cols_num > 1){
814
  jQuery('#cff-notice-bar').show();
815
  }
816
 
817
+ jQuery('#cff-notice-bar .dismiss').on('click', function(e) {
818
  e.preventDefault();
819
  jQuery('#cff-notice-bar').remove();
820
  jQuery.ajax({
829
  });
830
  });
831
 
832
+ jQuery('#cff-oembed-disable').on('click', function(e) {
833
  e.preventDefault();
834
  jQuery(this).addClass( 'loading' ).html('<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');
835
  jQuery.ajax({
843
  jQuery('#cff-oembed-disable').closest('p').html(data);
844
  }
845
  });
846
+
847
  });
848
 
849
  jQuery('.cff_show_gdpr_list').on('click', function(){
878
  jQuery('#cff_enable_email_report').closest('td').find('.cff_box').slideUp();
879
  }
880
  }cffToggleEmail();
881
+ jQuery('#cff_enable_email_report').on('change', cffToggleEmail);
882
  if (jQuery('#cff-goto').length) {
883
  jQuery('#cff-goto').closest('tr').addClass('cff-goto');
884
  $('html, body').animate({
886
  }, 500);
887
  }
888
 
889
+ jQuery('.cff-error-directions .cff-reconnect').on('click', function(){
890
  event.preventDefault();
891
  jQuery('.cff_admin_btn').trigger('click');
892
  });
893
+ jQuery('.cff-clear-errors-visit-page').on('click', function(event) {
894
  event.preventDefault();
895
  var $btn = jQuery(this);
896
  $btn.prop( 'disabled', true ).addClass( 'loading' ).html('<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');
914
  jQuery('#wpcontent').css('padding', 0);
915
  }
916
 
917
+ $('.cff-opt-in').on('click', function(event) {
918
  event.preventDefault();
919
 
920
  var $btn = jQuery(this);
923
  cffSubmitOptIn(true);
924
  }); // clear_comment_cache click
925
 
926
+ $('.cff-no-usage-opt-out').on('click', function(event) {
927
  event.preventDefault();
928
 
929
  var $btn = jQuery(this);
assets/css/cff-style.css CHANGED
@@ -17,6 +17,18 @@
17
  -moz-box-sizing: border-box;
18
  box-sizing: border-box;
19
  }
 
 
 
 
 
 
 
 
 
 
 
 
20
  /* Individual post item */
21
  #cff .cff-item{
22
  float: left;
@@ -644,10 +656,7 @@
644
  /*** STYLE OPTIONS ***/
645
  /*********************/
646
  #cff.cff-fixed-height{
647
- overflow: hidden;
648
- overflow-y: auto;
649
  padding: 5px 10px;
650
-
651
  -webkit-box-sizing: border-box;
652
  -moz-box-sizing: border-box;
653
  box-sizing: border-box;
@@ -917,7 +926,7 @@
917
 
918
  /* GDPR NOTICE */
919
  .cff-gdpr-notice{
920
- max-width: 100%;
921
  box-sizing: border-box;
922
  padding: 8px 15px;
923
  margin: 0;
@@ -928,4 +937,4 @@
928
  border: 1px solid #e4b1b1;
929
  line-height: 1.3;
930
  display: none;
931
- }
17
  -moz-box-sizing: border-box;
18
  box-sizing: border-box;
19
  }
20
+ .cff-wrapper-ctn{overflow: hidden;}
21
+ .cff-wrapper-ctn.cff-wrapper-fixed-height{overflow: auto; overflow-x: hidden;}
22
+ .cff-wrapper-ctn,
23
+ #cff .cff-posts-wrap,
24
+ #cff .cff-masonry-posts{
25
+ position: relative;
26
+ clear: both;
27
+ height: 100%;
28
+ top: 0;
29
+ bottom: 0;
30
+ width: 100%;
31
+ }
32
  /* Individual post item */
33
  #cff .cff-item{
34
  float: left;
656
  /*** STYLE OPTIONS ***/
657
  /*********************/
658
  #cff.cff-fixed-height{
 
 
659
  padding: 5px 10px;
 
660
  -webkit-box-sizing: border-box;
661
  -moz-box-sizing: border-box;
662
  box-sizing: border-box;
926
 
927
  /* GDPR NOTICE */
928
  .cff-gdpr-notice{
929
+ max-width: 100%;
930
  box-sizing: border-box;
931
  padding: 8px 15px;
932
  margin: 0;
937
  border: 1px solid #e4b1b1;
938
  line-height: 1.3;
939
  display: none;
940
+ }
assets/css/cff-style.min.css CHANGED
@@ -1 +1 @@
1
- .cff-wrapper:after{content:"";display:table;clear:both}#cff{float:left;width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-item{float:left;width:100%;clear:both;padding:20px 0 15px 0;margin:0;border-bottom:1px solid #ddd}#cff .cff-item:first-child{padding-top:0}#cff .cff-item.cff-box,#cff .cff-item.cff-box:first-child{padding:15px;margin:8px 0;background:rgba(255,255,255,.5);border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-item.cff-box:first-child{margin-top:0}#cff .cff-item.cff-box:last-child{margin-bottom:0}#cff .cff-item.cff-shadow{box-shadow:0 0 10px 0 rgba(0,0,0,.15);-moz-box-shadow:0 0 10px 0 rgba(0,0,0,.15);-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,.15)}.cff-header{width:100%;margin:0 0 15px 0;padding:0;line-height:1;-webkit-box-sizing:border-box;box-sizing:border-box;display:flex;align-items:center}.cff-header .fa,.cff-header svg{margin:0 10px 0 0;padding:0}.cff-visual-header{margin-bottom:24px!important}.cff-visual-header .cff-header-hero{width:100%;height:300px;position:relative;overflow:hidden}.cff-visual-header .cff-header-hero img{width:100%;display:none}.cff-visual-header .cff-likes-box{position:absolute;bottom:10px;right:10px;padding:5px;background:#eee;line-height:1;border-radius:2px;color:#445790}.cff-visual-header .cff-likes-box .cff-square-logo{float:left;display:inline-block;line-height:0}.cff-visual-header .cff-likes-box .cff-square-logo svg{width:18px;vertical-align:top}.cff-visual-header .cff-likes-box .cff-likes-count{float:left;display:inline-block;margin-left:8px;vertical-align:top;font-size:15px;line-height:20px}.cff-visual-header .cff-header-inner-wrap{position:relative;display:block;text-decoration:none!important}.cff-visual-header .cff-header-inner-wrap a{color:inherit!important;border:0}.cff-visual-header .cff-header-img img{display:block;width:100px;border-radius:3px;padding:0;margin:0}.cff-visual-header.cff-has-cover .cff-header-img img{border:2px solid #fff}.cff-visual-header .cff-header-img{position:absolute;display:inline-block;line-height:1}.cff-visual-header.cff-has-cover .cff-header-img{top:-25px;left:10px}.cff-visual-header .cff-header-text{display:inline-block;float:left;margin:20px 0 0 120px}#cff .cff-visual-header .cff-header-text h3,.cff-visual-header .cff-header-text h3{display:inline-block;width:auto;margin:0 8px 0 0;padding:0;font-size:1.2em;line-height:1.2em}.cff-visual-header .cff-header-text{padding-top:10px;margin:0}.cff-visual-header.cff-has-name{min-height:100px}.cff-visual-header.cff-has-cover.cff-has-name .cff-header-text{min-height:75px}.cff-visual-header.cff-has-name .cff-header-text{margin-left:120px}.cff-visual-header.cff-has-cover.cff-has-name .cff-header-text{margin-left:125px}.cff-visual-header.cff-has-name .cff-header-text{padding-top:30px}.cff-visual-header.cff-has-name.cff-has-about .cff-header-text,.cff-visual-header.cff-has-name.cff-has-cover .cff-header-text{padding-top:10px}#cff .cff-visual-header .cff-header-inner-wrap .cff-bio,.cff-visual-header .cff-header-inner-wrap .cff-bio{display:block;width:100%;clear:both;margin:3px 0 0 0;padding:0;line-height:1.2em}.cff-visual-header .cff-header-name{float:left;padding:0 5px 2px 0}.cff-visual-header .cff-bio-info{font-size:.9em;line-height:1.7}.cff-visual-header .cff-bio-info svg{display:inline-block;width:1em;vertical-align:middle;position:relative;top:-2px}.cff-posts-count svg{padding-right:3px}.cff-header-inner-wrap:after,.cff-header-text:after{display:table;clear:both;content:" "}#cff .cff-less{display:none}#cff.cff-default-styles a{text-decoration:none}#cff.cff-default-styles a:focus,#cff.cff-default-styles a:hover{text-decoration:underline}#cff .cff-post-text-link{display:block}.cff-post-text{width:100%;float:left}#cff .cff-post-desc,#cff h3,#cff h4,#cff h5,#cff h6,#cff p{float:left;width:100%;clear:both;padding:0;margin:5px 0;word-wrap:break-word}#cff.cff-default-styles .cff-post-desc,#cff.cff-default-styles h3,#cff.cff-default-styles h4,#cff.cff-default-styles h5,#cff.cff-default-styles h6,#cff.cff-default-styles p{line-height:1.4}#cff .cff-date{float:left;min-width:50px;width:auto}#cff.cff-default-styles .cff-date{font-size:11px}#cff .cff-author{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#cff .cff-author a{text-decoration:none;border:none}#cff .cff-author-img{float:left;width:40px;height:40px;margin:0 0 0 -100%!important;font-size:0;background:#eee;background:url(../img/cff-avatar.png) no-repeat;background-size:100%;border-radius:50%}#cff .cff-author img{float:left;margin:0!important;padding:0!important;border:none!important;font-size:0;border-radius:50%}#cff .cff-author-img.cff-no-consent img{display:none}.cff-no-consent .cff-header-text{margin-left:0!important}.cff-no-consent .cff-header-hero,.cff-no-consent .cff-header-img{display:none!important}#cff .cff-author .cff-author-text span.cff-page-name{display:table-cell;vertical-align:middle;height:40px;margin:0;font-weight:700;padding-left:50px;float:none}#cff .cff-author .cff-story{font-weight:400}#cff.cff-default-styles .cff-author a{text-decoration:none}#cff .cff-author.cff-no-author-info .cff-date{margin-top:12px!important}#cff .cff-author.cff-no-author-info .cff-author-img{width:40px;height:40px;background:url(../img/cff-avatar.png) no-repeat}#cff .cff-author .cff-author-text{float:left;width:100%}#cff .cff-author .cff-date,#cff .cff-author .cff-page-name{float:left;clear:both;width:auto;margin:0 0 0 50px!important}#cff.cff-default-styles .cff-author .cff-author-text *{font-weight:700;line-height:1.2}#cff .cff-author .cff-date{color:#9197a3;font-size:11px;margin-top:2px!important;margin-bottom:0!important}#cff.cff-default-styles .cff-author .cff-date{font-weight:400}#cff .cff-author .cff-page-name.cff-author-date{float:left;padding:3px 0 0 0;font-size:14px}#cff .cff-cta-link a,.cff-media-link .fa{display:inline-block;width:auto;padding:5px 7px 5px 6px;margin-right:6px;border:1px solid #eee;border:1px solid rgba(0,0,0,.1);border-radius:3px;background:rgba(0,0,0,.02)}#cff .cff-cta-link a:hover,.cff-media-link .fa:hover{background:#f9f9f9;background:rgba(0,0,0,.03);text-decoration:none}#cff .cff-cta-link a{padding:5px 15px}#cff .cff-break-word{word-break:break-all}#cff .cff-expand{display:none}#cff.cff-default-styles .cff-expand a{font-size:11px;font-weight:400}#cff .cff-shared-link{float:left;clear:both;width:100%;padding:5px 10px;margin:10px 0 5px 0;background:#f9f9f9;border:1px solid #d9d9d9;background:rgba(0,0,0,.02);border:1px solid rgba(0,0,0,.07);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-no-styles{background:0 0;border:none;padding:0}#cff .cff-link{float:left;clear:both;max-width:20%;margin:10px 0 0 0}#cff .cff-link img{max-width:100%}#cff .cff-link-title{float:left;clear:both;width:100%;display:block}#cff.cff-default-styles .cff-link-title{font-weight:700}#cff p.cff-link-title{margin:5px 0 0 0}#cff .cff-text-link{float:left;clear:none;width:72%;margin-left:3%;padding:0 0 5px 0}#cff .cff-link-caption{margin:0}#cff.cff-default-styles .cff-link-caption{font-size:12px}#cff .cff-text-link.cff-no-image{width:100%;margin-left:0}#cff .cff-post-desc{margin:5px 0 0 0}#cff .cff-details{float:left;clear:none;width:100%;margin:0;padding:0}#cff .cff-details h5{margin:0 0 5px 0}#cff.cff-default-styles .cff-details h5{padding:0;font-size:16px}#cff.cff-default-styles .cff-details p{font-size:14px}#cff .cff-timeline-event .cff-date,#cff .cff-timeline-event .cff-info,#cff .cff-timeline-event .cff-timeline-event-title,#cff .cff-timeline-event .cff-where{display:block;width:100%;clear:both}#cff .cff-details .cff-info{padding:10px 0 0 0}#cff.cff-default-styles .cff-details .cff-info{line-height:1.2}#cff .cff-desc-wrap{float:left;width:100%}#cff .cff-note-title{display:block;font-weight:700;padding-bottom:5px}#cff .cff-post-links{float:left;clear:none;padding:5px 0 0 0;margin:0}#cff.cff-default-styles .cff-post-links{font-size:11px}#cff .cff-post-links.cff-left{float:left;margin:8px 0}#cff.cff-default-styles .cff-post-links a{font-size:11px}#cff .cff-post-links a:first-child{padding-left:0;margin:0}#cff .cff-dot{padding:0 5px}#cff .cff-share-container{position:relative;display:inline}#cff .cff-share-tooltip{display:none;position:absolute;z-index:1000;bottom:22px;right:-40px;width:110px;padding:3px 5px 4px 5px;margin:0;background:#333;color:#eee;font-size:12px;line-height:1.3;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-share-tooltip .fa-play{position:absolute;font-size:8px;bottom:-6px;left:50%;margin-left:-3px;color:#333}#cff .cff-share-tooltip a .fa,#cff .cff-share-tooltip a svg{font-size:16px;margin:0;padding:5px}#cff .cff-share-tooltip a{display:block;float:left;margin:0!important;padding:0!important;color:#eee!important;opacity:0;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#cff .cff-share-tooltip a:hover{color:#fff!important}#cff .cff-share-tooltip .cff-facebook-icon:hover{background:#3b5998}#cff .cff-share-tooltip .cff-twitter-icon:hover{background:#00aced}#cff .cff-share-tooltip .cff-google-icon:hover{background:#dd4b39}#cff .cff-share-tooltip .cff-linkedin-icon:hover{background:#007bb6}#cff .cff-share-tooltip .cff-pinterest-icon:hover{background:#cb2027}#cff .cff-share-tooltip .cff-email-icon:hover{background:#dd4b39}#cff .cff-share-tooltip a.cff-show{opacity:1;transition:opacity .2s ease}.cff-likebox{float:left;width:100%;position:relative;margin:20px 0 0 0}.fb_iframe_widget{border:none;overflow:hidden}.cff-likebox .fb_iframe_widget{width:100%}.cff-likebox .fb_iframe_widget span{width:100%!important}.cff-likebox .fb_iframe_widget iframe{margin:0;position:relative;top:0;left:0;width:100%!important;height:100%}.cff-likebox.cff-top.cff-outside{margin-bottom:10px}.cff-likebox.cff-bottom.cff-outside{margin-top:10px}#cff.cff-fixed-height{overflow:hidden;overflow-y:auto;padding:5px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-error-msg{display:none;position:relative;font-size:12px;font-family:sans-serif;padding:8px 12px;border:1px solid #ddd;margin-bottom:10px;clear:both;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}#cff .cff-error-msg p{float:none}#cff .cff-error-msg .cff_notice_dismiss{position:absolute;top:4px;right:8px}#cff #cff-error-reason{display:none;padding:5px 0 0 0;clear:both}#cff.cff-default-styles .cff-credit{font-size:11px}#cff.cff-default-styles .cff-credit a{text-decoration:none}#cff .cff-credit img{float:left;margin:-2px 5px 0 0}#cff .cff-credit .fa{padding-right:5px;font-size:13px}.cff-credit a{display:flex;align-items:center}.cff-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important}@media all and (max-width:640px){#cff.cff-width-resp{width:100%!important}.cff-wrapper .cff-visual-header .cff-header-img img{width:80px}.cff-wrapper .cff-visual-header.cff-has-name .cff-header-text{margin-left:95px}.cff-wrapper .cff-visual-header.cff-has-cover.cff-has-name .cff-header-text{margin-left:105px}}#cff .cff-comment .cff-comment-text img,#cff img.emoji,#cff-lightbox-wrapper .cff-comment .cff-comment-text img,#cff-lightbox-wrapper img.emoji{float:none;max-width:100%}#cff .cff-linebreak{display:block;height:5px}#cff.cff-masonry .cff-item.cff-box{margin-left:1.5%;margin-right:1.5%}#cff.cff-masonry{box-sizing:border-box}#cff.cff-masonry .cff-item,#cff.cff-masonry .cff-item:first-child{padding-top:20px;margin-top:0}#cff.cff-masonry .cff-item,#cff.cff-masonry .cff-likebox{float:none;display:inline-block;width:30.3%;margin:0 1.5%;margin-bottom:20px}#cff.cff-masonry.cff-opaque-comments .cff-item{z-index:1}#cff.cff-masonry.masonry-2-desktop .cff-item{width:47%;margin:0 1.5%}#cff.cff-masonry.masonry-4-desktop .cff-item{width:22%;margin:0 1.5%}#cff.cff-masonry.masonry-5-desktop .cff-item{width:17%;margin:0 1.5%}#cff.cff-masonry.masonry-6-desktop .cff-item{width:13.516%;margin:0 1.5%}#cff.cff-masonry .cff-comments-box{position:relative;z-index:999}#cff.cff-masonry .cff-comment-attachment,#cff.cff-masonry .cff-comment-replies-box{max-width:100%}#cff.cff-masonry .cff-load-more{display:block;float:left;clear:both}@media (max-width:780px){#cff.cff-masonry .cff-item,#cff.cff-masonry .cff-likebox,#cff.cff-masonry.masonry-2-desktop .cff-item,#cff.cff-masonry.masonry-4-desktop .cff-item,#cff.cff-masonry.masonry-5-desktop .cff-item,#cff.cff-masonry.masonry-6-desktop .cff-item{width:100%;margin:0}#cff.cff-masonry.masonry-2-mobile .cff-item{width:47%;margin-left:1.5%;margin-right:1.5%}}#cff.cff-masonry.cff-masonry-css{width:100%;overflow:hidden;margin-bottom:20px}#cff.cff-masonry.cff-masonry-css{-webkit-column-gap:20px;-moz-column-gap:20px;column-gap:20px;-webkit-column-fill:auto;column-fill:unset;-webkit-column-count:3;-moz-column-count:3;column-count:3;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-2-desktop{-webkit-column-count:2;-moz-column-count:2;column-count:2;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-4-desktop{-webkit-column-count:4;-moz-column-count:4;column-count:4;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-5-desktop{-webkit-column-count:5;-moz-column-count:5;column-count:5;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-6-desktop{-webkit-column-count:6;-moz-column-count:6;column-count:6;margin:0}#cff.cff-masonry.cff-masonry-css .cff-item,#cff.cff-masonry.cff-masonry-css .cff-likebox,#cff.cff-masonry.cff-masonry-css.masonry-2-desktop .cff-item,#cff.cff-masonry.cff-masonry-css.masonry-4-desktop .cff-item,#cff.cff-masonry.cff-masonry-css.masonry-5-desktop .cff-item,#cff.cff-masonry.cff-masonry-css.masonry-6-desktop .cff-item{float:none;display:inline-block;width:100%;margin:0 0 12px 0}#cff.cff-masonry.cff-masonry-css .cff-likebox{width:99.5%}#cff.cff-masonry.cff-masonry-css .cff-load-more{margin:0 0 10px 0;position:relative;bottom:0}@media only screen and (max-width:780px){#cff.cff-masonry.cff-masonry-css,#cff.cff-masonry.cff-masonry-css.masonry-2-desktop,#cff.cff-masonry.cff-masonry-css.masonry-4-desktop,#cff.cff-masonry.cff-masonry-css.masonry-5-desktop,#cff.cff-masonry.cff-masonry-css.masonry-6-desktop{-webkit-column-count:1;-moz-column-count:1;column-count:1}#cff.cff-masonry.cff-masonry-css.masonry-2-mobile{-webkit-column-count:2;-moz-column-count:2;column-count:2;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-2-mobile,#cff.cff-masonry.cff-masonry-css.masonry-2-mobile .cff-item{width:100%}}#cff.cff-disable-masonry{height:auto!important}#cff.cff-disable-masonry .cff-item,#cff.cff-disable-masonry .cff-likebox{position:relative!important;top:auto!important}.cff-num-diff-hide{display:none!important}.cff-gdpr-notice{max-width:100%;box-sizing:border-box;padding:8px 15px;margin:0;font-size:12px;background:#fdf7f7;display:inline-block;border-radius:5px;border:1px solid #e4b1b1;line-height:1.3;display:none}
1
+ .cff-wrapper:after{content:"";display:table;clear:both}#cff{float:left;width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cff-wrapper-ctn{overflow:hidden}.cff-wrapper-ctn.cff-wrapper-fixed-height{overflow:auto;overflow-x:hidden}#cff .cff-masonry-posts,#cff .cff-posts-wrap,.cff-wrapper-ctn{position:relative;clear:both;height:100%;top:0;bottom:0;width:100%}#cff .cff-item{float:left;width:100%;clear:both;padding:20px 0 15px 0;margin:0;border-bottom:1px solid #ddd}#cff .cff-item:first-child{padding-top:0}#cff .cff-item.cff-box,#cff .cff-item.cff-box:first-child{padding:15px;margin:8px 0;background:rgba(255,255,255,.5);border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-item.cff-box:first-child{margin-top:0}#cff .cff-item.cff-box:last-child{margin-bottom:0}#cff .cff-item.cff-shadow{box-shadow:0 0 10px 0 rgba(0,0,0,.15);-moz-box-shadow:0 0 10px 0 rgba(0,0,0,.15);-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,.15)}.cff-header{width:100%;margin:0 0 15px 0;padding:0;line-height:1;-webkit-box-sizing:border-box;box-sizing:border-box;display:flex;align-items:center}.cff-header .fa,.cff-header svg{margin:0 10px 0 0;padding:0}.cff-visual-header{margin-bottom:24px!important}.cff-visual-header .cff-header-hero{width:100%;height:300px;position:relative;overflow:hidden}.cff-visual-header .cff-header-hero img{width:100%;display:none}.cff-visual-header .cff-likes-box{position:absolute;bottom:10px;right:10px;padding:5px;background:#eee;line-height:1;border-radius:2px;color:#445790}.cff-visual-header .cff-likes-box .cff-square-logo{float:left;display:inline-block;line-height:0}.cff-visual-header .cff-likes-box .cff-square-logo svg{width:18px;vertical-align:top}.cff-visual-header .cff-likes-box .cff-likes-count{float:left;display:inline-block;margin-left:8px;vertical-align:top;font-size:15px;line-height:20px}.cff-visual-header .cff-header-inner-wrap{position:relative;display:block;text-decoration:none!important}.cff-visual-header .cff-header-inner-wrap a{color:inherit!important;border:0}.cff-visual-header .cff-header-img img{display:block;width:100px;border-radius:3px;padding:0;margin:0}.cff-visual-header.cff-has-cover .cff-header-img img{border:2px solid #fff}.cff-visual-header .cff-header-img{position:absolute;display:inline-block;line-height:1}.cff-visual-header.cff-has-cover .cff-header-img{top:-25px;left:10px}.cff-visual-header .cff-header-text{display:inline-block;float:left;margin:20px 0 0 120px}#cff .cff-visual-header .cff-header-text h3,.cff-visual-header .cff-header-text h3{display:inline-block;width:auto;margin:0 8px 0 0;padding:0;font-size:1.2em;line-height:1.2em}.cff-visual-header .cff-header-text{padding-top:10px;margin:0}.cff-visual-header.cff-has-name{min-height:100px}.cff-visual-header.cff-has-cover.cff-has-name .cff-header-text{min-height:75px}.cff-visual-header.cff-has-name .cff-header-text{margin-left:120px}.cff-visual-header.cff-has-cover.cff-has-name .cff-header-text{margin-left:125px}.cff-visual-header.cff-has-name .cff-header-text{padding-top:30px}.cff-visual-header.cff-has-name.cff-has-about .cff-header-text,.cff-visual-header.cff-has-name.cff-has-cover .cff-header-text{padding-top:10px}#cff .cff-visual-header .cff-header-inner-wrap .cff-bio,.cff-visual-header .cff-header-inner-wrap .cff-bio{display:block;width:100%;clear:both;margin:3px 0 0 0;padding:0;line-height:1.2em}.cff-visual-header .cff-header-name{float:left;padding:0 5px 2px 0}.cff-visual-header .cff-bio-info{font-size:.9em;line-height:1.7}.cff-visual-header .cff-bio-info svg{display:inline-block;width:1em;vertical-align:middle;position:relative;top:-2px}.cff-posts-count svg{padding-right:3px}.cff-header-inner-wrap:after,.cff-header-text:after{display:table;clear:both;content:" "}#cff .cff-less{display:none}#cff.cff-default-styles a{text-decoration:none}#cff.cff-default-styles a:focus,#cff.cff-default-styles a:hover{text-decoration:underline}#cff .cff-post-text-link{display:block}.cff-post-text{width:100%;float:left}#cff .cff-post-desc,#cff h3,#cff h4,#cff h5,#cff h6,#cff p{float:left;width:100%;clear:both;padding:0;margin:5px 0;word-wrap:break-word}#cff.cff-default-styles .cff-post-desc,#cff.cff-default-styles h3,#cff.cff-default-styles h4,#cff.cff-default-styles h5,#cff.cff-default-styles h6,#cff.cff-default-styles p{line-height:1.4}#cff .cff-date{float:left;min-width:50px;width:auto}#cff.cff-default-styles .cff-date{font-size:11px}#cff .cff-author{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#cff .cff-author a{text-decoration:none;border:none}#cff .cff-author-img{float:left;width:40px;height:40px;margin:0 0 0 -100%!important;font-size:0;background:#eee;background:url(../img/cff-avatar.png) no-repeat;background-size:100%;border-radius:50%}#cff .cff-author img{float:left;margin:0!important;padding:0!important;border:none!important;font-size:0;border-radius:50%}#cff .cff-author-img.cff-no-consent img{display:none}.cff-no-consent .cff-header-text{margin-left:0!important}.cff-no-consent .cff-header-hero,.cff-no-consent .cff-header-img{display:none!important}#cff .cff-author .cff-author-text span.cff-page-name{display:table-cell;vertical-align:middle;height:40px;margin:0;font-weight:700;padding-left:50px;float:none}#cff .cff-author .cff-story{font-weight:400}#cff.cff-default-styles .cff-author a{text-decoration:none}#cff .cff-author.cff-no-author-info .cff-date{margin-top:12px!important}#cff .cff-author.cff-no-author-info .cff-author-img{width:40px;height:40px;background:url(../img/cff-avatar.png) no-repeat}#cff .cff-author .cff-author-text{float:left;width:100%}#cff .cff-author .cff-date,#cff .cff-author .cff-page-name{float:left;clear:both;width:auto;margin:0 0 0 50px!important}#cff.cff-default-styles .cff-author .cff-author-text *{font-weight:700;line-height:1.2}#cff .cff-author .cff-date{color:#9197a3;font-size:11px;margin-top:2px!important;margin-bottom:0!important}#cff.cff-default-styles .cff-author .cff-date{font-weight:400}#cff .cff-author .cff-page-name.cff-author-date{float:left;padding:3px 0 0 0;font-size:14px}#cff .cff-cta-link a,.cff-media-link .fa{display:inline-block;width:auto;padding:5px 7px 5px 6px;margin-right:6px;border:1px solid #eee;border:1px solid rgba(0,0,0,.1);border-radius:3px;background:rgba(0,0,0,.02)}#cff .cff-cta-link a:hover,.cff-media-link .fa:hover{background:#f9f9f9;background:rgba(0,0,0,.03);text-decoration:none}#cff .cff-cta-link a{padding:5px 15px}#cff .cff-break-word{word-break:break-all}#cff .cff-expand{display:none}#cff.cff-default-styles .cff-expand a{font-size:11px;font-weight:400}#cff .cff-shared-link{float:left;clear:both;width:100%;padding:5px 10px;margin:10px 0 5px 0;background:#f9f9f9;border:1px solid #d9d9d9;background:rgba(0,0,0,.02);border:1px solid rgba(0,0,0,.07);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-no-styles{background:0 0;border:none;padding:0}#cff .cff-link{float:left;clear:both;max-width:20%;margin:10px 0 0 0}#cff .cff-link img{max-width:100%}#cff .cff-link-title{float:left;clear:both;width:100%;display:block}#cff.cff-default-styles .cff-link-title{font-weight:700}#cff p.cff-link-title{margin:5px 0 0 0}#cff .cff-text-link{float:left;clear:none;width:72%;margin-left:3%;padding:0 0 5px 0}#cff .cff-link-caption{margin:0}#cff.cff-default-styles .cff-link-caption{font-size:12px}#cff .cff-text-link.cff-no-image{width:100%;margin-left:0}#cff .cff-post-desc{margin:5px 0 0 0}#cff .cff-details{float:left;clear:none;width:100%;margin:0;padding:0}#cff .cff-details h5{margin:0 0 5px 0}#cff.cff-default-styles .cff-details h5{padding:0;font-size:16px}#cff.cff-default-styles .cff-details p{font-size:14px}#cff .cff-timeline-event .cff-date,#cff .cff-timeline-event .cff-info,#cff .cff-timeline-event .cff-timeline-event-title,#cff .cff-timeline-event .cff-where{display:block;width:100%;clear:both}#cff .cff-details .cff-info{padding:10px 0 0 0}#cff.cff-default-styles .cff-details .cff-info{line-height:1.2}#cff .cff-desc-wrap{float:left;width:100%}#cff .cff-note-title{display:block;font-weight:700;padding-bottom:5px}#cff .cff-post-links{float:left;clear:none;padding:5px 0 0 0;margin:0}#cff.cff-default-styles .cff-post-links{font-size:11px}#cff .cff-post-links.cff-left{float:left;margin:8px 0}#cff.cff-default-styles .cff-post-links a{font-size:11px}#cff .cff-post-links a:first-child{padding-left:0;margin:0}#cff .cff-dot{padding:0 5px}#cff .cff-share-container{position:relative;display:inline}#cff .cff-share-tooltip{display:none;position:absolute;z-index:1000;bottom:22px;right:-40px;width:110px;padding:3px 5px 4px 5px;margin:0;background:#333;color:#eee;font-size:12px;line-height:1.3;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-share-tooltip .fa-play{position:absolute;font-size:8px;bottom:-6px;left:50%;margin-left:-3px;color:#333}#cff .cff-share-tooltip a .fa,#cff .cff-share-tooltip a svg{font-size:16px;margin:0;padding:5px}#cff .cff-share-tooltip a{display:block;float:left;margin:0!important;padding:0!important;color:#eee!important;opacity:0;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#cff .cff-share-tooltip a:hover{color:#fff!important}#cff .cff-share-tooltip .cff-facebook-icon:hover{background:#3b5998}#cff .cff-share-tooltip .cff-twitter-icon:hover{background:#00aced}#cff .cff-share-tooltip .cff-google-icon:hover{background:#dd4b39}#cff .cff-share-tooltip .cff-linkedin-icon:hover{background:#007bb6}#cff .cff-share-tooltip .cff-pinterest-icon:hover{background:#cb2027}#cff .cff-share-tooltip .cff-email-icon:hover{background:#dd4b39}#cff .cff-share-tooltip a.cff-show{opacity:1;transition:opacity .2s ease}.cff-likebox{float:left;width:100%;position:relative;margin:20px 0 0 0}.fb_iframe_widget{border:none;overflow:hidden}.cff-likebox .fb_iframe_widget{width:100%}.cff-likebox .fb_iframe_widget span{width:100%!important}.cff-likebox .fb_iframe_widget iframe{margin:0;position:relative;top:0;left:0;width:100%!important;height:100%}.cff-likebox.cff-top.cff-outside{margin-bottom:10px}.cff-likebox.cff-bottom.cff-outside{margin-top:10px}#cff.cff-fixed-height{padding:5px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-error-msg{display:none;position:relative;font-size:12px;font-family:sans-serif;padding:8px 12px;border:1px solid #ddd;margin-bottom:10px;clear:both;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}#cff .cff-error-msg p{float:none}#cff .cff-error-msg .cff_notice_dismiss{position:absolute;top:4px;right:8px}#cff #cff-error-reason{display:none;padding:5px 0 0 0;clear:both}#cff.cff-default-styles .cff-credit{font-size:11px}#cff.cff-default-styles .cff-credit a{text-decoration:none}#cff .cff-credit img{float:left;margin:-2px 5px 0 0}#cff .cff-credit .fa{padding-right:5px;font-size:13px}.cff-credit a{display:flex;align-items:center}.cff-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important}@media all and (max-width:640px){#cff.cff-width-resp{width:100%!important}.cff-wrapper .cff-visual-header .cff-header-img img{width:80px}.cff-wrapper .cff-visual-header.cff-has-name .cff-header-text{margin-left:95px}.cff-wrapper .cff-visual-header.cff-has-cover.cff-has-name .cff-header-text{margin-left:105px}}#cff .cff-comment .cff-comment-text img,#cff img.emoji,#cff-lightbox-wrapper .cff-comment .cff-comment-text img,#cff-lightbox-wrapper img.emoji{float:none;max-width:100%}#cff .cff-linebreak{display:block;height:5px}#cff.cff-masonry .cff-item.cff-box{margin-left:1.5%;margin-right:1.5%}#cff.cff-masonry{box-sizing:border-box}#cff.cff-masonry .cff-item,#cff.cff-masonry .cff-item:first-child{padding-top:20px;margin-top:0}#cff.cff-masonry .cff-item,#cff.cff-masonry .cff-likebox{float:none;display:inline-block;width:30.3%;margin:0 1.5%;margin-bottom:20px}#cff.cff-masonry.cff-opaque-comments .cff-item{z-index:1}#cff.cff-masonry.masonry-2-desktop .cff-item{width:47%;margin:0 1.5%}#cff.cff-masonry.masonry-4-desktop .cff-item{width:22%;margin:0 1.5%}#cff.cff-masonry.masonry-5-desktop .cff-item{width:17%;margin:0 1.5%}#cff.cff-masonry.masonry-6-desktop .cff-item{width:13.516%;margin:0 1.5%}#cff.cff-masonry .cff-comments-box{position:relative;z-index:999}#cff.cff-masonry .cff-comment-attachment,#cff.cff-masonry .cff-comment-replies-box{max-width:100%}#cff.cff-masonry .cff-load-more{display:block;float:left;clear:both}@media (max-width:780px){#cff.cff-masonry .cff-item,#cff.cff-masonry .cff-likebox,#cff.cff-masonry.masonry-2-desktop .cff-item,#cff.cff-masonry.masonry-4-desktop .cff-item,#cff.cff-masonry.masonry-5-desktop .cff-item,#cff.cff-masonry.masonry-6-desktop .cff-item{width:100%;margin:0}#cff.cff-masonry.masonry-2-mobile .cff-item{width:47%;margin-left:1.5%;margin-right:1.5%}}#cff.cff-masonry.cff-masonry-css{width:100%;overflow:hidden;margin-bottom:20px}#cff.cff-masonry.cff-masonry-css{-webkit-column-gap:20px;-moz-column-gap:20px;column-gap:20px;-webkit-column-fill:auto;column-fill:unset;-webkit-column-count:3;-moz-column-count:3;column-count:3;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-2-desktop{-webkit-column-count:2;-moz-column-count:2;column-count:2;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-4-desktop{-webkit-column-count:4;-moz-column-count:4;column-count:4;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-5-desktop{-webkit-column-count:5;-moz-column-count:5;column-count:5;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-6-desktop{-webkit-column-count:6;-moz-column-count:6;column-count:6;margin:0}#cff.cff-masonry.cff-masonry-css .cff-item,#cff.cff-masonry.cff-masonry-css .cff-likebox,#cff.cff-masonry.cff-masonry-css.masonry-2-desktop .cff-item,#cff.cff-masonry.cff-masonry-css.masonry-4-desktop .cff-item,#cff.cff-masonry.cff-masonry-css.masonry-5-desktop .cff-item,#cff.cff-masonry.cff-masonry-css.masonry-6-desktop .cff-item{float:none;display:inline-block;width:100%;margin:0 0 12px 0}#cff.cff-masonry.cff-masonry-css .cff-likebox{width:99.5%}#cff.cff-masonry.cff-masonry-css .cff-load-more{margin:0 0 10px 0;position:relative;bottom:0}@media only screen and (max-width:780px){#cff.cff-masonry.cff-masonry-css,#cff.cff-masonry.cff-masonry-css.masonry-2-desktop,#cff.cff-masonry.cff-masonry-css.masonry-4-desktop,#cff.cff-masonry.cff-masonry-css.masonry-5-desktop,#cff.cff-masonry.cff-masonry-css.masonry-6-desktop{-webkit-column-count:1;-moz-column-count:1;column-count:1}#cff.cff-masonry.cff-masonry-css.masonry-2-mobile{-webkit-column-count:2;-moz-column-count:2;column-count:2;margin:0}#cff.cff-masonry.cff-masonry-css.masonry-2-mobile,#cff.cff-masonry.cff-masonry-css.masonry-2-mobile .cff-item{width:100%}}#cff.cff-disable-masonry{height:auto!important}#cff.cff-disable-masonry .cff-item,#cff.cff-disable-masonry .cff-likebox{position:relative!important;top:auto!important}.cff-num-diff-hide{display:none!important}.cff-gdpr-notice{max-width:100%;box-sizing:border-box;padding:8px 15px;margin:0;font-size:12px;background:#fdf7f7;display:inline-block;border-radius:5px;border:1px solid #e4b1b1;line-height:1.3;display:none}
assets/js/cff-scripts.js CHANGED
@@ -168,7 +168,7 @@ if(!cff_js_exists){
168
 
169
 
170
  //Click function
171
- $self.find('.cff-expand a').unbind('click').bind('click', function(e){
172
  e.preventDefault();
173
  var $expand = jQuery(this),
174
  $more = $expand.find('.cff-more'),
@@ -187,6 +187,10 @@ if(!cff_js_exists){
187
  cffLinkHashtags();
188
  //Add target to links in text when expanded
189
  $post_text.find('a').attr('target', '_blank');
 
 
 
 
190
  });
191
  //Add target attr to post text links via JS so aren't included in char count
192
  $post_text.find('a').add( $self.find('.cff-post-desc a') ).attr({
@@ -244,7 +248,8 @@ if(!cff_js_exists){
244
  });
245
 
246
  //Share tooltip function
247
- $self.find('.cff-share-link').unbind().bind('click', function(e){
 
248
  e.preventDefault();
249
  var $cffShareTooltip = $self.find('.cff-share-tooltip')
250
 
@@ -268,16 +273,16 @@ if(!cff_js_exists){
268
 
269
 
270
  }); //End .cff-item each
271
-
272
-
273
 
274
  jQuery('.cff-wrapper').each(function(){
275
  var $cff = jQuery(this).find('#cff');
276
- var $cffElm = jQuery(this);
277
  setTimeout(function(){
278
  var consent = checkConsent( $cffElm );
279
  if(consent){
280
- addFullFeatures( $cffElm);
281
  }else{
282
  jQuery('.cff-gdpr-notice').css({'display':'inline-block'});
283
  if ($cffElm.find('.cff-visual-header').length) {
@@ -309,7 +314,7 @@ if(!cff_js_exists){
309
  //Call it again in case post isn't fully loaded
310
  setTimeout(function(){ cffAddMasonry($cff); }, 500);
311
  // Resizing the window can affect the masonry feed so it is reset on resize
312
- jQuery(window).resize(function () {
313
  setTimeout(function(){
314
  cffAddMasonry($cff);
315
  }, 500);
@@ -343,7 +348,7 @@ if(!cff_js_exists){
343
  });
344
  }setTimeout(cffSizeVisualHeader, 200);
345
 
346
- jQuery(window).resize(function () {
347
  setTimeout(function(){
348
  cffSizeVisualHeader();
349
  }, 500);
@@ -379,7 +384,7 @@ if(!cff_js_exists){
379
  } else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
380
  consentGiven = Cookiebot.consented;
381
  } else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
382
- consentGiven = window.BorlabsCookie.checkCookieConsent('facebook');
383
  }
384
  return consentGiven; // GDPR not enabled
385
  }
@@ -427,7 +432,7 @@ if(!cff_js_exists){
427
  jQuery(this).find('.cff-header-img').find('img').attr('src',jQuery(this).find('.cff-header-img').find('img').attr('data-avatar'))
428
  }
429
  });
430
- }
431
  }
432
 
433
  function afterConsentToggled( isConsent, ctn ) {
@@ -438,16 +443,16 @@ if(!cff_js_exists){
438
 
439
  jQuery(document).ready(function(){
440
  var $ = jQuery;
441
- $('#cookie-notice a').click(function() {
442
  setTimeout(function() {
443
- jQuery('.cff-wrapper').each(function(index){
444
  afterConsentToggled( checkConsent( jQuery(this) ), jQuery(this) );
445
  });
446
  },1000);
447
  });
448
 
449
  // Cookie Notice by dFactory
450
- $('#cookie-law-info-bar a').click(function() {
451
  setTimeout(function() {
452
  jQuery('.cff-wrapper').each(function(index){
453
  afterConsentToggled( checkConsent( jQuery(this) ), jQuery(this) );
@@ -456,7 +461,7 @@ if(!cff_js_exists){
456
  });
457
 
458
  // GDPR Cookie Consent by WebToffee
459
- $('.cli-user-preference-checkbox').click(function(){
460
  setTimeout(function() {
461
  jQuery('.cff-wrapper').each(function(index){
462
  afterConsentToggled( false, jQuery(this) );
168
 
169
 
170
  //Click function
171
+ $self.find('.cff-expand a').on('click', function(e){
172
  e.preventDefault();
173
  var $expand = jQuery(this),
174
  $more = $expand.find('.cff-more'),
187
  cffLinkHashtags();
188
  //Add target to links in text when expanded
189
  $post_text.find('a').attr('target', '_blank');
190
+ //Re-init masonry for JS
191
+ if( $self.closest('.cff').hasClass('cff-masonry-js') && !$self.closest('.cff').hasClass('cff-masonry-css') ){
192
+ cffAddMasonry($self.closest('.cff'));
193
+ }
194
  });
195
  //Add target attr to post text links via JS so aren't included in char count
196
  $post_text.find('a').add( $self.find('.cff-post-desc a') ).attr({
248
  });
249
 
250
  //Share tooltip function
251
+ $self.find('.cff-share-link').on('click', function(e){
252
+
253
  e.preventDefault();
254
  var $cffShareTooltip = $self.find('.cff-share-tooltip')
255
 
273
 
274
 
275
  }); //End .cff-item each
276
+
277
+
278
 
279
  jQuery('.cff-wrapper').each(function(){
280
  var $cff = jQuery(this).find('#cff');
281
+ var $cffElm = jQuery(this);
282
  setTimeout(function(){
283
  var consent = checkConsent( $cffElm );
284
  if(consent){
285
+ addFullFeatures( $cffElm);
286
  }else{
287
  jQuery('.cff-gdpr-notice').css({'display':'inline-block'});
288
  if ($cffElm.find('.cff-visual-header').length) {
314
  //Call it again in case post isn't fully loaded
315
  setTimeout(function(){ cffAddMasonry($cff); }, 500);
316
  // Resizing the window can affect the masonry feed so it is reset on resize
317
+ jQuery(window).on('resize', function () {
318
  setTimeout(function(){
319
  cffAddMasonry($cff);
320
  }, 500);
348
  });
349
  }setTimeout(cffSizeVisualHeader, 200);
350
 
351
+ jQuery(window).on('resize', function () {
352
  setTimeout(function(){
353
  cffSizeVisualHeader();
354
  }, 500);
384
  } else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
385
  consentGiven = Cookiebot.consented;
386
  } else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
387
+ consentGiven = window.BorlabsCookie.checkCookieConsent('facebook');
388
  }
389
  return consentGiven; // GDPR not enabled
390
  }
432
  jQuery(this).find('.cff-header-img').find('img').attr('src',jQuery(this).find('.cff-header-img').find('img').attr('data-avatar'))
433
  }
434
  });
435
+ }
436
  }
437
 
438
  function afterConsentToggled( isConsent, ctn ) {
443
 
444
  jQuery(document).ready(function(){
445
  var $ = jQuery;
446
+ $('#cookie-notice a').on('click', function() {
447
  setTimeout(function() {
448
+ jQuery('.cff-wrapper').each(function(index){
449
  afterConsentToggled( checkConsent( jQuery(this) ), jQuery(this) );
450
  });
451
  },1000);
452
  });
453
 
454
  // Cookie Notice by dFactory
455
+ $('#cookie-law-info-bar a').on('click', function() {
456
  setTimeout(function() {
457
  jQuery('.cff-wrapper').each(function(index){
458
  afterConsentToggled( checkConsent( jQuery(this) ), jQuery(this) );
461
  });
462
 
463
  // GDPR Cookie Consent by WebToffee
464
+ $('.cli-user-preference-checkbox').on('click', function(){
465
  setTimeout(function() {
466
  jQuery('.cff-wrapper').each(function(index){
467
  afterConsentToggled( false, jQuery(this) );
assets/js/cff-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var cff_js_exists=void 0!==cff_js_exists;function cffAddMasonry(t){780<jQuery(window).width()||t.hasClass("masonry-2-mobile")?(t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry"),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")})):t.find(".cff-album-item").length&&t.masonry({itemSelector:".cff-album-item"})):t.addClass("cff-disable-masonry")}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%",e=e-t,e=Math.max(0,Math.round(e/2)),i="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":-e+"px","margin-left":-i+"px",width:o})})}jQuery("#cff .cff-item").each(function(){var u=jQuery(this);u.find(".cff-viewpost-facebook").parent("p").length&&u.find(".cff-viewpost-facebook").unwrap("p"),u.find(".cff-author").parent("p").length&&(u.find(".cff-author").eq(1).unwrap("p"),u.find(".cff-author").eq(1).remove()),u.find("#cff .cff-link").parent("p").length&&u.find("#cff .cff-link").unwrap("p");var i=!1,n=u.find(".cff-post-text .cff-text"),t=u.closest("#cff").attr("data-char");void 0!==t&&""!=t||(t=99999),n.find("a.cff-post-text-link").length&&(n=u.find(".cff-post-text .cff-text a"));var o=n.html();null==o&&(o="");var e=new RegExp(/(<[^>]*>)/g),r=0;full_text_arr=o.split(e);for(var s,a=0,f=full_text_arr.length;a<f;a++)e.test(full_text_arr[a])||(r!=t?t<(r+=full_text_arr[a].length)&&(s=r-t,full_text_arr[a]=full_text_arr[a].slice(0,-s),r=t,o.length>t&&u.find(".cff-expand").show()):full_text_arr.splice(a,1));var h=full_text_arr.join("");function c(){var t,e=u.find(".cff-text").html(),i=u.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=u.find(".cff-text").attr("data-color");function r(t){t=jQuery.trim(t);return/^#[0-9A-F]{6}$/i.test(t)?t:' <a href="https://www.facebook.com/hashtag/'+t.substring(1)+'" target="_blank" rel="nofollow" style="color:#'+o+'">'+t+"</a>"}"undefined"==typeof cfflinkhashtags&&(cfflinkhashtags="true"),"true"!=cfflinkhashtags||0<(t=u.find(".cff-text")).length&&(e=e.replace(/<br>/g,"<br> "),t.html(e.replace(n,r))),0<u.find(".cff-post-desc").length&&u.find(".cff-post-desc").html(i.replace(n,r))}"<"==(h=h.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g,"")).substr(h.length-1)&&(h=h.substring(0,h.length-1)),h=(h=h.replace(/(<br>\s*)+$/,"")).replace(/(<img class="cff-linebreak">\s*)+$/,""),n.html(h),u.find(".cff-expand a").unbind("click").bind("click",function(t){t.preventDefault();var e=jQuery(this),t=e.find(".cff-more"),e=e.find(".cff-less");0==i?(n.html(o),i=!0,t.hide(),e.show()):(n.html(h),i=!1,t.show(),e.hide()),c(),n.find("a").attr("target","_blank")}),n.find("a").add(u.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow"}),$sharedLink=u.find(".cff-shared-link"),""==$sharedLink.text()&&$sharedLink.remove(),c(),u.find(".cff-text a").add(u.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow noopener noreferrer"}),u.find(".cff-share-link").unbind().bind("click",function(t){t.preventDefault();var e,t=u.find(".cff-share-tooltip");t.is(":visible")?t.hide().find("a").removeClass("cff-show"):(t.show(),e=0,t.find("a").each(function(){var t=jQuery(this);setTimeout(function(){t.addClass("cff-show")},e),e+=20}))})}),jQuery(".cff-wrapper").each(function(){var t,e,i,n=jQuery(this).find("#cff"),o=jQuery(this);setTimeout(function(){checkConsent(o)?addFullFeatures(o):(jQuery(".cff-gdpr-notice").css({display:"inline-block"}),o.find(".cff-visual-header").length&&o.find(".cff-header-text").closest(".cff-visual-header").addClass("cff-no-consent"))},250),void 0!==n.attr("data-nummobile")&&(t=void 0!==n.attr("data-pag-num")&&""!==n.attr("data-pag-num")?parseInt(n.attr("data-pag-num")):1,e=void 0!==n.attr("data-nummobile")&&""!==n.attr("data-nummobile")?parseInt(n.attr("data-nummobile")):t,i=n.find(".cff-item").length?".cff-item":".cff-album-item",jQuery(window).width()<480?e<n.find(i).length&&n.find(i).slice(e-n.find(i).length).addClass("cff-num-diff-hide"):t<n.find(i).length&&n.find(i).slice(t-n.find(i).length).addClass("cff-num-diff-hide"),n.removeAttr("data-nummobile")),n.hasClass("cff-masonry-js")&&(cffAddMasonry(n),setTimeout(function(){cffAddMasonry(n)},500),jQuery(window).resize(function(){setTimeout(function(){cffAddMasonry(n)},500)}),n.find(".cff-credit").length&&n.css("padding-bottom",30))}),setTimeout(t,200),jQuery(window).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(","):[],t=-1<e.indexOf("gdpr"),e=(e.indexOf("overrideBlockCDN"),!1);return!(!e&&t)||("undefined"!=typeof CLI_Cookie?null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(e="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")):void 0!==window.cnArgs?2===(t=("; "+document.cookie).split("; cookie_notice_accepted=")).length&&(e="true"===t.pop().split(";").shift()):void 0!==window.cookieconsent?e="allow"===cffCmplzGetCookie("complianz_consent_status"):void 0!==window.Cookiebot?e=Cookiebot.consented:void 0!==window.BorlabsCookie&&(e=window.BorlabsCookie.checkCookieConsent("facebook")),e)}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)}cff_js_exists||(jQuery("#cff.cff-masonry-js").length&&(function(t){function e(){}function i(s){if(s){var a="undefined"==typeof console?e:function(t){console.error(t)};return s.bridget=function(t,e){var r,u,i;(i=e).prototype.option||(i.prototype.option=function(t){s.isPlainObject(t)&&(this.options=s.extend(!0,this.options,t))}),r=t,u=e,s.fn[r]=function(e){if("string"!=typeof e)return this.each(function(){var t=s.data(this,r);t?(t.option(e),t._init()):(t=new u(this,e),s.data(this,r,t))});for(var t=f.call(arguments,1),i=0,n=this.length;i<n;i++){var o=this[i],o=s.data(o,r);if(o)if(s.isFunction(o[e])&&"_"!==e.charAt(0)){o=o[e].apply(o,t);if(void 0!==o)return o}else a("no such method '"+e+"' for "+r+" instance");else a("cannot call methods on "+r+" prior to initialization; attempted to call '"+e+"'")}return this}},s.bridget}}var f=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(i){function n(t){var e=i.event;return e.target=e.target||e.srcElement||t,e}var t=document.documentElement,e=function(){};t.addEventListener?e=function(t,e,i){t.addEventListener(e,i,!1)}:t.attachEvent&&(e=function(e,t,i){e[t+i]=i.handleEvent?function(){var t=n(e);i.handleEvent.call(i,t)}:function(){var t=n(e);i.call(e,t)},e.attachEvent("on"+t,e[t+i])});var o=function(){};t.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:t.detachEvent&&(o=function(e,i,n){e.detachEvent("on"+i,e[i+n]);try{delete e[i+n]}catch(t){e[i+n]=void 0}}),o={bind:e,unbind:o},"function"==typeof define&&define.amd?define("eventie/eventie",o):"object"==typeof exports?module.exports=o:i.eventie=o}(window),function(){function t(){}function r(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function e(t){return function(){return this[t].apply(this,arguments)}}var i=t.prototype,n=this,o=n.EventEmitter;i.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},i.flattenListeners=function(t){for(var e=[],i=0;i<t.length;i+=1)e.push(t[i].listener);return e},i.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},i.addListener=function(t,e){var i,n=this.getListenersAsObject(t),o="object"==typeof e;for(i in n)n.hasOwnProperty(i)&&-1===r(n[i],e)&&n[i].push(o?e:{listener:e,once:!1});return this},i.on=e("addListener"),i.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},i.once=e("addOnceListener"),i.defineEvent=function(t){return this.getListeners(t),this},i.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},i.removeListener=function(t,e){var i,n,o=this.getListenersAsObject(t);for(n in o)o.hasOwnProperty(n)&&(i=r(o[n],e),-1!==i&&o[n].splice(i,1));return this},i.off=e("removeListener"),i.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},i.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},i.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:u).call(this,n,o);return this},i.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},i.removeAllListeners=e("removeEvent"),i.emitEvent=function(t,e){var i,n,o,r,u=this.getListenersAsObject(t);for(o in u)if(u.hasOwnProperty(o))for(n=u[o].length;n--;)i=u[o][n],!0===i.once&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},i.trigger=e("emitEvent"),i.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},i.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=o,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof r[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,i=0,n=o.length;i<n;i++)if(e=o[i]+t,"string"==typeof r[e])return e}}var o="Webkit Moz ms Ms O".split(" "),r=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(E){function B(t){var e=parseFloat(t);return-1===t.indexOf("%")&&!isNaN(e)&&e}function t(g){var v,A,C,F=!1;return function(t){if(F||(F=!0,m=E.getComputedStyle,y=m?function(t){return m(t,null)}:function(t){return t.currentStyle},v=function(t){t=y(t);return t||b("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),t},(A=g("boxSizing"))&&((p=document.createElement("div")).style.width="200px",p.style.padding="1px 2px 3px 4px",p.style.borderStyle="solid",p.style.borderWidth="1px 2px 3px 4px",p.style[A]="border-box",(l=document.body||document.documentElement).appendChild(p),d=v(p),C=200===B(d.width),l.removeChild(p))),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=v(t);if("none"===e.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=D.length;e<i;e++)t[D[e]]=0;return t}();var i={};i.width=t.offsetWidth,i.height=t.offsetHeight;for(var n=i.isBorderBox=!(!A||!e[A]||"border-box"!==e[A]),o=0,r=D.length;o<r;o++){var u=D[o],s=function(t,e){if(E.getComputedStyle||-1===e.indexOf("%"))return e;var i=t.style,n=i.left,o=t.runtimeStyle,r=o&&o.left;return r&&(o.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=n,r&&(o.left=r),e}(t,s=e[u]),s=parseFloat(s);i[u]=isNaN(s)?0:s}var a=i.paddingLeft+i.paddingRight,f=i.paddingTop+i.paddingBottom,h=i.marginLeft+i.marginRight,c=i.marginTop+i.marginBottom,d=i.borderLeftWidth+i.borderRightWidth,l=i.borderTopWidth+i.borderBottomWidth,p=n&&C,n=B(e.width);!1!==n&&(i.width=n+(p?0:a+d));n=B(e.height);return!1!==n&&(i.height=n+(p?0:f+l)),i.innerWidth=i.width-(a+d),i.innerHeight=i.height-(f+l),i.outerWidth=i.width+h,i.outerHeight=i.height+c,i}var m,p,l,d,y}}var b="undefined"==typeof console?function(){}:function(t){console.error(t)},D=["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"],t):"object"==typeof exports?module.exports=t(require("desandro-get-style-property")):E.getSize=t(E.getStyleProperty)}(window),function(e){function i(t){"function"==typeof t&&(i.isReady?t():u.push(t))}function n(t){t="readystatechange"===t.type&&"complete"!==r.readyState;i.isReady||t||o()}function o(){i.isReady=!0;for(var t=0,e=u.length;t<e;t++)(0,u[t])()}function t(t){return"complete"===r.readyState?o():(t.bind(r,"DOMContentLoaded",n),t.bind(r,"readystatechange",n),t.bind(e,"load",n)),i}var r=e.document,u=[];i.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],t):"object"==typeof exports?module.exports=t(require("eventie")):e.docReady=t(e.eventie)}(window),function(o){function i(t,e){return t[n](e)}function r(t){t.parentNode||document.createDocumentFragment().appendChild(t)}var t,n=function(){if(o.matches)return"matches";if(o.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],e=0,i=t.length;e<i;e++){var n=t[e]+"MatchesSelector";if(o[n])return n}}();t=n?i(document.createElement("div"),"div")?i:function(t,e){return r(t),i(t,e)}:function(t,e){r(t);for(var i=t.parentNode.querySelectorAll(e),n=0,o=i.length;n<o;n++)if(i[n]===t)return!0;return!1},"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return t}):"object"==typeof exports?module.exports=t:window.matchesSelector=t}(Element.prototype),function(i,n){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(t,e){return n(i,t,e)}):"object"==typeof exports?module.exports=n(i,require("doc-ready"),require("desandro-matches-selector")):i.fizzyUIUtils=n(i,i.docReady,i.matchesSelector)}(window,function(d,t,f){var i,l={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},e=Object.prototype.toString;l.isArray=function(t){return"[object Array]"==e.call(t)},l.makeArray=function(t){var e=[];if(l.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,n=t.length;i<n;i++)e.push(t[i]);else e.push(t);return e},l.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},l.removeFrom=function(t,e){e=l.indexOf(t,e);-1!=e&&t.splice(e,1)},l.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},l.setText=function(t,e){t[i=i||(void 0!==document.documentElement.textContent?"textContent":"innerText")]=e},l.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,f(t,e))return t},l.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},l.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.filterFindElements=function(t,e){for(var i=[],n=0,o=(t=l.makeArray(t)).length;n<o;n++){var r=t[n];if(l.isElement(r))if(e){f(r,e)&&i.push(r);for(var u=r.querySelectorAll(e),s=0,a=u.length;s<a;s++)i.push(u[s])}else i.push(r)}return i},l.debounceMethod=function(t,e,n){var o=t.prototype[e],r=e+"Timeout";t.prototype[e]=function(){var t=this[r];t&&clearTimeout(t);var e=arguments,i=this;this[r]=setTimeout(function(){o.apply(i,e),delete i[r]},n||100)}},l.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var p=d.console;return l.htmlInit=function(h,c){t(function(){for(var t=l.toDashed(c),e=document.querySelectorAll(".js-"+t),i="data-"+t+"-options",n=0,o=e.length;n<o;n++){var r,u=e[n],s=u.getAttribute(i);try{r=s&&JSON.parse(s)}catch(t){p&&p.error("Error parsing "+i+" on "+u.nodeName.toLowerCase()+(u.id?"#"+u.id:"")+": "+t);continue}var a=new h(u,r),f=d.jQuery;f&&f.data(u,c,a)}})},l}),function(o,r){"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(t,e,i,n){return r(o,t,e,i,n)}):"object"==typeof exports?module.exports=r(o,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(o.Outlayer={},o.Outlayer.Item=r(o,o.EventEmitter,o.getSize,o.getStyleProperty,o.fizzyUIUtils))}(window,function(t,e,i,r,n){function o(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=r("transition"),f=r("transform"),h=a&&f,t=!!r("perspective"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[a],d=["transform","transition","transitionDuration","transitionProperty"],l=function(){for(var t={},e=0,i=d.length;e<i;e++){var n=d[e],o=r(n);o&&o!==n&&(t[n]=o)}return t}();n.extend(o.prototype,e.prototype),o.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},o.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},o.prototype.getSize=function(){this.size=i(this.element)},o.prototype.css=function(t){var e,i=this.element.style;for(e in t)i[l[e]||e]=t[e]},o.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),e=parseInt(t[n?"top":"bottom"],10),o=isNaN(o)?0:o,e=isNaN(e)?0:e,t=this.layout.size;o-=i?t.paddingLeft:t.paddingRight,e-=n?t.paddingTop:t.paddingBottom,this.position.x=o,this.position.y=e},o.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",n=this.position.x+t[n],n=e.percentPosition&&!e.isHorizontal?n/t.width*100+"%":n+"px";i[o]=n,i[r]="";o=e.isOriginTop?"paddingTop":"paddingBottom",n=e.isOriginTop?"top":"bottom",r=e.isOriginTop?"bottom":"top",o=this.position.y+t[o],o=e.percentPosition&&e.isHorizontal?o/t.height*100+"%":o+"px";i[n]=o,i[r]="",this.css(i),this.emitEvent("layout",[this])};var p=t?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};o.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),r=o===this.position.x&&r===this.position.y;this.setPosition(t,e),!r||this.isTransitioning?(t-=i,i=e-n,e={},t=(n=this.layout.options).isOriginLeft?t:-t,i=n.isOriginTop?i:-i,e.transform=p(t,i),this.transition({to:e,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})):this.layoutPosition()},o.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},o.prototype.moveTo=h?o.prototype._transitionTo:o.prototype.goTo,o.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},o.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)},o.prototype._transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e,i=this._transn;for(e in t.onTransitionEnd)i.onEnd[e]=t.onTransitionEnd[e];for(e in t.to)i.ingProperties[e]=!0,t.isCleaning&&(i.clean[e]=!0);t.from&&(this.css(t.from),this.element.offsetHeight,0),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var m=f&&n.toDashed(f)+",opacity";o.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(c,this,!1))},o.prototype.transition=o.prototype[a?"_transition":"_nonTransition"],o.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},o.prototype.onotransitionend=function(t){this.ontransitionend(t)};var y={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};o.prototype.ontransitionend=function(t){var e,i;t.target===this.element&&(e=this._transn,i=y[t.propertyName]||t.propertyName,delete e.ingProperties[i],function(t){for(var e in t)return;return 1}(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]))},o.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(c,this,!1),this.isTransitioning=!1},o.prototype._removeStyles=function(t){var e,i={};for(e in t)i[e]="";this.css(i)};var g={transitionProperty:"",transitionDuration:""};return o.prototype.removeTransitionStyles=function(){this.css(g)},o.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},o.prototype.remove=function(){var t;a&&parseFloat(this.layout.options.transitionDuration)?((t=this).once("transitionEnd",function(){t.removeElem()}),this.hide()):this.removeElem()},o.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})},o.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},o.prototype.getHideRevealTransitionEndProperty=function(t){var e,t=this.layout.options[t];if(t.opacity)return"opacity";for(e in t)return e},o.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})},o.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},o.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(r,u){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(t,e,i,n,o){return u(r,t,e,i,n,o)}):"object"==typeof exports?module.exports=u(r,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):r.Outlayer=u(r,r.eventie,r.EventEmitter,r.getSize,r.fizzyUIUtils,r.Outlayer.Item)}(window,function(t,e,i,o,r,n){function u(t,e){var i=r.getQueryElement(t);i?(this.element=i,f&&(this.$element=f(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(e),e=++h,this.element.outlayerGUID=e,(c[e]=this)._create(),this.options.isInitLayout&&this.layout()):a&&a.error("Bad element for "+this.constructor.namespace+": "+(i||t))}function s(){}var a=t.console,f=t.jQuery,h=0,c={};return u.namespace="outlayer",u.Item=n,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)"}},r.extend(u.prototype,i.prototype),u.prototype.option=function(t){r.extend(this.options,t)},u.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.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;o<r;o++){var u=new i(e[o],this);n.push(u)}return n},u.prototype._filterFindItemElements=function(t){return r.filterFindElements(t,this.options.itemSelector)},u.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;e<i;e++)t.push(this.items[e].element);return t},u.prototype._init=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._resetLayout=function(){this.getSize()},u.prototype.getSize=function(){this.size=o(this.element)},u.prototype._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):r.isElement(n)&&(i=n),this[t]=i?o(i)[e]:n):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;i<n;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;n<o;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;e<i;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(){var t;!this.options.isResizingContainer||(t=this._getContainerSize())&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},u.prototype._getContainerSize=s,u.prototype._setContainerMeasure=function(t,e){var i;void 0!==t&&((i=this.size).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;s<a;s++)e[s].once(t,n);else i()},u.prototype.ignore=function(t){t=this.getItem(t);t&&(t.isIgnored=!0)},u.prototype.unignore=function(t){t=this.getItem(t);t&&delete t.isIgnored},u.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;e<i;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;e<i;e++){var n=t[e];r.removeFrom(this.stamps,n),this.unignore(n)}},u.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=r.makeArray(t)):void 0},u.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;t<e;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=s,u.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,t=o(t);return{left:e.left-i.left-t.marginLeft,top:e.top-i.top-t.marginTop,right:i.right-e.right-t.marginRight,bottom:i.bottom-e.bottom-t.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=o(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},u.prototype.addItems=function(t){t=this._itemize(t);return t.length&&(this.items=this.items.concat(t)),t},u.prototype.appended=function(t){t=this.addItems(t);t.length&&(this.layoutItems(t,!0),this.reveal(t))},u.prototype.prepended=function(t){var e=this._itemize(t);e.length&&(t=this.items.slice(0),this.items=e.concat(t),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(t))},u.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].reveal()},u.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].hide()},u.prototype.revealItemElements=function(t){t=this.getItems(t);this.reveal(t)},u.prototype.hideItemElements=function(t){t=this.getItems(t);this.hide(t)},u.prototype.getItem=function(t){for(var e=0,i=this.items.length;e<i;e++){var n=this.items[e];if(n.element===t)return n}},u.prototype.getItems=function(t){for(var e=[],i=0,n=(t=r.makeArray(t)).length;i<n;i++){var o=t[i],o=this.getItem(o);o&&e.push(o)}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;i<n;i++){var o=e[i];o.remove(),r.removeFrom(this.items,o)}},u.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;e<i;e++)this.items[e].destroy();this.unbindResize();t=this.element.outlayerGUID;delete c[t],delete this.element.outlayerGUID,f&&f.removeData(this.element,this.constructor.namespace)},u.data=function(t){t=(t=r.getQueryElement(t))&&t.outlayerGUID;return t&&c[t]},u.create=function(t,e){function i(){u.apply(this,arguments)}return Object.create?i.prototype=Object.create(u.prototype):r.extend(i.prototype,u.prototype),(i.prototype.constructor=i).defaults=r.extend({},u.defaults),r.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=u.data,(i.Item=function(){n.apply(this,arguments)}).prototype=new n,r.htmlInit(i,t),f&&f.bridget&&f.bridget(t,i),i},u.Item=n,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,s,a){t=t.create("masonry");return t.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},t.prototype.measureColumns=function(){this.getContainerWidth(),this.columnWidth||(i=(e=this.items[0])&&e.element,this.columnWidth=i&&s(i).outerWidth||this.containerWidth);var t=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,i=e/t,t=t-e%t,i=Math[t&&t<1?"round":"floor"](i);this.cols=Math.max(i,1)},t.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,t=s(t);this.containerWidth=t&&t.innerWidth},t.prototype._getItemLayoutPosition=function(t){t.getSize();for(var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),i=Math.min(i,this.cols),n=this._getColGroup(i),e=Math.min.apply(Math,n),o=a.indexOf(n,e),i={x:this.columnWidth*o,y:e},r=e+t.size.outerHeight,u=this.cols+1-n.length,s=0;s<u;s++)this.colYs[o+s]=r;return i},t.prototype._getColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},t.prototype._manageStamp=function(t){var e=s(t),i=this._getElementOffset(t),n=this.options.isOriginLeft?i.left:i.right,t=n+e.outerWidth,n=Math.floor(n/this.columnWidth),n=Math.max(0,n),o=Math.floor(t/this.columnWidth);o-=t%this.columnWidth?0:1,o=Math.min(this.cols-1,o);for(var r=(this.options.isOriginTop?i.top:i.bottom)+e.outerHeight,u=n;u<=o;u++)this.colYs[u]=Math.max(r,this.colYs[u])},t.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},t.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},t.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},t})),cff_init(),jQuery(document).ready(function(){var t=jQuery;t("#cookie-notice a").click(function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(checkConsent(jQuery(this)),jQuery(this))})},1e3)}),t("#cookie-law-info-bar a").click(function(){setTimeout(function(){jQuery(".cff-wrapper").each(function(t){afterConsentToggled(checkConsent(jQuery(this)),jQuery(this))})},1e3)}),t(".cli-user-preference-checkbox").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))})})}));
1
+ var cff_js_exists=void 0!==cff_js_exists;function cffAddMasonry(t){780<jQuery(window).width()||t.hasClass("masonry-2-mobile")?(t.addClass("cff-masonry cff-masonry-js").removeClass("cff-disable-masonry"),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")})):t.find(".cff-album-item").length&&t.masonry({itemSelector:".cff-album-item"})):t.addClass("cff-disable-masonry")}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%",e=e-t,e=Math.max(0,Math.round(e/2)),i="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":-e+"px","margin-left":-i+"px",width:o})})}jQuery("#cff .cff-item").each(function(){var u=jQuery(this);u.find(".cff-viewpost-facebook").parent("p").length&&u.find(".cff-viewpost-facebook").unwrap("p"),u.find(".cff-author").parent("p").length&&(u.find(".cff-author").eq(1).unwrap("p"),u.find(".cff-author").eq(1).remove()),u.find("#cff .cff-link").parent("p").length&&u.find("#cff .cff-link").unwrap("p");var i=!1,n=u.find(".cff-post-text .cff-text"),t=u.closest("#cff").attr("data-char");void 0!==t&&""!=t||(t=99999),n.find("a.cff-post-text-link").length&&(n=u.find(".cff-post-text .cff-text a"));var o=n.html();null==o&&(o="");var e=new RegExp(/(<[^>]*>)/g),r=0;full_text_arr=o.split(e);for(var s,a=0,f=full_text_arr.length;a<f;a++)e.test(full_text_arr[a])||(r!=t?t<(r+=full_text_arr[a].length)&&(s=r-t,full_text_arr[a]=full_text_arr[a].slice(0,-s),r=t,o.length>t&&u.find(".cff-expand").show()):full_text_arr.splice(a,1));var h=full_text_arr.join("");function c(){var t,e=u.find(".cff-text").html(),i=u.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=u.find(".cff-text").attr("data-color");function r(t){t=jQuery.trim(t);return/^#[0-9A-F]{6}$/i.test(t)?t:' <a href="https://www.facebook.com/hashtag/'+t.substring(1)+'" target="_blank" rel="nofollow" style="color:#'+o+'">'+t+"</a>"}"undefined"==typeof cfflinkhashtags&&(cfflinkhashtags="true"),"true"!=cfflinkhashtags||0<(t=u.find(".cff-text")).length&&(e=e.replace(/<br>/g,"<br> "),t.html(e.replace(n,r))),0<u.find(".cff-post-desc").length&&u.find(".cff-post-desc").html(i.replace(n,r))}"<"==(h=h.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g,"")).substr(h.length-1)&&(h=h.substring(0,h.length-1)),h=(h=h.replace(/(<br>\s*)+$/,"")).replace(/(<img class="cff-linebreak">\s*)+$/,""),n.html(h),u.find(".cff-expand a").on("click",function(t){t.preventDefault();var e=jQuery(this),t=e.find(".cff-more"),e=e.find(".cff-less");0==i?(n.html(o),i=!0,t.hide(),e.show()):(n.html(h),i=!1,t.show(),e.hide()),c(),n.find("a").attr("target","_blank"),u.closest(".cff").hasClass("cff-masonry-js")&&!u.closest(".cff").hasClass("cff-masonry-css")&&cffAddMasonry(u.closest(".cff"))}),n.find("a").add(u.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow"}),$sharedLink=u.find(".cff-shared-link"),""==$sharedLink.text()&&$sharedLink.remove(),c(),u.find(".cff-text a").add(u.find(".cff-post-desc a")).attr({target:"_blank",rel:"nofollow noopener noreferrer"}),u.find(".cff-share-link").on("click",function(t){t.preventDefault();var e,t=u.find(".cff-share-tooltip");t.is(":visible")?t.hide().find("a").removeClass("cff-show"):(t.show(),e=0,t.find("a").each(function(){var t=jQuery(this);setTimeout(function(){t.addClass("cff-show")},e),e+=20}))})}),jQuery(".cff-wrapper").each(function(){var t,e,i,n=jQuery(this).find("#cff"),o=jQuery(this);setTimeout(function(){checkConsent(o)?addFullFeatures(o):(jQuery(".cff-gdpr-notice").css({display:"inline-block"}),o.find(".cff-visual-header").length&&o.find(".cff-header-text").closest(".cff-visual-header").addClass("cff-no-consent"))},250),void 0!==n.attr("data-nummobile")&&(t=void 0!==n.attr("data-pag-num")&&""!==n.attr("data-pag-num")?parseInt(n.attr("data-pag-num")):1,e=void 0!==n.attr("data-nummobile")&&""!==n.attr("data-nummobile")?parseInt(n.attr("data-nummobile")):t,i=n.find(".cff-item").length?".cff-item":".cff-album-item",jQuery(window).width()<480?e<n.find(i).length&&n.find(i).slice(e-n.find(i).length).addClass("cff-num-diff-hide"):t<n.find(i).length&&n.find(i).slice(t-n.find(i).length).addClass("cff-num-diff-hide"),n.removeAttr("data-nummobile")),n.hasClass("cff-masonry-js")&&(cffAddMasonry(n),setTimeout(function(){cffAddMasonry(n)},500),jQuery(window).on("resize",function(){setTimeout(function(){cffAddMasonry(n)},500)}),n.find(".cff-credit").length&&n.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(","):[],t=-1<e.indexOf("gdpr"),e=(e.indexOf("overrideBlockCDN"),!1);return!(!e&&t)||("undefined"!=typeof CLI_Cookie?null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(e="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")):void 0!==window.cnArgs?2===(t=("; "+document.cookie).split("; cookie_notice_accepted=")).length&&(e="true"===t.pop().split(";").shift()):void 0!==window.cookieconsent?e="allow"===cffCmplzGetCookie("complianz_consent_status"):void 0!==window.Cookiebot?e=Cookiebot.consented:void 0!==window.BorlabsCookie&&(e=window.BorlabsCookie.checkCookieConsent("facebook")),e)}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)}cff_js_exists||(jQuery("#cff.cff-masonry-js").length&&(function(t){function e(){}function i(s){if(s){var a="undefined"==typeof console?e:function(t){console.error(t)};return s.bridget=function(t,e){var r,u,i;(i=e).prototype.option||(i.prototype.option=function(t){s.isPlainObject(t)&&(this.options=s.extend(!0,this.options,t))}),r=t,u=e,s.fn[r]=function(e){if("string"!=typeof e)return this.each(function(){var t=s.data(this,r);t?(t.option(e),t._init()):(t=new u(this,e),s.data(this,r,t))});for(var t=f.call(arguments,1),i=0,n=this.length;i<n;i++){var o=this[i],o=s.data(o,r);if(o)if(s.isFunction(o[e])&&"_"!==e.charAt(0)){o=o[e].apply(o,t);if(void 0!==o)return o}else a("no such method '"+e+"' for "+r+" instance");else a("cannot call methods on "+r+" prior to initialization; attempted to call '"+e+"'")}return this}},s.bridget}}var f=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(i){function n(t){var e=i.event;return e.target=e.target||e.srcElement||t,e}var t=document.documentElement,e=function(){};t.addEventListener?e=function(t,e,i){t.addEventListener(e,i,!1)}:t.attachEvent&&(e=function(e,t,i){e[t+i]=i.handleEvent?function(){var t=n(e);i.handleEvent.call(i,t)}:function(){var t=n(e);i.call(e,t)},e.attachEvent("on"+t,e[t+i])});var o=function(){};t.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:t.detachEvent&&(o=function(e,i,n){e.detachEvent("on"+i,e[i+n]);try{delete e[i+n]}catch(t){e[i+n]=void 0}}),o={bind:e,unbind:o},"function"==typeof define&&define.amd?define("eventie/eventie",o):"object"==typeof exports?module.exports=o:i.eventie=o}(window),function(){function t(){}function r(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function e(t){return function(){return this[t].apply(this,arguments)}}var i=t.prototype,n=this,o=n.EventEmitter;i.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},i.flattenListeners=function(t){for(var e=[],i=0;i<t.length;i+=1)e.push(t[i].listener);return e},i.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},i.addListener=function(t,e){var i,n=this.getListenersAsObject(t),o="object"==typeof e;for(i in n)n.hasOwnProperty(i)&&-1===r(n[i],e)&&n[i].push(o?e:{listener:e,once:!1});return this},i.on=e("addListener"),i.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},i.once=e("addOnceListener"),i.defineEvent=function(t){return this.getListeners(t),this},i.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},i.removeListener=function(t,e){var i,n,o=this.getListenersAsObject(t);for(n in o)o.hasOwnProperty(n)&&(i=r(o[n],e),-1!==i&&o[n].splice(i,1));return this},i.off=e("removeListener"),i.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},i.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},i.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:u).call(this,n,o);return this},i.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},i.removeAllListeners=e("removeEvent"),i.emitEvent=function(t,e){var i,n,o,r,u=this.getListenersAsObject(t);for(o in u)if(u.hasOwnProperty(o))for(n=u[o].length;n--;)i=u[o][n],!0===i.once&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},i.trigger=e("emitEvent"),i.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},i.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=o,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof r[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,i=0,n=o.length;i<n;i++)if(e=o[i]+t,"string"==typeof r[e])return e}}var o="Webkit Moz ms Ms O".split(" "),r=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(E){function B(t){var e=parseFloat(t);return-1===t.indexOf("%")&&!isNaN(e)&&e}function t(g){var v,A,C,F=!1;return function(t){if(F||(F=!0,m=E.getComputedStyle,y=m?function(t){return m(t,null)}:function(t){return t.currentStyle},v=function(t){t=y(t);return t||D("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),t},(A=g("boxSizing"))&&((p=document.createElement("div")).style.width="200px",p.style.padding="1px 2px 3px 4px",p.style.borderStyle="solid",p.style.borderWidth="1px 2px 3px 4px",p.style[A]="border-box",(l=document.body||document.documentElement).appendChild(p),d=v(p),C=200===B(d.width),l.removeChild(p))),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=v(t);if("none"===e.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=b.length;e<i;e++)t[b[e]]=0;return t}();var i={};i.width=t.offsetWidth,i.height=t.offsetHeight;for(var n=i.isBorderBox=!(!A||!e[A]||"border-box"!==e[A]),o=0,r=b.length;o<r;o++){var u=b[o],s=function(t,e){if(E.getComputedStyle||-1===e.indexOf("%"))return e;var i=t.style,n=i.left,o=t.runtimeStyle,r=o&&o.left;return r&&(o.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=n,r&&(o.left=r),e}(t,s=e[u]),s=parseFloat(s);i[u]=isNaN(s)?0:s}var a=i.paddingLeft+i.paddingRight,f=i.paddingTop+i.paddingBottom,h=i.marginLeft+i.marginRight,c=i.marginTop+i.marginBottom,d=i.borderLeftWidth+i.borderRightWidth,l=i.borderTopWidth+i.borderBottomWidth,p=n&&C,n=B(e.width);!1!==n&&(i.width=n+(p?0:a+d));n=B(e.height);return!1!==n&&(i.height=n+(p?0:f+l)),i.innerWidth=i.width-(a+d),i.innerHeight=i.height-(f+l),i.outerWidth=i.width+h,i.outerHeight=i.height+c,i}var m,p,l,d,y}}var D="undefined"==typeof console?function(){}:function(t){console.error(t)},b=["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"],t):"object"==typeof exports?module.exports=t(require("desandro-get-style-property")):E.getSize=t(E.getStyleProperty)}(window),function(e){function i(t){"function"==typeof t&&(i.isReady?t():u.push(t))}function n(t){t="readystatechange"===t.type&&"complete"!==r.readyState;i.isReady||t||o()}function o(){i.isReady=!0;for(var t=0,e=u.length;t<e;t++)(0,u[t])()}function t(t){return"complete"===r.readyState?o():(t.bind(r,"DOMContentLoaded",n),t.bind(r,"readystatechange",n),t.bind(e,"load",n)),i}var r=e.document,u=[];i.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],t):"object"==typeof exports?module.exports=t(require("eventie")):e.docReady=t(e.eventie)}(window),function(o){function i(t,e){return t[n](e)}function r(t){t.parentNode||document.createDocumentFragment().appendChild(t)}var t,n=function(){if(o.matches)return"matches";if(o.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],e=0,i=t.length;e<i;e++){var n=t[e]+"MatchesSelector";if(o[n])return n}}();t=n?i(document.createElement("div"),"div")?i:function(t,e){return r(t),i(t,e)}:function(t,e){r(t);for(var i=t.parentNode.querySelectorAll(e),n=0,o=i.length;n<o;n++)if(i[n]===t)return!0;return!1},"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return t}):"object"==typeof exports?module.exports=t:window.matchesSelector=t}(Element.prototype),function(i,n){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(t,e){return n(i,t,e)}):"object"==typeof exports?module.exports=n(i,require("doc-ready"),require("desandro-matches-selector")):i.fizzyUIUtils=n(i,i.docReady,i.matchesSelector)}(window,function(d,t,f){var i,l={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},e=Object.prototype.toString;l.isArray=function(t){return"[object Array]"==e.call(t)},l.makeArray=function(t){var e=[];if(l.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,n=t.length;i<n;i++)e.push(t[i]);else e.push(t);return e},l.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},l.removeFrom=function(t,e){e=l.indexOf(t,e);-1!=e&&t.splice(e,1)},l.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},l.setText=function(t,e){t[i=i||(void 0!==document.documentElement.textContent?"textContent":"innerText")]=e},l.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,f(t,e))return t},l.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},l.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.filterFindElements=function(t,e){for(var i=[],n=0,o=(t=l.makeArray(t)).length;n<o;n++){var r=t[n];if(l.isElement(r))if(e){f(r,e)&&i.push(r);for(var u=r.querySelectorAll(e),s=0,a=u.length;s<a;s++)i.push(u[s])}else i.push(r)}return i},l.debounceMethod=function(t,e,n){var o=t.prototype[e],r=e+"Timeout";t.prototype[e]=function(){var t=this[r];t&&clearTimeout(t);var e=arguments,i=this;this[r]=setTimeout(function(){o.apply(i,e),delete i[r]},n||100)}},l.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var p=d.console;return l.htmlInit=function(h,c){t(function(){for(var t=l.toDashed(c),e=document.querySelectorAll(".js-"+t),i="data-"+t+"-options",n=0,o=e.length;n<o;n++){var r,u=e[n],s=u.getAttribute(i);try{r=s&&JSON.parse(s)}catch(t){p&&p.error("Error parsing "+i+" on "+u.nodeName.toLowerCase()+(u.id?"#"+u.id:"")+": "+t);continue}var a=new h(u,r),f=d.jQuery;f&&f.data(u,c,a)}})},l}),function(o,r){"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(t,e,i,n){return r(o,t,e,i,n)}):"object"==typeof exports?module.exports=r(o,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(o.Outlayer={},o.Outlayer.Item=r(o,o.EventEmitter,o.getSize,o.getStyleProperty,o.fizzyUIUtils))}(window,function(t,e,i,r,n){function o(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=r("transition"),f=r("transform"),h=a&&f,t=!!r("perspective"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[a],d=["transform","transition","transitionDuration","transitionProperty"],l=function(){for(var t={},e=0,i=d.length;e<i;e++){var n=d[e],o=r(n);o&&o!==n&&(t[n]=o)}return t}();n.extend(o.prototype,e.prototype),o.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},o.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},o.prototype.getSize=function(){this.size=i(this.element)},o.prototype.css=function(t){var e,i=this.element.style;for(e in t)i[l[e]||e]=t[e]},o.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),e=parseInt(t[n?"top":"bottom"],10),o=isNaN(o)?0:o,e=isNaN(e)?0:e,t=this.layout.size;o-=i?t.paddingLeft:t.paddingRight,e-=n?t.paddingTop:t.paddingBottom,this.position.x=o,this.position.y=e},o.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",n=this.position.x+t[n],n=e.percentPosition&&!e.isHorizontal?n/t.width*100+"%":n+"px";i[o]=n,i[r]="";o=e.isOriginTop?"paddingTop":"paddingBottom",n=e.isOriginTop?"top":"bottom",r=e.isOriginTop?"bottom":"top",o=this.position.y+t[o],o=e.percentPosition&&e.isHorizontal?o/t.height*100+"%":o+"px";i[n]=o,i[r]="",this.css(i),this.emitEvent("layout",[this])};var p=t?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};o.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),r=o===this.position.x&&r===this.position.y;this.setPosition(t,e),!r||this.isTransitioning?(t-=i,i=e-n,e={},t=(n=this.layout.options).isOriginLeft?t:-t,i=n.isOriginTop?i:-i,e.transform=p(t,i),this.transition({to:e,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})):this.layoutPosition()},o.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},o.prototype.moveTo=h?o.prototype._transitionTo:o.prototype.goTo,o.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},o.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)},o.prototype._transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e,i=this._transn;for(e in t.onTransitionEnd)i.onEnd[e]=t.onTransitionEnd[e];for(e in t.to)i.ingProperties[e]=!0,t.isCleaning&&(i.clean[e]=!0);t.from&&(this.css(t.from),this.element.offsetHeight,0),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var m=f&&n.toDashed(f)+",opacity";o.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(c,this,!1))},o.prototype.transition=o.prototype[a?"_transition":"_nonTransition"],o.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},o.prototype.onotransitionend=function(t){this.ontransitionend(t)};var y={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};o.prototype.ontransitionend=function(t){var e,i;t.target===this.element&&(e=this._transn,i=y[t.propertyName]||t.propertyName,delete e.ingProperties[i],function(t){for(var e in t)return;return 1}(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]))},o.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(c,this,!1),this.isTransitioning=!1},o.prototype._removeStyles=function(t){var e,i={};for(e in t)i[e]="";this.css(i)};var g={transitionProperty:"",transitionDuration:""};return o.prototype.removeTransitionStyles=function(){this.css(g)},o.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},o.prototype.remove=function(){var t;a&&parseFloat(this.layout.options.transitionDuration)?((t=this).once("transitionEnd",function(){t.removeElem()}),this.hide()):this.removeElem()},o.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})},o.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},o.prototype.getHideRevealTransitionEndProperty=function(t){var e,t=this.layout.options[t];if(t.opacity)return"opacity";for(e in t)return e},o.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})},o.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},o.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(r,u){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(t,e,i,n,o){return u(r,t,e,i,n,o)}):"object"==typeof exports?module.exports=u(r,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):r.Outlayer=u(r,r.eventie,r.EventEmitter,r.getSize,r.fizzyUIUtils,r.Outlayer.Item)}(window,function(t,e,i,o,r,n){function u(t,e){var i=r.getQueryElement(t);i?(this.element=i,f&&(this.$element=f(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(e),e=++h,this.element.outlayerGUID=e,(c[e]=this)._create(),this.options.isInitLayout&&this.layout()):a&&a.error("Bad element for "+this.constructor.namespace+": "+(i||t))}function s(){}var a=t.console,f=t.jQuery,h=0,c={};return u.namespace="outlayer",u.Item=n,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)"}},r.extend(u.prototype,i.prototype),u.prototype.option=function(t){r.extend(this.options,t)},u.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.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;o<r;o++){var u=new i(e[o],this);n.push(u)}return n},u.prototype._filterFindItemElements=function(t){return r.filterFindElements(t,this.options.itemSelector)},u.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;e<i;e++)t.push(this.items[e].element);return t},u.prototype._init=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._resetLayout=function(){this.getSize()},u.prototype.getSize=function(){this.size=o(this.element)},u.prototype._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):r.isElement(n)&&(i=n),this[t]=i?o(i)[e]:n):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;i<n;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;n<o;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;e<i;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(){var t;!this.options.isResizingContainer||(t=this._getContainerSize())&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},u.prototype._getContainerSize=s,u.prototype._setContainerMeasure=function(t,e){var i;void 0!==t&&((i=this.size).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;s<a;s++)e[s].once(t,n);else i()},u.prototype.ignore=function(t){t=this.getItem(t);t&&(t.isIgnored=!0)},u.prototype.unignore=function(t){t=this.getItem(t);t&&delete t.isIgnored},u.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;e<i;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;e<i;e++){var n=t[e];r.removeFrom(this.stamps,n),this.unignore(n)}},u.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=r.makeArray(t)):void 0},u.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;t<e;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=s,u.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,t=o(t);return{left:e.left-i.left-t.marginLeft,top:e.top-i.top-t.marginTop,right:i.right-e.right-t.marginRight,bottom:i.bottom-e.bottom-t.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=o(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},u.prototype.addItems=function(t){t=this._itemize(t);return t.length&&(this.items=this.items.concat(t)),t},u.prototype.appended=function(t){t=this.addItems(t);t.length&&(this.layoutItems(t,!0),this.reveal(t))},u.prototype.prepended=function(t){var e=this._itemize(t);e.length&&(t=this.items.slice(0),this.items=e.concat(t),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(t))},u.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].reveal()},u.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].hide()},u.prototype.revealItemElements=function(t){t=this.getItems(t);this.reveal(t)},u.prototype.hideItemElements=function(t){t=this.getItems(t);this.hide(t)},u.prototype.getItem=function(t){for(var e=0,i=this.items.length;e<i;e++){var n=this.items[e];if(n.element===t)return n}},u.prototype.getItems=function(t){for(var e=[],i=0,n=(t=r.makeArray(t)).length;i<n;i++){var o=t[i],o=this.getItem(o);o&&e.push(o)}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;i<n;i++){var o=e[i];o.remove(),r.removeFrom(this.items,o)}},u.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;e<i;e++)this.items[e].destroy();this.unbindResize();t=this.element.outlayerGUID;delete c[t],delete this.element.outlayerGUID,f&&f.removeData(this.element,this.constructor.namespace)},u.data=function(t){t=(t=r.getQueryElement(t))&&t.outlayerGUID;return t&&c[t]},u.create=function(t,e){function i(){u.apply(this,arguments)}return Object.create?i.prototype=Object.create(u.prototype):r.extend(i.prototype,u.prototype),(i.prototype.constructor=i).defaults=r.extend({},u.defaults),r.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=u.data,(i.Item=function(){n.apply(this,arguments)}).prototype=new n,r.htmlInit(i,t),f&&f.bridget&&f.bridget(t,i),i},u.Item=n,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,s,a){t=t.create("masonry");return t.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},t.prototype.measureColumns=function(){this.getContainerWidth(),this.columnWidth||(i=(e=this.items[0])&&e.element,this.columnWidth=i&&s(i).outerWidth||this.containerWidth);var t=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,i=e/t,t=t-e%t,i=Math[t&&t<1?"round":"floor"](i);this.cols=Math.max(i,1)},t.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,t=s(t);this.containerWidth=t&&t.innerWidth},t.prototype._getItemLayoutPosition=function(t){t.getSize();for(var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),i=Math.min(i,this.cols),n=this._getColGroup(i),e=Math.min.apply(Math,n),o=a.indexOf(n,e),i={x:this.columnWidth*o,y:e},r=e+t.size.outerHeight,u=this.cols+1-n.length,s=0;s<u;s++)this.colYs[o+s]=r;return i},t.prototype._getColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},t.prototype._manageStamp=function(t){var e=s(t),i=this._getElementOffset(t),n=this.options.isOriginLeft?i.left:i.right,t=n+e.outerWidth,n=Math.floor(n/this.columnWidth),n=Math.max(0,n),o=Math.floor(t/this.columnWidth);o-=t%this.columnWidth?0:1,o=Math.min(this.cols-1,o);for(var r=(this.options.isOriginTop?i.top:i.bottom)+e.outerHeight,u=n;u<=o;u++)this.colYs[u]=Math.max(r,this.colYs[u])},t.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},t.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},t.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},t})),cff_init(),jQuery(document).ready(function(){var t=jQuery;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))})})}));
custom-facebook-feed.php CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
  /*
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: 2.18.2
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
10
  Text Domain: custom-facebook-feed
11
  */
12
- /*
13
- Copyright 2021 Smash Balloon LLC (email : hey@smashballoon.com)
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
16
  the Free Software Foundation; either version 2 of the License, or
@@ -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', '2.18.2');
29
 
30
  // Db version.
31
  if ( ! defined( 'CFF_DBVERSION' ) ) {
@@ -48,22 +48,22 @@ if ( ! defined( 'CFF_FILE' ) ) {
48
  }
49
 
50
  if ( ! defined( 'CFF_FILE' ) ) {
51
- define( 'CFF_PLUGIN_BASE', plugin_basename( CFF_FILE ) );
52
  }
53
 
54
 
55
  /**
56
  * Check PHP version
57
- *
58
  * Check for minimum PHP 5.6 version
59
  *
60
  * @since X.X.X
61
  */
62
  if ( version_compare( phpversion(), '5.6', '<' ) ) {
63
- if( !function_exists( 'cff_check_php_notice' ) ){
64
  include CFF_PLUGIN_DIR . 'admin/enqueu-script.php';
65
  function cff_check_php_notice(){
66
- $include_revert = ( version_compare( phpversion(), '5.6', '<' ) && version_compare( phpversion(), '5.3', '>' ) );
67
  ?>
68
  <div class="notice notice-error">
69
  <div>
@@ -88,7 +88,7 @@ if ( version_compare( phpversion(), '5.6', '<' ) ) {
88
  <?php endif; ?>
89
  </div>
90
  </div>
91
- <?php
92
  }
93
  }
94
  add_action( 'admin_notices', 'cff_check_php_notice' );
@@ -100,10 +100,10 @@ include CFF_PLUGIN_DIR . 'inc/Custom_Facebook_Feed.php';
100
 
101
  if ( function_exists('cff_main_pro') ){
102
  wp_die( "Please deactivate the Pro version of the Custom Facebook Feed plugin before activating this version.<br /><br />Back to the WordPress <a href='".get_admin_url(null, 'plugins.php')."'>Plugins page</a>." );
103
- }
104
 
105
 
106
  function cff_main() {
107
- return CustomFacebookFeed\Custom_Facebook_Feed::instance();
108
  }
109
  cff_main();
1
+ <?php
2
  /*
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: 2.18.3
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
10
  Text Domain: custom-facebook-feed
11
  */
12
+ /*
13
+ Copyright 2021 Smash Balloon LLC (email : hey@smashballoon.com)
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
16
  the Free Software Foundation; either version 2 of the License, or
25
  */
26
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
27
 
28
+ define('CFFVER', '2.18.3');
29
 
30
  // Db version.
31
  if ( ! defined( 'CFF_DBVERSION' ) ) {
48
  }
49
 
50
  if ( ! defined( 'CFF_FILE' ) ) {
51
+ define( 'CFF_PLUGIN_BASE', plugin_basename( CFF_FILE ) );
52
  }
53
 
54
 
55
  /**
56
  * Check PHP version
57
+ *
58
  * Check for minimum PHP 5.6 version
59
  *
60
  * @since X.X.X
61
  */
62
  if ( version_compare( phpversion(), '5.6', '<' ) ) {
63
+ if( !function_exists( 'cff_check_php_notice' ) ){
64
  include CFF_PLUGIN_DIR . 'admin/enqueu-script.php';
65
  function cff_check_php_notice(){
66
+ $include_revert = ( version_compare( phpversion(), '5.6', '<' ) && version_compare( phpversion(), '5.3', '>' ) );
67
  ?>
68
  <div class="notice notice-error">
69
  <div>
88
  <?php endif; ?>
89
  </div>
90
  </div>
91
+ <?php
92
  }
93
  }
94
  add_action( 'admin_notices', 'cff_check_php_notice' );
100
 
101
  if ( function_exists('cff_main_pro') ){
102
  wp_die( "Please deactivate the Pro version of the Custom Facebook Feed plugin before activating this version.<br /><br />Back to the WordPress <a href='".get_admin_url(null, 'plugins.php')."'>Plugins page</a>." );
103
+ }
104
 
105
 
106
  function cff_main() {
107
+ return CustomFacebookFeed\Custom_Facebook_Feed::instance();
108
  }
109
  cff_main();
inc/CFF_FB_Settings.php CHANGED
@@ -185,6 +185,7 @@ class CFF_FB_Settings {
185
  'disablestyles' => isset($options[ 'cff_disable_styles' ]) ? $options[ 'cff_disable_styles' ] : '',
186
  'textissue' => isset($options[ 'cff_format_issue' ]) ? $options[ 'cff_format_issue' ] : '',
187
  'restrictedpage' => isset($options[ 'cff_restricted_page' ]) ? $options[ 'cff_restricted_page' ] : '',
 
188
 
189
  //Page Header
190
  'showheader' => isset($options[ 'cff_show_header' ]) ? $options[ 'cff_show_header' ] : '',
185
  'disablestyles' => isset($options[ 'cff_disable_styles' ]) ? $options[ 'cff_disable_styles' ] : '',
186
  'textissue' => isset($options[ 'cff_format_issue' ]) ? $options[ 'cff_format_issue' ] : '',
187
  'restrictedpage' => isset($options[ 'cff_restricted_page' ]) ? $options[ 'cff_restricted_page' ] : '',
188
+ 'salesposts' => 'false',
189
 
190
  //Page Header
191
  'showheader' => isset($options[ 'cff_show_header' ]) ? $options[ 'cff_show_header' ] : '',
inc/CFF_Shortcode.php CHANGED
@@ -59,11 +59,11 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
59
  add_shortcode('custom-facebook-feed', array($this, 'display_cff'));
60
  }
61
 
62
-
63
  /**
64
  * Get JSON data
65
  *
66
- * Returns a list of posts JSON form the FaceBook API API
67
  *
68
  * @since X.X.X
69
  * @return JSON OBJECT
@@ -71,7 +71,10 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
71
  public function get_feed_json( $graph_query, $cff_post_limit, $cff_locale, $cff_show_access_token, $cache_seconds, $cff_cache_time, $show_posts_by ){
72
  //Is it SSL?
73
  $cff_ssl = is_ssl() ? '&return_ssl_resources=true' : '';
74
- $cff_posts_json_url = 'https://graph.facebook.com/v4.0/' . $this->page_id . '/' . $graph_query . '?fields=id,from{picture,id,name,link},message,message_tags,story,story_tags,status_type,created_time,backdated_time,call_to_action,attachments{title,description,media_type,unshimmed_url,target{id},media{source}}&access_token=' . $this->access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale . $cff_ssl;
 
 
 
75
  if( $cff_show_access_token && strlen($this->access_token) > 130 ){
76
  //If using a Page Access Token then set caching time to be minimum of 5 minutes
77
  if( $cache_seconds < 300 || !isset($cache_seconds) ) $cache_seconds = 300;
@@ -200,17 +203,17 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
200
 
201
 
202
 
203
-
204
 
205
 
206
  /**
207
  * Display.
208
  * The main Shortcode display
209
- *
210
  * @since X.X.X
211
  */
212
- public function display_cff($atts) {
213
- $this->options = get_option('cff_style_settings');
214
  $this->fb_feed_settings = new CFF_FB_Settings($atts, $this->options);
215
  $this->atts = $this->fb_feed_settings->get_settings();
216
  $id_and_token = $this->fb_feed_settings->get_id_and_token();
@@ -239,7 +242,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
239
  $cff_cache_time_unit = $this->atts[ 'cacheunit' ];
240
 
241
  $like_box = CFF_Utils::print_template_part( 'likebox', get_defined_vars());
242
-
243
 
244
  if($cff_cache_time == 'nocaching') $cff_cache_time = 0;
245
 
@@ -271,10 +274,10 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
271
  if( $cff_show_author_old == 'true' ) $cff_show_author = true;
272
 
273
  //See Less text
274
- $cff_posttext_link_color = str_replace('#', '', $this->atts['textlinkcolor']);
275
  $cff_title_link = CFF_Utils::check_if_on( $this->atts['textlink'] );
276
 
277
- //Description Style
278
  $cff_body_styles = $this->get_style_attribute( 'body_description' );
279
 
280
  //Shared link box
@@ -286,7 +289,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
286
  $cff_date_position = ( !isset( $this->atts[ 'datepos' ] ) ) ? 'below' : $this->atts[ 'datepos' ];
287
 
288
 
289
- //Show Facebook link
290
  $cff_link_to_timeline = $this->atts[ 'linktotimeline' ];
291
 
292
  //Post Style settings
@@ -294,7 +297,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
294
  $cff_post_bg_color_check = ($this->atts['postbgcolor'] !== '' && $this->atts['postbgcolor'] !== '#' && $cff_post_style != 'regular' ) ? true : false;
295
  $cff_box_shadow = CFF_Utils::check_if_on( $this->atts['boxshadow'] ) && $cff_post_style == 'boxed';
296
 
297
- //Text limits
298
  $body_limit = $this->atts['desclength'];
299
 
300
  //Get show posts attribute. If not set then default to 25
@@ -326,7 +329,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
326
  if ( $desk_num < $mobile_num ) {
327
  $this->atts['minnum'] = $mobile_num;
328
  }
329
-
330
  $show_posts = isset( $this->atts['minnum'] ) ? $this->atts['minnum'] : $show_posts;
331
  $cff_post_limit = $this->get_post_limit($show_posts);
332
 
@@ -344,11 +347,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
344
  $cache_seconds = $cff_cache_time * $cff_cache_time_unit;
345
 
346
 
347
- //Feed header
348
- $cff_show_header = CFF_Utils::check_if_on( $this->atts['showheader'] );
349
- $cff_header_outside = CFF_Utils::check_if_on( $this->atts['headeroutside'] );
350
- $cff_header_type = strtolower( $this->atts['headertype'] );
351
- $cff_header = CFF_Utils::print_template_part( 'header', get_defined_vars(), $this);
352
 
353
 
354
  //Misc Settings
@@ -362,12 +361,20 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
362
  $cff_post_limit = 1;
363
  }
364
 
365
- //***START FEED***
366
- #$defined_vars = get_defined_vars();
367
  $cff_content = '';
368
 
369
  //Create CFF container HTML
370
  $cff_content .= '<div class="cff-wrapper">';
 
 
 
 
 
 
 
 
371
 
372
  //Add the page header to the outside of the top of feed
373
  if ($cff_show_header && $cff_header_outside) $cff_content .= $cff_header;
@@ -377,10 +384,12 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
377
 
378
 
379
  //Get Custom Class and Compiled CSS
380
- $cff_style_class = $this->feed_style_class_compiler();
381
 
 
 
 
382
  $cff_content .= '<div id="cff" ' . $cff_style_class['cff_custom_class'] . ' ' . $cff_style_class['cff_feed_styles'] . ' ' . $cff_style_class['cff_feed_attributes'] . '>';
383
-
384
  //Add the page header to the inside of the top of feed
385
  if ($cff_show_header && !$cff_header_outside) $cff_content .= $cff_header;
386
 
@@ -396,7 +405,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
396
  $FBdata = $this->get_feed_json( $graph_query, $cff_post_limit, $cff_locale, $cff_show_access_token, $cache_seconds, $cff_cache_time, $show_posts_by );
397
 
398
  global $current_user;
399
- $user_id = $current_user->ID;
400
 
401
  //Print Pretty Message Error
402
  $cff_content .= CFF_Utils::print_template_part( 'error-message', get_defined_vars());
@@ -410,6 +419,8 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
410
  }
411
  }
412
 
 
 
413
  //***STARTS POSTS LOOP***
414
  if( isset($FBdata->data) ){
415
  foreach ($FBdata->data as $news )
@@ -564,7 +575,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
564
 
565
 
566
  //Story/post text vars
567
- $post_text = '';
568
  $cff_story_raw = '';
569
  $cff_message_raw = '';
570
  $cff_name_raw = '';
@@ -578,7 +589,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
578
  //Use the story
579
  if (!empty($news->story)) {
580
  $cff_story_raw = $news->story;
581
- $post_text_story .= htmlspecialchars($cff_story_raw);
582
 
583
 
584
  //Add message and story tags if there are any and the post text is the message or the story
@@ -639,7 +650,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
639
  if( strpos( $cff_story_tag_offsets, $c ) !== false && $c !== '0' ){
640
  $cff_story_duplicate_offset = $c;
641
  } else {
642
- $cff_story_tag_offsets .= $c . ',';
643
  }
644
 
645
  }
@@ -669,10 +680,10 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
669
  } //END STORY TAGS
670
 
671
  }
672
-
673
  //POST AUTHOR
674
- $cff_author = CFF_Utils::print_template_part( 'item/author', get_defined_vars(), $this);
675
-
676
  //Get the actual post text
677
  //Which content should we use?
678
  //Use the message
@@ -736,7 +747,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
736
  if( strpos( $cff_msg_tag_offsets, $c ) !== false && $c !== '0' ){
737
  $cff_msg_duplicate_offset = $c;
738
  } else {
739
- $cff_msg_tag_offsets .= $c . ',';
740
  }
741
  }
742
 
@@ -759,7 +770,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
759
 
760
  }
761
 
762
- }
763
 
764
  } // end if/else
765
 
@@ -780,7 +791,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
780
  $url = '';
781
  }
782
  //Embeddable video strings
783
- $vimeo = 'vimeo';
784
  $youtube = CFF_Utils::stripos($url, 'youtube');
785
  $youtu = CFF_Utils::stripos($url, 'youtu');
786
  $youtubeembed = CFF_Utils::stripos($url, 'youtube.com/embed');
@@ -791,7 +802,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
791
  $cff_is_video_embed = true;
792
  }
793
  //If it's soundcloud then add it into the shared link box at the bottom of the post
794
- if( $soundcloudembed ) $cff_soundcloud = true;
795
  }
796
 
797
  //Add the story and message together
@@ -848,13 +859,13 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
848
  //Use the name if there's no other text, unless it's a shared link post as then it's already used as the shared link box title
849
  if ( !empty($news->name) && empty($news->message) && $cff_post_type != 'link' ) {
850
  $cff_name_raw = $news->name;
851
- $post_text = htmlspecialchars($cff_name_raw);
852
  }
853
 
854
  //OFFER TEXT
855
  if ($cff_post_type == 'offer'){
856
  isset($news->story) ? $post_text = htmlspecialchars($news->story) . '<br /><br />' : $post_text = '';
857
- $post_text .= htmlspecialchars($news->name);
858
  }
859
 
860
  //Add the description
@@ -870,7 +881,7 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
870
 
871
 
872
  //Create note
873
- if ($cff_post_type == 'note') {
874
  //Notes don't include any post text and so just replace the post text with the note content
875
  if($cff_show_text) $post_text = CFF_Utils::print_template_part( 'item/type/note', get_defined_vars(), $this);
876
  }
@@ -891,14 +902,14 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
891
  }
892
 
893
  //Create post action links HTML
894
- $cff_link = CFF_Utils::print_template_part( 'item/post-link', get_defined_vars(), $this);
895
- /* MEDIA LINK */
896
  $cff_media_link = CFF_Utils::print_template_part( 'item/media-link', get_defined_vars(), $this);
897
  //**************************//
898
  //***CREATE THE POST HTML***//
899
  //**************************//
900
  //Start the container
901
- $cff_post_item = CFF_Utils::print_template_part( 'item/container', get_defined_vars(), $this);
902
 
903
  //PUSH TO ARRAY
904
  $cff_posts_array = CFF_Utils::cff_array_push_assoc($cff_posts_array, $i_post, $cff_post_item);
@@ -926,14 +937,17 @@ class CFF_Shortcode extends CFF_Shortcode_Display{
926
  $p++;
927
  }
928
 
 
929
  //Add the Like Box inside
930
  if ($cff_like_box_position == 'bottom' && $cff_show_like_box && !$cff_like_box_outside) $cff_content .= $like_box;
931
  /* Credit link */
932
 
 
 
933
  $cff_content .= CFF_Utils::print_template_part( 'credit', get_defined_vars());
934
 
935
  //End the feed
936
- $cff_content .= '</div><div class="cff-clear"></div>';
937
 
938
  //Add the Like Box outside
939
  if ($cff_like_box_position == 'bottom' && $cff_show_like_box && $cff_like_box_outside) $cff_content .= $like_box;
59
  add_shortcode('custom-facebook-feed', array($this, 'display_cff'));
60
  }
61
 
62
+
63
  /**
64
  * Get JSON data
65
  *
66
+ * Returns a list of posts JSON form the FaceBook API API
67
  *
68
  * @since X.X.X
69
  * @return JSON OBJECT
71
  public function get_feed_json( $graph_query, $cff_post_limit, $cff_locale, $cff_show_access_token, $cache_seconds, $cff_cache_time, $show_posts_by ){
72
  //Is it SSL?
73
  $cff_ssl = is_ssl() ? '&return_ssl_resources=true' : '';
74
+ $attachments_desc = ( $this->atts['salesposts'] == 'true' ) ? '' : ',description';
75
+
76
+ $cff_posts_json_url = 'https://graph.facebook.com/v4.0/' . $this->page_id . '/' . $graph_query . '?fields=id,from{picture,id,name,link},message,message_tags,story,story_tags,status_type,created_time,backdated_time,call_to_action,attachments{title'. $attachments_desc . ',media_type,unshimmed_url,target{id},media{source}}&access_token=' . $this->access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale . $cff_ssl;
77
+
78
  if( $cff_show_access_token && strlen($this->access_token) > 130 ){
79
  //If using a Page Access Token then set caching time to be minimum of 5 minutes
80
  if( $cache_seconds < 300 || !isset($cache_seconds) ) $cache_seconds = 300;
203
 
204
 
205
 
206
+
207
 
208
 
209
  /**
210
  * Display.
211
  * The main Shortcode display
212
+ *
213
  * @since X.X.X
214
  */
215
+ public function display_cff($atts) {
216
+ $this->options = get_option('cff_style_settings');
217
  $this->fb_feed_settings = new CFF_FB_Settings($atts, $this->options);
218
  $this->atts = $this->fb_feed_settings->get_settings();
219
  $id_and_token = $this->fb_feed_settings->get_id_and_token();
242
  $cff_cache_time_unit = $this->atts[ 'cacheunit' ];
243
 
244
  $like_box = CFF_Utils::print_template_part( 'likebox', get_defined_vars());
245
+
246
 
247
  if($cff_cache_time == 'nocaching') $cff_cache_time = 0;
248
 
274
  if( $cff_show_author_old == 'true' ) $cff_show_author = true;
275
 
276
  //See Less text
277
+ $cff_posttext_link_color = str_replace('#', '', $this->atts['textlinkcolor']);
278
  $cff_title_link = CFF_Utils::check_if_on( $this->atts['textlink'] );
279
 
280
+ //Description Style
281
  $cff_body_styles = $this->get_style_attribute( 'body_description' );
282
 
283
  //Shared link box
289
  $cff_date_position = ( !isset( $this->atts[ 'datepos' ] ) ) ? 'below' : $this->atts[ 'datepos' ];
290
 
291
 
292
+ //Show Facebook link
293
  $cff_link_to_timeline = $this->atts[ 'linktotimeline' ];
294
 
295
  //Post Style settings
297
  $cff_post_bg_color_check = ($this->atts['postbgcolor'] !== '' && $this->atts['postbgcolor'] !== '#' && $cff_post_style != 'regular' ) ? true : false;
298
  $cff_box_shadow = CFF_Utils::check_if_on( $this->atts['boxshadow'] ) && $cff_post_style == 'boxed';
299
 
300
+ //Text limits
301
  $body_limit = $this->atts['desclength'];
302
 
303
  //Get show posts attribute. If not set then default to 25
329
  if ( $desk_num < $mobile_num ) {
330
  $this->atts['minnum'] = $mobile_num;
331
  }
332
+
333
  $show_posts = isset( $this->atts['minnum'] ) ? $this->atts['minnum'] : $show_posts;
334
  $cff_post_limit = $this->get_post_limit($show_posts);
335
 
347
  $cache_seconds = $cff_cache_time * $cff_cache_time_unit;
348
 
349
 
350
+
 
 
 
 
351
 
352
 
353
  //Misc Settings
361
  $cff_post_limit = 1;
362
  }
363
 
364
+ //***START FEED***
365
+ #$defined_vars = get_defined_vars();
366
  $cff_content = '';
367
 
368
  //Create CFF container HTML
369
  $cff_content .= '<div class="cff-wrapper">';
370
+ $cff_style_class = $this->feed_style_class_compiler();
371
+ $cff_insider_style = $this->get_style_attribute( 'feed_wrapper_insider' );
372
+ $cff_feed_height = CFF_Utils::get_css_distance( $this->atts[ 'height' ] ) ;
373
+ //Feed header
374
+ $cff_show_header = CFF_Utils::check_if_on( $this->atts['showheader'] );
375
+ $cff_header_outside = CFF_Utils::check_if_on( $this->atts['headeroutside'] );
376
+ $cff_header_type = strtolower( $this->atts['headertype'] );
377
+ $cff_header = CFF_Utils::print_template_part( 'header', get_defined_vars(), $this);
378
 
379
  //Add the page header to the outside of the top of feed
380
  if ($cff_show_header && $cff_header_outside) $cff_content .= $cff_header;
384
 
385
 
386
  //Get Custom Class and Compiled CSS
 
387
 
388
+ $custom_wrp_class = !empty($cff_feed_height) ? ' cff-wrapper-fixed-height' : '';
389
+
390
+ $cff_content .= '<div class="cff-wrapper-ctn '.$custom_wrp_class.'" '.$cff_insider_style.'>';
391
  $cff_content .= '<div id="cff" ' . $cff_style_class['cff_custom_class'] . ' ' . $cff_style_class['cff_feed_styles'] . ' ' . $cff_style_class['cff_feed_attributes'] . '>';
392
+
393
  //Add the page header to the inside of the top of feed
394
  if ($cff_show_header && !$cff_header_outside) $cff_content .= $cff_header;
395
 
405
  $FBdata = $this->get_feed_json( $graph_query, $cff_post_limit, $cff_locale, $cff_show_access_token, $cache_seconds, $cff_cache_time, $show_posts_by );
406
 
407
  global $current_user;
408
+ $user_id = $current_user->ID;
409
 
410
  //Print Pretty Message Error
411
  $cff_content .= CFF_Utils::print_template_part( 'error-message', get_defined_vars());
419
  }
420
  }
421
 
422
+ $cff_content .= '<div class="cff-posts-wrap">';
423
+
424
  //***STARTS POSTS LOOP***
425
  if( isset($FBdata->data) ){
426
  foreach ($FBdata->data as $news )
575
 
576
 
577
  //Story/post text vars
578
+ $post_text = '';
579
  $cff_story_raw = '';
580
  $cff_message_raw = '';
581
  $cff_name_raw = '';
589
  //Use the story
590
  if (!empty($news->story)) {
591
  $cff_story_raw = $news->story;
592
+ $post_text_story .= htmlspecialchars($cff_story_raw);
593
 
594
 
595
  //Add message and story tags if there are any and the post text is the message or the story
650
  if( strpos( $cff_story_tag_offsets, $c ) !== false && $c !== '0' ){
651
  $cff_story_duplicate_offset = $c;
652
  } else {
653
+ $cff_story_tag_offsets .= $c . ',';
654
  }
655
 
656
  }
680
  } //END STORY TAGS
681
 
682
  }
683
+
684
  //POST AUTHOR
685
+ $cff_author = CFF_Utils::print_template_part( 'item/author', get_defined_vars(), $this);
686
+
687
  //Get the actual post text
688
  //Which content should we use?
689
  //Use the message
747
  if( strpos( $cff_msg_tag_offsets, $c ) !== false && $c !== '0' ){
748
  $cff_msg_duplicate_offset = $c;
749
  } else {
750
+ $cff_msg_tag_offsets .= $c . ',';
751
  }
752
  }
753
 
770
 
771
  }
772
 
773
+ }
774
 
775
  } // end if/else
776
 
791
  $url = '';
792
  }
793
  //Embeddable video strings
794
+ $vimeo = 'vimeo';
795
  $youtube = CFF_Utils::stripos($url, 'youtube');
796
  $youtu = CFF_Utils::stripos($url, 'youtu');
797
  $youtubeembed = CFF_Utils::stripos($url, 'youtube.com/embed');
802
  $cff_is_video_embed = true;
803
  }
804
  //If it's soundcloud then add it into the shared link box at the bottom of the post
805
+ if( $soundcloudembed ) $cff_soundcloud = true;
806
  }
807
 
808
  //Add the story and message together
859
  //Use the name if there's no other text, unless it's a shared link post as then it's already used as the shared link box title
860
  if ( !empty($news->name) && empty($news->message) && $cff_post_type != 'link' ) {
861
  $cff_name_raw = $news->name;
862
+ $post_text = htmlspecialchars($cff_name_raw);
863
  }
864
 
865
  //OFFER TEXT
866
  if ($cff_post_type == 'offer'){
867
  isset($news->story) ? $post_text = htmlspecialchars($news->story) . '<br /><br />' : $post_text = '';
868
+ $post_text .= htmlspecialchars($news->name);
869
  }
870
 
871
  //Add the description
881
 
882
 
883
  //Create note
884
+ if ($cff_post_type == 'note') {
885
  //Notes don't include any post text and so just replace the post text with the note content
886
  if($cff_show_text) $post_text = CFF_Utils::print_template_part( 'item/type/note', get_defined_vars(), $this);
887
  }
902
  }
903
 
904
  //Create post action links HTML
905
+ $cff_link = CFF_Utils::print_template_part( 'item/post-link', get_defined_vars(), $this);
906
+ /* MEDIA LINK */
907
  $cff_media_link = CFF_Utils::print_template_part( 'item/media-link', get_defined_vars(), $this);
908
  //**************************//
909
  //***CREATE THE POST HTML***//
910
  //**************************//
911
  //Start the container
912
+ $cff_post_item = CFF_Utils::print_template_part( 'item/container', get_defined_vars(), $this);
913
 
914
  //PUSH TO ARRAY
915
  $cff_posts_array = CFF_Utils::cff_array_push_assoc($cff_posts_array, $i_post, $cff_post_item);
937
  $p++;
938
  }
939
 
940
+
941
  //Add the Like Box inside
942
  if ($cff_like_box_position == 'bottom' && $cff_show_like_box && !$cff_like_box_outside) $cff_content .= $like_box;
943
  /* Credit link */
944
 
945
+ $cff_content .= '</div>'; // End cff-posts-wrap
946
+
947
  $cff_content .= CFF_Utils::print_template_part( 'credit', get_defined_vars());
948
 
949
  //End the feed
950
+ $cff_content .= '</div></div><div class="cff-clear"></div>';
951
 
952
  //Add the Like Box outside
953
  if ($cff_like_box_position == 'bottom' && $cff_show_like_box && $cff_like_box_outside) $cff_content .= $like_box;
inc/CFF_Shortcode_Display.php CHANGED
@@ -30,7 +30,7 @@ class CFF_Shortcode_Display {
30
  $ajax_loaded_content = '';
31
  $ajax_theme = CFF_Utils::check_if_on( $this->atts['ajax'] );
32
  if ($ajax_theme) {
33
- $cff_min = isset( $this->options[ 'cff_minify' ] ) ? '.min' : '';
34
  $cff_link_hashtags = CFF_Utils::check_if_on( $this->atts['textlink'] ) ? 'false' : CFF_Utils::check_if_on( $this->atts['linkhashtags'] );
35
  $ajax_loaded_content .= '<script type="text/javascript">var cfflinkhashtags = "' . $cff_link_hashtags . '";</script>';
36
  $ajax_loaded_content .= '<script type="text/javascript" src="' . CFF_PLUGIN_URL . 'assets/js/cff-scripts'.$cff_min.'.js?ver='.CFFVER . '"></script>';
@@ -51,10 +51,10 @@ class CFF_Shortcode_Display {
51
  public function style_compiler( $style_array ){
52
  $style = '';
53
  foreach ($style_array as $single_style) {
54
- if( !empty($single_style['value']) && $single_style['value'] != '#' && $single_style['value'] != 'inherit' && $single_style['value'] != '0' ){
55
- $style .= $single_style['css_name'] . ':' .
56
  (isset($single_style['pref']) ? $single_style['pref'] : '') .
57
- $single_style['value'] .
58
  (isset($single_style['suff']) ? $single_style['suff'] : '') .
59
  ';';
60
  }
@@ -79,13 +79,13 @@ class CFF_Shortcode_Display {
79
  ];
80
  //Set to be 100% width on mobile?
81
  $cff_feed_width_resp = CFF_Utils::check_if_on( $this->atts['widthresp'] );
82
- $cff_feed_height = CFF_Utils::get_css_distance( $this->atts[ 'height' ] ) ;
83
 
84
- //Disable default CSS styles?
85
- $cff_disable_styles = CFF_Utils::get_css_distance( $this->atts[ 'disablestyles' ] ) ;
86
 
87
  $cff_class = $this->atts['class'];
88
- //Masonry
89
  $cff_cols = $this->atts['cols'];
90
  $cff_cols_mobile = $this->atts['colsmobile'];
91
  $cff_cols_js = $this->atts['colsjs'];
@@ -94,15 +94,16 @@ class CFF_Shortcode_Display {
94
  $js_only = isset( $cff_cols_js ) ? $cff_cols_js : false;
95
  if( $js_only === 'false' ) $js_only = false;
96
 
97
- if( $masonry || $masonry == 'true' ) $this->atts['headeroutside'] = true;
98
-
 
99
  $masonry_classes = '';
100
  if( isset($masonry) ) {
101
  if( $masonry === 'on' || $masonry === true || $masonry === 'true' ) {
102
  $masonry_classes .= 'cff-masonry';
103
  $masonry_classes .= ( $cff_cols != 3 ) ? sprintf( ' masonry-%s-desktop', $cff_cols ) : '';
104
  $masonry_classes .= ( $cff_cols_mobile == 2 ) ? ' masonry-2-mobile' : '';
105
- $masonry_classes .= ( ! $js_only ) ? ' cff-masonry-css' : ' cff-masonry-js';
106
  }
107
  }
108
 
@@ -115,16 +116,16 @@ class CFF_Shortcode_Display {
115
  $css_classes_string .= ( !empty($cff_feed_height) ) ? ' cff-fixed-height ' : '';
116
  $css_classes_string .= ( $cff_feed_width_resp ) ? ' cff-width-resp ' : '';
117
  $css_classes_string .= ( !$cff_disable_styles ) ? ' cff-default-styles ' : '';
118
- }
119
 
120
- $css_classes_string = ( !empty($css_classes_string) ) ? ' class="cff-list-container '.$css_classes_string.'" ' : 'class="cff-list-container"';
121
 
122
  $title_limit = !isset($title_limit) ? $this->atts['textlength'] : 9999;
123
  $attributes_string = ' data-char="'.$title_limit.'" ';
124
  $mobile_num = isset( $this->atts['nummobile'] ) && (int)$this->atts['nummobile'] !== (int)$this->atts['num'] ? (int)$this->atts['nummobile'] : false;
125
-
126
  $attributes_string .= ( $mobile_num ) ? ' data-nummobile="' . $mobile_num . '" data-pag-num="' . (int)$this->atts['num'] . '" ' : '';
127
- if ( CFF_GDPR_Integrations::doing_gdpr( $this->atts ) ) {
128
  $attributes_string .= ' data-cff-flags="gdpr" ';
129
  }
130
 
@@ -132,7 +133,7 @@ class CFF_Shortcode_Display {
132
  'cff_custom_class' => $css_classes_string,
133
  'cff_feed_styles' => $this->get_style_attribute( 'feed_global' ),
134
  'cff_feed_attributes' => $attributes_string
135
- ];
136
  return $result;
137
  }
138
 
@@ -146,7 +147,7 @@ class CFF_Shortcode_Display {
146
  * @return Array
147
  */
148
  public function get_item_attributes($cff_post_type, $cff_album, $cff_post_bg_color_check, $cff_post_style, $cff_box_shadow, $name, $cff_post_id){
149
- #extract($args);
150
  $item_class = 'cff-item ';
151
  if ($cff_post_type == 'link') $item_class .= 'cff-link-item ';
152
  else if ($cff_post_type == 'event') $item_class .= 'cff-timeline-event ';
@@ -185,7 +186,7 @@ class CFF_Shortcode_Display {
185
  $item_style_array = [
186
  ['css_name' => 'border-radius', 'value' => $this->atts['postcorners'] , 'suff' => 'px'],
187
  ['css_name' => 'background-color', 'value' => str_replace('#', '', $this->atts['postbgcolor']), 'pref' => '#']
188
- ];
189
  $item_style = $this->style_compiler( $item_style_array );
190
  }
191
  return $item_style;
@@ -214,15 +215,19 @@ class CFF_Shortcode_Display {
214
  ['css_name' => 'font-weight', 'value' => $this->atts['descweight']],
215
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts['desccolor']), 'pref' => '#']
216
  ];
217
- break;
218
  case 'feed_global':
219
  $style_array = [
220
  ['css_name' => 'width', 'value' => CFF_Utils::get_css_distance( $this->atts[ 'width' ] ) ],
221
- ['css_name' => 'height', 'value' => CFF_Utils::get_css_distance( $this->atts[ 'height' ] ) ],
 
 
 
222
  ['css_name' => 'padding', 'value' => CFF_Utils::get_css_distance( $this->atts[ 'padding' ] ) ],
 
223
  ['css_name' => 'background-color', 'value' => str_replace('#', '', $this->atts[ 'bgcolor' ] ), 'pref' => '#']
224
  ];
225
- break;
226
  case 'header':
227
  $style_array = [
228
  ['css_name' => 'background-color', 'value' => str_replace('#', '', $this->atts['headerbg']), 'pref' => '#'],
@@ -238,14 +243,14 @@ class CFF_Shortcode_Display {
238
  ['css_name' => 'font-size', 'value' => $this->atts['headertextsize'], 'suff' => 'px'],
239
  ['css_name' => 'font-weight', 'value' => $this->atts['headertextweight']]
240
  ];
241
- break;
242
 
243
  case 'header_icon':
244
  $style_array = [
245
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts['headericoncolor']), 'pref' => '#'],
246
  ['css_name' => 'font-size', 'value' => $this->atts['headericonsize'], 'suff' => 'px']
247
  ];
248
- break;
249
 
250
  case 'author':
251
  $style_array = [
@@ -274,19 +279,19 @@ class CFF_Shortcode_Display {
274
  ['css_name' => 'font-weight', 'value' => $this->atts['textweight']],
275
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts['textcolor']), 'pref' => '#']
276
  ];
277
- break;
278
  case 'shared_cap_link':
279
  $style_array = [
280
  ['css_name' => 'font-size', 'value' => $this->atts[ 'linkurlsize' ], 'suff' => 'px'],
281
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts[ 'linkurlcolor' ]), 'pref' => '#']
282
  ];
283
- break;
284
  case 'shared_desclink':
285
  $style_array = [
286
  ['css_name' => 'font-size', 'value' => $this->atts[ 'linkdescsize' ], 'suff' => 'px'],
287
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts[ 'linkdesccolor' ]), 'pref' => '#']
288
  ];
289
- break;
290
 
291
  }
292
 
@@ -313,14 +318,14 @@ class CFF_Shortcode_Display {
313
  /**
314
  *
315
  * Get Author Template Data
316
- * Get Authors the data for the templates
317
  *
318
  * @since X.X.X
319
  * -----------------------------------------
320
  */
321
 
322
  static function get_author_name( $news ){
323
- return isset($news->from->name) ? str_replace('"', "", $news->from->name) : '';
324
  }
325
 
326
  static function get_author_link_atts( $news, $target, $cff_nofollow, $cff_author_styles ){
@@ -347,26 +352,26 @@ class CFF_Shortcode_Display {
347
  if ( CFF_GDPR_Integrations::doing_gdpr( $atts ) ){
348
  $cff_author_img_src = CFF_PLUGIN_URL. '/assets/img/placeholder.png';
349
  $img_class = ' cff-no-consent';
350
- }
351
  return [
352
  'real_image' => $cff_author_src,
353
  'image' => $cff_author_img_src,
354
  'class' => $img_class
355
- ];
356
  }
357
 
358
 
359
  /**
360
  *
361
  * Get Date Data
362
- * Get Date the data for the templates
363
  *
364
  * @since X.X.X
365
  * -----------------------------------------
366
  */
367
  static function get_date( $options, $atts, $news ){
368
  $cff_date_before = isset($options[ 'cff_date_before' ]) ? $options[ 'cff_date_before' ] : '';
369
- $cff_date_after = isset($options[ 'cff_date_after' ]) ? $options[ 'cff_date_after' ] : '';
370
  //Timezone. The post date is adjusted by the timezone offset in the cff_getdate function.
371
  $cff_timezone = $atts['timezone'];
372
 
@@ -399,7 +404,7 @@ class CFF_Shortcode_Display {
399
  /**
400
  *
401
  * Get Media Link Data
402
- * Get the Media link data for the templates
403
  *
404
  * @since X.X.X
405
  * -----------------------------------------
@@ -412,13 +417,13 @@ class CFF_Shortcode_Display {
412
 
413
  static function get_media_link_icon( $cff_post_type, $cff_album ){
414
  return ( $cff_post_type == 'photo' || $cff_album ) ? 'picture-o fa-image' : 'video-camera fa-video';
415
- }
416
 
417
 
418
  /**
419
  *
420
  * Get Post Link Data
421
- * Get the Post link data for the templates
422
  *
423
  * @since X.X.X
424
  * -----------------------------------------
@@ -462,7 +467,7 @@ class CFF_Shortcode_Display {
462
  $link_text = ($cff_facebook_link_text != '' && !empty($cff_facebook_link_text)) ? $cff_facebook_link_text : esc_html__('View on Facebook', 'custom-facebook-feed');
463
  //If it's an offer post then change the text
464
  if ($cff_post_type == 'offer') $link_text = esc_html__('View Offer', 'custom-facebook-feed');
465
- return $link_text;
466
  }
467
 
468
  static function get_post_link_fb_share_text( $atts ){
@@ -473,7 +478,7 @@ class CFF_Shortcode_Display {
473
  /**
474
  *
475
  * Get Post Text Data
476
- * Get the Post text data for the templates
477
  *
478
  * @since X.X.X
479
  * -----------------------------------------
@@ -488,15 +493,15 @@ class CFF_Shortcode_Display {
488
 
489
  static function get_post_text_contenttext( $post_text, $cff_linebreak_el, $cff_title_link ){
490
  //Replace line breaks in text (needed for IE8 and to prevent lost line breaks in HTML minification)
491
- $post_text = preg_replace("/\r\n|\r|\n/",$cff_linebreak_el, $post_text);
492
  //If the text is wrapped in a link then don't hyperlink any text within
493
- if( $cff_title_link ):
494
  //Remove links from text
495
- $result = preg_replace('/<a href=\"(.*?)\">(.*?)<\/a>/', "\\2", $post_text);
496
  return CFF_Utils::cff_wrap_span( $result ) . ' ';;
497
  else :
498
  return CFF_Autolink::cff_autolink( $post_text );
499
- endif;
500
  }
501
 
502
  static function get_post_text_call_to_actions( $atts, $news, $cff_title_styles, $cff_posttext_link_color, $cff_nofollow_referrer){
@@ -517,7 +522,7 @@ class CFF_Shortcode_Display {
517
  case 'SHOP_NOW':
518
  $cff_cta_button_text = CFF_Utils::return_value( $atts['shopnowtext'], 'Shop Now');
519
  break;
520
- case 'MESSAGE_PAGE':
521
  $cff_cta_button_text = CFF_Utils::return_value( $atts['messagepage'], 'Message Page');
522
  break;
523
  case 'LEARN_MORE':
@@ -530,10 +535,10 @@ class CFF_Shortcode_Display {
530
  $cff_app_link = isset($news->call_to_action->value->app_link) ? $news->call_to_action->value->app_link : '';
531
 
532
  //Add the button to the post if the text isn't "NO_BUTTON"
533
- if( $cff_button_type != 'NO_BUTTON' ):
534
  ?>
535
  <p class="cff-cta-link" <?php echo $cff_title_styles ?>><a href="<?php echo esc_url($cff_cta_link) ?>" target="_blank" data-app-link="<?php echo $cff_app_link ?>" style="color: #<?php echo $cff_posttext_link_color ?>;" <?php echo $cff_nofollow_referrer ?> ><?php echo $cff_cta_button_text ?></a></p>
536
- <?php
537
  endif;
538
  }
539
  }
@@ -542,7 +547,7 @@ class CFF_Shortcode_Display {
542
  /**
543
  *
544
  * Get Shared Link Data
545
- * Get the Shared Link data for the templates
546
  *
547
  * @since X.X.X
548
  * -----------------------------------------
@@ -574,7 +579,7 @@ class CFF_Shortcode_Display {
574
  if ($cff_title_link) {
575
  }else{
576
  $description_text = CFF_Autolink::cff_autolink( htmlspecialchars($description_text), $link_color = $cff_posttext_link_color );
577
- }
578
  return $description_text;
579
  }
580
 
@@ -584,8 +589,8 @@ class CFF_Shortcode_Display {
584
  $cff_link_description = CFF_Utils::cff_wrap_span( htmlspecialchars($description_text) );
585
  }else{
586
  $cff_link_description = nl2br($description_text);
587
- }
588
- return $cff_link_description ;
589
  }
590
 
591
 
@@ -593,7 +598,7 @@ class CFF_Shortcode_Display {
593
  /**
594
  *
595
  * Get Error Message Data
596
- * Get the error message data for the templates
597
  *
598
  * @since X.X.X
599
  * -----------------------------------------
@@ -601,7 +606,7 @@ class CFF_Shortcode_Display {
601
 
602
  static function get_error_check( $page_id, $user_id, $access_token ){
603
  $cff_ppca_check_error = false;
604
- if( ! get_user_meta($user_id, 'cff_ppca_check_notice_dismiss') ){
605
  $cff_posts_json_url = 'https://graph.facebook.com/v8.0/'.$page_id.'/posts?limit=1&access_token='.$access_token;
606
  $transient_name = 'cff_ppca_' . substr($page_id, 0, 5) . substr($page_id, strlen($page_id)-5, 5) . '_' . substr($access_token, 15, 10);
607
  $cff_cache_time = 1;
@@ -632,7 +637,7 @@ class CFF_Shortcode_Display {
632
  /**
633
  *
634
  * Get Likebox Data
635
- * Get the likebox data for the templates
636
  *
637
  * @since X.X.X
638
  * -----------------------------------------
@@ -668,7 +673,7 @@ class CFF_Shortcode_Display {
668
  /**
669
  *
670
  * Get Header Data
671
- * Get the Header data for the templates
672
  *
673
  * @since X.X.X
674
  * -----------------------------------------
@@ -678,7 +683,7 @@ class CFF_Shortcode_Display {
678
  }
679
 
680
 
681
- static function get_header_parts( $atts ){
682
  if ( !empty( $atts['headerinc'] ) || !empty( $atts['headerexclude'] ) ) {
683
  if ( !empty( $atts['headerinc'] ) ) {
684
  $header_inc = explode( ',', str_replace( ' ', '', strtolower( $atts['headerinc'] ) ) );
@@ -695,7 +700,7 @@ class CFF_Shortcode_Display {
695
  $cff_header_cover = CFF_Utils::check_if_on( $atts['headercover'] );
696
  $cff_header_name = CFF_Utils::check_if_on( $atts['headername'] );
697
  $cff_header_bio = CFF_Utils::check_if_on( $atts['headerbio'] );
698
- }
699
 
700
  return [
701
  'cover' => $cff_header_cover,
@@ -704,17 +709,17 @@ class CFF_Shortcode_Display {
704
  ];
705
  }
706
 
707
- static function get_header_height_style( $atts ){
708
  $cff_header_cover_height = ! empty( $atts['headercoverheight'] ) ? (int)$atts['headercoverheight'] : 300;
709
  $header_hero_style = $cff_header_cover_height !== 300 ? ' style="height: '.$cff_header_cover_height.'px";' : '';
710
  return $header_hero_style;
711
  }
712
 
713
- static function get_header_font_size( $atts ){
714
  return !empty($atts['headertextsize']) ? 'style="font-size:'. $atts['headertextsize'] .'px;"' : '';
715
  }
716
 
717
- static function get_header_link( $header_data, $page_id ){
718
  $link = CFF_Parse::get_link( $header_data );
719
  if( $link == 'https://facebook.com' ) $link .= '/'.$page_id;
720
  return $link;
@@ -745,9 +750,9 @@ class CFF_Shortcode_Display {
745
  }
746
  ?>
747
  <div class="cff-gdpr-notice <?php echo $custom_class; ?>">
748
- <i class="fa fa-lock" aria-hidden="true"></i>
749
  <?php echo esc_html__('This notice is visible to admins only.','custom-facebook-feed') ?><br/>
750
- <?php echo $element_name.' '.esc_html__('disabled due to GDPR setting.','custom-facebook-feed') ?> <a href="<?php echo esc_url(admin_url('admin.php?page=cff-style&tab=misc')); ?>"><?php echo esc_html__('Click here','custom-facebook-feed') ?></a> <?php echo esc_html__('for more info.','custom-facebook-feed') ?>
751
  </div>
752
  <?php
753
  }
30
  $ajax_loaded_content = '';
31
  $ajax_theme = CFF_Utils::check_if_on( $this->atts['ajax'] );
32
  if ($ajax_theme) {
33
+ $cff_min = isset( $this->options[ 'cff_minify' ] ) ? '.min' : '';
34
  $cff_link_hashtags = CFF_Utils::check_if_on( $this->atts['textlink'] ) ? 'false' : CFF_Utils::check_if_on( $this->atts['linkhashtags'] );
35
  $ajax_loaded_content .= '<script type="text/javascript">var cfflinkhashtags = "' . $cff_link_hashtags . '";</script>';
36
  $ajax_loaded_content .= '<script type="text/javascript" src="' . CFF_PLUGIN_URL . 'assets/js/cff-scripts'.$cff_min.'.js?ver='.CFFVER . '"></script>';
51
  public function style_compiler( $style_array ){
52
  $style = '';
53
  foreach ($style_array as $single_style) {
54
+ if( !empty($single_style['value']) && $single_style['value'] != '#' && $single_style['value'] != 'inherit' && $single_style['value'] !== '0' ){
55
+ $style .= $single_style['css_name'] . ':' .
56
  (isset($single_style['pref']) ? $single_style['pref'] : '') .
57
+ $single_style['value'] .
58
  (isset($single_style['suff']) ? $single_style['suff'] : '') .
59
  ';';
60
  }
79
  ];
80
  //Set to be 100% width on mobile?
81
  $cff_feed_width_resp = CFF_Utils::check_if_on( $this->atts['widthresp'] );
82
+ $cff_feed_height = CFF_Utils::get_css_distance( $this->atts[ 'height' ] ) ;
83
 
84
+ //Disable default CSS styles?
85
+ $cff_disable_styles = CFF_Utils::get_css_distance( $this->atts[ 'disablestyles' ] ) ;
86
 
87
  $cff_class = $this->atts['class'];
88
+ //Masonry
89
  $cff_cols = $this->atts['cols'];
90
  $cff_cols_mobile = $this->atts['colsmobile'];
91
  $cff_cols_js = $this->atts['colsjs'];
94
  $js_only = isset( $cff_cols_js ) ? $cff_cols_js : false;
95
  if( $js_only === 'false' ) $js_only = false;
96
 
97
+ if( $masonry || $masonry == 'true' ){
98
+ $this->atts['headeroutside'] = true;
99
+ }
100
  $masonry_classes = '';
101
  if( isset($masonry) ) {
102
  if( $masonry === 'on' || $masonry === true || $masonry === 'true' ) {
103
  $masonry_classes .= 'cff-masonry';
104
  $masonry_classes .= ( $cff_cols != 3 ) ? sprintf( ' masonry-%s-desktop', $cff_cols ) : '';
105
  $masonry_classes .= ( $cff_cols_mobile == 2 ) ? ' masonry-2-mobile' : '';
106
+ $masonry_classes .= ( ! $js_only ) ? ' cff-masonry-css' : ' cff-masonry-js';
107
  }
108
  }
109
 
116
  $css_classes_string .= ( !empty($cff_feed_height) ) ? ' cff-fixed-height ' : '';
117
  $css_classes_string .= ( $cff_feed_width_resp ) ? ' cff-width-resp ' : '';
118
  $css_classes_string .= ( !$cff_disable_styles ) ? ' cff-default-styles ' : '';
119
+ }
120
 
121
+ $css_classes_string = ( !empty($css_classes_string) ) ? ' class="cff cff-list-container '.$css_classes_string.'" ' : 'class="cff cff-list-container"';
122
 
123
  $title_limit = !isset($title_limit) ? $this->atts['textlength'] : 9999;
124
  $attributes_string = ' data-char="'.$title_limit.'" ';
125
  $mobile_num = isset( $this->atts['nummobile'] ) && (int)$this->atts['nummobile'] !== (int)$this->atts['num'] ? (int)$this->atts['nummobile'] : false;
126
+
127
  $attributes_string .= ( $mobile_num ) ? ' data-nummobile="' . $mobile_num . '" data-pag-num="' . (int)$this->atts['num'] . '" ' : '';
128
+ if ( CFF_GDPR_Integrations::doing_gdpr( $this->atts ) ) {
129
  $attributes_string .= ' data-cff-flags="gdpr" ';
130
  }
131
 
133
  'cff_custom_class' => $css_classes_string,
134
  'cff_feed_styles' => $this->get_style_attribute( 'feed_global' ),
135
  'cff_feed_attributes' => $attributes_string
136
+ ];
137
  return $result;
138
  }
139
 
147
  * @return Array
148
  */
149
  public function get_item_attributes($cff_post_type, $cff_album, $cff_post_bg_color_check, $cff_post_style, $cff_box_shadow, $name, $cff_post_id){
150
+ #extract($args);
151
  $item_class = 'cff-item ';
152
  if ($cff_post_type == 'link') $item_class .= 'cff-link-item ';
153
  else if ($cff_post_type == 'event') $item_class .= 'cff-timeline-event ';
186
  $item_style_array = [
187
  ['css_name' => 'border-radius', 'value' => $this->atts['postcorners'] , 'suff' => 'px'],
188
  ['css_name' => 'background-color', 'value' => str_replace('#', '', $this->atts['postbgcolor']), 'pref' => '#']
189
+ ];
190
  $item_style = $this->style_compiler( $item_style_array );
191
  }
192
  return $item_style;
215
  ['css_name' => 'font-weight', 'value' => $this->atts['descweight']],
216
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts['desccolor']), 'pref' => '#']
217
  ];
218
+ break;
219
  case 'feed_global':
220
  $style_array = [
221
  ['css_name' => 'width', 'value' => CFF_Utils::get_css_distance( $this->atts[ 'width' ] ) ],
222
+ ];
223
+ break;
224
+ case 'feed_wrapper_insider':
225
+ $style_array = [
226
  ['css_name' => 'padding', 'value' => CFF_Utils::get_css_distance( $this->atts[ 'padding' ] ) ],
227
+ ['css_name' => 'height', 'value' => CFF_Utils::get_css_distance( $this->atts[ 'height' ] ) ],
228
  ['css_name' => 'background-color', 'value' => str_replace('#', '', $this->atts[ 'bgcolor' ] ), 'pref' => '#']
229
  ];
230
+ break;
231
  case 'header':
232
  $style_array = [
233
  ['css_name' => 'background-color', 'value' => str_replace('#', '', $this->atts['headerbg']), 'pref' => '#'],
243
  ['css_name' => 'font-size', 'value' => $this->atts['headertextsize'], 'suff' => 'px'],
244
  ['css_name' => 'font-weight', 'value' => $this->atts['headertextweight']]
245
  ];
246
+ break;
247
 
248
  case 'header_icon':
249
  $style_array = [
250
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts['headericoncolor']), 'pref' => '#'],
251
  ['css_name' => 'font-size', 'value' => $this->atts['headericonsize'], 'suff' => 'px']
252
  ];
253
+ break;
254
 
255
  case 'author':
256
  $style_array = [
279
  ['css_name' => 'font-weight', 'value' => $this->atts['textweight']],
280
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts['textcolor']), 'pref' => '#']
281
  ];
282
+ break;
283
  case 'shared_cap_link':
284
  $style_array = [
285
  ['css_name' => 'font-size', 'value' => $this->atts[ 'linkurlsize' ], 'suff' => 'px'],
286
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts[ 'linkurlcolor' ]), 'pref' => '#']
287
  ];
288
+ break;
289
  case 'shared_desclink':
290
  $style_array = [
291
  ['css_name' => 'font-size', 'value' => $this->atts[ 'linkdescsize' ], 'suff' => 'px'],
292
  ['css_name' => 'color', 'value' => str_replace('#', '', $this->atts[ 'linkdesccolor' ]), 'pref' => '#']
293
  ];
294
+ break;
295
 
296
  }
297
 
318
  /**
319
  *
320
  * Get Author Template Data
321
+ * Get Authors the data for the templates
322
  *
323
  * @since X.X.X
324
  * -----------------------------------------
325
  */
326
 
327
  static function get_author_name( $news ){
328
+ return isset($news->from->name) ? str_replace('"', "", $news->from->name) : '';
329
  }
330
 
331
  static function get_author_link_atts( $news, $target, $cff_nofollow, $cff_author_styles ){
352
  if ( CFF_GDPR_Integrations::doing_gdpr( $atts ) ){
353
  $cff_author_img_src = CFF_PLUGIN_URL. '/assets/img/placeholder.png';
354
  $img_class = ' cff-no-consent';
355
+ }
356
  return [
357
  'real_image' => $cff_author_src,
358
  'image' => $cff_author_img_src,
359
  'class' => $img_class
360
+ ];
361
  }
362
 
363
 
364
  /**
365
  *
366
  * Get Date Data
367
+ * Get Date the data for the templates
368
  *
369
  * @since X.X.X
370
  * -----------------------------------------
371
  */
372
  static function get_date( $options, $atts, $news ){
373
  $cff_date_before = isset($options[ 'cff_date_before' ]) ? $options[ 'cff_date_before' ] : '';
374
+ $cff_date_after = isset($options[ 'cff_date_after' ]) ? $options[ 'cff_date_after' ] : '';
375
  //Timezone. The post date is adjusted by the timezone offset in the cff_getdate function.
376
  $cff_timezone = $atts['timezone'];
377
 
404
  /**
405
  *
406
  * Get Media Link Data
407
+ * Get the Media link data for the templates
408
  *
409
  * @since X.X.X
410
  * -----------------------------------------
417
 
418
  static function get_media_link_icon( $cff_post_type, $cff_album ){
419
  return ( $cff_post_type == 'photo' || $cff_album ) ? 'picture-o fa-image' : 'video-camera fa-video';
420
+ }
421
 
422
 
423
  /**
424
  *
425
  * Get Post Link Data
426
+ * Get the Post link data for the templates
427
  *
428
  * @since X.X.X
429
  * -----------------------------------------
467
  $link_text = ($cff_facebook_link_text != '' && !empty($cff_facebook_link_text)) ? $cff_facebook_link_text : esc_html__('View on Facebook', 'custom-facebook-feed');
468
  //If it's an offer post then change the text
469
  if ($cff_post_type == 'offer') $link_text = esc_html__('View Offer', 'custom-facebook-feed');
470
+ return $link_text;
471
  }
472
 
473
  static function get_post_link_fb_share_text( $atts ){
478
  /**
479
  *
480
  * Get Post Text Data
481
+ * Get the Post text data for the templates
482
  *
483
  * @since X.X.X
484
  * -----------------------------------------
493
 
494
  static function get_post_text_contenttext( $post_text, $cff_linebreak_el, $cff_title_link ){
495
  //Replace line breaks in text (needed for IE8 and to prevent lost line breaks in HTML minification)
496
+ $post_text = preg_replace("/\r\n|\r|\n/",$cff_linebreak_el, $post_text);
497
  //If the text is wrapped in a link then don't hyperlink any text within
498
+ if( $cff_title_link ):
499
  //Remove links from text
500
+ $result = preg_replace('/<a href=\"(.*?)\">(.*?)<\/a>/', "\\2", $post_text);
501
  return CFF_Utils::cff_wrap_span( $result ) . ' ';;
502
  else :
503
  return CFF_Autolink::cff_autolink( $post_text );
504
+ endif;
505
  }
506
 
507
  static function get_post_text_call_to_actions( $atts, $news, $cff_title_styles, $cff_posttext_link_color, $cff_nofollow_referrer){
522
  case 'SHOP_NOW':
523
  $cff_cta_button_text = CFF_Utils::return_value( $atts['shopnowtext'], 'Shop Now');
524
  break;
525
+ case 'MESSAGE_PAGE':
526
  $cff_cta_button_text = CFF_Utils::return_value( $atts['messagepage'], 'Message Page');
527
  break;
528
  case 'LEARN_MORE':
535
  $cff_app_link = isset($news->call_to_action->value->app_link) ? $news->call_to_action->value->app_link : '';
536
 
537
  //Add the button to the post if the text isn't "NO_BUTTON"
538
+ if( $cff_button_type != 'NO_BUTTON' ):
539
  ?>
540
  <p class="cff-cta-link" <?php echo $cff_title_styles ?>><a href="<?php echo esc_url($cff_cta_link) ?>" target="_blank" data-app-link="<?php echo $cff_app_link ?>" style="color: #<?php echo $cff_posttext_link_color ?>;" <?php echo $cff_nofollow_referrer ?> ><?php echo $cff_cta_button_text ?></a></p>
541
+ <?php
542
  endif;
543
  }
544
  }
547
  /**
548
  *
549
  * Get Shared Link Data
550
+ * Get the Shared Link data for the templates
551
  *
552
  * @since X.X.X
553
  * -----------------------------------------
579
  if ($cff_title_link) {
580
  }else{
581
  $description_text = CFF_Autolink::cff_autolink( htmlspecialchars($description_text), $link_color = $cff_posttext_link_color );
582
+ }
583
  return $description_text;
584
  }
585
 
589
  $cff_link_description = CFF_Utils::cff_wrap_span( htmlspecialchars($description_text) );
590
  }else{
591
  $cff_link_description = nl2br($description_text);
592
+ }
593
+ return $cff_link_description ;
594
  }
595
 
596
 
598
  /**
599
  *
600
  * Get Error Message Data
601
+ * Get the error message data for the templates
602
  *
603
  * @since X.X.X
604
  * -----------------------------------------
606
 
607
  static function get_error_check( $page_id, $user_id, $access_token ){
608
  $cff_ppca_check_error = false;
609
+ if( ! get_user_meta($user_id, 'cff_ppca_check_notice_dismiss') ){
610
  $cff_posts_json_url = 'https://graph.facebook.com/v8.0/'.$page_id.'/posts?limit=1&access_token='.$access_token;
611
  $transient_name = 'cff_ppca_' . substr($page_id, 0, 5) . substr($page_id, strlen($page_id)-5, 5) . '_' . substr($access_token, 15, 10);
612
  $cff_cache_time = 1;
637
  /**
638
  *
639
  * Get Likebox Data
640
+ * Get the likebox data for the templates
641
  *
642
  * @since X.X.X
643
  * -----------------------------------------
673
  /**
674
  *
675
  * Get Header Data
676
+ * Get the Header data for the templates
677
  *
678
  * @since X.X.X
679
  * -----------------------------------------
683
  }
684
 
685
 
686
+ static function get_header_parts( $atts ){
687
  if ( !empty( $atts['headerinc'] ) || !empty( $atts['headerexclude'] ) ) {
688
  if ( !empty( $atts['headerinc'] ) ) {
689
  $header_inc = explode( ',', str_replace( ' ', '', strtolower( $atts['headerinc'] ) ) );
700
  $cff_header_cover = CFF_Utils::check_if_on( $atts['headercover'] );
701
  $cff_header_name = CFF_Utils::check_if_on( $atts['headername'] );
702
  $cff_header_bio = CFF_Utils::check_if_on( $atts['headerbio'] );
703
+ }
704
 
705
  return [
706
  'cover' => $cff_header_cover,
709
  ];
710
  }
711
 
712
+ static function get_header_height_style( $atts ){
713
  $cff_header_cover_height = ! empty( $atts['headercoverheight'] ) ? (int)$atts['headercoverheight'] : 300;
714
  $header_hero_style = $cff_header_cover_height !== 300 ? ' style="height: '.$cff_header_cover_height.'px";' : '';
715
  return $header_hero_style;
716
  }
717
 
718
+ static function get_header_font_size( $atts ){
719
  return !empty($atts['headertextsize']) ? 'style="font-size:'. $atts['headertextsize'] .'px;"' : '';
720
  }
721
 
722
+ static function get_header_link( $header_data, $page_id ){
723
  $link = CFF_Parse::get_link( $header_data );
724
  if( $link == 'https://facebook.com' ) $link .= '/'.$page_id;
725
  return $link;
750
  }
751
  ?>
752
  <div class="cff-gdpr-notice <?php echo $custom_class; ?>">
753
+ <i class="fa fa-lock" aria-hidden="true"></i>
754
  <?php echo esc_html__('This notice is visible to admins only.','custom-facebook-feed') ?><br/>
755
+ <?php echo $element_name.' '.esc_html__('disabled due to GDPR setting.','custom-facebook-feed') ?> <a href="<?php echo esc_url(admin_url('admin.php?page=cff-style&tab=misc')); ?>"><?php echo esc_html__('Click here','custom-facebook-feed') ?></a> <?php echo esc_html__('for more info.','custom-facebook-feed') ?>
756
  </div>
757
  <?php
758
  }
inc/Custom_Facebook_Feed.php CHANGED
@@ -151,8 +151,8 @@ final class Custom_Facebook_Feed{
151
  */
152
  public $cff_sitehealth;
153
 
154
-
155
-
156
  /**
157
  * Custom_Facebook_Feed Instance.
158
  *
@@ -162,22 +162,22 @@ final class Custom_Facebook_Feed{
162
  * @access public
163
  * @static
164
  *
165
- * @return Custom_Facebook_Feed
166
  */
167
  public static function instance() {
168
- if ( null === self::$instance) {
169
  self::$instance = new self();
170
-
171
  if( !class_exists('CFF_Utils') ) include CFF_PLUGIN_DIR. 'inc/CFF_Utils.php';
172
 
173
 
174
  add_action( 'plugins_loaded', [ self::$instance, 'load_textdomain' ], 10 );
175
  add_action( 'init', [ self::$instance, 'init' ], 0 );
176
 
177
-
178
 
179
  add_action( 'wp_loaded', [ self::$instance, 'cff_check_for_db_updates' ] );
180
-
181
  add_action( 'wp_head', [ self::$instance, 'cff_custom_css' ] );
182
  add_action( 'wp_footer', [ self::$instance, 'cff_js' ] );
183
 
@@ -187,7 +187,7 @@ final class Custom_Facebook_Feed{
187
  register_activation_hook( CFF_FILE, [ self::$instance, 'cff_activate' ] );
188
  register_deactivation_hook( CFF_FILE, [ self::$instance, 'cff_deactivate' ] );
189
  register_uninstall_hook( CFF_FILE, array('CustomFacebookFeed\Custom_Facebook_Feed','cff_uninstall'));
190
-
191
 
192
  }
193
  return self::$instance;
@@ -208,15 +208,15 @@ final class Custom_Facebook_Feed{
208
 
209
  /**
210
  * Init.
211
- *
212
  * Initialize Custom_Facebook_Feed plugin.
213
  *
214
  * @since X.X.X
215
  * @access public
216
  */
217
  public function init() {
218
- //Load Composer Autoload
219
- require CFF_PLUGIN_DIR . 'vendor/autoload.php';
220
  $this->cff_tracking = new CFF_Tracking();
221
  $this->cff_oembed = new CFF_Oembed();
222
  $this->cff_error_reporter = new CFF_Error_Reporter();
@@ -252,7 +252,7 @@ final class Custom_Facebook_Feed{
252
 
253
 
254
  /**
255
- * Register Assets
256
  *
257
  * @since X.X.X
258
  */
@@ -263,7 +263,7 @@ final class Custom_Facebook_Feed{
263
 
264
 
265
  /**
266
- * Enqueue & Register Styles
267
  *
268
  * @since X.X.X
269
  */
@@ -274,11 +274,11 @@ final class Custom_Facebook_Feed{
274
  $cff_minify ? $cff_min = '.min' : $cff_min = '';
275
 
276
  // Respects SSL, Style.css is relative to the current file
277
- wp_register_style(
278
- 'cff',
279
  CFF_PLUGIN_URL . 'assets/css/cff-style'.$cff_min.'.css' ,
280
- array(),
281
- CFFVER
282
  );
283
  wp_enqueue_style( 'cff' );
284
 
@@ -294,11 +294,11 @@ final class Custom_Facebook_Feed{
294
  if( $options[ 'cff_font_source' ] == 'none' ){
295
  //Do nothing
296
  } else if( $options[ 'cff_font_source' ] == 'local' ){
297
- wp_enqueue_style(
298
- 'sb-font-awesome',
299
  CFF_PLUGIN_URL . 'assets/css/font-awesome.min.css',
300
- array(),
301
- '4.7.0'
302
  );
303
  } else {
304
  wp_enqueue_style( 'sb-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
@@ -309,25 +309,25 @@ final class Custom_Facebook_Feed{
309
 
310
 
311
  /**
312
- * Enqueue & Register Scripts
313
- *
314
  *
315
  * @since X.X.X
316
  * @access public
317
  */
318
- public function enqueue_scripts_assets(){
319
  //Minify files?
320
  $options = get_option('cff_style_settings');
321
  isset($options[ 'cff_minify' ]) ? $cff_minify = $options[ 'cff_minify' ] : $cff_minify = '';
322
  $cff_minify ? $cff_min = '.min' : $cff_min = '';
323
 
324
  //Register the script to make it available
325
- wp_register_script(
326
- 'cffscripts',
327
  CFF_PLUGIN_URL . 'assets/js/cff-scripts'.$cff_min.'.js' ,
328
- array('jquery'),
329
- CFFVER,
330
- true
331
  );
332
  //Enqueue it to load it onto the page
333
  wp_enqueue_script('cffscripts');
@@ -336,7 +336,7 @@ final class Custom_Facebook_Feed{
336
 
337
  /**
338
  * DB Update Checker.
339
- *
340
  * Check for the db updates
341
  *
342
  * @since X.X.X
@@ -394,7 +394,7 @@ final class Custom_Facebook_Feed{
394
 
395
  /**
396
  * Activate
397
- *
398
  * CFF activation action.
399
  *
400
  * @since X.X.X
@@ -460,7 +460,7 @@ final class Custom_Facebook_Feed{
460
 
461
  /**
462
  * Deactivate
463
- *
464
  * CFF deactivation action.
465
  *
466
  * @since X.X.X
@@ -474,7 +474,7 @@ final class Custom_Facebook_Feed{
474
 
475
  /**
476
  * Uninstall
477
- *
478
  * CFF uninstallation action.
479
  *
480
  * @since X.X.X
@@ -525,7 +525,7 @@ final class Custom_Facebook_Feed{
525
 
526
  /**
527
  * Custom CSS
528
- *
529
  * Adding custom CSS
530
  *
531
  * @since X.X.X
@@ -549,7 +549,7 @@ final class Custom_Facebook_Feed{
549
 
550
  /**
551
  * Custom JS
552
- *
553
  * Adding custom JS
554
  *
555
  * @since X.X.X
@@ -567,7 +567,7 @@ final class Custom_Facebook_Feed{
567
  isset($options[ 'cff_title_link' ]) ? $cff_title_link = $options[ 'cff_title_link' ] : $cff_title_link = false;
568
  ($cff_title_link == 'true' || $cff_title_link == 'on') ? $cff_title_link = true : $cff_title_link = false;
569
  if ($cff_title_link) $cff_link_hashtags = 'false';
570
-
571
  echo '<!-- Custom Facebook Feed JS -->';
572
  echo "\r\n";
573
  echo '<script type="text/javascript">';
@@ -587,7 +587,7 @@ final class Custom_Facebook_Feed{
587
 
588
  /**
589
  * Notice Dismiss
590
- *
591
  * PPCA Check Notice Dismiss
592
  *
593
  * @since X.X.X
@@ -604,7 +604,7 @@ final class Custom_Facebook_Feed{
604
 
605
  /**
606
  * Cron Custom Interval
607
- *
608
  * Cron Job Custom Interval
609
  *
610
  * @since X.X.X
151
  */
152
  public $cff_sitehealth;
153
 
154
+
155
+
156
  /**
157
  * Custom_Facebook_Feed Instance.
158
  *
162
  * @access public
163
  * @static
164
  *
165
+ * @return Custom_Facebook_Feed
166
  */
167
  public static function instance() {
168
+ if ( null === self::$instance) {
169
  self::$instance = new self();
170
+
171
  if( !class_exists('CFF_Utils') ) include CFF_PLUGIN_DIR. 'inc/CFF_Utils.php';
172
 
173
 
174
  add_action( 'plugins_loaded', [ self::$instance, 'load_textdomain' ], 10 );
175
  add_action( 'init', [ self::$instance, 'init' ], 0 );
176
 
177
+
178
 
179
  add_action( 'wp_loaded', [ self::$instance, 'cff_check_for_db_updates' ] );
180
+
181
  add_action( 'wp_head', [ self::$instance, 'cff_custom_css' ] );
182
  add_action( 'wp_footer', [ self::$instance, 'cff_js' ] );
183
 
187
  register_activation_hook( CFF_FILE, [ self::$instance, 'cff_activate' ] );
188
  register_deactivation_hook( CFF_FILE, [ self::$instance, 'cff_deactivate' ] );
189
  register_uninstall_hook( CFF_FILE, array('CustomFacebookFeed\Custom_Facebook_Feed','cff_uninstall'));
190
+
191
 
192
  }
193
  return self::$instance;
208
 
209
  /**
210
  * Init.
211
+ *
212
  * Initialize Custom_Facebook_Feed plugin.
213
  *
214
  * @since X.X.X
215
  * @access public
216
  */
217
  public function init() {
218
+ //Load Composer Autoload
219
+ require CFF_PLUGIN_DIR . 'vendor/autoload.php';
220
  $this->cff_tracking = new CFF_Tracking();
221
  $this->cff_oembed = new CFF_Oembed();
222
  $this->cff_error_reporter = new CFF_Error_Reporter();
252
 
253
 
254
  /**
255
+ * Register Assets
256
  *
257
  * @since X.X.X
258
  */
263
 
264
 
265
  /**
266
+ * Enqueue & Register Styles
267
  *
268
  * @since X.X.X
269
  */
274
  $cff_minify ? $cff_min = '.min' : $cff_min = '';
275
 
276
  // Respects SSL, Style.css is relative to the current file
277
+ wp_register_style(
278
+ 'cff',
279
  CFF_PLUGIN_URL . 'assets/css/cff-style'.$cff_min.'.css' ,
280
+ array(),
281
+ CFFVER
282
  );
283
  wp_enqueue_style( 'cff' );
284
 
294
  if( $options[ 'cff_font_source' ] == 'none' ){
295
  //Do nothing
296
  } else if( $options[ 'cff_font_source' ] == 'local' ){
297
+ wp_enqueue_style(
298
+ 'sb-font-awesome',
299
  CFF_PLUGIN_URL . 'assets/css/font-awesome.min.css',
300
+ array(),
301
+ '4.7.0'
302
  );
303
  } else {
304
  wp_enqueue_style( 'sb-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
309
 
310
 
311
  /**
312
+ * Enqueue & Register Scripts
313
+ *
314
  *
315
  * @since X.X.X
316
  * @access public
317
  */
318
+ public function enqueue_scripts_assets(){
319
  //Minify files?
320
  $options = get_option('cff_style_settings');
321
  isset($options[ 'cff_minify' ]) ? $cff_minify = $options[ 'cff_minify' ] : $cff_minify = '';
322
  $cff_minify ? $cff_min = '.min' : $cff_min = '';
323
 
324
  //Register the script to make it available
325
+ wp_register_script(
326
+ 'cffscripts',
327
  CFF_PLUGIN_URL . 'assets/js/cff-scripts'.$cff_min.'.js' ,
328
+ array('jquery'),
329
+ CFFVER,
330
+ true
331
  );
332
  //Enqueue it to load it onto the page
333
  wp_enqueue_script('cffscripts');
336
 
337
  /**
338
  * DB Update Checker.
339
+ *
340
  * Check for the db updates
341
  *
342
  * @since X.X.X
394
 
395
  /**
396
  * Activate
397
+ *
398
  * CFF activation action.
399
  *
400
  * @since X.X.X
460
 
461
  /**
462
  * Deactivate
463
+ *
464
  * CFF deactivation action.
465
  *
466
  * @since X.X.X
474
 
475
  /**
476
  * Uninstall
477
+ *
478
  * CFF uninstallation action.
479
  *
480
  * @since X.X.X
525
 
526
  /**
527
  * Custom CSS
528
+ *
529
  * Adding custom CSS
530
  *
531
  * @since X.X.X
549
 
550
  /**
551
  * Custom JS
552
+ *
553
  * Adding custom JS
554
  *
555
  * @since X.X.X
567
  isset($options[ 'cff_title_link' ]) ? $cff_title_link = $options[ 'cff_title_link' ] : $cff_title_link = false;
568
  ($cff_title_link == 'true' || $cff_title_link == 'on') ? $cff_title_link = true : $cff_title_link = false;
569
  if ($cff_title_link) $cff_link_hashtags = 'false';
570
+
571
  echo '<!-- Custom Facebook Feed JS -->';
572
  echo "\r\n";
573
  echo '<script type="text/javascript">';
587
 
588
  /**
589
  * Notice Dismiss
590
+ *
591
  * PPCA Check Notice Dismiss
592
  *
593
  * @since X.X.X
604
 
605
  /**
606
  * Cron Custom Interval
607
+ *
608
  * Cron Job Custom Interval
609
  *
610
  * @since X.X.X