Custom Facebook Feed - Version 2.3.7

Version Description

  • Fix: Fixed an issue caused by the WordPress 4.3 update where feeds from very long page IDs wouldn't update correctly due to the cache not clearing when expired
  • Fix: Removed specific encoding parameters from the cURL request method to prevent encoding issues on some servers
Download this release

Release Info

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

Code changes from version 2.3.6 to 2.3.7

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
3
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook groups, Facebook fans, Facebook likes, Facebook followers, Facebooks, Face book, posts, Facebook postings, Facebook feeds, Facebook pages, Facebook Like Box, Facebook plugin, Facebook plug-in, Facebook walls, Facebook hashtag, Facebook embed, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social media
4
Requires at least: 3.0
5
Tested up to: 4.3
6
- Stable tag: 2.3.6
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -361,6 +361,10 @@ Credit iMarketing Factory - "The Importance of Facebook for Small Businesses"
361
9. It's super easy to display your Facebook feed in any page or post
362
363
== Changelog ==
364
= 2.3.6 =
365
* New: Added a couple of new customization options for the Facebook Like Box/Page Plugin which allow you to select a small/slim header for the Like Box and hide the call-to-action button (if available)
366
* Fix: The plugin now works with Access Tokens which use the new recently-released version 2.4 of the Facebook API
3
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook groups, Facebook fans, Facebook likes, Facebook followers, Facebooks, Face book, posts, Facebook postings, Facebook feeds, Facebook pages, Facebook Like Box, Facebook plugin, Facebook plug-in, Facebook walls, Facebook hashtag, Facebook embed, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social media
4
Requires at least: 3.0
5
Tested up to: 4.3
6
+ Stable tag: 2.3.7
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
361
9. It's super easy to display your Facebook feed in any page or post
362
363
== Changelog ==
364
+ = 2.3.7 =
365
+ * Fix: Fixed an issue caused by the WordPress 4.3 update where feeds from very long page IDs wouldn't update correctly due to the cache not clearing when expired
366
+ * Fix: Removed specific encoding parameters from the cURL request method to prevent encoding issues on some servers
367
+
368
= 2.3.6 =
369
* New: Added a couple of new customization options for the Facebook Like Box/Page Plugin which allow you to select a small/slim header for the Like Box and hide the call-to-action button (if available)
370
* Fix: The plugin now works with Access Tokens which use the new recently-released version 2.4 of the Facebook API
custom-facebook-feed-admin.php CHANGED
@@ -94,27 +94,23 @@ function cff_settings_page() {
94
$options[ 'cff_timezone' ] = $cff_timezone;
95
update_option( 'cff_style_settings', $options );
96
97
- //Delete the transient for the main page ID
98
- delete_transient( 'cff_posts_json_' .$page_id_val );
99
- delete_transient( 'cff_feed_json_' .$page_id_val );
100
- delete_transient( 'cff_events_json_' . $page_id_val );
101
//Delete ALL transients
102
global $wpdb;
103
$table_name = $wpdb->prefix . "options";
104
$wpdb->query( "
105
DELETE
106
FROM $table_name
107
- WHERE `option_name` LIKE ('%cff\_posts\_json\_%')
108
" );
109
$wpdb->query( "
110
DELETE
111
FROM $table_name
112
- WHERE `option_name` LIKE ('%cff\_feed\_json\_%')
113
" );
114
$wpdb->query( "
115
DELETE
116
FROM $table_name
117
- WHERE `option_name` LIKE ('%cff\_events\_json\_%')
118
" );
119
// Put an settings updated message on the screen
120
?>
94
$options[ 'cff_timezone' ] = $cff_timezone;
95
update_option( 'cff_style_settings', $options );
96
97
//Delete ALL transients
98
global $wpdb;
99
$table_name = $wpdb->prefix . "options";
100
$wpdb->query( "
101
DELETE
102
FROM $table_name
103
+ WHERE `option_name` LIKE ('%\_transient\_cff\_%')
104
" );
105
$wpdb->query( "
106
DELETE
107
FROM $table_name
108
+ WHERE `option_name` LIKE ('%\_transient\_cff\_tle\_%')
109
" );
110
$wpdb->query( "
111
DELETE
112
FROM $table_name
113
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_cff\_%')
114
" );
115
// Put an settings updated message on the screen
116
?>
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.3.6
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
//Include admin
26
include dirname( __FILE__ ) .'/custom-facebook-feed-admin.php';
27
28
- define('CFFVER', '2.3.6');
29
30
// Add shortcodes
31
add_shortcode('custom-facebook-feed', 'display_cff');
@@ -785,8 +785,15 @@ function display_cff($atts) {
785
786
//Don't use caching if the cache time is set to zero
787
if ($cff_cache_time != 0){
788
- // Get any existing copy of our transient data
789
- $transient_name = 'cff_'. $graph_query .'_json_' . $page_id . $cff_post_limit . $show_posts_by;
790
if ( false === ( $posts_json = get_transient( $transient_name ) ) || $posts_json === null ) {
791
//Get the contents of the Facebook page
792
$posts_json = cff_fetchUrl($cff_posts_json_url);
@@ -1244,7 +1251,9 @@ function display_cff($atts) {
1244
//Don't use caching if the cache time is set to zero
1245
if ($cff_cache_time != 0){
1246
// Get any existing copy of our transient data
1247
- $transient_name = 'cff_timeline_event_json_' . $eventID;
1248
if ( false === ( $event_json = get_transient( $transient_name ) ) || $event_json === null ) {
1249
//Get the contents of the Facebook page
1250
$event_json = cff_fetchUrl($event_json_url);
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.3.7
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
25
//Include admin
26
include dirname( __FILE__ ) .'/custom-facebook-feed-admin.php';
27
28
+ define('CFFVER', '2.3.7');
29
30
// Add shortcodes
31
add_shortcode('custom-facebook-feed', 'display_cff');
785
786
//Don't use caching if the cache time is set to zero
787
if ($cff_cache_time != 0){
788
+
789
+ //Create the transient name
790
+ //Split the Page ID in half and stick it together so we definitely have the beginning and end of it
791
+ $trans_page_id = substr($page_id, 0, 17) . substr($page_id, -16);
792
+ $transient_name = 'cff_' . substr($graph_query, 0, 1) . '_' . $trans_page_id . substr($cff_post_limit, 0, 3) . substr($show_posts_by, 0, 2);
793
+ //Limit to 45 chars max
794
+ $transient_name = substr($transient_name, 0, 45);
795
+
796
+ //Get any existing copy of our transient data
797
if ( false === ( $posts_json = get_transient( $transient_name ) ) || $posts_json === null ) {
798
//Get the contents of the Facebook page
799
$posts_json = cff_fetchUrl($cff_posts_json_url);
1251
//Don't use caching if the cache time is set to zero
1252
if ($cff_cache_time != 0){
1253
// Get any existing copy of our transient data
1254
+ $transient_name = 'cff_tle_' . $eventID;
1255
+ $transient_name = substr($transient_name, 0, 45);
1256
+
1257
if ( false === ( $event_json = get_transient( $transient_name ) ) || $event_json === null ) {
1258
//Get the contents of the Facebook page
1259
$event_json = cff_fetchUrl($event_json_url);