Custom Facebook Feed - Version 1.5.2

Version Description

  • Fix: Fixed JavaScript error in previous update
Download this release

Release Info

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

Code changes from version 1.5.1 to 1.5.2

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
3
  Tags: facebook, custom, customizable, feed, events, seo, search engine, responsive, mobile, shortcode, social, status
4
  Requires at least: 3.0
5
  Tested up to: 3.6.1
6
- Stable tag: 1.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -22,14 +22,14 @@ Display a **completely customizable**, **responsive** and **search engine crawla
22
  * Show **events** from your Facebook feed with name, date/time, location and description
23
  * Add your own **custom CSS**
24
  * Show and hide certain parts of each post
25
- * Choose to show the profile picture and name above each post
26
- * Select whether to display posts by just the page owner, or everyone
27
  * Control the width, height, padding and background color of your Facebook feed
28
  * Customize the size, weight and color of text
29
  * Select from a range of date formats or enter your own
30
- * Use your own custom link text
31
- * Use the shortcode options to style multiple feeds in completely different ways
32
- * Select the number of posts to display
33
  * Set a maximum character length for both the post title and body text
34
 
35
  To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options and more then [upgrade to the Pro version](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). Try out the [Pro demo](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
@@ -94,16 +94,19 @@ You can embed the feed directly into a template file by using the WordPress do_s
94
 
95
  == Changelog ==
96
 
 
 
 
97
  = 1.5.1 =
98
  * New: Added a 'See More' link to expand any text which is longer than the character limit defined
99
- * New: Choose to show posts by other people in your feed
100
- * New: Option to show the post author's profile picture and name above each post
101
  * New: Added options to customize and format the post date
102
- * New: Add your own text before and after the date and in place of the 'View on Facebook' and 'View Link' links
103
- * New: Specify the format of the Event date
104
  * Tweak: Default date format is less specific and better mimics Facebook's - credit Mark Bebbington
105
  * Tweak: Changed the layout of the Typography section to allow for the additional options
106
- * Fix: When a photo album is shared it now links to the album itself and not just the cover photo
107
  * Fix: Fixed issue with hyperlinks in post text which don't have a space before them not being converted to links
108
 
109
  = 1.4.8 =
3
  Tags: facebook, custom, customizable, feed, events, seo, search engine, responsive, mobile, shortcode, social, status
4
  Requires at least: 3.0
5
  Tested up to: 3.6.1
6
+ Stable tag: 1.5.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
22
  * Show **events** from your Facebook feed with name, date/time, location and description
23
  * Add your own **custom CSS**
24
  * Show and hide certain parts of each post
25
+ * Choose to show the Facebook profile picture and name above each post
26
+ * Select whether to display posts by just the page owner, or everyone who posts on your Facebook page
27
  * Control the width, height, padding and background color of your Facebook feed
28
  * Customize the size, weight and color of text
29
  * Select from a range of date formats or enter your own
30
+ * Use your own custom link text in place of the defaults
31
+ * Use the shortcode options to style multiple Facebook feeds in completely different ways
32
+ * Select the number of Facebook posts to display
33
  * Set a maximum character length for both the post title and body text
34
 
35
  To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options and more then [upgrade to the Pro version](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). Try out the [Pro demo](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
94
 
95
  == Changelog ==
96
 
97
+ = 1.5.2 =
98
+ * Fix: Fixed JavaScript error in previous update
99
+
100
  = 1.5.1 =
101
  * New: Added a 'See More' link to expand any text which is longer than the character limit defined
102
+ * New: Choose to show Facebook posts by other people in your feed
103
+ * New: Option to show the post author's Facebook profile picture and name above each post
104
  * New: Added options to customize and format the post date
105
+ * New: Add your own text before and after the date and in place of the 'View on Facebook' and 'View Link' text links
106
+ * New: Specify the format of the Facebook Event date
107
  * Tweak: Default date format is less specific and better mimics Facebook's - credit Mark Bebbington
108
  * Tweak: Changed the layout of the Typography section to allow for the additional options
109
+ * Fix: When a Facebook photo album is shared it now links to the album itself on Facebook and not just the cover photo
110
  * Fix: Fixed issue with hyperlinks in post text which don't have a space before them not being converted to links
111
 
112
  = 1.4.8 =
custom-facebook-feed-admin.php CHANGED
@@ -444,7 +444,7 @@ function cff_style_page() {
444
  <tbody>
445
  <h3><?php _e('Post Types'); ?></h3>
446
  <tr valign="top">
447
- <th scope="row"><?php _e('Show these types of posts:'); ?></th>
448
  <td>
449
  <input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled checked />
450
  <label for="cff_show_status_type">Statuses</label>
444
  <tbody>
445
  <h3><?php _e('Post Types'); ?></h3>
446
  <tr valign="top">
447
+ <th scope="row"><?php _e('Only show these types of posts:'); ?></th>
448
  <td>
449
  <input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled checked />
450
  <label for="cff_show_status_type">Statuses</label>
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.5.1
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
@@ -207,11 +207,7 @@ function display_cff($atts) {
207
 
208
  //Text limits
209
  $title_limit = $atts['textlength'];
210
- if(empty($title_limit)) $title_limit = 99999;
211
  $body_limit = $atts['desclength']; ?>
212
- <script type="text/javascript">
213
- var text_limit = <?php echo $title_limit ?>;
214
- </script>
215
  <?php //Assign the Access Token and Page ID variables
216
  $access_token = get_option('cff_access_token');
217
  $page_id = $atts['id'];
@@ -245,7 +241,7 @@ function display_cff($atts) {
245
 
246
  //***START FEED***
247
  //Create HTML
248
- $content = '<div id="cff" class="';
249
  if ( !empty($cff_feed_height) ) $content .= 'fixed-height ';
250
  $content .= '"' . $cff_feed_styles . '>';
251
  //Add like box to top of feed
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.5.2
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
207
 
208
  //Text limits
209
  $title_limit = $atts['textlength'];
 
210
  $body_limit = $atts['desclength']; ?>
 
 
 
211
  <?php //Assign the Access Token and Page ID variables
212
  $access_token = get_option('cff_access_token');
213
  $page_id = $atts['id'];
241
 
242
  //***START FEED***
243
  //Create HTML
244
+ $content = '<div id="cff" rel="'.$title_limit.'" class="';
245
  if ( !empty($cff_feed_height) ) $content .= 'fixed-height ';
246
  $content .= '"' . $cff_feed_styles . '>';
247
  //Add like box to top of feed
js/cff-scripts.js CHANGED
@@ -12,11 +12,15 @@ jQuery(document).ready(function() {
12
  jQuery('.cff-item').each(function(){
13
  var $self = jQuery(this),
14
  expanded = false,
15
- $post_text = $self.find('.cff-post-text span');
 
 
 
16
  //If the text is linked then use the text within the link
17
  if ( $post_text.find('a.cff-post-text-link').length ) $post_text = $self.find('.cff-post-text span a');
18
- var full_text = $post_text.html(),
19
- short_text = $post_text.html().substring(0,text_limit);
 
20
 
21
  //Cut the text based on limits set
22
  $post_text.html( short_text );
@@ -40,6 +44,4 @@ jQuery(document).ready(function() {
40
  });
41
  });
42
 
43
- console.log(text_limit);
44
-
45
  });
12
  jQuery('.cff-item').each(function(){
13
  var $self = jQuery(this),
14
  expanded = false,
15
+ $post_text = $self.find('.cff-post-text span'),
16
+ text_limit = jQuery('#cff').attr('rel');
17
+ if(text_limit == '' || text_limit == undefined) text_limit = 99999;
18
+
19
  //If the text is linked then use the text within the link
20
  if ( $post_text.find('a.cff-post-text-link').length ) $post_text = $self.find('.cff-post-text span a');
21
+ var full_text = $post_text.html();
22
+ if(full_text == undefined) full_text = '';
23
+ var short_text = full_text.substring(0,text_limit);
24
 
25
  //Cut the text based on limits set
26
  $post_text.html( short_text );
44
  });
45
  });
46
 
 
 
47
  });