Custom Facebook Feed - Version 1.3.0

Version Description

  • Tweak: If 'Number of Posts to show' is not set then default to 10
Download this release

Release Info

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

Code changes from version 1.2.9 to 1.3.0

Files changed (2) hide show
  1. README.txt +4 -1
  2. custom-facebook-feed.php +6 -2
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
3
  Tags: facebook, custom, customizable, feed, seo, search engine, responsive, mobile, shortcode, social, status
4
  Requires at least: 3.0
5
  Tested up to: 3.5.1
6
- Stable tag: 1.2.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -70,6 +70,9 @@ It sure is. Unlike other Facebook plugins which use iframes to embed your feed i
70
 
71
  == Changelog ==
72
 
 
 
 
73
  = 1.2.9 =
74
  * Fix: Now using cURL instead of file_get_contents to prevent issues with php.ini configuration on some web servers
75
 
3
  Tags: facebook, custom, customizable, feed, seo, search engine, responsive, mobile, shortcode, social, status
4
  Requires at least: 3.0
5
  Tested up to: 3.5.1
6
+ Stable tag: 1.3.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.3.0 =
74
+ * Tweak: If 'Number of Posts to show' is not set then default to 10
75
+
76
  = 1.2.9 =
77
  * Fix: Now using cURL instead of file_get_contents to prevent issues with php.ini configuration on some web servers
78
 
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: 1.2.9
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
@@ -48,6 +48,10 @@ function display_cff($atts) {
48
  $access_token = get_option('cff_access_token');
49
  $page_id = $atts['id'];
50
 
 
 
 
 
51
  //Check whether the Access Token is present and valid
52
  if ($access_token == '') {
53
  echo 'Please enter a valid Access Token. You can do this in the plugin settings (Settings > Custom Facebook Feed).<br /><br />';
@@ -98,7 +102,7 @@ function display_cff($atts) {
98
  //If it isn't then create the post
99
 
100
  //Only create posts for the amount of posts specified
101
- if ( $i == $atts['show'] ) break;
102
  $i++;
103
 
104
  //Start the container
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: 1.3.0
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
48
  $access_token = get_option('cff_access_token');
49
  $page_id = $atts['id'];
50
 
51
+ //Get show posts attribute. If not set then default to 10.
52
+ $show_posts = $atts['show'];
53
+ if ( $show_posts == 0 || $show_posts == undefined ) $show_posts = 10;
54
+
55
  //Check whether the Access Token is present and valid
56
  if ($access_token == '') {
57
  echo 'Please enter a valid Access Token. You can do this in the plugin settings (Settings > Custom Facebook Feed).<br /><br />';
102
  //If it isn't then create the post
103
 
104
  //Only create posts for the amount of posts specified
105
+ if ( $i == $show_posts ) break;
106
  $i++;
107
 
108
  //Start the container