Version Description
- Tweak: Added links to statuses which link to the Facebook page
- Tweak: Added classes to event date, location and description to allow custom styling
- Tweak: Removed 'Where' and 'When' text from events and made bold instead
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 1.4.7 |
Comparing to | |
See all releases |
Code changes from version 1.4.6 to 1.4.7
- README.txt +7 -2
- css/cff-style.css +8 -0
- custom-facebook-feed.php +19 -9
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.6
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -88,8 +88,13 @@ You can embed the feed directly into a template file by using the WordPress do_s
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
|
|
91 |
= 1.4.6 =
|
92 |
-
*
|
93 |
|
94 |
= 1.4.4 =
|
95 |
* New: Added more shortcode options
|
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.6
|
6 |
+
Stable tag: 1.4.7
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= 1.4.7 =
|
92 |
+
* Tweak: Added links to statuses which link to the Facebook page
|
93 |
+
* Tweak: Added classes to event date, location and description to allow custom styling
|
94 |
+
* Tweak: Removed 'Where' and 'When' text from events and made bold instead
|
95 |
+
|
96 |
= 1.4.6 =
|
97 |
+
* Fix: Fixed 'num' option in shortcode
|
98 |
|
99 |
= 1.4.4 =
|
100 |
* New: Added more shortcode options
|
css/cff-style.css
CHANGED
@@ -77,6 +77,14 @@
|
|
77 |
#cff .details p{
|
78 |
font-size: 14px;
|
79 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
/*****************/
|
81 |
/*** POST META ***/
|
82 |
/*****************/
|
77 |
#cff .details p{
|
78 |
font-size: 14px;
|
79 |
}
|
80 |
+
#cff .details .info{
|
81 |
+
padding: 10px 0 0 0;
|
82 |
+
line-height: 1.2;
|
83 |
+
}
|
84 |
+
#cff .details .where,
|
85 |
+
#cff .details .when{
|
86 |
+
font-weight: bold;
|
87 |
+
}
|
88 |
/*****************/
|
89 |
/*** POST META ***/
|
90 |
/*****************/
|
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.4.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
@@ -250,7 +250,13 @@ function display_cff($atts) {
|
|
250 |
//********************************//
|
251 |
//POST TEXT
|
252 |
$cff_post_text = '';
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
$cff_post_text .= '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
|
255 |
if (!empty($news->story)) {
|
256 |
$story_text = $news->story;
|
@@ -333,14 +339,14 @@ function display_cff($atts) {
|
|
333 |
}
|
334 |
//Show event details
|
335 |
if ($cff_show_event_details){
|
336 |
-
if (!empty($event_object->location)) $cff_event .= '<p ' . $cff_event_details_styles . '>
|
337 |
-
if (!empty($event_object->start_time)) $cff_event .= '<p ' . $cff_event_details_styles . '>
|
338 |
if (!empty($event_object->description)){
|
339 |
$description = $event_object->description;
|
340 |
if (!empty($body_limit)) {
|
341 |
if (strlen($description) > $body_limit) $description = substr($description, 0, $body_limit) . '...';
|
342 |
}
|
343 |
-
$cff_event .= '<p ' . $cff_event_details_styles . '>' . cff_make_clickable($description) . '</p>';
|
344 |
}
|
345 |
}
|
346 |
$cff_event .= '</div><!-- end .details -->';
|
@@ -350,17 +356,21 @@ function display_cff($atts) {
|
|
350 |
//LINK
|
351 |
//Display the link to the Facebook post or external link
|
352 |
$cff_link = '';
|
|
|
|
|
|
|
|
|
353 |
if (!empty($news->link)) {
|
354 |
$link = $news->link;
|
355 |
//Check whether it links to facebook or somewhere else
|
356 |
$facebook_str = 'facebook.com';
|
357 |
-
if(stripos($link, $facebook_str)
|
358 |
-
$link_text = 'View on Facebook';
|
359 |
-
} else {
|
360 |
$link_text = 'View Link';
|
361 |
}
|
362 |
-
$cff_link = '<div class="meta-wrap"><a class="cff-viewpost" href="' . $link . '" title="' . $link_text . '" ' . $target . ' ' . $cff_link_styles . '>' . $link_text . '</a></div><!-- end .meta-wrap -->';
|
363 |
}
|
|
|
|
|
|
|
364 |
//**************************//
|
365 |
//***CREATE THE POST HTML***//
|
366 |
//**************************//
|
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.4.7
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
250 |
//********************************//
|
251 |
//POST TEXT
|
252 |
$cff_post_text = '';
|
253 |
+
|
254 |
+
//Set the link
|
255 |
+
$link = $news->link;
|
256 |
+
//If there's no link provided then link to Facebook page
|
257 |
+
if (empty($news->link)) $link = 'http://facebook.com/' . $page_id;
|
258 |
+
|
259 |
+
if ($cff_title_link) $cff_post_text .= '<a href="'.$link.'" '.$target.'>';
|
260 |
$cff_post_text .= '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
|
261 |
if (!empty($news->story)) {
|
262 |
$story_text = $news->story;
|
339 |
}
|
340 |
//Show event details
|
341 |
if ($cff_show_event_details){
|
342 |
+
if (!empty($event_object->location)) $cff_event .= '<p class="where" ' . $cff_event_details_styles . '>' . $event_object->location . '</p>';
|
343 |
+
if (!empty($event_object->start_time)) $cff_event .= '<p class="when" ' . $cff_event_details_styles . '>' . date("F j, Y, g:i a", strtotime($event_object->start_time)) . '</p>';
|
344 |
if (!empty($event_object->description)){
|
345 |
$description = $event_object->description;
|
346 |
if (!empty($body_limit)) {
|
347 |
if (strlen($description) > $body_limit) $description = substr($description, 0, $body_limit) . '...';
|
348 |
}
|
349 |
+
$cff_event .= '<p class="info" ' . $cff_event_details_styles . '>' . cff_make_clickable($description) . '</p>';
|
350 |
}
|
351 |
}
|
352 |
$cff_event .= '</div><!-- end .details -->';
|
356 |
//LINK
|
357 |
//Display the link to the Facebook post or external link
|
358 |
$cff_link = '';
|
359 |
+
//Default link
|
360 |
+
$link = 'http://facebook.com/' . $page_id;
|
361 |
+
$link_text = 'View on Facebook';
|
362 |
+
//If there's an actual link provided
|
363 |
if (!empty($news->link)) {
|
364 |
$link = $news->link;
|
365 |
//Check whether it links to facebook or somewhere else
|
366 |
$facebook_str = 'facebook.com';
|
367 |
+
if(stripos($link, $facebook_str) == false) {
|
|
|
|
|
368 |
$link_text = 'View Link';
|
369 |
}
|
|
|
370 |
}
|
371 |
+
$cff_link = '<div class="meta-wrap"><a class="cff-viewpost" href="' . $link . '" title="' . $link_text . '" ' . $target . ' ' . $cff_link_styles . '>' . $link_text . '</a></div><!-- end .meta-wrap -->';
|
372 |
+
|
373 |
+
|
374 |
//**************************//
|
375 |
//***CREATE THE POST HTML***//
|
376 |
//**************************//
|