Custom Facebook Feed - Version 2.8

Version Description

  • New: Added support for Notes in timeline feeds. If your timeline feed contains a note then the plugin will now get the content from the note and display it within the post.
  • New: Facebook call-to-action buttons - such as "Learn More", "Shop Now", and "Message Page" - are now supported in your posts. These text strings can be translated using the settings at: Facebook Feed > Customize > Custom Text/Translate
  • New: Added a setting that you can enable if you are displaying posts from a restricted (non-public) Facebook page. This will allow the page avatar to be displayed, and is located at: Facebook Feed > Customize > Misc > Misc Settings > Is Facebook Page restricted?
  • New: If a visitor posts to your page then their avatar will now be displayed and cached for 6 months. To clear the cache of these avatar images use the button located at: Facebook Feed > Customize > Misc > Misc Settings > Clear Avatar Cache
  • Tweak: The Timezone setting can now be set in the shortcode. Eg: timezone="America/Los_Angeles"
  • Tweak: Minor UI changes to the admin pages
  • Tweak: Reduced some of the data in the System Info
  • Fix: If you backdate a post it will now be ordered correctly in your feed
  • Fix: Fixed a theme conflict related to the Color Picker in the admins section
  • Verified compatibility with WordPress 5.0 and Gutenburg
Download this release

Release Info

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

Code changes from version 2.7.2 to 2.8

README.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: smashballoon
3
  Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook page
4
  Requires at least: 3.0
5
- Tested up to: 4.9
6
- Stable tag: 2.7.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -265,32 +265,44 @@ You no longer need your own Access Token to use the Custom Facebook Feed Plugin,
265
 
266
  == Changelog ==
267
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  = 2.7.2 =
269
  * **Important:** If you are displaying a feed from a Facebook page which you are *not* an admin of then it is advised that you obtain a new Access Token in the plugin using the "Log in and get my Access Token" button. This will switch you from using the "SlickRemix" app to using our own "Smash Balloon" Facebook app which was recently approved by Facebook, and will prevent you from experiencing any potential interuptions in your feeds going forward. This will be the final time this is required.
270
  * Fix: Fixed a rare issue caused by some themes including the JavaScript file incorrectly
271
 
272
  = 2.7.1 =
273
- * Tweak: Made some adjustments to the Access Token login process
274
 
275
  = 2.7 =
276
- * New: Now easily get your own Facebook Access Token to avoid any Facebook connection issues. Simply click the blue "Log in and get my Access Token" button on the plugin's settings page and connect your Facebook account to get your token. The Access Token will work to get posts from ANY Facebook page. Thanks to our friends at SlickRemix for powering our new login and getting the plugin back up and running again!
277
- * Tweak: Removed the minimum caching time if you're using your own Page Access Token
278
 
279
  = 2.6.4 =
280
- * **Important:** If you are displaying posts from a Facebook page that **you are an admin of** then it is now highly recommended that you retrieve your own Access Token for that page to avoid any API rate limit errors. Simply follow these [step-by-step](https://smashballoon.com/custom-facebook-feed/page-token/) instructions to obtain one.
281
 
282
  = 2.6.3 =
283
- * Fix: Fixed an issue where API errors were being cached
284
 
285
  = 2.6.2 =
286
  * Fix: Replaced all HTTP links with HTTPS
287
  * Fix: Fixed a rare issue which affected the layout of other Facebook widgets
288
- * Fix: Automatically remove slashes at the end of the Page ID as it caused an error
289
- * Fix: The API response test in the System Info now only tests with your token if you have the "Use my own Access Token" setting enabled
290
- * Fix: Fixed an issue which caused an occasional API rate limit error
291
 
292
  = 2.6.1 =
293
- * Fix: Removed an unnecessary API call
294
  * Fix: Removed a PHP notice which was displayed under rare circumstances
295
  * Fix: Minor bug fixes
296
 
2
  Contributors: smashballoon
3
  Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook page
4
  Requires at least: 3.0
5
+ Tested up to: 5.0
6
+ Stable tag: 2.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
265
 
266
  == Changelog ==
267
 
268
+ = 2.8 =
269
+ * New: Added support for Notes in timeline feeds. If your timeline feed contains a note then the plugin will now get the content from the note and display it within the post.
270
+ * New: Facebook call-to-action buttons - such as "Learn More", "Shop Now", and "Message Page" - are now supported in your posts. These text strings can be translated using the settings at: Facebook Feed > Customize > Custom Text/Translate
271
+ * New: Added a setting that you can enable if you are displaying posts from a restricted (non-public) Facebook page. This will allow the page avatar to be displayed, and is located at: Facebook Feed > Customize > Misc > Misc Settings > Is Facebook Page restricted?
272
+ * New: If a visitor posts to your page then their avatar will now be displayed and cached for 6 months. To clear the cache of these avatar images use the button located at: Facebook Feed > Customize > Misc > Misc Settings > Clear Avatar Cache
273
+ * Tweak: The Timezone setting can now be set in the shortcode. Eg: `timezone="America/Los_Angeles"`
274
+ * Tweak: Minor UI changes to the admin pages
275
+ * Tweak: Reduced some of the data in the System Info
276
+ * Fix: If you backdate a post it will now be ordered correctly in your feed
277
+ * Fix: Fixed a theme conflict related to the Color Picker in the admins section
278
+ * Verified compatibility with WordPress 5.0 and Gutenburg
279
+
280
  = 2.7.2 =
281
  * **Important:** If you are displaying a feed from a Facebook page which you are *not* an admin of then it is advised that you obtain a new Access Token in the plugin using the "Log in and get my Access Token" button. This will switch you from using the "SlickRemix" app to using our own "Smash Balloon" Facebook app which was recently approved by Facebook, and will prevent you from experiencing any potential interuptions in your feeds going forward. This will be the final time this is required.
282
  * Fix: Fixed a rare issue caused by some themes including the JavaScript file incorrectly
283
 
284
  = 2.7.1 =
285
+ * Tweak: Made some adjustments to the Facebook Access Token login process
286
 
287
  = 2.7 =
288
+ * New: Now easily get your own Facebook Access Token to avoid any Facebook connection issues. Simply click the blue Facebook "Log in and get my Access Token" button on the Custom Facebook Feed settings page and connect your Facebook account to get your token. The Access Token will work to get posts from ANY Facebook page. Thanks to our friends at SlickRemix for powering our new login and getting the plugin back up and running again!
289
+ * Tweak: Removed the minimum caching time if you're using your own Facebook Page Access Token
290
 
291
  = 2.6.4 =
292
+ * **Important:** If you are displaying Facebook posts from a Facebook page that **you are an admin of** then it is now highly recommended that you retrieve your own Facebook Access Token for that Facebook page to avoid any Facebook API rate limit errors. Simply follow these [step-by-step](https://smashballoon.com/custom-facebook-feed/page-token/) instructions to obtain one.
293
 
294
  = 2.6.3 =
295
+ * Fix: Fixed an issue where Facebook API errors were being cached
296
 
297
  = 2.6.2 =
298
  * Fix: Replaced all HTTP links with HTTPS
299
  * Fix: Fixed a rare issue which affected the layout of other Facebook widgets
300
+ * Fix: Automatically remove slashes at the end of the Facebook Page ID as it caused an error
301
+ * Fix: The API response test in the System Info now only tests with your Facebook token if you have the "Use my own Access Token" setting enabled
302
+ * Fix: Fixed an issue which caused an occasional Facebook API rate limit error
303
 
304
  = 2.6.1 =
305
+ * Fix: Removed an unnecessary Facebook API call
306
  * Fix: Removed a PHP notice which was displayed under rare circumstances
307
  * Fix: Minor bug fixes
308
 
css/cff-admin-style.css CHANGED
@@ -432,7 +432,7 @@
432
  }
433
  #cff-admin .cff-save-settings-btn #submit:active{
434
  vertical-align: middle;
435
- margin-top: -3px;
436
  }
437
  #cff-admin .cff-save-settings-btn .cff-tooltip-link{
438
  display: inline-block;
@@ -973,4 +973,12 @@
973
  font-size: 13px;
974
  background: #f0f0f0;
975
  padding: 10px 15px;
 
 
 
 
 
 
 
 
976
  }
432
  }
433
  #cff-admin .cff-save-settings-btn #submit:active{
434
  vertical-align: middle;
435
+ margin-top: -4px;
436
  }
437
  #cff-admin .cff-save-settings-btn .cff-tooltip-link{
438
  display: inline-block;
973
  font-size: 13px;
974
  background: #f0f0f0;
975
  padding: 10px 15px;
976
+ }
977
+
978
+ #cff-admin .cff-success-check {
979
+ color: #75cd32;
980
+ font-size: 16px;
981
+ position: relative;
982
+ top: 6px;
983
+ left: 7px;
984
  }
css/cff-style.css CHANGED
@@ -145,9 +145,6 @@
145
  #cff .cff-author .cff-story{
146
  font-weight: normal;
147
  }
148
- #cff.cff-default-styles .cff-author .cff-author-text span{
149
- font-weight: 1.2;
150
- }
151
  #cff.cff-default-styles .cff-author a{
152
  text-decoration: none;
153
  }
@@ -309,6 +306,13 @@
309
  width: 100%;
310
  }
311
 
 
 
 
 
 
 
 
312
  /* View on Facebook / View Link text */
313
  #cff .cff-post-links{
314
  float: left;
@@ -493,4 +497,18 @@
493
  #cff .cff-linebreak{
494
  display: block;
495
  height: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  }
145
  #cff .cff-author .cff-story{
146
  font-weight: normal;
147
  }
 
 
 
148
  #cff.cff-default-styles .cff-author a{
149
  text-decoration: none;
150
  }
306
  width: 100%;
307
  }
308
 
309
+ /* Note */
310
+ #cff .cff-note-title{
311
+ display: block;
312
+ font-weight: bold;
313
+ padding-bottom: 5px;
314
+ }
315
+
316
  /* View on Facebook / View Link text */
317
  #cff .cff-post-links{
318
  float: left;
497
  #cff .cff-linebreak{
498
  display: block;
499
  height: 5px;
