Custom Facebook Feed - Version 2.7.2

Version Description

  • 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.
  • Fix: Fixed a rare issue caused by some themes including the JavaScript file incorrectly
Download this release

Release Info

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

Code changes from version 2.7.1 to 2.7.2

README.txt CHANGED
@@ -3,7 +3,7 @@ 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.1
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -11,7 +11,7 @@ The Custom Facebook Feed allows you to display completely customizable Facebook
11
12
== Description ==
13
14
- Display a **completely customizable**, **responsive** and **search engine crawlable** version of your Facebook feed on your website. Completely match the look and feel of the site with tons of customization options!
15
16
*"The perfect plugin with amazing support! What else do you want? Get it!"* - [JoeJeffries](http://wordpress.org/support/topic/you-dont-already-have-this)
17
@@ -21,14 +21,14 @@ Display a **completely customizable**, **responsive** and **search engine crawla
21
22
= Features =
23
24
* **Completely Customizable** - By default the Facebook feed will adopt the style of your website, but can be completely customized to look however you like - with tons of styling and customization options!
25
* Facebook feed content is **crawlable by search engines** adding SEO value to your site - other Facebook plugins embed the feed using iframes which are not crawlable
26
* Completely **responsive** and mobile optimized - layout looks great on any screen size and in any container width
27
* Display **feeds from multiple different Facebook pages** and use the shortcode to embed them into a page, post or widget anywhere on your site
28
- * Show **events** from your Facebook feed with name, date/time, location and description
29
* Add your own **custom CSS**
30
* **Caching** means that your Facebook posts load lightning fast. Set your own caching time - check for new posts on Facebook every few seconds, minutes, hours or days. You decide.
31
- * **Super simple to set up**. Just enter your Facebook page ID and you're done.
32
* Show and hide certain parts of each Facebook post
33
* Show or hide the Facebook profile picture and name of the author above each post
34
* Display Facebook posts by just the page owner, everyone who posts on your Facebook page, or only other people
@@ -265,11 +265,15 @@ You no longer need your own Access Token to use the Custom Facebook Feed Plugin,
265
266
== Changelog ==
267
268
= 2.7.1 =
269
* Tweak: Made some adjustments to the Access Token login process
270
271
= 2.7 =
272
- * New: Now easily get your own 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!
273
* Tweak: Removed the minimum caching time if you're using your own Page Access Token
274
275
= 2.6.4 =
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
11
12
== Description ==
13
14
+ Display **completely customizable**, **responsive** and **search engine crawlable** Facebook feeds on your website. Display **multiple feeds** from **any public Facebook page**, and completely match the look and feel of the site with tons of customization options!
15
16
*"The perfect plugin with amazing support! What else do you want? Get it!"* - [JoeJeffries](http://wordpress.org/support/topic/you-dont-already-have-this)
17
21
22
= Features =
23
24
+ * **Super simple to set up** - 1 minute quick setup with no Facebook Developer App required
25
+ * **Display feeds from ANY Facebook page** - even ones you aren't an admin of
26
* **Completely Customizable** - By default the Facebook feed will adopt the style of your website, but can be completely customized to look however you like - with tons of styling and customization options!
27
* Facebook feed content is **crawlable by search engines** adding SEO value to your site - other Facebook plugins embed the feed using iframes which are not crawlable
28
* Completely **responsive** and mobile optimized - layout looks great on any screen size and in any container width
29
* Display **feeds from multiple different Facebook pages** and use the shortcode to embed them into a page, post or widget anywhere on your site
30
* Add your own **custom CSS**
31
* **Caching** means that your Facebook posts load lightning fast. Set your own caching time - check for new posts on Facebook every few seconds, minutes, hours or days. You decide.
32
* Show and hide certain parts of each Facebook post
33
* Show or hide the Facebook profile picture and name of the author above each post
34
* Display Facebook posts by just the page owner, everyone who posts on your Facebook page, or only other people
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 =
custom-facebook-feed-admin.php CHANGED
@@ -136,63 +136,21 @@ function cff_settings_page() {
136
<div id="cff_fb_login_modal">
137
<div class="cff_modal_box">
138
139
- <div id="cff-token-intro">
140
- <p>I am displaying a feed from a Facebook page that:</p>
141
- <div class="cff-token-radios">
142
- <div>
143
- <input type="radio" id="cff-token-own" name="token-perm" value="own" />
144
- <label for="cff-token-own">I am an admin of</label>&nbsp;<a href="javascript:void(0);" class="cff-tooltip-link cff-token-question-own"><i class="fa fa-info-circle" aria-hidden="true"></i></a>
145
-
146
- <p class="cff-tooltip cff-more-info"><?php _e("Select this option if you are an admin of the Facebook page you want to display a feed from.", 'custom-facebook-feed'); ?></p>
147
- </div>
148
- <div>
149
- <input type="radio" id="cff-token-public" name="token-perm" value="public" />
150
- <label for="cff-token-public">I am <b>NOT</b> an admin of</label>&nbsp;<a href="javascript:void(0);" class="cff-tooltip-link cff-token-question-public"><i class="fa fa-info-circle" aria-hidden="true"></i></a>
151
-
152
- <p class="cff-tooltip cff-more-info"><?php _e("Select this option if you need to display a feed from a Facebook page that you are not an admin of.", 'custom-facebook-feed'); ?></p>
153
- </div>
154
- </div>
155
-
156
- <p>
157
- <a href="javascript:void(0);" id="cff_admin_cancel_btn_2" class="cff-admin-cancel-btn">Cancel</a>
158
- <a href="javascript:void(0);" class="cff_admin_btn cff-disabled" id="cff_token_perm_selected"><?php _e( 'Continue', 'custom-facebook-feed' ); ?></a>
159
- </p>
160
- </div>
161
-
162
- <div id="cff-own">
163
- <p>Log into your Facebook account using the button below and approve the plugin to connect your account.</p>
164
165
- <p><a href="javascript:void(0);" id="cff_admin_cancel_btn_3" class="cff-admin-cancel-btn">Cancel</a>
166
-
167
- <?php
168
- $admin_url_state = admin_url('admin.php?page=cff-top');
169
- //If the admin_url isn't returned correctly then use a fallback
170
- if( $admin_url_state == '/wp-admin/admin.php?page=cff-top' || $admin_url_state == '/wp-admin/admin.php?page=cff-top&tab=configuration' ){
171
- $admin_url_state = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
172
- }
173
- ?>
174
- <a href="https://www.facebook.com/dialog/oauth?client_id=1332798716823516&redirect_uri=https://smashballoon.com/fb-1332798716823516-redirect/&scope=manage_pages&state=<?php echo $admin_url_state; ?>" class="cff_admin_btn"><i class="fa fa-facebook-square"></i> <?php _e( 'Continue', 'custom-facebook-feed' ); ?></a></p>
175
-
176
- <p style="font-size: 11px; margin-top: 25px;"><b>Please note:</b> this does not give us permission to manage your Facebook pages, it simply allows the plugin to see a list of the pages you manage and retrieve an Access Token.</p>
177
- </div>
178
-
179
- <div id="cff-public">
180
- <p>We're teaming up with our good friends at <span class="cff_srlogo">SlickRemix</b> <img src="<?php echo plugins_url( 'img/slick-remix.png' , __FILE__ ) ?>"></span> to provide you with an easy way to connect to Facebook. Simply log into your Facebook account using the button below and approve the plugin to connect your account.</p>
181
182
183
- <p><a href="javascript:void(0);" id="cff_admin_cancel_btn" class="cff-admin-cancel-btn">Cancel</a>
184
185
- <?php
186
- $admin_url_state = admin_url('admin.php?page=cff-top');
187
- //If the admin_url isn't returned correctly then use a fallback
188
- if( $admin_url_state == '/wp-admin/admin.php?page=cff-top' || $admin_url_state == '/wp-admin/admin.php?page=cff-top&tab=configuration' ){
189
- $admin_url_state = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
190
- }
191
- ?>
192
- <a href="https://www.facebook.com/dialog/oauth?scope=manage_pages&client_id=1123168491105924&redirect_uri=https://www.slickremix.com/facebook-token/&state=<?php echo $admin_url_state; ?>" class="cff_admin_btn"><i class="fa fa-facebook-square"></i> <?php _e( 'Continue', 'custom-facebook-feed' ); ?></a></p>
193
-
194
- <p style="font-size: 11px; margin-top: 25px;"><b>Please note:</b> this does not give us permission to manage your Facebook pages, it simply allows the plugin to see a list of the pages you manage and retrieve an Access Token.</p>
195
- </div>
196
197
</div>
198
</div>
@@ -228,12 +186,7 @@ function cff_settings_page() {
228
<?php
229
} else {
230
//Show the pages they manage
231
-
232
- if( isset($_GET['own']) ){
233
- echo '<p style="background: #F7E6E6; border: 1px solid #BA7B7B; padding: 15px 20px; border-radius: 5px;">Select one of the pages below to get an Access Token for that page.<br /><b><u>Important:</u></b> This Access Token will only be able to display content from the <b>selected page</b>.</p>';
234
- } else {
235
- echo '<p style="background: #dceada; border: 1px solid #6ca365; padding: 15px 20px; border-radius: 5px;">Select one of the pages below to get an Access Token.<br /><b><u>Important:</u> This Access Token will allow you to display posts from <u>any</u> public Facebook page, not just the one selected.</b></p>';
236
- }
237
238
foreach ( $pages_data_arr->data as $page => $page_data ) {
239
echo '<div class="cff-managed-page ';
@@ -596,7 +549,7 @@ function cff_settings_page() {
596
var js, fjs = d.getElementsByTagName(s)[0];
597
if (d.getElementById(id)) return;
598
js = d.createElement(s); js.id = id;
599
- js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=640861236031365&version=v2.0";
600
fjs.parentNode.insertBefore(js, fjs);
601
}(document, 'script', 'facebook-jssdk'));</script>
602
<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>
136
<div id="cff_fb_login_modal">
137
<div class="cff_modal_box">
138
139
+ <p>Log into your Facebook account using the button below and approve the plugin to connect your account.</p>
140
141
+ <p><a href="javascript:void(0);" id="cff_admin_cancel_btn" class="cff-admin-cancel-btn">Cancel</a>
142
143
+ <?php
144
+ $admin_url_state = admin_url('admin.php?page=cff-top');
145
+ //If the admin_url isn't returned correctly then use a fallback
146
+ if( $admin_url_state == '/wp-admin/admin.php?page=cff-top' || $admin_url_state == '/wp-admin/admin.php?page=cff-top&tab=configuration' ){
147
+ $admin_url_state = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
148
+ }
149
+ ?>
150
151
+ <a href="https://api.smashballoon.com/facebook-login.php?state=<?php echo $admin_url_state; ?>" class="cff_admin_btn"><i class="fa fa-facebook-square"></i> <?php _e( 'Continue', 'custom-facebook-feed' ); ?></a></p>
152
153
+ <p style="font-size: 11px; margin-top: 25px;"><b>Please note:</b> this does not give us permission to manage your Facebook pages, it simply allows the plugin to see a list of the pages you manage and retrieve an Access Token.</p>
154
155
</div>
156
</div>
186
<?php
187
} else {
188
//Show the pages they manage
189
+ echo '<p style="background: #dceada; border: 1px solid #6ca365; padding: 15px 20px; border-radius: 5px;">Select one of the pages below to get an Access Token.<br /><b><u>Important:</u> This Access Token will allow you to display posts from <u>any</u> public Facebook page, not just the one selected.</b></p>';
190
191
foreach ( $pages_data_arr->data as $page => $page_data ) {
192
echo '<div class="cff-managed-page ';
549
var js, fjs = d.getElementsByTagName(s)[0];
550
if (d.getElementById(id)) return;
551
js = d.createElement(s); js.id = id;
552
+ js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=&version=v2.0";
553
fjs.parentNode.insertBefore(js, fjs);
554
}(document, 'script', 'facebook-jssdk'));</script>
555
<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>
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.1
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.1');
28
29
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
30
//Include admin
@@ -785,7 +785,7 @@ function display_cff($atts) {
785
if ( !isset($cff_likebox_width) || empty($cff_likebox_width) || $cff_likebox_width == '' ) $cff_likebox_width = 300;
786
787
//Set like box variable
788
- isset( $options[ 'cff_app_id' ] ) && !empty( $options[ 'cff_app_id' ] ) ? $cff_app_id = $options[ 'cff_app_id' ] : $cff_app_id = '712681982206086';
789
$cff_like_box_params = '&appId=' .$cff_app_id;
790
$like_box = '<div class="cff-likebox';
791
if ($cff_like_box_outside) $like_box .= ' cff-outside';
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
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
785
if ( !isset($cff_likebox_width) || empty($cff_likebox_width) || $cff_likebox_width == '' ) $cff_likebox_width = 300;
786
787
//Set like box variable
788
+ isset( $options[ 'cff_app_id' ] ) && !empty( $options[ 'cff_app_id' ] ) ? $cff_app_id = $options[ 'cff_app_id' ] : $cff_app_id = '';
789
$cff_like_box_params = '&appId=' .$cff_app_id;
790
$like_box = '<div class="cff-likebox';
791
if ($cff_like_box_outside) $like_box .= ' cff-outside';
img/cff-icon.png CHANGED
Binary file
js/cff-admin-scripts.js CHANGED
@@ -191,9 +191,8 @@ jQuery(document).ready(function($) {
191
$('#cff_fb_login').on('click', function(){
192
$('#cff_fb_login_modal').show();
193
});
194
- $('#cff_admin_cancel_btn, #cff_admin_cancel_btn_2, #cff_admin_cancel_btn_3').on('click', function(){
195
- $('#cff_fb_login_modal, #cff-public, #cff-own').hide();
196
- $('#cff-token-intro').show();
197
});
198
199
//Select a page for token
@@ -209,21 +208,4 @@ jQuery(document).ready(function($) {
209
}
210
});
211
212
- //Token radio change event
213
- $('input[type=radio][name=token-perm]').change(function() {
214
- $('.cff_admin_btn').removeClass('cff-disabled');
215
- });
216
- if( $('input[type=radio][name=token-perm]').is(":checked") ){
217
- $('.cff_admin_btn').removeClass('cff-disabled');
218
- }
219
-
220
- $('#cff_token_perm_selected').on('click', function(){
221
- if( !$(this).hasClass('cff-disabled') ){
222
- var cffTokenRadioVal = $('input[name=token-perm]:checked').val();
223
- if( cffTokenRadioVal == 'own' ) $('#cff-own').show();
224
- if( cffTokenRadioVal == 'public' ) $('#cff-public').show();
225
- $('#cff-token-intro').hide();
226
- }
227
- });
228
-
229
});
191
$('#cff_fb_login').on('click', function(){
192
$('#cff_fb_login_modal').show();
193
});
194
+ $('#cff_admin_cancel_btn').on('click', function(){
195
+ $('#cff_fb_login_modal').hide();
196
});
197
198
//Select a page for token
208
}
209
});
210
211
});
js/cff-scripts.js CHANGED
@@ -129,6 +129,9 @@ if(!cff_js_exists){
129
}
130
}
131
132
if(cfflinkhashtags == 'true'){
133
//Replace hashtags in text
134
var $cffText = $self.find('.cff-text');
129
}
130
}
131
132
+ //If it's not defined in the source code then set it to be true
133
+ if (typeof cfflinkhashtags == 'undefined') cfflinkhashtags = 'true';
134
+
135
if(cfflinkhashtags == 'true'){
136
//Replace hashtags in text
137
var $cffText = $self.find('.cff-text');