Custom Facebook Feed - Version 2.3.4

Version Description

  • Fix: The event description is no longer shown twice in event posts. It was previously shown in the post text itself and in the event details.
  • Fix: Fixed a rare bug which would occur if your Facebook page or group name contained a number
Download this release

Release Info

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

Code changes from version 2.3.3 to 2.3.4

Files changed (2) hide show
  1. README.txt +6 -2
  2. custom-facebook-feed.php +12 -3
README.txt CHANGED
@@ -2,8 +2,8 @@
2
Contributors: smashballoon
3
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook Like box, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social media
4
Requires at least: 3.0
5
- Tested up to: 4.1.1
6
- Stable tag: 2.3.3
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -271,6 +271,10 @@ Credit iMarketing Factory - "The Importance of Facebook for Small Businesses"
271
9. It's super easy to display your Facebook feed in any page or post
272
273
== Changelog ==
274
= 2.3.3 =
275
* Fix: Removed a PHP notice which was missed in the last update. Apologies for the two updates in quick succession.
276
2
Contributors: smashballoon
3
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook Like box, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social media
4
Requires at least: 3.0
5
+ Tested up to: 4.2
6
+ Stable tag: 2.3.4
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
271
9. It's super easy to display your Facebook feed in any page or post
272
273
== Changelog ==
274
+ = 2.3.4 =
275
+ * Fix: The event description is no longer shown twice in event posts. It was previously shown in the post text itself and in the event details.
276
+ * Fix: Fixed a rare bug which would occur if your Facebook page or group name contained a number
277
+
278
= 2.3.3 =
279
* Fix: Removed a PHP notice which was missed in the last update. Apologies for the two updates in quick succession.
280
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 a completely customizable Facebook feed to your WordPress site
6
- Version: 2.3.3
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.3');
29
30
// Add shortcodes
31
add_shortcode('custom-facebook-feed', 'display_cff');
@@ -643,6 +643,10 @@ function display_cff($atts) {
643
if ($cff_like_box_outside) $like_box .= ' cff-outside';
644
$like_box .= ($cff_like_box_position == 'top') ? ' cff-top' : ' cff-bottom';
645
$like_box .= '" ' . $cff_likebox_styles . '><script src="https://connect.facebook.net/' . $cff_locale . '/all.js#xfbml=1 '.$cff_like_box_params.'"></script><fb:like-box href="http://www.facebook.com/' . $page_id . '" show_faces="'.$cff_like_box_faces.'" stream="false" header="false" colorscheme="'. $cff_like_box_colorscheme .'" show_border="'. $cff_like_box_border .'" data-height="'.$cff_likebox_height.'"></fb:like-box><div id="fb-root"></div></div>';
646
//Don't show like box if it's a group
647
if($cff_is_group) $like_box = '';
648
@@ -884,11 +888,15 @@ function display_cff($atts) {
884
885
//Is it an album?
886
$cff_album = false;
887
888
if( $news->status_type == 'added_photos' ){
889
//Check 'story' to see whether it contains a number
890
(isset($news->story)) ? $str = $news->story : $str = '';
891
- preg_match('!\d+!', $str, $matches);
892
(isset($matches[0])) ? $num_photos = $matches[0] : $num_photos = 0;
893
894
if ( $num_photos > 1 ) {
@@ -1090,6 +1098,7 @@ function display_cff($atts) {
1090
//If the post text and description/caption are the same then don't show the description
1091
if($post_text == $description_text) $cff_description = '';
1092
1093
}
1094
1095
//LINK
3
Plugin Name: Custom Facebook Feed
4
Plugin URI: http://smashballoon.com/custom-facebook-feed
5
Description: Add a completely customizable Facebook feed to your WordPress site
6
+ Version: 2.3.4
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.4');
29
30
// Add shortcodes
31
add_shortcode('custom-facebook-feed', 'display_cff');
643
if ($cff_like_box_outside) $like_box .= ' cff-outside';
644
$like_box .= ($cff_like_box_position == 'top') ? ' cff-top' : ' cff-bottom';
645
$like_box .= '" ' . $cff_likebox_styles . '><script src="https://connect.facebook.net/' . $cff_locale . '/all.js#xfbml=1 '.$cff_like_box_params.'"></script><fb:like-box href="http://www.facebook.com/' . $page_id . '" show_faces="'.$cff_like_box_faces.'" stream="false" header="false" colorscheme="'. $cff_like_box_colorscheme .'" show_border="'. $cff_like_box_border .'" data-height="'.$cff_likebox_height.'"></fb:like-box><div id="fb-root"></div></div>';
646
+
647
+ //New like box:
648
+ // $like_box .= '" ' . $cff_likebox_styles . '><div id="fb-root"></div><script src="https://connect.facebook.net/' . $cff_locale . '/all.js#xfbml=1 '.$cff_like_box_params.'"></script><div class="fb-page" data-href="https://www.facebook.com/' . $page_id . '" data-height="'.$cff_likebox_height.'" data-hide-cover="true" data-show-facepile="'.$cff_like_box_faces.'" data-show-posts="false"></div></div>';
649
+
650
//Don't show like box if it's a group
651
if($cff_is_group) $like_box = '';
652
888
889
//Is it an album?
890
$cff_album = false;
891
+ $num_photos = 0;
892
893
if( $news->status_type == 'added_photos' ){
894
//Check 'story' to see whether it contains a number
895
(isset($news->story)) ? $str = $news->story : $str = '';
896
+
897
+ //Only matches number with a space after them
898
+ preg_match('!\d+ !', $str, $matches);
899
+
900
(isset($matches[0])) ? $num_photos = $matches[0] : $num_photos = 0;
901
902
if ( $num_photos > 1 ) {
1098
//If the post text and description/caption are the same then don't show the description
1099
if($post_text == $description_text) $cff_description = '';
1100
1101
+ if( $cff_post_type == 'event' ) $cff_description = '';
1102
}
1103
1104
//LINK