500
+ }
501
+
502
+ /* Call to action button */
503
+ #cff .cff-cta-link a {
504
+ display: inline-block;
505
+ padding: 5px 15px;
506
+ border: 1px solid #ddd;
507
+ border: 1px solid rgba(0,0,0,0.15);
508
+ border-radius: 3px;
509
+ }
510
+ #cff .cff-cta-link a:hover {
511
+ background: #f9f9f9;
512
+ background: rgba(0,0,0,0.05);
513
+ text-decoration: none;
514
  }
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;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:5px 0;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cff-header{width:100%;margin:0 0 15px;padding:0;line-height:1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-share-tooltip,#cff .cff-shared-link{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.cff-header .fa,.cff-header svg{margin:0 10px 0 0;padding:0}#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-author a,#cff.cff-default-styles .cff-author a,#cff.cff-default-styles .cff-credit a{text-decoration:none}#cff .cff-post-text-link{display:block}#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;white-space:pre;white-space:pre-wrap;white-space:pre-line;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:-moz-pre-wrap;white-space:-hp-pre-wrap;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;padding:0;line-height:1.2;width:100%}#cff .cff-author-img,#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 a{border:none}#cff .cff-author-img{float:left;margin:0 0 0 -100%!important;font-size:0}#cff .cff-author img{float:left;margin:0!important;padding:0!important;border:none!important;font-size:0}#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 .cff-author-text span{font-weight:1.2}#cff .cff-author.cff-no-author-info .cff-date{margin-top:14px!important}#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:0!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:2px 0 0;font-size:14px}#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;border:1px solid #d9d9d9;background:rgba(0,0,0,.02);border:1px solid rgba(0,0,0,.07);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}#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}#cff .cff-text-link{float:left;clear:none;width:72%;margin-left:3%;padding:0 0 5px}#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}#cff .cff-details{float:left;clear:none;width:100%;margin:0;padding:0}#cff .cff-details h5{margin:0 0 5px}#cff.cff-default-styles .cff-details h5{padding:0;font-size:16px}#cff.cff-default-styles .cff-details p{font-size:14px}#cff.cff-default-styles .cff-post-links,#cff.cff-default-styles .cff-post-links a{font-size:11px}#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}#cff.cff-default-styles .cff-details .cff-info{line-height:1.2}#cff .cff-desc-wrap{float:left;width:100%}#cff .cff-post-links{float:left;clear:none;padding:5px 0 0;margin:0}#cff .cff-post-links.cff-left{float:left;margin:8px 0}#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:-54px;width:140px;padding:5px 5px 4px;margin:0;background:#333;color:#eee;font-size:12px;line-height:1.3;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;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#cff .cff-share-tooltip a:hover{color:#fff}#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:#666}.cff-likebox{float:left;width:100%;position:relative;margin:20px 0 0}.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;font-size:12px;font-family:sans-serif}#cff #cff-error-reason{display:none;padding:5px 0 0;clear:both}#cff.cff-default-styles .cff-credit{font-size:11px}#cff .cff-credit img{float:left;margin:-2px 5px 0 0}#cff .cff-credit .fa{padding-right:5px;font-size:13px}@media all and (max-width:640px){#cff.cff-width-resp{width:100%!important}}#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}
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;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:5px 0;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cff-header{width:100%;margin:0 0 15px;padding:0;line-height:1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cff .cff-share-tooltip,#cff .cff-shared-link{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.cff-header .fa,.cff-header svg{margin:0 10px 0 0;padding:0}#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-author a,#cff.cff-default-styles .cff-author a,#cff.cff-default-styles .cff-credit a{text-decoration:none}#cff .cff-post-text-link{display:block}#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;white-space:pre;white-space:pre-wrap;white-space:pre-line;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:-moz-pre-wrap;white-space:-hp-pre-wrap;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;padding:0;line-height:1.2;width:100%}#cff .cff-author-img,#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 a{border:none}#cff .cff-author-img{float:left;margin:0 0 0 -100%!important;font-size:0}#cff .cff-author img{float:left;margin:0!important;padding:0!important;border:none!important;font-size:0}#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-author.cff-no-author-info .cff-date{margin-top:14px!important}#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:0!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:2px 0 0;font-size:14px}#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;border:1px solid #d9d9d9;background:rgba(0,0,0,.02);border:1px solid rgba(0,0,0,.07);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}#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}#cff .cff-text-link{float:left;clear:none;width:72%;margin-left:3%;padding:0 0 5px}#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}#cff .cff-details{float:left;clear:none;width:100%;margin:0;padding:0}#cff .cff-details h5{margin:0 0 5px}#cff.cff-default-styles .cff-details h5{padding:0;font-size:16px}#cff.cff-default-styles .cff-details p{font-size:14px}#cff.cff-default-styles .cff-post-links,#cff.cff-default-styles .cff-post-links a{font-size:11px}#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}#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;margin:0}#cff .cff-post-links.cff-left{float:left;margin:8px 0}#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:-54px;width:140px;padding:5px 5px 4px;margin:0;background:#333;color:#eee;font-size:12px;line-height:1.3;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;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#cff .cff-share-tooltip a:hover{color:#fff}#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:#666}.cff-likebox{float:left;width:100%;position:relative;margin:20px 0 0}.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;font-size:12px;font-family:sans-serif}#cff #cff-error-reason{display:none;padding:5px 0 0;clear:both}#cff.cff-default-styles .cff-credit{font-size:11px}#cff .cff-credit img{float:left;margin:-2px 5px 0 0}#cff .cff-credit .fa{padding-right:5px;font-size:13px}@media all and (max-width:640px){#cff.cff-width-resp{width:100%!important}}#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-cta-link a{display:inline-block;padding:5px 15px;border:1px solid #ddd;border:1px solid rgba(0,0,0,.15);border-radius:3px}#cff .cff-cta-link a:hover{background:#f9f9f9;background:rgba(0,0,0,.05);text-decoration:none}
custom-facebook-feed-admin.php CHANGED
@@ -247,27 +247,8 @@ function cff_settings_page() {
247
  <table class="form-table">
248
  <tbody>
249
  <h3><?php _e('Settings', 'custom-facebook-feed'); ?></h3>
250
- <tr valign="top" class="cff-page-type">
251
- <th scope="row"><label><?php _e('Is this a page, group or profile?', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> pagetype
252
- Eg: pagetype=group</code></th>
253
- <td>
254
- <select name="cff_page_type">
255
- <option value="page" <?php if($cff_page_type_val == "page") echo 'selected="selected"' ?> ><?php _e('Page', 'custom-facebook-feed'); ?></option>
256
- <option value="group" <?php if($cff_page_type_val == "group") echo 'selected="selected"' ?> ><?php _e('Group', 'custom-facebook-feed'); ?></option>
257
- <option value="profile" <?php if($cff_page_type_val == "profile") echo 'selected="selected"' ?> ><?php _e('Profile', 'custom-facebook-feed'); ?></option>
258
- </select>
259
-
260
- <div class="cff-notice cff-profile-error cff-page-type">
261
- <?php _e("<p>Due to Facebook's privacy policy you're not able to display posts from a personal profile, only from a public Facebook Page.</p><p>If you're using a profile to represent a business, organization, product, public figure or the like, then Facebook recommends <a href='http://www.facebook.com/help/175644189234902/' target='_blank'>converting your profile to a page</a>. There are many advantages to using pages over profiles, and once you've converted then the plugin will be able to successfully retrieve and display all of your posts.</p>", 'custom-facebook-feed'); ?>
262
- </div>
263
-
264
- <div class="cff-notice cff-group-error cff-page-type">
265
- <?php _e("<p>Due to recent changes in the Facebook API it is unfortunately not possible to display posts from Facebook Groups. Please see <a href='https://smashballoon.com/facebook-api-changes-april-4-2018/' target='_blank'>this page</a> for more information.</p>", 'custom-facebook-feed'); ?>
266
- </div>
267
- </td>
268
- </tr>
269
 
270
- <tr valign="top" class="cff-page-options">
271
  <th scope="row"><label><?php _e('Show posts on my page by:', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> showpostsby
272
  Eg: showpostsby=others</code></th>
273
  <td>
@@ -287,7 +268,7 @@ function cff_settings_page() {
287
  Eg: num=5</code></th>
288
  <td>
289
  <input name="cff_num_show" type="text" value="<?php esc_attr_e( $num_show_val, 'custom-facebook-feed' ); ?>" size="4" />
290
- <i style="color: #666; font-size: 11px;">Eg. 5</i>
291
  </td>
292
  </tr>
293
  <tr valign="top">
@@ -302,7 +283,7 @@ function cff_settings_page() {
302
  <input name="cff_post_limit" id="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
303
  <i style="color: #666; font-size: 11px;">Eg. 10. Max 100.</i>
304
  </div>
305
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
306
  <p class="cff-tooltip cff-more-info"><?php _e("The post 'limit' is the number of posts retrieved from the Facebook API. Most users won't need to manually adjust this setting as by default the plugin automatically retrieves a few more posts from the Facebook API than you need, as some posts may be filtered out.", "custom-facebook-feed"); ?><br /><br />
307
 
308
  <b><?php _e('Auto', 'custom-facebook-feed'); ?></b> (<?php _e('Recommended', 'custom-facebook-feed'); ?>)<br />
@@ -321,7 +302,7 @@ function cff_settings_page() {
321
  <option value="hours" <?php if($cff_cache_time_unit_val == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'custom-facebook-feed'); ?></option>
322
  <option value="days" <?php if($cff_cache_time_unit_val == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'custom-facebook-feed'); ?></option>
323
  </select>
324
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
325
  <p class="cff-tooltip cff-more-info"><?php _e('Your Facebook posts and comments data is temporarily cached by the plugin in your WordPress database. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data.', 'custom-facebook-feed'); ?></p>
326
  </td>
327
  </tr>
@@ -409,12 +390,15 @@ function cff_settings_page() {
409
  <option value="zh_HK" <?php if($cff_locale_val == "zh_HK") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Hong Kong)', 'custom-facebook-feed'); ?></option>
410
  <option value="zh_TW" <?php if($cff_locale_val == "zh_TW") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Taiwan)', 'custom-facebook-feed'); ?></option>
411
  </select>
412
- <i style="color: #666; font-size: 11px;"><?php _e('Select a language', 'custom-facebook-feed'); ?></i>
 
413
  </td>
414
  </tr>
415
 
416
  <tr>
417
- <th><label for="cff_timezone" class="bump-left"><?php _e('Timezone', 'custom-facebook-feed'); ?></label></th>
 
 
418
  <td>
419
  <select name="cff_timezone" style="width: 300px;">
420
  <option value="Pacific/Midway" <?php if($cff_timezone == "Pacific/Midway") echo 'selected="selected"' ?> ><?php _e('(GMT-11:00) Midway Island, Samoa', 'custom-facebook-feed'); ?></option>
@@ -597,7 +581,7 @@ function cff_settings_page() {
597
 
598
  <ul>
599
  <li><b>Documentation</b></li>
600
- <li>&bull;&nbsp; <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/docs/wordpress/" target="_blank">Installation and Configuration</a>'); ?></li>
601
  <li>&bull;&nbsp; <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank">Shortcode Reference</a>', 'custom-facebook-feed'); ?></li>
602
  <li>&bull;&nbsp; <?php _e('<a href=https://smashballoon.com/category/custom-facebook-feed/customizations/snippets/?cat=18" target="_blank">Custom CSS and JavaScript Snippets</a>'); ?></li>
603
  <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/custom-facebook-feed/docs/" target="_blank">See all<i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
@@ -649,32 +633,207 @@ foreach ( $plugins as $plugin_path => $plugin ) {
649
  ?>
650
 
651
  ## PLUGIN SETTINGS: ##
652
- Access Token: <?php echo get_option( 'cff_access_token' ) ."\n"; ?>
653
  Page ID: <?php echo get_option( 'cff_page_id' ) ."\n"; ?>
654
- Page Type: <?php echo get_option( 'cff_page_type' ) ."\n"; ?>
655
  Number of Posts: <?php echo get_option( 'cff_num_show' ) ."\n"; ?>
656
  Post Limit: <?php echo get_option( 'cff_post_limit' ) ."\n"; ?>
657
  Show Posts by: <?php echo get_option( 'cff_show_others' ) ."\n"; ?>
658
- Cache Time: <?php echo get_option( 'cff_cache_time' ) ."\n"; ?>
659
- Cache Unit: <?php echo get_option( 'cff_cache_time_unit' ) ."\n"; ?>
660
  Locale: <?php echo get_option( 'cff_locale' ) ."\n"; ?>
661
  Timezone: <?php $options = get_option( 'cff_style_settings', array() );
662
  echo $options[ 'cff_timezone' ] ."\n"; ?>
663
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
 
665
- ## CUSTOMIZE: ##
666
- cff_ajax => <?php echo get_option('cff_ajax') ."\n"; ?>
667
- cff_preserve_settings => <?php echo get_option('cff_preserve_settings') ."\n"; ?>
668
- cff_title_length => <?php echo get_option('cff_title_length') ."\n"; ?>
669
- cff_body_length => <?php echo get_option('cff_body_length') ."\n"; ?>
670
  <?php
671
- foreach ( $options as $option => $value ) {
672
- echo "$option => $value\n";
 
 
 
673
  }
674
  ?>
675
-
676
- ## FACEBOOK API RESPONSE: ##
677
- <?php echo $posts_json; ?>
678
  </textarea>
679
 
680
  <?php } ?>
@@ -776,7 +935,7 @@ function cff_style_page() {
776
  'cff_nocomments_text' => 'No comments yet',
777
  'cff_hide_comments' => '',
778
  //Misc
779
- 'cff_feed_width' => '',
780
  'cff_feed_width_resp' => false,
781
  'cff_feed_height' => '',
782
  'cff_feed_padding' => '',
@@ -801,6 +960,7 @@ function cff_style_page() {
801
  'cff_request_method' => 'auto',
802
  'cff_disable_styles' => false,
803
  'cff_format_issue' => false,
 
804
 
805
  //New
806
  'cff_custom_css' => '',
@@ -846,6 +1006,10 @@ function cff_style_page() {
846
  'cff_translate_photo_text' => 'Photo',
847
  'cff_translate_video_text' => 'Video',
848
 
 
 
 
 
849
  //Translate - date
850
  'cff_translate_second' => 'second',
851
  'cff_translate_seconds' => 'seconds',
@@ -960,6 +1124,10 @@ function cff_style_page() {
960
  $cff_translate_photo_text = $options[ 'cff_translate_photo_text' ];
961
  $cff_translate_video_text = $options[ 'cff_translate_video_text' ];
962
 
 
 
 
 
963
  //View on Facebook link
964
  $cff_link_size = $options[ 'cff_link_size' ];
965
  $cff_link_weight = $options[ 'cff_link_weight' ];
@@ -1009,6 +1177,7 @@ function cff_style_page() {
1009
  $cff_request_method = $options[ 'cff_request_method' ];
1010
  $cff_disable_styles = $options[ 'cff_disable_styles' ];
1011
  $cff_format_issue = $options[ 'cff_format_issue' ];
 
1012
  $cff_minify = $options[ 'cff_minify' ];
1013
 
1014
  //Page Header
@@ -1394,6 +1563,7 @@ function cff_style_page() {
1394
  if (isset($_POST[ 'cff_request_method' ])) $cff_request_method = sanitize_text_field( $_POST[ 'cff_request_method' ] );
1395
  (isset($_POST[ 'cff_disable_styles' ])) ? $cff_disable_styles = sanitize_text_field( $_POST[ 'cff_disable_styles' ] ) : $cff_disable_styles = '';
1396
  (isset($_POST[ 'cff_format_issue' ])) ? $cff_format_issue = sanitize_text_field( $_POST[ 'cff_format_issue' ] ) : $cff_format_issue = '';
 
1397
  (isset($_POST[ 'cff_minify' ])) ? $cff_minify = sanitize_text_field( $_POST[ 'cff_minify' ] ) : $cff_minify = '';
1398
 
1399
  //Custom CSS
@@ -1414,6 +1584,7 @@ function cff_style_page() {
1414
  $options[ 'cff_request_method' ] = $cff_request_method;
1415
  $options[ 'cff_disable_styles' ] = $cff_disable_styles;
1416
  $options[ 'cff_format_issue' ] = $cff_format_issue;
 
1417
  $options[ 'cff_minify' ] = $cff_minify;
1418
 
1419
  if( $cff_cron == 'no' ) wp_clear_scheduled_hook('cff_cron_job');
@@ -1449,6 +1620,10 @@ function cff_style_page() {
1449
  if (isset($_POST[ 'cff_translate_photo_text' ])) $cff_translate_photo_text = sanitize_text_field( $_POST[ 'cff_translate_photo_text' ] );
1450
  if (isset($_POST[ 'cff_translate_video_text' ])) $cff_translate_video_text = sanitize_text_field( $_POST[ 'cff_translate_video_text' ] );
1451
 
 
 
 
 
1452
  //Date translate
1453
  if (isset($_POST[ 'cff_translate_second' ])) $cff_translate_second = sanitize_text_field( $_POST[ 'cff_translate_second' ] );
1454
  if (isset($_POST[ 'cff_translate_seconds' ])) $cff_translate_seconds = sanitize_text_field( $_POST[ 'cff_translate_seconds' ] );
@@ -1477,6 +1652,10 @@ function cff_style_page() {
1477
  $options[ 'cff_translate_photo_text' ] = $cff_translate_photo_text;
1478
  $options[ 'cff_translate_video_text' ] = $cff_translate_video_text;
1479
 
 
 
 
 
1480
  //Date translate
1481
  $options[ 'cff_translate_second' ] = $cff_translate_second;
1482
  $options[ 'cff_translate_seconds' ] = $cff_translate_seconds;
@@ -1550,7 +1729,7 @@ function cff_style_page() {
1550
  Eg: width=500px</code></th>
1551
  <td>
1552
  <input name="cff_feed_width" id="cff_feed_width" type="text" value="<?php esc_attr_e( $cff_feed_width, 'custom-facebook-feed' ); ?>" size="6" />
1553
- <i style="color: #666; font-size: 11px;">Eg. 100% or 500px. &nbsp;Default is 100%.</i>
1554
  <div id="cff_width_options">
1555
  <input name="cff_feed_width_resp" type="checkbox" id="cff_feed_width_resp" <?php if($cff_feed_width_resp == true) echo "checked"; ?> /><label for="cff_feed_width_resp"><?php _e('Set to be 100% width on mobile?', 'custom-facebook-feed'); ?></label>
1556
  <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
@@ -1564,7 +1743,7 @@ function cff_style_page() {
1564
  <td>
1565
  <input name="cff_feed_height" type="text" value="<?php esc_attr_e( $cff_feed_height, 'custom-facebook-feed' ); ?>" size="6" />
1566
  <i style="color: #666; font-size: 11px;">Eg. 500px</i>
1567
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1568
  <p class="cff-tooltip cff-more-info"><?php _e("Use this to set a fixed height on the feed. If the feed exceeds this height then a scroll bar will be used. Leave it empty to set no maximum height."); ?></p>
1569
  </td>
1570
  </tr>
@@ -1573,7 +1752,7 @@ function cff_style_page() {
1573
  <td>
1574
  <input name="cff_feed_padding" type="text" value="<?php esc_attr_e( $cff_feed_padding, 'custom-facebook-feed' ); ?>" size="6" />
1575
  <i style="color: #666; font-size: 11px;">Eg. 20px or 2%</i>
1576
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1577
  <p class="cff-tooltip cff-more-info"><?php _e("This is the amount of padding/spacing that goes around the feed. This is particularly useful if you intend to set a background color on the feed."); ?></p>
1578
  </td>
1579
  </tr>
@@ -1589,7 +1768,7 @@ function cff_style_page() {
1589
  Eg: class=myfeed</code></th>
1590
  <td>
1591
  <input name="cff_class" type="text" value="<?php esc_attr_e( $cff_class, 'custom-facebook-feed' ); ?>" size="25" />
1592
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1593
  <p class="cff-tooltip cff-more-info"><?php _e("You can add your own CSS classes to the feed here. To add multiple classes separate each with a space, Eg. classone classtwo classthree"); ?></p>
1594
  </td>
1595
  </tr>
@@ -1663,7 +1842,7 @@ function cff_style_page() {
1663
  Eg: headeroutside=true</code></th>
1664
  <td>
1665
  <input type="checkbox" name="cff_header_outside" id="cff_header_outside" <?php if($cff_header_outside == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes', 'custom-facebook-feed'); ?>
1666
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1667
  <p class="cff-tooltip cff-more-info"><?php _e("This positions the Header outside of the feed container. It is useful if your feed has a vertical scrollbar as it places it outside of the scrollable area and fixes it at the top or bottom."); ?></p>
1668
  </td>
1669
  </tr>
@@ -1821,7 +2000,7 @@ function cff_style_page() {
1821
  Eg: likeboxoutside=true</code></th>
1822
  <td>
1823
  <input type="checkbox" name="cff_like_box_outside" id="cff_like_box_outside" <?php if($cff_like_box_outside == true) echo 'checked="checked"' ?> />
1824
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1825
  <p class="cff-tooltip cff-more-info"><?php _e("This positions the Like Box widget outside of the feed container. It is useful if your feed has a vertical scrollbar as it places it outside of the scrollable area and fixes it at the top or bottom."); ?></p>
1826
  </td>
1827
  </tr>
@@ -1831,7 +2010,7 @@ function cff_style_page() {
1831
  Eg: likeboxfaces=true</code></th>
1832
  <td>
1833
  <input type="checkbox" name="cff_like_box_faces" id="cff_like_box_faces" <?php if($cff_like_box_faces == true) echo 'checked="checked"' ?> />
1834
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1835
  <p class="cff-tooltip cff-more-info"><?php _e("This will display thumbnail photos within the Like Box of some of the people who like your page."); ?></p>
1836
  </td>
1837
  </tr>
@@ -1847,7 +2026,7 @@ function cff_style_page() {
1847
  Eg: likeboxsmallheader=true</code></th>
1848
  <td>
1849
  <input type="checkbox" name="cff_like_box_small_header" id="cff_like_box_small_header" <?php if($cff_like_box_small_header == true) echo 'checked="checked"' ?> />
1850
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1851
  <p class="cff-tooltip cff-more-info"><?php _e("This will display a shorter version of the Like Box with a slimmer cover photo and less information."); ?></p>
1852
  </td>
1853
  </tr>
@@ -1856,7 +2035,7 @@ function cff_style_page() {
1856
  Eg: likeboxhidebtn=true</code></th>
1857
  <td>
1858
  <input type="checkbox" name="cff_like_box_hide_cta" id="cff_like_box_hide_cta" <?php if($cff_like_box_hide_cta == true) echo 'checked="checked"' ?> />
1859
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1860
  <p class="cff-tooltip cff-more-info"><?php _e("If you have a custom 'Call To Action' button for your Facebook Page then this will hide it and display the default Like Box button."); ?></p>
1861
  </td>
1862
  </tr>
@@ -1886,7 +2065,7 @@ function cff_style_page() {
1886
  <th class="bump-left" scope="row"><label><?php _e('Show "Load More" Button'); ?></label></th>
1887
  <td>
1888
  <input type="checkbox" name="cff_load_more" id="cff_load_more" disabled />
1889
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
1890
  <p class="cff-tooltip cff-more-info"><?php _e("The Load More button is added to the bottom of your feed and allows you to dynamically load more posts into your feed. Use the button below to reveal customization settings for the button."); ?></p>
1891
  </td>
1892
  </tr>
@@ -1931,7 +2110,7 @@ function cff_style_page() {
1931
  <td>
1932
  <input name="cff_filter_string" type="text" size="25" disabled />
1933
  <i style="color: #666; font-size: 11px;">Eg. #smash, balloon </i>
1934
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this do?'); ?></a>
1935
  <p class="cff-tooltip cff-more-info"><?php _e("You can use this setting to only display posts containing these text strings. Separate multiple strings using commas. If only a few posts, or none at all, are displayed then you may need to increase the plugin's 'Post Limit' settings. See <a href='https://smashballoon.com/filtering-your-facebook-posts/' target='_blank'>this FAQ</a> to learn more about how filtering works."); ?></p>
1936
  </td>
1937
  </tr>
@@ -1939,7 +2118,7 @@ function cff_style_page() {
1939
  <th class="bump-left" scope="row"><label><?php _e("Don't show posts containing:"); ?></label></th>
1940
  <td>
1941
  <input name="cff_exclude_string" type="text" size="25" disabled />
1942
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this do?'); ?></a>
1943
  <p class="cff-tooltip cff-more-info"><?php _e("You can use this setting to remove any posts containing these text strings. Separate multiple strings using commas."); ?></p>
1944
  </td>
1945
  </tr>
@@ -2023,7 +2202,7 @@ function cff_style_page() {
2023
  <th><label for="cff_enable_narrow" class="bump-left"><?php _e('Always use the Full-width layout when feed is narrow?'); ?></label></th>
2024
  <td>
2025
  <input name="cff_enable_narrow" type="checkbox" id="cff_enable_narrow" disabled />
2026
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
2027
  <p class="cff-tooltip cff-more-info"><?php _e("When displaying posts in either a narrow column or on a mobile device the plugin will automatically default to using the 'Full-width' layout as it's better suited to narrow sizes."); ?></p>
2028
  </td>
2029
  </tr>
@@ -2031,7 +2210,7 @@ function cff_style_page() {
2031
  <th><label for="cff_one_image" class="bump-left"><?php _e('Only show one image per post'); ?></label></th>
2032
  <td>
2033
  <input name="cff_one_image" type="checkbox" id="cff_one_image" disabled />
2034
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
2035
  <p class="cff-tooltip cff-more-info"><?php _e("If a Facebook post contains more than photo then enabling this setting means that only the first photo in the post is displayed."); ?></p>
2036
  </td>
2037
  </tr>
@@ -2252,7 +2431,7 @@ function cff_style_page() {
2252
  Eg: textlength=200</code></th>
2253
  <td>
2254
  <input name="cff_title_length" type="text" value="<?php esc_attr_e( $cff_title_length_val ); ?>" size="4" /><span class="cff-pixel-label"><?php _e('Characters'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Eg. 200'); ?></i>
2255
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
2256
  <p class="cff-tooltip cff-more-info"><?php _e("If the post text exceeds this length then a 'See More' link will be added. Leave empty to set no maximum length."); ?></p>
2257
  </td>
2258
  </tr>
@@ -2492,7 +2671,9 @@ function cff_style_page() {
2492
  </tr>
2493
 
2494
  <tr>
2495
- <th class="bump-left"><label for="cff_timezone" class="bump-left"><?php _e('Timezone'); ?></label></th>
 
 
2496
  <td>
2497
  <select name="cff_timezone" style="width: 300px;">
2498
  <option value="Pacific/Midway" <?php if($cff_timezone == "Pacific/Midway") echo 'selected="selected"' ?> ><?php _e('(GMT-11:00) Midway Island, Samoa'); ?></option>
@@ -2602,7 +2783,7 @@ function cff_style_page() {
2602
  <th class="bump-left"><label for="cff_date_before" class="bump-left"><?php _e('Text Before Date'); ?></label></th>
2603
  <td>
2604
  <input name="cff_date_before" type="text" value="<?php esc_attr_e( $cff_date_before ); ?>" size="20" placeholder="Eg. Posted" />
2605
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
2606
  <p class="cff-tooltip cff-more-info"><?php _e('You can add custom text here to display immediately <b>before</b> the date text'); ?></p>
2607
  </td>
2608
  </tr>
@@ -2610,7 +2791,7 @@ function cff_style_page() {
2610
  <th class="bump-left"><label for="cff_date_after" class="bump-left"><?php _e('Text After Date'); ?></label></th>
2611
  <td>
2612
  <input name="cff_date_after" type="text" value="<?php esc_attr_e( $cff_date_after ); ?>" size="20" placeholder="Eg. by ___" />
2613
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
2614
  <p class="cff-tooltip cff-more-info"><?php _e('You can add custom text here to display immediately <b>after</b> the date text'); ?></p>
2615
  </td>
2616
  </tr>
@@ -2682,7 +2863,7 @@ function cff_style_page() {
2682
  Eg: desclength=150</code></th>
2683
  <td>
2684
  <input name="cff_body_length" type="text" value="<?php esc_attr_e( $cff_body_length_val ); ?>" size="4" /><span class="cff-pixel-label"><?php _e('Characters'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Eg. 200'); ?></i>
2685
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
2686
  <p class="cff-tooltip cff-more-info"><?php _e("If the link description text exceeds this length then it will be truncated with an ellipsis. Leave empty to set no maximum length."); ?></p>
2687
  </td>
2688
  </tr>
@@ -2940,95 +3121,12 @@ function cff_style_page() {
2940
  <input name="cff_event_link_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_link_color) ); ?>" class="cff-colorpicker" />
2941
  </td>
2942
  </tr>
2943
- <tr>
2944
- <th class="bump-left"><label for="cff_buy_tickets_text" class="bump-left"><?php _e('"Buy Tickets" Text'); ?></label><code class="cff_shortcode"> buyticketstext
2945
- Eg: buyticketstext="Get tickets"</code></th>
2946
- <td>
2947
- <input name="cff_buy_tickets_text" type="text" size="25" />
2948
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
2949
- <p class="cff-tooltip cff-more-info"><?php _e('When you configure the plugin to display events from your Facebook Events page then the plugin will display the "Buy Tickets" link when applicable. Use this setting to customize the "Buy Tickets" text.'); ?></p>
2950
- </td>
2951
- </tr>
2952
  <tr id="comments"><!-- Quick link --></tr>
2953
  </tbody>
2954
  </table>
2955
 
2956
  <?php submit_button(); ?>
2957
- <hr />
2958
-
2959
- <h3><?php _e('Likes, Shares and Comments Box'); ?></h3>
2960
- <table class="form-table">
2961
- <tbody>
2962
- <tr valign="top">
2963
- <th class="bump-left" scope="row"><label><?php _e('Icon Style'); ?></label><code class="cff_shortcode"> iconstyle
2964
- Eg: iconstyle=dark</code></th>
2965
- <td>
2966
- <select name="cff_icon_style" style="width: 250px;">
2967
- <option value="light"><?php _e('Light (for light backgrounds)'); ?></option>
2968
- <option value="dark"><?php _e('Dark (for dark backgrounds)'); ?></option>
2969
- </select>
2970
- </td>
2971
- </tr>
2972
- <tr valign="top">
2973
- <th class="bump-left" scope="row"><label><?php _e('Text Color'); ?></label><code class="cff_shortcode"> socialtextcolor
2974
- Eg: socialtextcolor=FFF</code></th>
2975
- <td>
2976
- <input name="cff_meta_text_color" class="cff-colorpicker" />
2977
- </td>
2978
- </tr>
2979
- <tr valign="top">
2980
- <th class="bump-left" scope="row"><label><?php _e('Link Color'); ?></label><code class="cff_shortcode"> sociallinkcolor
2981
- Eg: sociallinkcolor=FFF</code></th>
2982
- <td>
2983
- <input name="cff_meta_link_color" class="cff-colorpicker" />
2984
- </td>
2985
- </tr>
2986
- <tr valign="top">
2987
- <th class="bump-left" scope="row"><label><?php _e('Background Color'); ?></label><code class="cff_shortcode"> socialbgcolor
2988
- Eg: socialbgcolor=111</code></th>
2989
- <td>
2990
- <input name="cff_meta_bg_color" class="cff-colorpicker" />
2991
- </td>
2992
- </tr>
2993
- <tr valign="top">
2994
- <th class="bump-left" scope="row"><label><?php _e('Expand Comments Box Initially'); ?></label><code class="cff_shortcode"> expandcomments
2995
- Eg: expandcomments=true</code></th>
2996
- <td>
2997
- <input type="checkbox" name="cff_expand_comments" id="cff_expand_comments" />
2998
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
2999
- <p class="cff-tooltip cff-more-info"><?php _e('Checking this box will automatically expand the comments box beneath each post. Unchecking this box will mean that users will need to click the number of comments below each post in order to expand the comments box.'); ?></p>
3000
- </td>
3001
- </tr>
3002
- <tr valign="top">
3003
- <th class="bump-left" for="cff_comments_num" scope="row"><label><?php _e('Number of Comments to Show Initially'); ?></label><code class="cff_shortcode"> commentsnum
3004
- Eg: commentsnum=1</code></th>
3005
- <td>
3006
- <input name="cff_comments_num" type="text" size="2" />
3007
- <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('25 max'); ?></i></span>
3008
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
3009
- <p class="cff-tooltip cff-more-info"><?php _e('The number of comments to show initially when the comments box is expanded.'); ?></p>
3010
- </td>
3011
- </tr>
3012
- <tr valign="top">
3013
- <th class="bump-left" scope="row"><label><?php _e('Hide Comment Avatars'); ?></label><code class="cff_shortcode"> hidecommentimages
3014
- Eg: hidecommentimages=true</code></th>
3015
- <td>
3016
- <input type="checkbox" name="cff_hide_comment_avatars" id="cff_hide_comment_avatars" />
3017
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("Why aren't avatars being displayed?"); ?></a>
3018
- <p class="cff-tooltip cff-more-info"><?php _e("Due to a recent Facebook API change, comment names and avatars can now only be displayed if you're using a 'Page' Access Token. See <a href='https://smashballoon.com/displaying-comment-names-avatars/' target='_blank'>this FAQ</a> for more information."); ?></p>
3019
- </td>
3020
- </tr>
3021
- <tr valign="top" class="cff-pro">
3022
- <th class="bump-left" scope="row"><label><?php _e('Show Comments in Lightbox'); ?></label></th>
3023
- <td>
3024
- <input type="checkbox" name="cff_lightbox_comments" id="cff_lightbox_comments" disabled />
3025
- <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('For timeline posts only'); ?> &nbsp; - &nbsp; <a href="https://smashballoon.com/custom-facebook-feed/" target="_blank">Upgrade to Pro to enable</a></i></span>
3026
- </td>
3027
- </tr>
3028
- <tr id="action"><!-- Quick link --></tr>
3029
- </tbody>
3030
- </table>
3031
-
3032
  <hr />
3033
 
3034
  <h3><?php _e('Post Action Links'); ?></span> <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
@@ -3112,6 +3210,85 @@ function cff_style_page() {
3112
  <tr id="loadmore"><!-- Quick link --></tr>
3113
  </tbody>
3114
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3115
  <div style="margin-top: -15px;">
3116
  <?php submit_button(); ?>
3117
  </div>
@@ -3179,7 +3356,7 @@ function cff_style_page() {
3179
  Eg: fulllinkimages=false</code></th>
3180
  <td>
3181
  <input type="checkbox" name="cff_full_link_images" id="cff_full_link_images" disabled />
3182
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
3183
  <p class="cff-tooltip cff-more-info"><?php _e("By default the shared link boxes in your posts use the same layout selected on the 'Post Layout' page, however, but you can disable this by unchecking this setting to force all shared links to use the smaller image thumbnails instead."); ?></p>
3184
  </td>
3185
  </tr>
@@ -3217,24 +3394,16 @@ function cff_style_page() {
3217
  <td>
3218
  <input name="cff_ajax" type="checkbox" id="cff_ajax" <?php if($cff_ajax_val == true) echo "checked"; ?> />
3219
  <label for="cff_ajax"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3220
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
3221
  <p class="cff-tooltip cff-more-info"><?php _e('Some modern WordPress themes use Ajax to load content into the page after it has loaded. If your theme uses Ajax to load the Custom Facebook Feed content into the page then check this box. If you are not sure then please check with the theme author.', 'custom-facebook-feed'); ?></p>
3222
  </td>
3223
  </tr>
3224
- <tr>
3225
- <th class="bump-left"><label class="bump-left"><?php _e('Facebook App ID', 'custom-facebook-feed'); ?></label></th>
3226
- <td>
3227
- <input name="cff_app_id" type="text" value="<?php esc_attr_e( $cff_app_id, 'custom-facebook-feed' ); ?>" size="18" />
3228
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?', 'custom-facebook-feed'); ?></a>
3229
- <p class="cff-tooltip cff-more-info"><?php _e("If you've registered as a Facebook developer and have an App ID then you can enter it here. You can add your website to your Facebook App by going to your App Settings, clicking 'Add Platform' and then entering your website URL.", 'custom-facebook-feed'); ?></p>
3230
- </td>
3231
- </tr>
3232
  <tr>
3233
  <th class="bump-left"><label class="bump-left"><?php _e("Preserve settings when plugin is removed", 'custom-facebook-feed'); ?></label></th>
3234
  <td>
3235
  <input name="cff_preserve_settings" type="checkbox" id="cff_preserve_settings" <?php if($cff_preserve_settings_val == true) echo "checked"; ?> />
3236
  <label for="cff_preserve_settings"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3237
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
3238
  <p class="cff-tooltip cff-more-info"><?php _e('When removing the plugin your settings are automatically deleted from your database. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.', 'custom-facebook-feed'); ?></p>
3239
  </td>
3240
  </tr>
@@ -3255,6 +3424,17 @@ function cff_style_page() {
3255
  </td>
3256
  </tr>
3257
 
 
 
 
 
 
 
 
 
 
 
 
3258
  <tr>
3259
  <th class="bump-left"><label class="bump-left"><?php _e("Icon font source", 'custom-facebook-feed'); ?></label></th>
3260
  <td>
@@ -3277,7 +3457,7 @@ function cff_style_page() {
3277
  <option value="no" <?php if($cff_cron == "no") echo 'selected="selected"' ?> ><?php _e('No', 'custom-facebook-feed'); ?></option>
3278
  </select>
3279
 
3280
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
3281
  <p class="cff-tooltip cff-more-info"><?php _e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Facebook.", 'custom-facebook-feed'); ?></p>
3282
  </td>
3283
  </tr>
@@ -3305,10 +3485,19 @@ function cff_style_page() {
3305
  <td>
3306
  <input name="cff_disable_styles" type="checkbox" id="cff_disable_styles" <?php if($cff_disable_styles == true) echo "checked"; ?> />
3307
  <label for="cff_disable_styles"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3308
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this do?', 'custom-facebook-feed'); ?></a>
3309
  <p class="cff-tooltip cff-more-info"><?php _e("The plugin includes some basic text and link styles which can be disabled by enabling this setting. Note that the styles used for the layout of the posts will still be applied.", 'custom-facebook-feed'); ?></p>
3310
  </td>
3311
  </tr>
 
 
 
 
 
 
 
 
 
3312
 
3313
  </tbody>
3314
  </table>
@@ -3385,6 +3574,23 @@ function cff_style_page() {
3385
  <td><input name="cff_translate_video_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_video_text ) ); ?>" /></td>
3386
  <td class="cff-context"><?php _e('Used to link to videos on Facebook', 'custom-facebook-feed'); ?></td>
3387
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3388
 
3389
  <tr class="cff-table-header"><th colspan="3"><?php _e('Date', 'custom-facebook-feed'); ?></th></tr>
3390
  <tr>
@@ -3436,7 +3642,7 @@ function cff_style_page() {
3436
  <label for="cff_translate_ago"><?php _e("ago", 'custom-facebook-feed'); ?></label>
3437
  <input name="cff_translate_ago" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_ago ) ); ?>" size="20" />
3438
  </td>
3439
- <td class="cff-context"><?php _e('Used to translate the "Posted _ days ago" date text', 'custom-facebook-feed'); ?></td>
3440
  </tr>
3441
 
3442
  </tbody>
@@ -3465,7 +3671,7 @@ function cff_style_page() {
3465
  var js, fjs = d.getElementsByTagName(s)[0];
3466
  if (d.getElementById(id)) return;
3467
  js = d.createElement(s); js.id = id;
3468
- js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=640861236031365&version=v2.0";
3469
  fjs.parentNode.insertBefore(js, fjs);
3470
  }(document, 'script', 'facebook-jssdk'));</script>
3471
  <div class="fb-like" data-href="https://wordpress.org/plugins/custom-facebook-feed/" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true" style="display: block; float: left; margin-right: 20px;"></div>
@@ -3493,7 +3699,9 @@ function cff_admin_style() {
3493
  add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
3494
  //Enqueue admin scripts
3495
  function cff_admin_scripts() {
3496
- wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js', false, CFFVER );
 
 
3497
  if( !wp_script_is('jquery-ui-draggable') ) {
3498
  wp_enqueue_script(
3499
  array(
@@ -3505,8 +3713,7 @@ function cff_admin_scripts() {
3505
  }
3506
  wp_enqueue_script(
3507
  array(
3508
- 'hoverIntent',
3509
- 'wp-color-picker'
3510
  )
3511
  );
3512
  }
@@ -3576,7 +3783,7 @@ function cff_check_nag_get( $get, $nag, $option, $transient ) {
3576
  if ( isset( $_GET[$nag] ) && $get[$nag] == 1 ) {
3577
  update_option( $option, 'dismissed' );
3578
  } elseif ( isset( $_GET[$nag] ) && $get[$nag] == 'later' ) {
3579
- $time = 4 * WEEK_IN_SECONDS;
3580
  set_transient( $transient, 'waiting', $time );
3581
  update_option( $option, 'pending' );
3582
  }
@@ -3588,7 +3795,7 @@ function cff_maybe_set_transient( $transient, $option ) {
3588
  $notice_status = get_option( $option, false );
3589
 
3590
  if ( ! $cff_rating_notice_waiting && !( $notice_status === 'dismissed' || $notice_status === 'pending' ) ) {
3591
- $time = 4 * WEEK_IN_SECONDS;
3592
  set_transient( $transient, 'waiting', $time );
3593
  update_option( $option, 'pending' );
3594
  }
@@ -3644,4 +3851,26 @@ if ( get_transient( $transient ) !== 'waiting' && $notice_status !== 'dismissed'
3644
  add_action( 'admin_notices', 'cff_rating_notice_html' );
3645
  }
3646
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3647
  ?>
247
  <table class="form-table">
248
  <tbody>
249
  <h3><?php _e('Settings', 'custom-facebook-feed'); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
+ <tr valign="top">
252
  <th scope="row"><label><?php _e('Show posts on my page by:', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> showpostsby
253
  Eg: showpostsby=others</code></th>
254
  <td>
268
  Eg: num=5</code></th>
269
  <td>
270
  <input name="cff_num_show" type="text" value="<?php esc_attr_e( $num_show_val, 'custom-facebook-feed' ); ?>" size="4" />
271
+ <i style="color: #666; font-size: 11px;">Max 100</i>
272
  </td>
273
  </tr>
274
  <tr valign="top">
283
  <input name="cff_post_limit" id="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
284
  <i style="color: #666; font-size: 11px;">Eg. 10. Max 100.</i>
285
  </div>
286
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
287
  <p class="cff-tooltip cff-more-info"><?php _e("The post 'limit' is the number of posts retrieved from the Facebook API. Most users won't need to manually adjust this setting as by default the plugin automatically retrieves a few more posts from the Facebook API than you need, as some posts may be filtered out.", "custom-facebook-feed"); ?><br /><br />
288
 
289
  <b><?php _e('Auto', 'custom-facebook-feed'); ?></b> (<?php _e('Recommended', 'custom-facebook-feed'); ?>)<br />
302
  <option value="hours" <?php if($cff_cache_time_unit_val == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'custom-facebook-feed'); ?></option>
303
  <option value="days" <?php if($cff_cache_time_unit_val == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'custom-facebook-feed'); ?></option>
304
  </select>
305
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
306
  <p class="cff-tooltip cff-more-info"><?php _e('Your Facebook posts and comments data is temporarily cached by the plugin in your WordPress database. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data.', 'custom-facebook-feed'); ?></p>
307
  </td>
308
  </tr>
390
  <option value="zh_HK" <?php if($cff_locale_val == "zh_HK") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Hong Kong)', 'custom-facebook-feed'); ?></option>
391
  <option value="zh_TW" <?php if($cff_locale_val == "zh_TW") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Taiwan)', 'custom-facebook-feed'); ?></option>
392
  </select>
393
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
394
+ <p class="cff-tooltip cff-more-info"><?php _e("This translates some of the text sent by Facebook, specifically, the descriptive post text (eg: Smash Balloon shared a link) and the text in the 'Like Box' widget. To find out how to translate the other text in the plugin see <a href='https://smashballoon.com/cff-how-does-the-plugin-handle-text-and-language-translation/' target='_blank'>this FAQ</a>."); ?></p>
395
  </td>
396
  </tr>
397
 
398
  <tr>
399
+ <th><label for="cff_timezone" class="bump-left"><?php _e('Timezone', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> timezone
400
+ Eg: timezone="America/New_York"
401
+ <a href="http://php.net/manual/en/timezones.php" target="_blank">See full list</a></code></th>
402
  <td>
403
  <select name="cff_timezone" style="width: 300px;">
404
  <option value="Pacific/Midway" <?php if($cff_timezone == "Pacific/Midway") echo 'selected="selected"' ?> ><?php _e('(GMT-11:00) Midway Island, Samoa', 'custom-facebook-feed'); ?></option>
581
 
582
  <ul>
583
  <li><b>Documentation</b></li>
584
+ <li>&bull;&nbsp; <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/docs/free/" target="_blank">Installation and Configuration</a>'); ?></li>
585
  <li>&bull;&nbsp; <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank">Shortcode Reference</a>', 'custom-facebook-feed'); ?></li>
586
  <li>&bull;&nbsp; <?php _e('<a href=https://smashballoon.com/category/custom-facebook-feed/customizations/snippets/?cat=18" target="_blank">Custom CSS and JavaScript Snippets</a>'); ?></li>
587
  <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/custom-facebook-feed/docs/" target="_blank">See all<i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
633
  ?>
634
 
635
  ## PLUGIN SETTINGS: ##
636
+ Access Token: <?php echo chunk_split( get_option( 'cff_access_token' ), 100 ); ?>
637
  Page ID: <?php echo get_option( 'cff_page_id' ) ."\n"; ?>
 
638
  Number of Posts: <?php echo get_option( 'cff_num_show' ) ."\n"; ?>
639
  Post Limit: <?php echo get_option( 'cff_post_limit' ) ."\n"; ?>
640
  Show Posts by: <?php echo get_option( 'cff_show_others' ) ."\n"; ?>
641
+ Cache Time: <?php echo get_option( 'cff_cache_time' ) ." ".get_option( 'cff_cache_time_unit' )."\n"; ?>
 
642
  Locale: <?php echo get_option( 'cff_locale' ) ."\n"; ?>
643
  Timezone: <?php $options = get_option( 'cff_style_settings', array() );
644
  echo $options[ 'cff_timezone' ] ."\n"; ?>
645
 
646
+ <?php if( isset( $options[ 'cff_feed_width' ] ) ) { ?>
647
+ ## CUSTOMIZE ##
648
+ Feed Width => <?php echo $options[ 'cff_feed_width' ] ."\n"; ?>
649
+ Responsive => <?php echo $options[ 'cff_feed_width_resp' ] ."\n"; ?>
650
+ Feed Height => <?php echo $options[ 'cff_feed_height' ] ."\n"; ?>
651
+ Feed Padding => <?php echo $options[ 'cff_feed_padding' ] ."\n"; ?>
652
+ Feed BG Color => <?php echo $options[ 'cff_bg_color' ] ."\n"; ?>
653
+ CSS Class => <?php echo $options[ 'cff_class' ] ."\n"; ?>
654
+
655
+ ## HEADER: ##
656
+ Show Header => <?php echo $options[ 'cff_show_header' ] ."\n"; ?>
657
+ Text => <?php echo $options[ 'cff_header_text' ] ."\n"; ?>
658
+ Header Outside => <?php echo $options[ 'cff_header_outside' ] ."\n"; ?>
659
+ Background Color => <?php echo $options[ 'cff_header_bg_color' ] ."\n"; ?>
660
+ Padding => <?php echo $options[ 'cff_header_padding' ] ."\n"; ?>
661
+ Text Size => <?php echo $options[ 'cff_header_text_size' ] ."\n"; ?>
662
+ Text Weight => <?php echo $options[ 'cff_header_text_weight' ] ."\n"; ?>
663
+ Text Color => <?php echo $options[ 'cff_header_text_color' ] ."\n"; ?>
664
+ Icon => <?php echo $options[ 'cff_header_icon' ] ."\n"; ?>
665
+ Icon Color => <?php echo $options[ 'cff_header_icon_color' ] ."\n"; ?>
666
+ Icon Size => <?php echo $options[ 'cff_header_icon_size' ] ."\n"; ?>
667
+
668
+ ## LIKE BOX: ##
669
+ Position => <?php echo $options[ 'cff_like_box_position' ] ."\n"; ?>
670
+ Display Outside => <?php echo $options[ 'cff_like_box_outside' ] ."\n"; ?>
671
+ Show Fans => <?php echo $options[ 'cff_like_box_faces' ] ."\n"; ?>
672
+ Cover Photo => <?php echo $options[ 'cff_like_box_cover' ] ."\n"; ?>
673
+ Small Header => <?php echo $options[ 'cff_like_box_small_header' ] ."\n"; ?>
674
+ Hide CTA => <?php echo $options[ 'cff_like_box_hide_cta' ] ."\n"; ?>
675
+ Custom Width => <?php echo $options[ 'cff_likebox_width' ] ."\n"; ?>
676
+
677
+ ## SHOW/HIDE: ##
678
+ Show => <?php if( $options[ 'cff_show_author' ] ) echo 'Author, ';
679
+ if( $options[ 'cff_show_text' ] ) echo 'Post Text, ';
680
+ if( $options[ 'cff_show_desc' ] ) echo 'Description, ';
681
+ if( $options[ 'cff_show_shared_links' ] ) echo 'Shared Links, ';
682
+ if( $options[ 'cff_show_date' ] ) echo 'Date, ';
683
+ if( $options[ 'cff_show_media' ] ) echo 'Photos/Videos, ';
684
+ if( $options[ 'cff_show_event_title' ] ) echo 'Event Title, ';
685
+ if( $options[ 'cff_show_event_details' ] ) echo 'Event Details, ';
686
+ if( $options[ 'cff_show_meta' ] ) echo 'Comments Box, ';
687
+ if( $options[ 'cff_show_link' ] ) echo 'Post Link';
688
+ echo "\n"; ?>
689
+ Hide => <?php if( !$options[ 'cff_show_author' ] ) echo 'Author, ';
690
+ if( !$options[ 'cff_show_text' ] ) echo 'Post Text, ';
691
+ if( !$options[ 'cff_show_desc' ] ) echo 'Description, ';
692
+ if( !$options[ 'cff_show_shared_links' ] ) echo 'Shared Links, ';
693
+ if( !$options[ 'cff_show_date' ] ) echo 'Date, ';
694
+ if( !$options[ 'cff_show_media' ] ) echo 'Photos/Videos, ';
695
+ if( !$options[ 'cff_show_event_title' ] ) echo 'Event Title, ';
696
+ if( !$options[ 'cff_show_event_details' ] ) echo 'Event Details, ';
697
+ if( !$options[ 'cff_show_meta' ] ) echo 'Comments Box, ';
698
+ if( !$options[ 'cff_show_link' ] ) echo 'Post Link';
699
+ echo "\n"; ?>
700
+
701
+ ## STYLE POSTS: ##
702
+ Background Color => <?php echo $options[ 'cff_post_bg_color' ] ."\n"; ?>
703
+ Rounded => <?php echo $options[ 'cff_post_rounded' ] ."\n"; ?>
704
+ Seperator Color => <?php echo $options[ 'cff_sep_color' ] ."\n"; ?>
705
+ Seperator Size => <?php echo $options[ 'cff_sep_size' ] ."\n"; ?>
706
+
707
+ ## POST AUTHOR: ##
708
+ Text Size => <?php echo $options[ 'cff_author_size' ] ."\n"; ?>
709
+ Text Color => <?php echo $options[ 'cff_author_color' ] ."\n"; ?>
710
+
711
+ ## POST TEXT: ##
712
+ Text Length => <?php echo get_option('cff_title_length') ."\n"; ?>
713
+ Format => <?php echo $options['cff_title_format'] ."\n"; ?>
714
+ Text Size => <?php echo $options['cff_title_size'] ."\n"; ?>
715
+ Text Weight => <?php echo $options['cff_title_weight'] ."\n"; ?>
716
+ Text Color => <?php echo $options['cff_title_color'] ."\n"; ?>
717
+ Link Color => <?php echo $options['cff_link_color'] ."\n"; ?>
718
+ Link Text To Facebook => <?php echo $options['cff_link_to_timeline'] ."\n"; ?>
719
+ Link Post Tags => <?php echo $options['cff_post_tags'] ."\n"; ?>
720
+ Link Hashags => <?php echo $options['cff_link_hashtags'] ."\n"; ?>
721
+
722
+ ## SHARED POST DESCRIPTION: ##
723
+ Text Size => <?php echo $options['cff_body_size'] ."\n"; ?>
724
+ Text Weight => <?php echo $options['cff_body_weight'] ."\n"; ?>
725
+ Text Color => <?php echo $options['cff_body_color'] ."\n"; ?>
726
+
727
+ ## POST DATE: ##
728
+ Position => <?php echo $options['cff_date_position'] ."\n"; ?>
729
+ Text Size => <?php echo $options['cff_date_size'] ."\n"; ?>
730
+ Text Weight => <?php echo $options['cff_date_weight'] ."\n"; ?>
731
+ Text Color => <?php echo $options['cff_date_color'] ."\n"; ?>
732
+ Date Formatting => <?php echo $options['cff_date_formatting'] ."\n"; ?>
733
+ Timezone => <?php echo $options['cff_timezone'] ."\n"; ?>
734
+ Custom Format => <?php echo $options['cff_date_custom'] ."\n"; ?>
735
+ Text Before Date => <?php echo $options['cff_date_before'] ."\n"; ?>
736
+ Text After Date => <?php echo $options['cff_date_after'] ."\n"; ?>
737
+
738
+ ## SHARED LINK BOXES: ##
739
+ Link Title Format => <?php echo $options['cff_link_title_format'] ."\n"; ?>
740
+ Link Title Size => <?php echo $options['cff_link_size'] ."\n"; ?>
741
+ Link Title Color => <?php echo $options['cff_link_color'] ."\n"; ?>
742
+ Link URL Color => <?php echo $options['cff_link_url_color'] ."\n"; ?>
743
+ Max Length => <?php echo get_option('cff_body_length') ."\n"; ?>
744
+ Box Background Color => <?php echo $options['cff_link_bg_color'] ."\n"; ?>
745
+ Box Border Color => <?php echo $options['cff_link_border_color'] ."\n"; ?>
746
+ Remove Background/Border => <?php echo $options['cff_disable_link_box'] ."\n"; ?>
747
+
748
+ ## EVENT TITLE: ##
749
+ Format => <?php echo $options['cff_event_title_format'] ."\n"; ?>
750
+ Text Size => <?php echo $options['cff_event_title_size'] ."\n"; ?>
751
+ Text Weight => <?php echo $options['cff_event_title_weight'] ."\n"; ?>
752
+ Text Color => <?php echo $options['cff_event_title_color'] ."\n"; ?>
753
+ Link To Facebook => <?php echo $options['cff_event_title_link'] ."\n"; ?>
754
+
755
+ ## EVENT DATE: ##
756
+ Text Size => <?php echo $options['cff_event_date_size'] ."\n"; ?>
757
+ Text Weight => <?php echo $options['cff_event_date_weight'] ."\n"; ?>
758
+ Text Color => <?php echo $options['cff_event_date_color'] ."\n"; ?>
759
+ Date Position => <?php echo $options['cff_event_date_position'] ."\n"; ?>
760
+ Date Formatting => <?php echo $options['cff_event_date_formatting'] ."\n"; ?>
761
+ Custom Format => <?php echo $options['cff_event_date_custom'] ."\n"; ?>
762
+
763
+ ## EVENT DETAILS: ##
764
+ Text Size => <?php echo $options['cff_event_details_size'] ."\n"; ?>
765
+ Text Weight => <?php echo $options['cff_event_details_weight'] ."\n"; ?>
766
+ Text Color => <?php echo $options['cff_event_details_color'] ."\n"; ?>
767
+ Link Color => <?php echo $options['cff_event_link_color'] ."\n"; ?>
768
+
769
+ ## POST ACTION LINKS: ##
770
+ Text Size => <?php echo $options['cff_link_size'] ."\n"; ?>
771
+ Text Weight => <?php echo $options['cff_link_weight'] ."\n"; ?>
772
+ Text Color => <?php echo $options['cff_link_color'] ."\n"; ?>
773
+ View on Facebook Text => <?php echo $options['cff_facebook_link_text'] ."\n"; ?>
774
+ Share Text => <?php echo $options['cff_facebook_share_text'] ."\n"; ?>
775
+ Show View on Facebook Text => <?php echo $options['cff_show_facebook_link'] ."\n"; ?>
776
+ Show Share Text => <?php echo $options['cff_show_facebook_share'] ."\n"; ?>
777
+
778
+ ## CUSTOM CSS/JS: ##
779
+ Custom CSS => <?php echo $options['cff_custom_css'] ."\n"; ?>
780
+ Custom JavaScript => <?php echo $options['cff_custom_js'] ."\n"; ?>
781
+
782
+ ## MISC SETTINGS: ##
783
+ Loading via AJAX => <?php echo get_option('cff_ajax') ."\n"; ?>
784
+ Preserve Settings => <?php echo get_option('cff_preserve_settings') ."\n"; ?>
785
+ Credit Link => <?php echo $options['cff_show_credit'] ."\n"; ?>
786
+ Minify CSS/JS => <?php echo $options['cff_minify'] ."\n"; ?>
787
+ Restricted Page => <?php echo $options['cff_restricted_page'] ."\n"; ?>
788
+ Icon Font Source Method => <?php echo $options['cff_font_source'] ."\n"; ?>
789
+ Force Cache To Clear => <?php echo $options['cff_cron'] ."\n"; ?>
790
+ Request Method => <?php echo $options['cff_request_method'] ."\n"; ?>
791
+ Fix Text Shortening => <?php echo $options['cff_format_issue'] ."\n"; ?>
792
+ Disable Default Styles => <?php echo $options['cff_disable_styles'] ."\n"; ?>
793
+
794
+ ## CUSTOM TEXT/TRANSLATE: ##
795
+ Modified text strings:
796
+ <?php if($options['cff_see_more_text'] != 'See More'){ ?>See More => <?php echo $options['cff_see_more_text'] ."\n"; ?><?php } ?>
797
+ <?php if($options['cff_see_less_text'] != 'See Less'){ ?>See Less => <?php echo $options['cff_see_less_text'] ."\n"; ?><?php } ?>
798
+ <?php if($options['cff_facebook_link_text'] != 'View on Facebook'){ ?>View on Facebook => <?php echo $options['cff_facebook_link_text'] ."\n"; ?><?php } ?>
799
+ <?php if($options['cff_facebook_share_text'] != 'Share'){ ?>Share => <?php echo $options['cff_facebook_share_text'] ."\n"; ?><?php } ?>
800
+ <?php if($options['cff_translate_photos_text'] != 'photos'){ ?>Photos => <?php echo $options['cff_translate_photos_text'] ."\n"; ?><?php } ?>
801
+ <?php if($options['cff_translate_photo_text'] != 'Photo'){ ?>Photo => <?php echo $options['cff_translate_photo_text'] ."\n"; ?><?php } ?>
802
+ <?php if($options['cff_translate_video_text'] != 'Video'){ ?>Video => <?php echo $options['cff_translate_video_text'] ."\n"; ?><?php } ?>
803
+ <?php if($options['cff_translate_learn_more_text'] != 'Learn More'){ ?>Learn More => <?php echo $options['cff_translate_learn_more_text'] ."\n"; ?><?php } ?>
804
+ <?php if($options['cff_translate_shop_now_text'] != 'Shop Now'){ ?>Shop Now => <?php echo $options['cff_translate_shop_now_text'] ."\n"; ?><?php } ?>
805
+ <?php if($options['cff_translate_message_page_text'] != 'Message Page'){ ?>Message Page => <?php echo $options['cff_translate_message_page_text'] ."\n"; ?><?php } ?>
806
+ <?php if($options['cff_translate_second'] != 'second'){ ?>Second => <?php echo $options['cff_translate_second'] ."\n"; ?><?php } ?>
807
+ <?php if($options['cff_translate_seconds'] != 'seconds'){ ?>Seconds => <?php echo $options['cff_translate_seconds'] ."\n"; ?><?php } ?>
808
+ <?php if($options['cff_translate_minute'] != 'minute'){ ?>Minute => <?php echo $options['cff_translate_minute'] ."\n"; ?><?php } ?>
809
+ <?php if($options['cff_translate_minutes'] != 'minutes'){ ?>Minutes => <?php echo $options['cff_translate_minutes'] ."\n"; ?><?php } ?>
810
+ <?php if($options['cff_translate_hour'] != 'hour'){ ?>Hour => <?php echo $options['cff_translate_hour'] ."\n"; ?><?php } ?>
811
+ <?php if($options['cff_translate_hours'] != 'hours'){ ?>Hours => <?php echo $options['cff_translate_hours'] ."\n"; ?><?php } ?>
812
+ <?php if($options['cff_translate_day'] != 'day'){ ?>Day => <?php echo $options['cff_translate_day'] ."\n"; ?><?php } ?>
813
+ <?php if($options['cff_translate_days'] != 'days'){ ?>Days => <?php echo $options['cff_translate_days'] ."\n"; ?><?php } ?>
814
+ <?php if($options['cff_translate_week'] != 'week'){ ?>Week => <?php echo $options['cff_translate_week'] ."\n"; ?><?php } ?>
815
+ <?php if($options['cff_translate_weeks'] != 'weeks'){ ?>Weeks => <?php echo $options['cff_translate_weeks'] ."\n"; ?><?php } ?>
816
+ <?php if($options['cff_translate_month'] != 'month'){ ?>Month => <?php echo $options['cff_translate_month'] ."\n"; ?><?php } ?>
817
+ <?php if($options['cff_translate_months'] != 'months'){ ?>Months => <?php echo $options['cff_translate_months'] ."\n"; ?><?php } ?>
818
+ <?php if($options['cff_translate_year'] != 'year'){ ?>Year => <?php echo $options['cff_translate_year'] ."\n"; ?><?php } ?>
819
+ <?php if($options['cff_translate_years'] != 'years'){ ?>Years => <?php echo $options['cff_translate_years'] ."\n"; ?><?php } ?>
820
+ <?php if($options['cff_translate_ago'] != 'ago'){ ?>Ago => <?php echo $options['cff_translate_ago'] ."\n"; ?><?php } ?>
821
+ <?php } else {
822
+ echo "\n"."## CUSTOMIZE ##"."\n";
823
+ echo '-----------------------------'."\n";
824
+ echo "Customize Settings not saved."."\n";
825
+ echo '-----------------------------'."\n";
826
+ } ?>
827
 
828
+ ## FACEBOOK API RESPONSE: ##
 
 
 
 
829
  <?php
830
+ $api_response_json = json_decode($posts_json);
831
+ if( isset( $api_response_json->error ) ) echo $posts_json;
832
+ if( isset( $api_response_json->data ) ){
833
+ $posts_json_split = explode(',"paging":{', $posts_json);
834
+ echo $posts_json_split[0];
835
  }
836
  ?>
 
 
 
837
  </textarea>
838
 
839
  <?php } ?>
935
  'cff_nocomments_text' => 'No comments yet',
936
  'cff_hide_comments' => '',
937
  //Misc
938
+ 'cff_feed_width' => '100%',
939
  'cff_feed_width_resp' => false,
940
  'cff_feed_height' => '',
941
  'cff_feed_padding' => '',
960
  'cff_request_method' => 'auto',
961
  'cff_disable_styles' => false,
962
  'cff_format_issue' => false,
963
+ 'cff_restricted_page' => false,
964
 
965
  //New
966
  'cff_custom_css' => '',
1006
  'cff_translate_photo_text' => 'Photo',
1007
  'cff_translate_video_text' => 'Video',
1008
 
1009
+ 'cff_translate_learn_more_text' => 'Learn More',
1010
+ 'cff_translate_shop_now_text' => 'Shop Now',
1011
+ 'cff_translate_message_page_text' => 'Message Page',
1012
+
1013
  //Translate - date
1014
  'cff_translate_second' => 'second',
1015
  'cff_translate_seconds' => 'seconds',
1124
  $cff_translate_photo_text = $options[ 'cff_translate_photo_text' ];
1125
  $cff_translate_video_text = $options[ 'cff_translate_video_text' ];
1126
 
1127
+ $cff_translate_learn_more_text = $options[ 'cff_translate_learn_more_text' ];
1128
+ $cff_translate_shop_now_text = $options[ 'cff_translate_shop_now_text' ];
1129
+ $cff_translate_message_page_text = $options[ 'cff_translate_message_page_text' ];
1130
+
1131
  //View on Facebook link
1132
  $cff_link_size = $options[ 'cff_link_size' ];
1133
  $cff_link_weight = $options[ 'cff_link_weight' ];
1177
  $cff_request_method = $options[ 'cff_request_method' ];
1178
  $cff_disable_styles = $options[ 'cff_disable_styles' ];
1179
  $cff_format_issue = $options[ 'cff_format_issue' ];
1180
+ $cff_restricted_page = $options[ 'cff_restricted_page' ];
1181
  $cff_minify = $options[ 'cff_minify' ];
1182
 
1183
  //Page Header
1563
  if (isset($_POST[ 'cff_request_method' ])) $cff_request_method = sanitize_text_field( $_POST[ 'cff_request_method' ] );
1564
  (isset($_POST[ 'cff_disable_styles' ])) ? $cff_disable_styles = sanitize_text_field( $_POST[ 'cff_disable_styles' ] ) : $cff_disable_styles = '';
1565
  (isset($_POST[ 'cff_format_issue' ])) ? $cff_format_issue = sanitize_text_field( $_POST[ 'cff_format_issue' ] ) : $cff_format_issue = '';
1566
+ (isset($_POST[ 'cff_restricted_page' ])) ? $cff_restricted_page = sanitize_text_field( $_POST[ 'cff_restricted_page' ] ) : $cff_restricted_page = '';
1567
  (isset($_POST[ 'cff_minify' ])) ? $cff_minify = sanitize_text_field( $_POST[ 'cff_minify' ] ) : $cff_minify = '';
1568
 
1569
  //Custom CSS
1584
  $options[ 'cff_request_method' ] = $cff_request_method;
1585
  $options[ 'cff_disable_styles' ] = $cff_disable_styles;
1586
  $options[ 'cff_format_issue' ] = $cff_format_issue;
1587
+ $options[ 'cff_restricted_page' ] = $cff_restricted_page;
1588
  $options[ 'cff_minify' ] = $cff_minify;
1589
 
1590
  if( $cff_cron == 'no' ) wp_clear_scheduled_hook('cff_cron_job');
1620
  if (isset($_POST[ 'cff_translate_photo_text' ])) $cff_translate_photo_text = sanitize_text_field( $_POST[ 'cff_translate_photo_text' ] );
1621
  if (isset($_POST[ 'cff_translate_video_text' ])) $cff_translate_video_text = sanitize_text_field( $_POST[ 'cff_translate_video_text' ] );
1622
 
1623
+ if (isset($_POST[ 'cff_translate_learn_more_text' ])) $cff_translate_learn_more_text = sanitize_text_field( $_POST[ 'cff_translate_learn_more_text' ] );
1624
+ if (isset($_POST[ 'cff_translate_shop_now_text' ])) $cff_translate_shop_now_text = sanitize_text_field( $_POST[ 'cff_translate_shop_now_text' ] );
1625
+ if (isset($_POST[ 'cff_translate_message_page_text' ])) $cff_translate_message_page_text = sanitize_text_field( $_POST[ 'cff_translate_message_page_text' ] );
1626
+
1627
  //Date translate
1628
  if (isset($_POST[ 'cff_translate_second' ])) $cff_translate_second = sanitize_text_field( $_POST[ 'cff_translate_second' ] );
1629
  if (isset($_POST[ 'cff_translate_seconds' ])) $cff_translate_seconds = sanitize_text_field( $_POST[ 'cff_translate_seconds' ] );
1652
  $options[ 'cff_translate_photo_text' ] = $cff_translate_photo_text;
1653
  $options[ 'cff_translate_video_text' ] = $cff_translate_video_text;
1654
 
1655
+ $options[ 'cff_translate_learn_more_text' ] = $cff_translate_learn_more_text;
1656
+ $options[ 'cff_translate_shop_now_text' ] = $cff_translate_shop_now_text;
1657
+ $options[ 'cff_translate_message_page_text' ] = $cff_translate_message_page_text;
1658
+
1659
  //Date translate
1660
  $options[ 'cff_translate_second' ] = $cff_translate_second;
1661
  $options[ 'cff_translate_seconds' ] = $cff_translate_seconds;
1729
  Eg: width=500px</code></th>
1730
  <td>
1731
  <input name="cff_feed_width" id="cff_feed_width" type="text" value="<?php esc_attr_e( $cff_feed_width, 'custom-facebook-feed' ); ?>" size="6" />
1732
+ <i style="color: #666; font-size: 11px;">Eg. 100% or 500px</i>
1733
  <div id="cff_width_options">
1734
  <input name="cff_feed_width_resp" type="checkbox" id="cff_feed_width_resp" <?php if($cff_feed_width_resp == true) echo "checked"; ?> /><label for="cff_feed_width_resp"><?php _e('Set to be 100% width on mobile?', 'custom-facebook-feed'); ?></label>
1735
  <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
1743
  <td>
1744
  <input name="cff_feed_height" type="text" value="<?php esc_attr_e( $cff_feed_height, 'custom-facebook-feed' ); ?>" size="6" />
1745
  <i style="color: #666; font-size: 11px;">Eg. 500px</i>
1746
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1747
  <p class="cff-tooltip cff-more-info"><?php _e("Use this to set a fixed height on the feed. If the feed exceeds this height then a scroll bar will be used. Leave it empty to set no maximum height."); ?></p>
1748
  </td>
1749
  </tr>
1752
  <td>
1753
  <input name="cff_feed_padding" type="text" value="<?php esc_attr_e( $cff_feed_padding, 'custom-facebook-feed' ); ?>" size="6" />
1754
  <i style="color: #666; font-size: 11px;">Eg. 20px or 2%</i>
1755
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1756
  <p class="cff-tooltip cff-more-info"><?php _e("This is the amount of padding/spacing that goes around the feed. This is particularly useful if you intend to set a background color on the feed."); ?></p>
1757
  </td>
1758
  </tr>
1768
  Eg: class=myfeed</code></th>
1769
  <td>
1770
  <input name="cff_class" type="text" value="<?php esc_attr_e( $cff_class, 'custom-facebook-feed' ); ?>" size="25" />
1771
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1772
  <p class="cff-tooltip cff-more-info"><?php _e("You can add your own CSS classes to the feed here. To add multiple classes separate each with a space, Eg. classone classtwo classthree"); ?></p>
1773
  </td>
1774
  </tr>
1842
  Eg: headeroutside=true</code></th>
1843
  <td>
1844
  <input type="checkbox" name="cff_header_outside" id="cff_header_outside" <?php if($cff_header_outside == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes', 'custom-facebook-feed'); ?>
1845
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1846
  <p class="cff-tooltip cff-more-info"><?php _e("This positions the Header outside of the feed container. It is useful if your feed has a vertical scrollbar as it places it outside of the scrollable area and fixes it at the top or bottom."); ?></p>
1847
  </td>
1848
  </tr>
2000
  Eg: likeboxoutside=true</code></th>
2001
  <td>
2002
  <input type="checkbox" name="cff_like_box_outside" id="cff_like_box_outside" <?php if($cff_like_box_outside == true) echo 'checked="checked"' ?> />
2003
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2004
  <p class="cff-tooltip cff-more-info"><?php _e("This positions the Like Box widget outside of the feed container. It is useful if your feed has a vertical scrollbar as it places it outside of the scrollable area and fixes it at the top or bottom."); ?></p>
2005
  </td>
2006
  </tr>
2010
  Eg: likeboxfaces=true</code></th>
2011
  <td>
2012
  <input type="checkbox" name="cff_like_box_faces" id="cff_like_box_faces" <?php if($cff_like_box_faces == true) echo 'checked="checked"' ?> />
2013
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2014
  <p class="cff-tooltip cff-more-info"><?php _e("This will display thumbnail photos within the Like Box of some of the people who like your page."); ?></p>
2015
  </td>
2016
  </tr>
2026
  Eg: likeboxsmallheader=true</code></th>
2027
  <td>
2028
  <input type="checkbox" name="cff_like_box_small_header" id="cff_like_box_small_header" <?php if($cff_like_box_small_header == true) echo 'checked="checked"' ?> />
2029
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2030
  <p class="cff-tooltip cff-more-info"><?php _e("This will display a shorter version of the Like Box with a slimmer cover photo and less information."); ?></p>
2031
  </td>
2032
  </tr>
2035
  Eg: likeboxhidebtn=true</code></th>
2036
  <td>
2037
  <input type="checkbox" name="cff_like_box_hide_cta" id="cff_like_box_hide_cta" <?php if($cff_like_box_hide_cta == true) echo 'checked="checked"' ?> />
2038
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2039
  <p class="cff-tooltip cff-more-info"><?php _e("If you have a custom 'Call To Action' button for your Facebook Page then this will hide it and display the default Like Box button."); ?></p>
2040
  </td>
2041
  </tr>
2065
  <th class="bump-left" scope="row"><label><?php _e('Show "Load More" Button'); ?></label></th>
2066
  <td>
2067
  <input type="checkbox" name="cff_load_more" id="cff_load_more" disabled />
2068
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2069
  <p class="cff-tooltip cff-more-info"><?php _e("The Load More button is added to the bottom of your feed and allows you to dynamically load more posts into your feed. Use the button below to reveal customization settings for the button."); ?></p>
2070
  </td>
2071
  </tr>
2110
  <td>
2111
  <input name="cff_filter_string" type="text" size="25" disabled />
2112
  <i style="color: #666; font-size: 11px;">Eg. #smash, balloon </i>
2113
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2114
  <p class="cff-tooltip cff-more-info"><?php _e("You can use this setting to only display posts containing these text strings. Separate multiple strings using commas. If only a few posts, or none at all, are displayed then you may need to increase the plugin's 'Post Limit' settings. See <a href='https://smashballoon.com/filtering-your-facebook-posts/' target='_blank'>this FAQ</a> to learn more about how filtering works."); ?></p>
2115
  </td>
2116
  </tr>
2118
  <th class="bump-left" scope="row"><label><?php _e("Don't show posts containing:"); ?></label></th>
2119
  <td>
2120
  <input name="cff_exclude_string" type="text" size="25" disabled />
2121
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2122
  <p class="cff-tooltip cff-more-info"><?php _e("You can use this setting to remove any posts containing these text strings. Separate multiple strings using commas."); ?></p>
2123
  </td>
2124
  </tr>
2202
  <th><label for="cff_enable_narrow" class="bump-left"><?php _e('Always use the Full-width layout when feed is narrow?'); ?></label></th>
2203
  <td>
2204
  <input name="cff_enable_narrow" type="checkbox" id="cff_enable_narrow" disabled />
2205
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2206
  <p class="cff-tooltip cff-more-info"><?php _e("When displaying posts in either a narrow column or on a mobile device the plugin will automatically default to using the 'Full-width' layout as it's better suited to narrow sizes."); ?></p>
2207
  </td>
2208
  </tr>
2210
  <th><label for="cff_one_image" class="bump-left"><?php _e('Only show one image per post'); ?></label></th>
2211
  <td>
2212
  <input name="cff_one_image" type="checkbox" id="cff_one_image" disabled />
2213
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2214
  <p class="cff-tooltip cff-more-info"><?php _e("If a Facebook post contains more than photo then enabling this setting means that only the first photo in the post is displayed."); ?></p>
2215
  </td>
2216
  </tr>
2431
  Eg: textlength=200</code></th>
2432
  <td>
2433
  <input name="cff_title_length" type="text" value="<?php esc_attr_e( $cff_title_length_val ); ?>" size="4" /><span class="cff-pixel-label"><?php _e('Characters'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Eg. 200'); ?></i>
2434
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2435
  <p class="cff-tooltip cff-more-info"><?php _e("If the post text exceeds this length then a 'See More' link will be added. Leave empty to set no maximum length."); ?></p>
2436
  </td>
2437
  </tr>
2671
  </tr>
2672
 
2673
  <tr>
2674
+ <th class="bump-left"><label for="cff_timezone" class="bump-left"><?php _e('Timezone'); ?></label><code class="cff_shortcode"> timezone
2675
+ Eg: timezone="America/New_York"
2676
+ <a href="http://php.net/manual/en/timezones.php" target="_blank">See full list</a></code></th>
2677
  <td>
2678
  <select name="cff_timezone" style="width: 300px;">
2679
  <option value="Pacific/Midway" <?php if($cff_timezone == "Pacific/Midway") echo 'selected="selected"' ?> ><?php _e('(GMT-11:00) Midway Island, Samoa'); ?></option>
2783
  <th class="bump-left"><label for="cff_date_before" class="bump-left"><?php _e('Text Before Date'); ?></label></th>
2784
  <td>
2785
  <input name="cff_date_before" type="text" value="<?php esc_attr_e( $cff_date_before ); ?>" size="20" placeholder="Eg. Posted" />
2786
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2787
  <p class="cff-tooltip cff-more-info"><?php _e('You can add custom text here to display immediately <b>before</b> the date text'); ?></p>
2788
  </td>
2789
  </tr>
2791
  <th class="bump-left"><label for="cff_date_after" class="bump-left"><?php _e('Text After Date'); ?></label></th>
2792
  <td>
2793
  <input name="cff_date_after" type="text" value="<?php esc_attr_e( $cff_date_after ); ?>" size="20" placeholder="Eg. by ___" />
2794
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2795
  <p class="cff-tooltip cff-more-info"><?php _e('You can add custom text here to display immediately <b>after</b> the date text'); ?></p>
2796
  </td>
2797
  </tr>
2863
  Eg: desclength=150</code></th>
2864
  <td>
2865
  <input name="cff_body_length" type="text" value="<?php esc_attr_e( $cff_body_length_val ); ?>" size="4" /><span class="cff-pixel-label"><?php _e('Characters'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Eg. 200'); ?></i>
2866
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2867
  <p class="cff-tooltip cff-more-info"><?php _e("If the link description text exceeds this length then it will be truncated with an ellipsis. Leave empty to set no maximum length."); ?></p>
2868
  </td>
2869
  </tr>
3121
  <input name="cff_event_link_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_link_color) ); ?>" class="cff-colorpicker" />
3122
  </td>
3123
  </tr>
 
 
 
 
 
 
 
 
 
3124
  <tr id="comments"><!-- Quick link --></tr>
3125
  </tbody>
3126
  </table>
3127
 
3128
  <?php submit_button(); ?>
3129
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3130
  <hr />
3131
 
3132
  <h3><?php _e('Post Action Links'); ?></span> <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
3210
  <tr id="loadmore"><!-- Quick link --></tr>
3211
  </tbody>
3212
  </table>
3213
+
3214
+ <hr />
3215
+
3216
+ <h3><?php _e('Likes, Shares and Comments Box'); ?></h3>
3217
+ <a href="https://smashballoon.com/custom-facebook-feed/" target="_blank">Upgrade to Pro to enable likes, shares and comments</a>
3218
+ <p class="submit cff-expand-button">
3219
+ <a href="javascript:void(0);" class="button"><b>+</b> Show Pro Options</a>
3220
+ </p>
3221
+ <table class="form-table cff-expandable-options">
3222
+ <tbody>
3223
+ <tr valign="top" class="cff-pro">
3224
+ <th class="bump-left" scope="row"><label><?php _e('Icon Style'); ?></label><code class="cff_shortcode"> iconstyle
3225
+ Eg: iconstyle=dark</code></th>
3226
+ <td>
3227
+ <select name="cff_icon_style" style="width: 250px;" disabled>
3228
+ <option value="light"><?php _e('Light (for light backgrounds)'); ?></option>
3229
+ <option value="dark"><?php _e('Dark (for dark backgrounds)'); ?></option>
3230
+ </select>
3231
+ </td>
3232
+ </tr>
3233
+ <tr valign="top" class="cff-pro">
3234
+ <th class="bump-left" scope="row"><label><?php _e('Text Color'); ?></label><code class="cff_shortcode"> socialtextcolor
3235
+ Eg: socialtextcolor=FFF</code></th>
3236
+ <td>
3237
+ <input name="cff_meta_text_color" class="cff-colorpicker" />
3238
+ </td>
3239
+ </tr>
3240
+ <tr valign="top" class="cff-pro">
3241
+ <th class="bump-left" scope="row"><label><?php _e('Link Color'); ?></label><code class="cff_shortcode"> sociallinkcolor
3242
+ Eg: sociallinkcolor=FFF</code></th>
3243
+ <td>
3244
+ <input name="cff_meta_link_color" class="cff-colorpicker" />
3245
+ </td>
3246
+ </tr>
3247
+ <tr valign="top" class="cff-pro">
3248
+ <th class="bump-left" scope="row"><label><?php _e('Background Color'); ?></label><code class="cff_shortcode"> socialbgcolor
3249
+ Eg: socialbgcolor=111</code></th>
3250
+ <td>
3251
+ <input name="cff_meta_bg_color" class="cff-colorpicker" />
3252
+ </td>
3253
+ </tr>
3254
+ <tr valign="top" class="cff-pro">
3255
+ <th class="bump-left" scope="row"><label><?php _e('Expand Comments Box Initially'); ?></label><code class="cff_shortcode"> expandcomments
3256
+ Eg: expandcomments=true</code></th>
3257
+ <td>
3258
+ <input type="checkbox" name="cff_expand_comments" id="cff_expand_comments" disabled />
3259
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3260
+ <p class="cff-tooltip cff-more-info"><?php _e('Checking this box will automatically expand the comments box beneath each post. Unchecking this box will mean that users will need to click the number of comments below each post in order to expand the comments box.'); ?></p>
3261
+ </td>
3262
+ </tr>
3263
+ <tr valign="top" class="cff-pro">
3264
+ <th class="bump-left" for="cff_comments_num" scope="row"><label><?php _e('Number of Comments to Show Initially'); ?></label><code class="cff_shortcode"> commentsnum
3265
+ Eg: commentsnum=1</code></th>
3266
+ <td>
3267
+ <input name="cff_comments_num" type="text" size="2" disabled />
3268
+ <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('25 max'); ?></i></span>
3269
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3270
+ <p class="cff-tooltip cff-more-info"><?php _e('The number of comments to show initially when the comments box is expanded.'); ?></p>
3271
+ </td>
3272
+ </tr>
3273
+ <tr valign="top" class="cff-pro">
3274
+ <th class="bump-left" scope="row"><label><?php _e('Hide Comment Avatars'); ?></label><code class="cff_shortcode"> hidecommentimages
3275
+ Eg: hidecommentimages=true</code></th>
3276
+ <td>
3277
+ <input type="checkbox" name="cff_hide_comment_avatars" id="cff_hide_comment_avatars" disabled />
3278
+ </td>
3279
+ </tr>
3280
+ <tr valign="top" class="cff-pro">
3281
+ <th class="bump-left" scope="row"><label><?php _e('Show Comments in Lightbox'); ?></label></th>
3282
+ <td>
3283
+ <input type="checkbox" name="cff_lightbox_comments" id="cff_lightbox_comments" disabled />
3284
+ <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('For timeline posts only'); ?>
3285
+ </td>
3286
+ </tr>
3287
+ <tr id="action"><!-- Quick link --></tr>
3288
+ </tbody>
3289
+ </table>
3290
+
3291
+
3292
  <div style="margin-top: -15px;">
3293
  <?php submit_button(); ?>
3294
  </div>
3356
  Eg: fulllinkimages=false</code></th>
3357
  <td>
3358
  <input type="checkbox" name="cff_full_link_images" id="cff_full_link_images" disabled />
3359
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3360
  <p class="cff-tooltip cff-more-info"><?php _e("By default the shared link boxes in your posts use the same layout selected on the 'Post Layout' page, however, but you can disable this by unchecking this setting to force all shared links to use the smaller image thumbnails instead."); ?></p>
3361
  </td>
3362
  </tr>
3394
  <td>
3395
  <input name="cff_ajax" type="checkbox" id="cff_ajax" <?php if($cff_ajax_val == true) echo "checked"; ?> />
3396
  <label for="cff_ajax"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3397
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3398
  <p class="cff-tooltip cff-more-info"><?php _e('Some modern WordPress themes use Ajax to load content into the page after it has loaded. If your theme uses Ajax to load the Custom Facebook Feed content into the page then check this box. If you are not sure then please check with the theme author.', 'custom-facebook-feed'); ?></p>
3399
  </td>
3400
  </tr>
 
 
 
 
 
 
 
 
3401
  <tr>
3402
  <th class="bump-left"><label class="bump-left"><?php _e("Preserve settings when plugin is removed", 'custom-facebook-feed'); ?></label></th>
3403
  <td>
3404
  <input name="cff_preserve_settings" type="checkbox" id="cff_preserve_settings" <?php if($cff_preserve_settings_val == true) echo "checked"; ?> />
3405
  <label for="cff_preserve_settings"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3406
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3407
  <p class="cff-tooltip cff-more-info"><?php _e('When removing the plugin your settings are automatically deleted from your database. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.', 'custom-facebook-feed'); ?></p>
3408
  </td>
3409
  </tr>
3424
  </td>
3425
  </tr>
3426
 
3427
+ <tr>
3428
+ <th class="bump-left"><label class="bump-left"><?php _e('Is Facebook Page restricted?'); ?></label><code class="cff_shortcode"> restricedpage
3429
+ Eg: restricedpage=true</code></th>
3430
+ <td>
3431
+ <input name="cff_restricted_page" type="checkbox" id="cff_restricted_page" <?php if($cff_restricted_page == true) echo "checked"; ?> />
3432
+ <label for="cff_ajax"><?php _e('Yes'); ?></label>
3433
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3434
+ <p class="cff-tooltip cff-more-info"><?php _e('If you want to display your Facebook feed on your website then ideally your Facebook page should not have any age or location restrictions on it as that restricts the plugin from being able to fully access the content. If it is not possible for you to remove all restrictions then you can enable this setting.'); ?></p>
3435
+ </td>
3436
+ </tr>
3437
+
3438
  <tr>
3439
  <th class="bump-left"><label class="bump-left"><?php _e("Icon font source", 'custom-facebook-feed'); ?></label></th>
3440
  <td>
3457
  <option value="no" <?php if($cff_cron == "no") echo 'selected="selected"' ?> ><?php _e('No', 'custom-facebook-feed'); ?></option>
3458
  </select>
3459
 
3460
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3461
  <p class="cff-tooltip cff-more-info"><?php _e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Facebook.", 'custom-facebook-feed'); ?></p>
3462
  </td>
3463
  </tr>
3485
  <td>
3486
  <input name="cff_disable_styles" type="checkbox" id="cff_disable_styles" <?php if($cff_disable_styles == true) echo "checked"; ?> />
3487
  <label for="cff_disable_styles"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3488
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3489
  <p class="cff-tooltip cff-more-info"><?php _e("The plugin includes some basic text and link styles which can be disabled by enabling this setting. Note that the styles used for the layout of the posts will still be applied.", 'custom-facebook-feed'); ?></p>
3490
  </td>
3491
  </tr>
3492
+ <tr>
3493
+ <th class="bump-left"><label class="bump-left"><?php _e("Clear Avatar Cache"); ?></label></th>
3494
+ <td>
3495
+ <input id="cff_clear_avatars" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Clear Cache' ); ?>" />
3496
+ <a class="cff-tooltip-link" href="JavaScript:void(0);" style="position: relative; top: 5px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3497
+ <p class="cff-tooltip cff-more-info"><?php _e( 'The plugin will cache the avatars of people posting to your page for a prolonged period of time to avoid making frequent requests to Facebook. You can use this button to clear the avatar cache so that the plugin requests new avatars for all posts.', 'custom-facebook-feed' ); ?>.</p>
3498
+
3499
+ </td>
3500
+ </tr>
3501
 
3502
  </tbody>
3503
  </table>
3574
  <td><input name="cff_translate_video_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_video_text ) ); ?>" /></td>
3575
  <td class="cff-context"><?php _e('Used to link to videos on Facebook', 'custom-facebook-feed'); ?></td>
3576
  </tr>
3577
+
3578
+ <tr class="cff-table-header"><th colspan="3"><?php _e('Call-to-action Buttons', 'custom-facebook-feed'); ?></th></tr>
3579
+ <tr>
3580
+ <td><label for="cff_translate_learn_more_text" class="bump-left"><?php _e('Learn More', 'custom-facebook-feed'); ?></label></td>
3581
+ <td><input name="cff_translate_learn_more_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_learn_more_text ) ); ?>" /></td>
3582
+ <td class="cff-context"><?php _e("Used for the 'Learn More' button", 'custom-facebook-feed'); ?></td>
3583
+ </tr>
3584
+ <tr>
3585
+ <td><label for="cff_translate_shop_now_text" class="bump-left"><?php _e('Shop Now', 'custom-facebook-feed'); ?></label></td>
3586
+ <td><input name="cff_translate_shop_now_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_shop_now_text ) ); ?>" /></td>
3587
+ <td class="cff-context"><?php _e("Used for the 'Shop Now' button", 'custom-facebook-feed'); ?></td>
3588
+ </tr>
3589
+ <tr>
3590
+ <td><label for="cff_translate_message_page_text" class="bump-left"><?php _e('Message Page', 'custom-facebook-feed'); ?></label></td>
3591
+ <td><input name="cff_translate_message_page_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_message_page_text ) ); ?>" /></td>
3592
+ <td class="cff-context"><?php _e("Used for the 'Message Page' button", 'custom-facebook-feed'); ?></td>
3593
+ </tr>
3594
 
3595
  <tr class="cff-table-header"><th colspan="3"><?php _e('Date', 'custom-facebook-feed'); ?></th></tr>
3596
  <tr>
3642
  <label for="cff_translate_ago"><?php _e("ago", 'custom-facebook-feed'); ?></label>
3643
  <input name="cff_translate_ago" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_ago ) ); ?>" size="20" />
3644
  </td>
3645
+ <td class="cff-context"><?php _e('Used to translate the "__ days ago" date text', 'custom-facebook-feed'); ?></td>
3646
  </tr>
3647
 
3648
  </tbody>
3671
  var js, fjs = d.getElementsByTagName(s)[0];
3672
  if (d.getElementById(id)) return;
3673
  js = d.createElement(s); js.id = id;
3674
+ js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=&version=v2.0";
3675
  fjs.parentNode.insertBefore(js, fjs);
3676
  }(document, 'script', 'facebook-jssdk'));</script>
3677
  <div class="fb-like" data-href="https://wordpress.org/plugins/custom-facebook-feed/" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true" style="display: block; float: left; margin-right: 20px;"></div>
3699
  add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
3700
  //Enqueue admin scripts
3701
  function cff_admin_scripts() {
3702
+ //Declare color-picker as a dependency
3703
+ wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js', array( 'wp-color-picker' ), CFFVER );
3704
+
3705
  if( !wp_script_is('jquery-ui-draggable') ) {
3706
  wp_enqueue_script(
3707
  array(
3713
  }
3714
  wp_enqueue_script(
3715
  array(
3716
+ 'hoverIntent'
 
3717
  )
3718
  );
3719
  }
3783
  if ( isset( $_GET[$nag] ) && $get[$nag] == 1 ) {
3784
  update_option( $option, 'dismissed' );
3785
  } elseif ( isset( $_GET[$nag] ) && $get[$nag] == 'later' ) {
3786
+ $time = 2 * WEEK_IN_SECONDS;
3787
  set_transient( $transient, 'waiting', $time );
3788
  update_option( $option, 'pending' );
3789
  }
3795
  $notice_status = get_option( $option, false );
3796
 
3797
  if ( ! $cff_rating_notice_waiting && !( $notice_status === 'dismissed' || $notice_status === 'pending' ) ) {
3798
+ $time = 2 * WEEK_IN_SECONDS;
3799
  set_transient( $transient, 'waiting', $time );
3800
  update_option( $option, 'pending' );
3801
  }
3851
  add_action( 'admin_notices', 'cff_rating_notice_html' );
3852
  }
3853
 
3854
+ function cff_clear_avatar_cache() {
3855
+ if ( current_user_can( 'edit_posts' ) ) {
3856
+ global $wpdb;
3857
+ $table_name = $wpdb->prefix . "options";
3858
+ $result = $wpdb->query("
3859
+ DELETE
3860
+ FROM $table_name
3861
+ WHERE `option_name` LIKE ('%\_transient\_fb\_avatar\_%')
3862
+ " );
3863
+ $wpdb->query( "
3864
+ DELETE
3865
+ FROM $table_name
3866
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_fb\_avatar\_%')
3867
+ " );
3868
+ return $result;
3869
+ } else {
3870
+ return false;
3871
+ }
3872
+ die();
3873
+ }
3874
+ add_action( 'wp_ajax_cff_clear_avatar_cache', 'cff_clear_avatar_cache' );
3875
+
3876
  ?>
custom-facebook-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Facebook Feed
4
  Plugin URI: http://smashballoon.com/custom-facebook-feed
5
  Description: Add completely customizable Facebook feeds to your WordPress site
6
- Version: 2.7.2
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
@@ -24,7 +24,7 @@ along with this program; if not, write to the Free Software
24
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
 
27
- define('CFFVER', '2.7.2');
28
 
29
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
30
  //Include admin
@@ -168,6 +168,7 @@ function display_cff($atts) {
168
  'nofollow' => 'true',
169
  'disablestyles' => isset($options[ 'cff_disable_styles' ]) ? $options[ 'cff_disable_styles' ] : '',
170
  'textissue' => isset($options[ 'cff_format_issue' ]) ? $options[ 'cff_format_issue' ] : '',
 
171
 
172
  //Page Header
173
  'showheader' => isset($options[ 'cff_show_header' ]) ? $options[ 'cff_show_header' ] : '',
@@ -192,7 +193,11 @@ function display_cff($atts) {
192
  'seelesstext' => isset( $options[ 'cff_see_less_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_see_less_text' ] ) ) : '',
193
  'photostext' => isset( $options[ 'cff_translate_photos_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_photos_text' ] ) ) : '',
194
  'phototext' => isset( $options[ 'cff_translate_photo_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_photo_text' ] ) ) : '',
195
- 'videotext' => isset( $options[ 'cff_translate_video_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_video_text' ] ) ) : '',
 
 
 
 
196
 
197
  'facebooklinktext' => isset( $options[ 'cff_facebook_link_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_facebook_link_text' ] ) ) : '',
198
  'sharelinktext' => isset( $options[ 'cff_facebook_share_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_facebook_share_text' ] ) ) : '',
@@ -670,16 +675,10 @@ function display_cff($atts) {
670
 
671
  //If there's no Access Token then use a default
672
  $access_token_array = array(
673
- '1786066011417150|5043eac44ee54731ed404b9db021cdf2',
674
- '1795317140689602|e25d547c4f12164254f85eead086b0a7',
675
- '1851314935096786|0de2a9ec77d745d6941850696ce166f9',
676
- '322095208287051|pbCTS6jPuhjR18sl2UPhKQw7eyY',
677
  '1042396375891598|gn2HiZgDgjTbCMcXsSb6VK91PqM',
678
  '348613608818294|d4gRX7tNppCrI-DrOGof_O8gwvg',
679
  '1591407604237466|cHUFs9XDDJa7LDUW9zBxirwGAHE',
680
  '697312047120344|p8ST5dkrub6IoBZsClmyRBTScB0',
681
- '1134584793234186|763Jh88I-PuO8_slARazfgucxFg',
682
- '1788677371359317|UU7yeB5dsKOT8xLsLA9xSNu4OMQ',
683
  '1024245627652108|VmyBFUaBhjmvF31kPWdLcwtA0nU',
684
  '1665626540320930|kDmIPfF8Y0mvV5mPr3927c2nRlM',
685
  '219254908466738|9AAaE_5GnONhVWUTlEBS8LDiFi8',
@@ -688,25 +687,18 @@ function display_cff($atts) {
688
  '1425047524403499|shKbcYtt0KmDzOG5n9hkuVmP1bA',
689
  '1677248395890039|CSZsE5C-HJ8cYOraU6J6gwACZys',
690
  '162288250832230|HvQ8grGeT3QGVEFgRkooK-V55vs',
691
- '258557634485082|vBEtyzuLUrCVDeks57FPNbH5YCo',
692
- '1028332560591295|InX-Kx2LF2tjcfjbz4ddP6wXJ6U',
693
  '1816228771930249|xW0dj0nD-gWTl9oUEFyz7kCn4Gk',
694
  '451848331655448|YnHljWJNCMRxlo5JwAQRukxqQj0',
695
- '1590285041189842|PNrjtuwPpJWAda9GjvDnYCZvQH0',
696
- '1425919427736604|6NKiBWf5_rR4DuV2z1E_Pk27F2I',
697
  '198080700214649|natEgdD5R82UoiLXL5UsUK82-O8',
698
  '452046251639377|sruLhZT7bktRpuPy0txclkvCMWE',
699
  '282581258595802|QRueniLvr6ppOBW9UcNpJVswGKw',
700
  '120755681588984|8IamCzI5D56psRs_726PwSgUgos',
701
  '236542103198412|YZBFLCWsx_ap_c2rmznf_tEbh6E',
702
- '820682411352870|0W2O9df8U0suAfllTVdPP2Zl8lI',
703
  '444110102425340|1xyyWHpqzWy5jNrMnNAsMgIIKVI',
704
- '334097170130531|fpcajp_H4f79HoAP2j5Ryo_0OKE',
705
- '350665888465252|pi9du5kAZ9JRDAfxzNpq-S7w7Zw',
706
- '294686830545691|3DhoPPXbNBmzlmXXK9cbLnGJTMI'
707
  );
708
 
709
- if ($access_token == '' || !$cff_show_access_token) $access_token = $access_token_array[rand(0, 33)];
710
 
711
  //Check whether a Page ID has been defined
712
  if ($page_id == '') {
@@ -714,6 +706,9 @@ function display_cff($atts) {
714
  return false;
715
  }
716
 
 
 
 
717
 
718
  //Is it SSL?
719
  $cff_ssl = '';
@@ -871,16 +866,13 @@ function display_cff($atts) {
871
  //Limit var
872
  $i_post = 0;
873
 
874
- if ($access_token == '' || !$cff_show_access_token) $access_token = '395202813876688|73e8ede72008b231a0322e40f0072fe6';
875
-
876
  //Define array for post items
877
  $cff_posts_array = array();
878
 
879
  //ALL POSTS
880
  if (!$cff_events_only){
881
 
882
- $cff_posts_json_url = 'https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?fields=id,from,message,message_tags,story,story_tags,link,source,name,caption,description,type,status_type,object_id,created_time&access_token=' . $access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale . $cff_ssl;
883
-
884
 
885
  if( $cff_show_access_token && strlen($access_token) > 130 ){
886
  //If using a Page Access Token then set caching time to be minimum of 5 minutes
@@ -972,6 +964,16 @@ function display_cff($atts) {
972
  return $cff_content;
973
  }
974
 
 
 
 
 
 
 
 
 
 
 
975
  //***STARTS POSTS LOOP***
976
  foreach ($FBdata->data as $news )
977
  {
@@ -989,8 +991,10 @@ function display_cff($atts) {
989
  isset($news->story) ? $story = $news->story : $story = '';
990
  //Check whether it's an event
991
  $event_link_check = "facebook.com/events/";
992
- $event_link_check = stripos($news->link, $event_link_check);
993
- if ( $event_link_check ) $cff_post_type = 'event';
 
 
994
  }
995
 
996
  //Should we show this post or not?
@@ -1020,21 +1024,14 @@ function display_cff($atts) {
1020
  break;
1021
  }
1022
 
1023
-
1024
  //ONLY show posts by others
1025
  if ( $cff_show_only_others ) {
1026
- //Get the numeric ID of the page
1027
- $fbdata_string = $FBdata->data;
1028
- $first_post_id = explode("_", $fbdata_string[0]->id);
1029
- $numeric_page_id = $first_post_id[0];
1030
-
1031
  //If the post author's ID is the same as the page ID then don't show the post
1032
- if( isset($news->from->id) ){
1033
  if ( $numeric_page_id == $news->from->id ) $cff_show_post = false;
1034
- }
1035
  }
1036
 
1037
-
1038
  //Is it a duplicate post?
1039
  if (!isset($prev_post_message)) $prev_post_message = '';
1040
  if (!isset($prev_post_link)) $prev_post_link = '';
@@ -1155,7 +1152,9 @@ function display_cff($atts) {
1155
  $cff_date_formatting = $atts[ 'dateformat' ];
1156
  $cff_date_custom = $atts[ 'datecustom' ];
1157
 
1158
- $post_time = $news->created_time;
 
 
1159
  $cff_date = '<p class="cff-date" '.$cff_date_styles.'>'. $cff_date_before . ' ' . cff_getdate(strtotime($post_time), $cff_date_formatting, $cff_date_custom, $cff_date_translate_strings) . ' ' . $cff_date_after;
1160
  if($cff_date_position == 'below' || (!$cff_show_author && $cff_date_position == 'author') ) $cff_date .= '<span class="cff-date-dot">&nbsp;&middot;&nbsp;&nbsp;</span>';
1161
  $cff_date .= '</p>';
@@ -1288,6 +1287,14 @@ function display_cff($atts) {
1288
 
1289
  $cff_author_link_atts = 'href="https://facebook.com/' . $cff_from_id . '" '.$target.$cff_nofollow.' '.$cff_author_styles;
1290
 
 
 
 
 
 
 
 
 
1291
  //Remove the first occurence of the author name from the story
1292
  if( !empty($cff_author_name) ){
1293
  $cff_author_name_pos = strpos($post_text_story, $cff_author_name);
@@ -1299,19 +1306,37 @@ function display_cff($atts) {
1299
  //Author text
1300
  $cff_author .= '<div class="cff-author-text">';
1301
  if($cff_show_date && $cff_date_position !== 'above' && $cff_date_position !== 'below'){
1302
- $cff_author .= '<p class="cff-page-name cff-author-date" '.$cff_author_styles.'><a '.$cff_author_link_atts.'>'.$cff_author_name.'</a><span class="cff-story"> '.$post_text_story.'</span></p>';
1303
  $cff_author .= $cff_date;
1304
  } else {
1305
- $cff_author .= '<span class="cff-page-name"><a '.$cff_author_link_atts.'>'.$cff_author_name.'</a><span class="cff-story"> '.$post_text_story.'</span></span>';
1306
  }
1307
 
1308
  $cff_author .= '</div>';
1309
 
 
1310
  //Author image
1311
- //Set the author image as a variable. If it already exists then don't query the api for it again.
1312
- $cff_author_img_var = '$cff_author_img_' . $cff_from_id;
1313
- if ( !isset($$cff_author_img_var) ) $$cff_author_img_var = 'https://graph.facebook.com/' . $cff_from_id . '/picture?type=square';
1314
- $cff_author .= '<div class="cff-author-img"><a '.$cff_author_link_atts.'><img src="'.$$cff_author_img_var.'" title="'.$cff_author_name.'" alt="'.$cff_author_name.'" width=40 height=40 onerror="this.style.display=\'none\'"></a></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1315
 
1316
  $cff_author .= '</div>'; //End .cff-author
1317
 
@@ -1549,8 +1574,54 @@ function display_cff($atts) {
1549
  $cff_event = '';
1550
 
1551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1552
  //Create the HTML for the post text elemtent, if the post has text
1553
  $cff_post_text = '';
 
1554
  if( !empty($post_text) ){
1555
  $cff_post_text = '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
1556
 
@@ -1584,6 +1655,38 @@ function display_cff($atts) {
1584
  $cff_post_text .= '</' . $cff_title_format . '>';
1585
  }
1586
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1587
  //LINK
1588
  $cff_shared_link = '';
1589
  //Display shared link
@@ -1739,7 +1842,6 @@ function display_cff($atts) {
1739
  $cff_media_link .= '</a></p>';
1740
  }
1741
 
1742
-
1743
  //**************************//
1744
  //***CREATE THE POST HTML***//
1745
  //**************************//
@@ -1783,11 +1885,7 @@ function display_cff($atts) {
1783
  $cff_post_item .= '</div>';
1784
 
1785
  //PUSH TO ARRAY
1786
- if(!$cff_is_group){
1787
- $cff_posts_array = cff_array_push_assoc($cff_posts_array, strtotime($post_time), $cff_post_item);
1788
- } else {
1789
- $cff_posts_array = cff_array_push_assoc($cff_posts_array, $i_post, $cff_post_item);
1790
- }
1791
 
1792
  } // End post type check
1793
 
@@ -1798,7 +1896,7 @@ function display_cff($atts) {
1798
  } // End the loop
1799
 
1800
  //Sort the array in reverse order (newest first)
1801
- if(!$cff_is_group) krsort($cff_posts_array);
1802
 
1803
  } // End ALL POSTS
1804
 
3
  Plugin Name: Custom Facebook Feed
4
  Plugin URI: http://smashballoon.com/custom-facebook-feed
5
  Description: Add completely customizable Facebook feeds to your WordPress site
6
+ Version: 2.8
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
24
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
 
27
+ define('CFFVER', '2.8');
28
 
29
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
30
  //Include admin
168
  'nofollow' => 'true',
169
  'disablestyles' => isset($options[ 'cff_disable_styles' ]) ? $options[ 'cff_disable_styles' ] : '',
170
  'textissue' => isset($options[ 'cff_format_issue' ]) ? $options[ 'cff_format_issue' ] : '',
171
+ 'restrictedpage' => isset($options[ 'cff_restricted_page' ]) ? $options[ 'cff_restricted_page' ] : '',
172
 
173
  //Page Header
174
  'showheader' => isset($options[ 'cff_show_header' ]) ? $options[ 'cff_show_header' ] : '',
193
  'seelesstext' => isset( $options[ 'cff_see_less_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_see_less_text' ] ) ) : '',
194
  'photostext' => isset( $options[ 'cff_translate_photos_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_photos_text' ] ) ) : '',
195
  'phototext' => isset( $options[ 'cff_translate_photo_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_photo_text' ] ) ) : '',
196
+ 'videotext' => isset( $options[ 'cff_translate_video_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_video_text' ] ) ) : '',
197
+
198
+ 'learnmoretext' => isset( $options[ 'cff_translate_learn_more_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_learn_more_text' ] ) ) : '',
199
+ 'shopnowtext' => isset( $options[ 'cff_translate_shop_now_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_shop_now_text' ] ) ) : '',
200
+ 'messagepage' => isset( $options[ 'cff_translate_message_page_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_translate_message_page_text' ] ) ) : '',
201
 
202
  'facebooklinktext' => isset( $options[ 'cff_facebook_link_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_facebook_link_text' ] ) ) : '',
203
  'sharelinktext' => isset( $options[ 'cff_facebook_share_text' ] ) ? stripslashes( esc_attr( $options[ 'cff_facebook_share_text' ] ) ) : '',
675
 
676
  //If there's no Access Token then use a default
677
  $access_token_array = array(
 
 
 
 
678
  '1042396375891598|gn2HiZgDgjTbCMcXsSb6VK91PqM',
679
  '348613608818294|d4gRX7tNppCrI-DrOGof_O8gwvg',
680
  '1591407604237466|cHUFs9XDDJa7LDUW9zBxirwGAHE',
681
  '697312047120344|p8ST5dkrub6IoBZsClmyRBTScB0',
 
 
682
  '1024245627652108|VmyBFUaBhjmvF31kPWdLcwtA0nU',
683
  '1665626540320930|kDmIPfF8Y0mvV5mPr3927c2nRlM',
684
  '219254908466738|9AAaE_5GnONhVWUTlEBS8LDiFi8',
687
  '1425047524403499|shKbcYtt0KmDzOG5n9hkuVmP1bA',
688
  '1677248395890039|CSZsE5C-HJ8cYOraU6J6gwACZys',
689
  '162288250832230|HvQ8grGeT3QGVEFgRkooK-V55vs',
 
 
690
  '1816228771930249|xW0dj0nD-gWTl9oUEFyz7kCn4Gk',
691
  '451848331655448|YnHljWJNCMRxlo5JwAQRukxqQj0',
 
 
692
  '198080700214649|natEgdD5R82UoiLXL5UsUK82-O8',
693
  '452046251639377|sruLhZT7bktRpuPy0txclkvCMWE',
694
  '282581258595802|QRueniLvr6ppOBW9UcNpJVswGKw',
695
  '120755681588984|8IamCzI5D56psRs_726PwSgUgos',
696
  '236542103198412|YZBFLCWsx_ap_c2rmznf_tEbh6E',
 
697
  '444110102425340|1xyyWHpqzWy5jNrMnNAsMgIIKVI',
698
+ '334097170130531|fpcajp_H4f79HoAP2j5Ryo_0OKE'
 
 
699
  );
700
 
701
+ if ($access_token == '' || !$cff_show_access_token) $access_token = $access_token_array[rand(0, 20)];
702
 
703
  //Check whether a Page ID has been defined
704
  if ($page_id == '') {
706
  return false;
707
  }
708
 
709
+ //Is it a restricted page?
710
+ $cff_restricted_page = $atts['restrictedpage'];
711
+ ($cff_restricted_page == 'true' || $cff_restricted_page == 'on') ? $cff_restricted_page = true : $cff_restricted_page = false;
712
 
713
  //Is it SSL?
714
  $cff_ssl = '';
866
  //Limit var
867
  $i_post = 0;
868
 
 
 
869
  //Define array for post items
870
  $cff_posts_array = array();
871
 
872
  //ALL POSTS
873
  if (!$cff_events_only){
874
 
875
+ $cff_posts_json_url = 'https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?fields=id,from,message,message_tags,story,story_tags,link,source,name,caption,description,type,status_type,object_id,created_time,backdated_time,call_to_action&access_token=' . $access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale . $cff_ssl;
 
876
 
877
  if( $cff_show_access_token && strlen($access_token) > 130 ){
878
  //If using a Page Access Token then set caching time to be minimum of 5 minutes
964
  return $cff_content;
965
  }
966
 
967
+
968
+ $numeric_page_id = '';
969
+ if( !empty($FBdata->data) ){
970
+ if ( ($cff_show_only_others || $show_posts_by == 'others') && count($FBdata->data) > 0 ) {
971
+ //Get the numeric ID of the page so can compare it to the author of each post
972
+ $first_post_id = explode("_", $FBdata->data[0]->id);
973
+ $numeric_page_id = $first_post_id[0];
974
+ }
975
+ }
976
+
977
  //***STARTS POSTS LOOP***
978
  foreach ($FBdata->data as $news )
979
  {
991
  isset($news->story) ? $story = $news->story : $story = '';
992
  //Check whether it's an event
993
  $event_link_check = "facebook.com/events/";
994
+ if( isset($news->link) ){
995
+ $event_link_check = stripos($news->link, $event_link_check);
996
+ if ( $event_link_check ) $cff_post_type = 'event';
997
+ }
998
  }
999
 
1000
  //Should we show this post or not?
1024
  break;
1025
  }
1026
 
 
1027
  //ONLY show posts by others
1028
  if ( $cff_show_only_others ) {
 
 
 
 
 
1029
  //If the post author's ID is the same as the page ID then don't show the post
1030
+ if( isset($news->from) ){
1031
  if ( $numeric_page_id == $news->from->id ) $cff_show_post = false;
1032
+ }
1033
  }
1034
 
 
1035
  //Is it a duplicate post?
1036
  if (!isset($prev_post_message)) $prev_post_message = '';
1037
  if (!isset($prev_post_link)) $prev_post_link = '';
1152
  $cff_date_formatting = $atts[ 'dateformat' ];
1153
  $cff_date_custom = $atts[ 'datecustom' ];
1154
 
1155
+ isset($news->created_time) ? $post_time = $news->created_time : $post_time = '';
1156
+ if( isset($news->backdated_time) ) $post_time = $news->backdated_time; //If the post is backdated then use that as the date instead
1157
+
1158
  $cff_date = '<p class="cff-date" '.$cff_date_styles.'>'. $cff_date_before . ' ' . cff_getdate(strtotime($post_time), $cff_date_formatting, $cff_date_custom, $cff_date_translate_strings) . ' ' . $cff_date_after;
1159
  if($cff_date_position == 'below' || (!$cff_show_author && $cff_date_position == 'author') ) $cff_date .= '<span class="cff-date-dot">&nbsp;&middot;&nbsp;&nbsp;</span>';
1160
  $cff_date .= '</p>';
1287
 
1288
  $cff_author_link_atts = 'href="https://facebook.com/' . $cff_from_id . '" '.$target.$cff_nofollow.' '.$cff_author_styles;
1289
 
1290
+ //Link to the post if it's a visitor post as profile link no longer available
1291
+ $cff_author_link_el = 'a';
1292
+ $cff_author_link_atts = ' href="https://facebook.com/' . $cff_from_id . '" '.$target.$cff_nofollow.' '.$cff_author_styles;
1293
+ if( $cff_from_id != $numeric_page_id && !empty($numeric_page_id) ){
1294
+ $cff_author_link_el = 'span';
1295
+ $cff_author_link_atts = '';
1296
+ }
1297
+
1298
  //Remove the first occurence of the author name from the story
1299
  if( !empty($cff_author_name) ){
1300
  $cff_author_name_pos = strpos($post_text_story, $cff_author_name);
1306
  //Author text
1307
  $cff_author .= '<div class="cff-author-text">';
1308
  if($cff_show_date && $cff_date_position !== 'above' && $cff_date_position !== 'below'){
1309
+ $cff_author .= '<p class="cff-page-name cff-author-date" '.$cff_author_styles.'><'.$cff_author_link_el.$cff_author_link_atts.'>'.$cff_author_name.'</'.$cff_author_link_el.'><span class="cff-story"> '.$post_text_story.'</span></p>';
1310
  $cff_author .= $cff_date;
1311
  } else {
1312
+ $cff_author .= '<span class="cff-page-name"><'.$cff_author_link_el.$cff_author_link_atts.'>'.$cff_author_name.'</'.$cff_author_link_el.'><span class="cff-story"> '.$post_text_story.'</span></span>';
1313
  }
1314
 
1315
  $cff_author .= '</div>';
1316
 
1317
+
1318
  //Author image
1319
+ //Get author avatar of visitor
1320
+ if( ( $cff_from_id != $numeric_page_id && !empty($numeric_page_id) ) || $cff_restricted_page ){
1321
+ //Check whether the profile pic exists in a transient
1322
+ $cff_pic_transient_name = "fb_avatar_" . $cff_from_id;
1323
+ if ( false === get_transient( $cff_pic_transient_name ) ) {
1324
+ //Get the profile pic from the API
1325
+ $cff_author_data_url = 'https://graph.facebook.com/' . $cff_from_id . '/?fields=picture&access_token='.$access_token;
1326
+ $cff_author_data = cff_fetchUrl($cff_author_data_url);
1327
+ $cff_author_json = json_decode($cff_author_data);
1328
+ $cff_author_src = $cff_author_json->picture->data->url;
1329
+
1330
+ //Store in a transient for 6 months
1331
+ set_transient( $cff_pic_transient_name, $cff_author_src, 180 * 60 * 60 * 24 );
1332
+ } else {
1333
+ $cff_author_src = get_transient( $cff_pic_transient_name );
1334
+ }
1335
+ } else {
1336
+ $cff_author_src = 'https://graph.facebook.com/' . $cff_from_id . '/picture?type=square';
1337
+ }
1338
+
1339
+ $cff_author .= '<div class="cff-author-img"><'.$cff_author_link_el.$cff_author_link_atts.'><img src="'.$cff_author_src.'" title="'.$cff_author_name.'" alt="'.$cff_author_name.'" width=40 height=40 onerror="this.style.display=\'none\'"></'.$cff_author_link_el.'></div>';
1340
 
1341
  $cff_author .= '</div>'; //End .cff-author
1342
 
1574
  $cff_event = '';
1575
 
1576
 
1577
+ //Create note
1578
+ if ($news->status_type == 'created_note') {
1579
+
1580
+ //Is it SSL?
1581
+ $cff_ssl = '';
1582
+ if (is_ssl()) $cff_ssl = '&return_ssl_resources=true';
1583
+
1584
+ //Get the contents of the event
1585
+ $note_json_url = 'https://graph.facebook.com/'.$cff_post_id.'?fields=attachments&access_token=' . $access_token . $cff_ssl;
1586
+
1587
+ // Get any existing copy of our transient data
1588
+ $transient_name = 'cff_tle_' . $cff_post_id;
1589
+ $transient_name = substr($transient_name, 0, 45);
1590
+
1591
+ if ( false === ( $cff_note_json = get_transient( $transient_name ) ) || $cff_note_json === null ) {
1592
+ //Get the contents of the Facebook page
1593
+ $cff_note_json = cff_fetchUrl($note_json_url);
1594
+ //Cache the JSON for 180 days as the note info probably isn't going to change
1595
+ set_transient( $transient_name, $cff_note_json, 60 * 60 * 24 * 180 );
1596
+ } else {
1597
+ $cff_note_json = get_transient( $transient_name );
1598
+ //If we can't find the transient then fall back to just getting the json from the api
1599
+ if ($cff_note_json == false) $cff_note_json = cff_fetchUrl($note_json_url);
1600
+ }
1601
+
1602
+ //Interpret data with JSON
1603
+ $cff_note_obj = json_decode($cff_note_json);
1604
+ $cff_note_object = $cff_note_obj->attachments->data[0];
1605
+
1606
+ isset($cff_note_object->title) ? $cff_note_title = htmlentities($cff_note_object->title, ENT_QUOTES | ENT_HTML5, 'UTF-8') : $cff_note_title = '';
1607
+ isset($cff_note_object->description) ? $cff_note_description = htmlentities($cff_note_object->description, ENT_QUOTES | ENT_HTML5, 'UTF-8') : $cff_note_description = '';
1608
+ isset($cff_note_object->url) ? $cff_note_link = $cff_note_object->url : $cff_note_link = '';
1609
+ isset( $cff_note_object->media->image->src ) ? $cff_note_media_src = $cff_note_object->media->image->src : $cff_note_media_src = false;
1610
+
1611
+ //Note details
1612
+ $cff_note = '<span class="cff-details">';
1613
+ $cff_note = '<span class="cff-note-title">'.$cff_note_title.'</span>';
1614
+ $cff_note .= $cff_note_description;
1615
+ $cff_note .= '</span>';
1616
+
1617
+ //Notes don't include any post text and so just replace the post text with the note content
1618
+ if($cff_show_text) $post_text = $cff_note;
1619
+ }
1620
+
1621
+
1622
  //Create the HTML for the post text elemtent, if the post has text
1623
  $cff_post_text = '';
1624
+
1625
  if( !empty($post_text) ){
1626
  $cff_post_text = '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
1627
 
1655
  $cff_post_text .= '</' . $cff_title_format . '>';
1656
  }
1657
 
1658
+ //Add a call to action button if included
1659
+ if( isset($news->call_to_action->value->link) ){
1660
+ $cff_cta_link = $news->call_to_action->value->link;
1661
+ //If it's not an absolute link then it means it's a relative Facebook one so prefix it with facebook.com
1662
+ if (strpos($cff_cta_link, 'http') === false) $cff_cta_link = 'https://facebook.com' . $cff_cta_link;
1663
+
1664
+ $cff_button_type = $news->call_to_action->type;
1665
+
1666
+ switch ($cff_button_type) {
1667
+ case 'SHOP_NOW':
1668
+ $cff_translate_shop_now_text = $atts['shopnowtext'];
1669
+ if (!isset($cff_translate_shop_now_text) || empty($cff_translate_shop_now_text)) $cff_translate_shop_now_text = 'Shop Now';
1670
+ $cff_cta_button_text = $cff_translate_shop_now_text;
1671
+ break;
1672
+ case 'MESSAGE_PAGE':
1673
+ $cff_translate_message_page_text = $atts['messagepage'];
1674
+ if (!isset($cff_translate_message_page_text) || empty($cff_translate_message_page_text)) $cff_translate_message_page_text = 'Message Page';
1675
+ $cff_cta_button_text = $cff_translate_message_page_text;
1676
+ break;
1677
+ case 'LEARN_MORE':
1678
+ $cff_translate_learn_more_text = $atts['learnmoretext'];
1679
+ if (!isset($cff_translate_learn_more_text) || empty($cff_translate_learn_more_text)) $cff_translate_learn_more_text = 'Learn More';
1680
+ $cff_cta_button_text = $cff_translate_learn_more_text;
1681
+ break;
1682
+ default:
1683
+ $cff_cta_button_text = ucwords(strtolower( str_replace('_',' ',$cff_button_type) ) );
1684
+ }
1685
+
1686
+ isset($news->call_to_action->value->app_link) ? $cff_app_link = $news->call_to_action->value->app_link : $cff_app_link = '';
1687
+ $cff_post_text .= '<p class="cff-cta-link" '.$cff_title_styles.'><a href="'.$cff_cta_link.'" target="_blank" data-app-link="'.$cff_app_link.'" style="color: #'.$cff_posttext_link_color.';" >'.$cff_cta_button_text.'</a></p>';
1688
+ }
1689
+
1690
  //LINK
1691
  $cff_shared_link = '';
1692
  //Display shared link
1842
  $cff_media_link .= '</a></p>';
1843
  }
1844
 
 
1845
  //**************************//
1846
  //***CREATE THE POST HTML***//
1847
  //**************************//
1885
  $cff_post_item .= '</div>';
1886
 
1887
  //PUSH TO ARRAY
1888
+ $cff_posts_array = cff_array_push_assoc($cff_posts_array, $i_post, $cff_post_item);
 
 
 
 
1889
 
1890
  } // End post type check
1891
 
1896
  } // End the loop
1897
 
1898
  //Sort the array in reverse order (newest first)
1899
+ if(!$cff_is_group) ksort($cff_posts_array);
1900
 
1901
  } // End ALL POSTS
1902
 
img/layout-full.png CHANGED
Binary file
img/layout-half.png CHANGED
Binary file
img/layout-thumb.png CHANGED
Binary file
js/cff-admin-scripts.js CHANGED
@@ -159,20 +159,26 @@ jQuery(document).ready(function($) {
159
 
160
  //Shortcode tooltips
161
  jQuery('#cff-admin label').click(function(){
162
- var $sbi_shortcode = jQuery(this).siblings('.cff_shortcode');
163
- if($sbi_shortcode.is(':visible')){
164
- jQuery(this).siblings('.cff_shortcode').css('display','none');
165
- } else {
166
- jQuery(this).siblings('.cff_shortcode').css('display','block');
167
- }
 
168
  });
169
- jQuery('#cff-admin label').hover(function(){
170
- if( jQuery(this).siblings('.cff_shortcode').length > 0 ){
171
- jQuery(this).attr('title', 'Click for shortcode option').append('<code class="cff_shortcode_symbol">[]</code>');
172
- }
173
  }, function(){
174
  jQuery(this).find('.cff_shortcode_symbol').remove();
175
  });
 
 
 
 
 
176
 
177
  //Open/close the expandable option sections
178
  jQuery('.cff-expandable-options').hide();
@@ -208,4 +214,27 @@ jQuery(document).ready(function($) {
208
  }
209
  });
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  });
159
 
160
  //Shortcode tooltips
161
  jQuery('#cff-admin label').click(function(){
162
+ var $el = jQuery(this);
163
+ var $cff_shortcode = $el.siblings('.cff_shortcode');
164
+ if($cff_shortcode.is(':visible')){
165
+ $el.siblings('.cff_shortcode').css('display','none');
166
+ } else {
167
+ $el.siblings('.cff_shortcode').css('display','block');
168
+ }
169
  });
170
+ jQuery('#cff-admin th').hover(function(){
171
+ if( jQuery(this).find('.cff_shortcode').length > 0 ){
172
+ jQuery(this).find('label').append('<code class="cff_shortcode_symbol">[]</code>');
173
+ }
174
  }, function(){
175
  jQuery(this).find('.cff_shortcode_symbol').remove();
176
  });
177
+ jQuery('#cff-admin label').hover(function(){
178
+ if( jQuery(this).siblings('.cff_shortcode').length > 0 ){
179
+ jQuery(this).attr('title', 'Click for shortcode option');
180
+ }
181
+ }, function(){});
182
 
183
  //Open/close the expandable option sections
184
  jQuery('.cff-expandable-options').hide();
214
  }
215
  });
216
 
217
+ // Clear avatar cache
218
+ var $cffClearAvatarsBtn = $('#cff-admin #cff_clear_avatars');
219
+ $cffClearAvatarsBtn.click(function(event) {
220
+ event.preventDefault();
221
+ $('#cff-clear-avatars-success').remove();
222
+ $(this).prop("disabled",true);
223
+ $.ajax({
224
+ url : ajaxurl,
225
+ type : 'post',
226
+ data : {
227
+ action : 'cff_clear_avatar_cache'
228
+ },
229
+ success : function(data) {
230
+ $cffClearAvatarsBtn.prop('disabled',false);
231
+ if(!data===false) {
232
+ $cffClearAvatarsBtn.after('<i id="cff-clear-avatars-success" class="fa fa-check-circle cff-success-check"></i>');
233
+ } else {
234
+ $cffClearAvatarsBtn.after('<span>error</span>');
235
+ }
236
+ }
237
+ });
238
+ });
239
+
240
  });
js/cff-scripts.min.js CHANGED
@@ -6,7 +6,7 @@ cff_trunc_counter=cff_trunc_counter+full_text_arr[i].length;if(cff_trunc_counter
6
  var short_text=full_text_arr.join('');short_text=short_text.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g,"");var lastChar=short_text.substr(short_text.length-1);if(lastChar=='<')short_text=short_text.substring(0,short_text.length-1);short_text=short_text.replace(/(<br>\s*)+$/,'');short_text=short_text.replace(/(<img class="cff-linebreak">\s*)+$/,'');$post_text.html(short_text);$self.find('.cff-expand a').unbind('click').bind('click',function(e){e.preventDefault();var $expand=jQuery(this),$more=$expand.find('.cff-more'),$less=$expand.find('.cff-less');if(expanded==!1){$post_text.html(full_text);expanded=!0;$more.hide();$less.show()}else{$post_text.html(short_text);expanded=!1;$more.show();$less.hide()}
7
  cffLinkHashtags();$post_text.find('a').attr('target','_blank')});$post_text.find('a').add($self.find('.cff-post-desc a')).attr({'target':'_blank','rel':'nofollow'});$sharedLink=$self.find('.cff-shared-link');if($sharedLink.text()==''){$sharedLink.remove()}
8
  function cffLinkHashtags(){var cffTextStr=$self.find('.cff-text').html(),cffDescStr=$self.find('.cff-post-desc').html(),regex=/(^|\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,linkcolor=$self.find('.cff-text').attr('data-color');function replacer(hash){var replacementString=jQuery.trim(hash);if(/^#[0-9A-F]{6}$/i.test(replacementString)){return replacementString}else{return' <a href="https://www.facebook.com/hashtag/'+replacementString.substring(1)+'" target="_blank" rel="nofollow" style="color:#'+linkcolor+'">'+replacementString+'</a>'}}
9
- if(cfflinkhashtags=='true'){var $cffText=$self.find('.cff-text');if($cffText.length>0){cffTextStr=cffTextStr.replace(/<br>/g,"<br> ");$cffText.html(cffTextStr.replace(regex,replacer))}}
10
  if($self.find('.cff-post-desc').length>0)$self.find('.cff-post-desc').html(cffDescStr.replace(regex,replacer))}
11
  cffLinkHashtags();$self.find('.cff-text a').add($self.find('.cff-post-desc a')).attr({'target':'_blank','rel':'nofollow'});$self.find('.cff-share-link').unbind().bind('click',function(){$self.find('.cff-share-tooltip').toggle()})})}
12
  cff_init()}
6
  var short_text=full_text_arr.join('');short_text=short_text.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g,"");var lastChar=short_text.substr(short_text.length-1);if(lastChar=='<')short_text=short_text.substring(0,short_text.length-1);short_text=short_text.replace(/(<br>\s*)+$/,'');short_text=short_text.replace(/(<img class="cff-linebreak">\s*)+$/,'');$post_text.html(short_text);$self.find('.cff-expand a').unbind('click').bind('click',function(e){e.preventDefault();var $expand=jQuery(this),$more=$expand.find('.cff-more'),$less=$expand.find('.cff-less');if(expanded==!1){$post_text.html(full_text);expanded=!0;$more.hide();$less.show()}else{$post_text.html(short_text);expanded=!1;$more.show();$less.hide()}
7
  cffLinkHashtags();$post_text.find('a').attr('target','_blank')});$post_text.find('a').add($self.find('.cff-post-desc a')).attr({'target':'_blank','rel':'nofollow'});$sharedLink=$self.find('.cff-shared-link');if($sharedLink.text()==''){$sharedLink.remove()}
8
  function cffLinkHashtags(){var cffTextStr=$self.find('.cff-text').html(),cffDescStr=$self.find('.cff-post-desc').html(),regex=/(^|\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,linkcolor=$self.find('.cff-text').attr('data-color');function replacer(hash){var replacementString=jQuery.trim(hash);if(/^#[0-9A-F]{6}$/i.test(replacementString)){return replacementString}else{return' <a href="https://www.facebook.com/hashtag/'+replacementString.substring(1)+'" target="_blank" rel="nofollow" style="color:#'+linkcolor+'">'+replacementString+'</a>'}}
9
+ if(typeof cfflinkhashtags=='undefined')cfflinkhashtags='true';if(cfflinkhashtags=='true'){var $cffText=$self.find('.cff-text');if($cffText.length>0){cffTextStr=cffTextStr.replace(/<br>/g,"<br> ");$cffText.html(cffTextStr.replace(regex,replacer))}}
10
  if($self.find('.cff-post-desc').length>0)$self.find('.cff-post-desc').html(cffDescStr.replace(regex,replacer))}
11
  cffLinkHashtags();$self.find('.cff-text a').add($self.find('.cff-post-desc a')).attr({'target':'_blank','rel':'nofollow'});$self.find('.cff-share-link').unbind().bind('click',function(){$self.find('.cff-share-tooltip').toggle()})})}
12
  cff_init()}