Version Description
- Tweak: Moved the 'Show post author' option from the General settings tab to the Post Layout tab
- Tweak: Added the ability to show or hide the author to the 'include' shortcode option
- Fix: Added CSS box-sizing property to feed header so that padding doesn't increase its width
- Fix: Fixed showheader=false and headeroutside=false shortcode options
- Fix: Now allows users to enter their Facebook page URL as their Page ID
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 1.7.1 |
Comparing to | |
See all releases |
Code changes from version 1.7.0 to 1.7.1
- README.txt +26 -10
- css/cff-style.css +3 -0
- custom-facebook-feed-admin.php +9 -14
- custom-facebook-feed.php +56 -28
README.txt
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
=== Custom Facebook Feed ===
|
2 |
Contributors: smashballoon
|
3 |
-
Tags:
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.8.1
|
6 |
-
Stable tag: 1.7.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
9 |
|
10 |
The Custom Facebook Feed allows you to display a completely customizable Facebook feed of any public Facebook page or group on your website
|
11 |
|
@@ -38,11 +39,24 @@ Display a **completely customizable**, **responsive** and **search engine crawla
|
|
38 |
* Use the shortcode options to style multiple Facebook feeds in completely different ways
|
39 |
* Select the number of Facebook posts to display
|
40 |
* Set a maximum character length for both the text and descriptions of your Facebook posts
|
41 |
-
* Create a customizable header for your Custom Facebook Feed
|
42 |
* Localization/i18n support to allow every part of the feed to be displayed in your language
|
43 |
|
44 |
To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options, post filtering by type or #hashtag/string 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").
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
== Installation ==
|
47 |
|
48 |
1. Install the Custom Facebook Feed either via the WordPress plugin directory, or by uploading the files to your web server (in the `/wp-content/plugins/` directory).
|
@@ -79,11 +93,6 @@ An Access Token is required by Facebook in order to access their feeds. Don't w
|
|
79 |
|
80 |
You can set your default Facebook Page ID on the Custom Facebook Feed settings page within the WordPress admin, you can then define different page IDs in the shortcodes you use to show multiple feeds from different Facebook pages. Just use the id option in your shortcode like so: [custom-facebook-feed id=another_page_id]. You can use as many shortcodes as you like with as many different IDs as you like.
|
81 |
|
82 |
-
= Why isn't the feed from my group displaying? =
|
83 |
-
|
84 |
-
Firstly, check that your group is public and not a private group.
|
85 |
-
Secondly, be sure to check the 'Show posts by others on my page' option in the Custom Facebook Feed settings page.
|
86 |
-
|
87 |
= Can I display the feed from a personal Facebook profile? =
|
88 |
|
89 |
Due to Facebook's privacy policy you're not able to use the plugin to display all of your posts from a personal profile, only from a public page or group, as posts from a personal profile are protected for privacy reasons. You may have limited success in displaying certain posts from a personal profile but most posts are not able to be displayed.
|
@@ -94,11 +103,11 @@ Once you've done so, the plugin will be able to retrieve and display all of your
|
|
94 |
|
95 |
= Can I show photos and videos in my Custom Facebook feed? =
|
96 |
|
97 |
-
This free plugin only allows you to display text from your Facebook posts. To display photos and videos in your feed you need to upgrade to the Pro version of the plugin. Try out a demo of the Pro version on the [Custom Facebook Feed website](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo"), and find out more about the Pro version [here](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
|
98 |
|
99 |
= Can I show the comments, shares and likes associated with each Facebook post? =
|
100 |
|
101 |
-
|
102 |
|
103 |
= Is the content of my Custom Facebook Feed crawlable by search engines? =
|
104 |
|
@@ -122,6 +131,13 @@ You can embed your Facebook feed directly into a template file by using the Word
|
|
122 |
|
123 |
== Changelog ==
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
= 1.7.0 =
|
126 |
* New: Added ability to add a customizable header to your feed
|
127 |
* New: Added a Custom JavaScript section to allow you to add your own JS or jQuery functionality to the feed
|
1 |
=== Custom Facebook Feed ===
|
2 |
Contributors: smashballoon
|
3 |
+
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, custom, customizable, seo, responsive, mobile, social
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.8.1
|
6 |
+
Stable tag: 1.7.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H5XFD33R3FHMG
|
10 |
|
11 |
The Custom Facebook Feed allows you to display a completely customizable Facebook feed of any public Facebook page or group on your website
|
12 |
|
39 |
* Use the shortcode options to style multiple Facebook feeds in completely different ways
|
40 |
* Select the number of Facebook posts to display
|
41 |
* Set a maximum character length for both the text and descriptions of your Facebook posts
|
42 |
+
* Create a customizable header with a range of icons for your Custom Facebook Feed
|
43 |
* Localization/i18n support to allow every part of the feed to be displayed in your language
|
44 |
|
45 |
To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options, post filtering by type or #hashtag/string 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").
|
46 |
|
47 |
+
= Benefits =
|
48 |
+
|
49 |
+
* **Save time** by using the Custom Facebook Feed instead to generate dynamic, search engine crawlable content on your website
|
50 |
+
* **Increase social engagement** between you and your users, customers, fans or group members
|
51 |
+
* **Get more likes** by displaying your Facebook content directly on your site
|
52 |
+
* **Improve your SEO** as all of that quality keyword-rich Facebook content from posts and comments is directly embedded into your website
|
53 |
+
* Display your Facebook content your way to perfectly match your website's style
|
54 |
+
* The plugin is **updated regularly** with new features, bug-fixes and Facebook API changes
|
55 |
+
* Support is quick and effective
|
56 |
+
* We're dedicated to providing the **most customizable**, **robust** and **well supported** Facebook feed plugin in the world!
|
57 |
+
|
58 |
+
[View the reviews](http://wordpress.org/support/view/plugin-reviews/custom-facebook-feed) to see what other users are saying about the Custom Facebook Feed plugin.
|
59 |
+
|
60 |
== Installation ==
|
61 |
|
62 |
1. Install the Custom Facebook Feed either via the WordPress plugin directory, or by uploading the files to your web server (in the `/wp-content/plugins/` directory).
|
93 |
|
94 |
You can set your default Facebook Page ID on the Custom Facebook Feed settings page within the WordPress admin, you can then define different page IDs in the shortcodes you use to show multiple feeds from different Facebook pages. Just use the id option in your shortcode like so: [custom-facebook-feed id=another_page_id]. You can use as many shortcodes as you like with as many different IDs as you like.
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
= Can I display the feed from a personal Facebook profile? =
|
97 |
|
98 |
Due to Facebook's privacy policy you're not able to use the plugin to display all of your posts from a personal profile, only from a public page or group, as posts from a personal profile are protected for privacy reasons. You may have limited success in displaying certain posts from a personal profile but most posts are not able to be displayed.
|
103 |
|
104 |
= Can I show photos and videos in my Custom Facebook feed? =
|
105 |
|
106 |
+
This free plugin only allows you to display text from your Facebook posts. To display photos and videos in your feed you would need to upgrade to the Pro version of the plugin. Try out a demo of the Pro version on the [Custom Facebook Feed website](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo"), and find out more about the Pro version [here](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
|
107 |
|
108 |
= Can I show the comments, shares and likes associated with each Facebook post? =
|
109 |
|
110 |
+
This is a feature of the [Pro version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). To display comments, shares and likes you would need to upgrade from the free version to the Pro version.
|
111 |
|
112 |
= Is the content of my Custom Facebook Feed crawlable by search engines? =
|
113 |
|
131 |
|
132 |
== Changelog ==
|
133 |
|
134 |
+
= 1.7.1 =
|
135 |
+
* Tweak: Moved the 'Show post author' option from the General settings tab to the Post Layout tab
|
136 |
+
* Tweak: Added the ability to show or hide the author to the 'include' shortcode option
|
137 |
+
* Fix: Added CSS box-sizing property to feed header so that padding doesn't increase its width
|
138 |
+
* Fix: Fixed showheader=false and headeroutside=false shortcode options
|
139 |
+
* Fix: Now allows users to enter their Facebook page URL as their Page ID
|
140 |
+
|
141 |
= 1.7.0 =
|
142 |
* New: Added ability to add a customizable header to your feed
|
143 |
* New: Added a Custom JavaScript section to allow you to add your own JS or jQuery functionality to the feed
|
css/cff-style.css
CHANGED
@@ -26,6 +26,9 @@
|
|
26 |
width: 100%;
|
27 |
margin: 0 0 15px 0;
|
28 |
line-height: 1;
|
|
|
|
|
|
|
29 |
}
|
30 |
.cff-header .fa{
|
31 |
margin-right: 10px;
|
26 |
width: 100%;
|
27 |
margin: 0 0 15px 0;
|
28 |
line-height: 1;
|
29 |
+
-webkit-box-sizing: border-box;
|
30 |
+
-moz-box-sizing: border-box;
|
31 |
+
box-sizing: border-box;
|
32 |
}
|
33 |
.cff-header .fa{
|
34 |
margin-right: 10px;
|
custom-facebook-feed-admin.php
CHANGED
@@ -21,8 +21,8 @@ add_action('admin_menu', 'cff_menu');
|
|
21 |
function cff_styling_menu() {
|
22 |
add_submenu_page(
|
23 |
'cff-top',
|
24 |
-
'Layout & Style',
|
25 |
-
'Layout & Style',
|
26 |
'manage_options',
|
27 |
'cff-style',
|
28 |
'cff_style_page'
|
@@ -627,7 +627,6 @@ function cff_style_page() {
|
|
627 |
if (isset($_POST[ 'cff_feed_height' ]) ) $cff_feed_height = $_POST[ 'cff_feed_height' ];
|
628 |
if (isset($_POST[ 'cff_feed_padding' ]) ) $cff_feed_padding = $_POST[ 'cff_feed_padding' ];
|
629 |
if (isset($_POST[ 'cff_bg_color' ]) ) $cff_bg_color = $_POST[ 'cff_bg_color' ];
|
630 |
-
(isset($_POST[ 'cff_show_author' ]) ) ? $cff_show_author = $_POST[ 'cff_show_author' ] : $cff_show_author = '';
|
631 |
if (isset($_POST[ 'cff_class' ]) ) $cff_class = $_POST[ 'cff_class' ];
|
632 |
//Post types
|
633 |
if (isset($_POST[ 'cff_show_links_type' ]) ) $cff_show_links_type = $_POST[ 'cff_show_links_type' ];
|
@@ -640,7 +639,6 @@ function cff_style_page() {
|
|
640 |
$options[ 'cff_feed_height' ] = $cff_feed_height;
|
641 |
$options[ 'cff_feed_padding' ] = $cff_feed_padding;
|
642 |
$options[ 'cff_bg_color' ] = $cff_bg_color;
|
643 |
-
$options[ 'cff_show_author' ] = $cff_show_author;
|
644 |
$options[ 'cff_class' ] = $cff_class;
|
645 |
//Post types
|
646 |
$options[ 'cff_show_links_type' ] = $cff_show_links_type;
|
@@ -654,6 +652,7 @@ function cff_style_page() {
|
|
654 |
//Layout
|
655 |
if (isset($_POST[ 'cff_preset_layout' ]) ) $cff_preset_layout = $_POST[ 'cff_preset_layout' ];
|
656 |
//Include
|
|
|
657 |
(isset($_POST[ 'cff_show_text' ]) ) ? $cff_show_text = $_POST[ 'cff_show_text' ] : $cff_show_text = '';
|
658 |
(isset($_POST[ 'cff_show_desc' ]) ) ? $cff_show_desc = $_POST[ 'cff_show_desc' ] : $cff_show_desc = '';
|
659 |
(isset($_POST[ 'cff_show_shared_links' ]) ) ? $cff_show_shared_links = $_POST[ 'cff_show_shared_links' ] : $cff_show_shared_links = '';
|
@@ -666,6 +665,7 @@ function cff_style_page() {
|
|
666 |
//Layout
|
667 |
$options[ 'cff_preset_layout' ] = $cff_preset_layout;
|
668 |
//Include
|
|
|
669 |
$options[ 'cff_show_text' ] = $cff_show_text;
|
670 |
$options[ 'cff_show_desc' ] = $cff_show_desc;
|
671 |
$options[ 'cff_show_shared_links' ] = $cff_show_shared_links;
|
@@ -948,7 +948,7 @@ function cff_style_page() {
|
|
948 |
|
949 |
<div id="cff-admin" class="wrap">
|
950 |
<div id="header">
|
951 |
-
<h1><?php _e('Layout & Style'); ?></h1>
|
952 |
</div>
|
953 |
<form name="form1" method="post" action="">
|
954 |
<input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
|
@@ -996,15 +996,6 @@ function cff_style_page() {
|
|
996 |
<span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
|
997 |
</td>
|
998 |
</tr>
|
999 |
-
<tr valign="top">
|
1000 |
-
<th class="bump-left" scope="row"><label><?php _e('Show name and picture of author'); ?></label></th>
|
1001 |
-
<td>
|
1002 |
-
<input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
|
1003 |
-
<label for="cff_show_status_type">Yes</label>
|
1004 |
-
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This will show the thumbnail picture and name of the post author at the top of each post'); ?></i>
|
1005 |
-
|
1006 |
-
</td>
|
1007 |
-
</tr>
|
1008 |
<tr valign="top">
|
1009 |
<th class="bump-left" scope="row"><label><?php _e('Add CSS class to feed'); ?></label></th>
|
1010 |
<td>
|
@@ -1096,6 +1087,10 @@ function cff_style_page() {
|
|
1096 |
<th scope="row"><?php _e('Include the following in posts: <i style="font-size: 11px;">(when applicable)</i>'); ?>
|
1097 |
<br /><i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable all of these options'); ?></a></i></th>
|
1098 |
<td>
|
|
|
|
|
|
|
|
|
1099 |
<div>
|
1100 |
<input name="cff_show_text" type="checkbox" id="cff_show_text" <?php if($cff_show_text == true) echo "checked"; ?> />
|
1101 |
<label for="cff_show_text"><?php _e('Post text'); ?></label>
|
21 |
function cff_styling_menu() {
|
22 |
add_submenu_page(
|
23 |
'cff-top',
|
24 |
+
'Layout & Style',
|
25 |
+
'Layout & Style',
|
26 |
'manage_options',
|
27 |
'cff-style',
|
28 |
'cff_style_page'
|
627 |
if (isset($_POST[ 'cff_feed_height' ]) ) $cff_feed_height = $_POST[ 'cff_feed_height' ];
|
628 |
if (isset($_POST[ 'cff_feed_padding' ]) ) $cff_feed_padding = $_POST[ 'cff_feed_padding' ];
|
629 |
if (isset($_POST[ 'cff_bg_color' ]) ) $cff_bg_color = $_POST[ 'cff_bg_color' ];
|
|
|
630 |
if (isset($_POST[ 'cff_class' ]) ) $cff_class = $_POST[ 'cff_class' ];
|
631 |
//Post types
|
632 |
if (isset($_POST[ 'cff_show_links_type' ]) ) $cff_show_links_type = $_POST[ 'cff_show_links_type' ];
|
639 |
$options[ 'cff_feed_height' ] = $cff_feed_height;
|
640 |
$options[ 'cff_feed_padding' ] = $cff_feed_padding;
|
641 |
$options[ 'cff_bg_color' ] = $cff_bg_color;
|
|
|
642 |
$options[ 'cff_class' ] = $cff_class;
|
643 |
//Post types
|
644 |
$options[ 'cff_show_links_type' ] = $cff_show_links_type;
|
652 |
//Layout
|
653 |
if (isset($_POST[ 'cff_preset_layout' ]) ) $cff_preset_layout = $_POST[ 'cff_preset_layout' ];
|
654 |
//Include
|
655 |
+
(isset($_POST[ 'cff_show_author' ]) ) ? $cff_show_author = $_POST[ 'cff_show_author' ] : $cff_show_author = '';
|
656 |
(isset($_POST[ 'cff_show_text' ]) ) ? $cff_show_text = $_POST[ 'cff_show_text' ] : $cff_show_text = '';
|
657 |
(isset($_POST[ 'cff_show_desc' ]) ) ? $cff_show_desc = $_POST[ 'cff_show_desc' ] : $cff_show_desc = '';
|
658 |
(isset($_POST[ 'cff_show_shared_links' ]) ) ? $cff_show_shared_links = $_POST[ 'cff_show_shared_links' ] : $cff_show_shared_links = '';
|
665 |
//Layout
|
666 |
$options[ 'cff_preset_layout' ] = $cff_preset_layout;
|
667 |
//Include
|
668 |
+
$options[ 'cff_show_author' ] = $cff_show_author;
|
669 |
$options[ 'cff_show_text' ] = $cff_show_text;
|
670 |
$options[ 'cff_show_desc' ] = $cff_show_desc;
|
671 |
$options[ 'cff_show_shared_links' ] = $cff_show_shared_links;
|
948 |
|
949 |
<div id="cff-admin" class="wrap">
|
950 |
<div id="header">
|
951 |
+
<h1><?php _e('Layout & Style'); ?></h1>
|
952 |
</div>
|
953 |
<form name="form1" method="post" action="">
|
954 |
<input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
|
996 |
<span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
|
997 |
</td>
|
998 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
999 |
<tr valign="top">
|
1000 |
<th class="bump-left" scope="row"><label><?php _e('Add CSS class to feed'); ?></label></th>
|
1001 |
<td>
|
1087 |
<th scope="row"><?php _e('Include the following in posts: <i style="font-size: 11px;">(when applicable)</i>'); ?>
|
1088 |
<br /><i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable all of these options'); ?></a></i></th>
|
1089 |
<td>
|
1090 |
+
<div>
|
1091 |
+
<input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
|
1092 |
+
<label for="cff_show_author"><?php _e('Author name and avatar'); ?></label>
|
1093 |
+
</div>
|
1094 |
<div>
|
1095 |
<input name="cff_show_text" type="checkbox" id="cff_show_text" <?php if($cff_show_text == true) echo "checked"; ?> />
|
1096 |
<label for="cff_show_text"><?php _e('Post text'); ?></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.7.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
@@ -33,6 +33,7 @@ function display_cff($atts) {
|
|
33 |
$options = get_option('cff_style_settings');
|
34 |
//Create the types string to set as shortcode default
|
35 |
$include_string = '';
|
|
|
36 |
if($options[ 'cff_show_text' ]) $include_string .= 'text,';
|
37 |
if($options[ 'cff_show_desc' ]) $include_string .= 'desc,';
|
38 |
if($options[ 'cff_show_shared_links' ]) $include_string .= 'sharedlinks,';
|
@@ -59,7 +60,8 @@ function display_cff($atts) {
|
|
59 |
'height' => isset($options[ 'cff_feed_height' ]) ? $options[ 'cff_feed_height' ] : '',
|
60 |
'padding' => isset($options[ 'cff_feed_padding' ]) ? $options[ 'cff_feed_padding' ] : '',
|
61 |
'bgcolor' => isset($options[ 'cff_bg_color' ]) ? $options[ 'cff_bg_color' ] : '',
|
62 |
-
'showauthor' =>
|
|
|
63 |
'class' => isset($options[ 'cff_class' ]) ? $options[ 'cff_class' ] : '',
|
64 |
'layout' => isset($options[ 'cff_preset_layout' ]) ? $options[ 'cff_preset_layout' ] : '',
|
65 |
'include' => $include_string,
|
@@ -153,7 +155,7 @@ function display_cff($atts) {
|
|
153 |
$cff_feed_height = $atts[ 'height' ];
|
154 |
$cff_feed_padding = $atts[ 'padding' ];
|
155 |
$cff_bg_color = $atts[ 'bgcolor' ];
|
156 |
-
$cff_show_author = $atts[ '
|
157 |
$cff_cache_time = $atts[ 'cachetime' ];
|
158 |
$cff_locale = $atts[ 'locale' ];
|
159 |
if ( empty($cff_locale) || !isset($cff_locale) || $cff_locale == '' ) $cff_locale = 'en_US';
|
@@ -184,6 +186,7 @@ function display_cff($atts) {
|
|
184 |
/********** LAYOUT **********/
|
185 |
$cff_includes = $atts[ 'include' ];
|
186 |
//Look for non-plural version of string in the types string in case user specifies singular in shortcode
|
|
|
187 |
$cff_show_text = false;
|
188 |
$cff_show_desc = false;
|
189 |
$cff_show_shared_links = false;
|
@@ -194,6 +197,7 @@ function display_cff($atts) {
|
|
194 |
$cff_show_meta = false;
|
195 |
$cff_show_link = false;
|
196 |
$cff_show_like_box = false;
|
|
|
197 |
if ( stripos($cff_includes, 'text') !== false ) $cff_show_text = true;
|
198 |
if ( stripos($cff_includes, 'desc') !== false ) $cff_show_desc = true;
|
199 |
if ( stripos($cff_includes, 'sharedlink') !== false ) $cff_show_shared_links = true;
|
@@ -204,7 +208,14 @@ function display_cff($atts) {
|
|
204 |
if ( stripos($cff_includes, 'social') !== false ) $cff_show_meta = true;
|
205 |
if ( stripos($cff_includes, ',link') !== false ) $cff_show_link = true; //comma used to separate it from 'sharedlinks' - which also contains 'link' string
|
206 |
if ( stripos($cff_includes, 'like') !== false ) $cff_show_like_box = true;
|
|
|
207 |
$cff_preset_layout = 'thumb';
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
/********** META **********/
|
210 |
$cff_icon_style = $atts[ 'iconstyle' ];
|
@@ -372,6 +383,18 @@ function display_cff($atts) {
|
|
372 |
//Assign the Access Token and Page ID variables
|
373 |
$access_token = trim( get_option('cff_access_token') );
|
374 |
$page_id = trim( $atts['id'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
//Get show posts attribute. If not set then default to 25
|
376 |
$show_posts = $atts['num'];
|
377 |
if (empty($show_posts)) $show_posts = 25;
|
@@ -441,14 +464,18 @@ function display_cff($atts) {
|
|
441 |
$like_box = '<div class="cff-likebox';
|
442 |
if ($cff_like_box_outside) $like_box .= ' cff-outside';
|
443 |
$like_box .= ($cff_like_box_position == 'top') ? ' top' : ' bottom';
|
444 |
-
$like_box .= '" ' . $cff_likebox_styles . '><script src="
|
445 |
//Don't show like box if it's a group
|
446 |
if($cff_is_group) $like_box = '';
|
447 |
|
448 |
|
449 |
//Feed header
|
450 |
$cff_show_header = $atts['showheader'];
|
|
|
|
|
451 |
$cff_header_outside = $atts['headeroutside'];
|
|
|
|
|
452 |
$cff_header_text = $atts['headertext'];
|
453 |
$cff_header_icon = $atts['headericon'];
|
454 |
$cff_header_icon_color = $atts['headericoncolor'];
|
@@ -629,8 +656,8 @@ function display_cff($atts) {
|
|
629 |
}
|
630 |
|
631 |
//POST AUTHOR
|
632 |
-
$cff_author = '<a class="cff-author" href="
|
633 |
-
$cff_author .= '<img src="
|
634 |
$cff_author .= '<span class="cff-page-name">'.$news->from->name.'</span>';
|
635 |
$cff_author .= '</a>';
|
636 |
|
@@ -1281,34 +1308,35 @@ add_action( 'wp_head', 'cff_custom_css' );
|
|
1281 |
function cff_custom_css() {
|
1282 |
$options = get_option('cff_style_settings');
|
1283 |
isset($options[ 'cff_custom_css' ]) ? $cff_custom_css = $options[ 'cff_custom_css' ] : $cff_custom_css = '';
|
1284 |
-
|
1285 |
-
|
1286 |
-
echo
|
1287 |
-
echo
|
1288 |
-
echo "
|
1289 |
-
|
1290 |
-
echo
|
1291 |
-
echo
|
1292 |
-
echo
|
|
|
1293 |
}
|
1294 |
add_action( 'wp_footer', 'cff_js' );
|
1295 |
function cff_js() {
|
1296 |
$options = get_option('cff_style_settings');
|
1297 |
$cff_custom_js = isset($options[ 'cff_custom_js' ]) ? $options[ 'cff_custom_js' ] : '';
|
1298 |
|
1299 |
-
echo "\r\n";
|
1300 |
-
echo '<!-- Custom Facebook Feed JS -->';
|
1301 |
-
echo "\r\n";
|
1302 |
-
echo '<script type="text/javascript">';
|
1303 |
-
echo "\r\n";
|
1304 |
-
echo "jQuery( document ).ready(function($) {";
|
1305 |
-
echo "\r\n";
|
1306 |
-
echo stripslashes($cff_custom_js);
|
1307 |
-
echo "\r\n";
|
1308 |
-
echo "});";
|
1309 |
-
echo "\r\n";
|
1310 |
-
echo '</script>';
|
1311 |
-
echo "\r\n";
|
1312 |
}
|
1313 |
|
1314 |
//Comment out the line below to view errors
|
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.7.1
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
33 |
$options = get_option('cff_style_settings');
|
34 |
//Create the types string to set as shortcode default
|
35 |
$include_string = '';
|
36 |
+
if($options[ 'cff_show_author' ]) $include_string .= 'author,';
|
37 |
if($options[ 'cff_show_text' ]) $include_string .= 'text,';
|
38 |
if($options[ 'cff_show_desc' ]) $include_string .= 'desc,';
|
39 |
if($options[ 'cff_show_shared_links' ]) $include_string .= 'sharedlinks,';
|
60 |
'height' => isset($options[ 'cff_feed_height' ]) ? $options[ 'cff_feed_height' ] : '',
|
61 |
'padding' => isset($options[ 'cff_feed_padding' ]) ? $options[ 'cff_feed_padding' ] : '',
|
62 |
'bgcolor' => isset($options[ 'cff_bg_color' ]) ? $options[ 'cff_bg_color' ] : '',
|
63 |
+
'showauthor' => '',
|
64 |
+
'showauthornew' => isset($options[ 'cff_show_author' ]) ? $options[ 'cff_show_author' ] : '',
|
65 |
'class' => isset($options[ 'cff_class' ]) ? $options[ 'cff_class' ] : '',
|
66 |
'layout' => isset($options[ 'cff_preset_layout' ]) ? $options[ 'cff_preset_layout' ] : '',
|
67 |
'include' => $include_string,
|
155 |
$cff_feed_height = $atts[ 'height' ];
|
156 |
$cff_feed_padding = $atts[ 'padding' ];
|
157 |
$cff_bg_color = $atts[ 'bgcolor' ];
|
158 |
+
$cff_show_author = $atts[ 'showauthornew' ];
|
159 |
$cff_cache_time = $atts[ 'cachetime' ];
|
160 |
$cff_locale = $atts[ 'locale' ];
|
161 |
if ( empty($cff_locale) || !isset($cff_locale) || $cff_locale == '' ) $cff_locale = 'en_US';
|
186 |
/********** LAYOUT **********/
|
187 |
$cff_includes = $atts[ 'include' ];
|
188 |
//Look for non-plural version of string in the types string in case user specifies singular in shortcode
|
189 |
+
$cff_show_author = false;
|
190 |
$cff_show_text = false;
|
191 |
$cff_show_desc = false;
|
192 |
$cff_show_shared_links = false;
|
197 |
$cff_show_meta = false;
|
198 |
$cff_show_link = false;
|
199 |
$cff_show_like_box = false;
|
200 |
+
if ( stripos($cff_includes, 'author') !== false ) $cff_show_author = true;
|
201 |
if ( stripos($cff_includes, 'text') !== false ) $cff_show_text = true;
|
202 |
if ( stripos($cff_includes, 'desc') !== false ) $cff_show_desc = true;
|
203 |
if ( stripos($cff_includes, 'sharedlink') !== false ) $cff_show_shared_links = true;
|
208 |
if ( stripos($cff_includes, 'social') !== false ) $cff_show_meta = true;
|
209 |
if ( stripos($cff_includes, ',link') !== false ) $cff_show_link = true; //comma used to separate it from 'sharedlinks' - which also contains 'link' string
|
210 |
if ( stripos($cff_includes, 'like') !== false ) $cff_show_like_box = true;
|
211 |
+
//Set free version to thumb layout by default as layout option not available on settings page
|
212 |
$cff_preset_layout = 'thumb';
|
213 |
+
|
214 |
+
//If the old shortcode option 'showauthor' is being used then apply it
|
215 |
+
$cff_show_author_old = $atts[ 'showauthor' ];
|
216 |
+
if( $cff_show_author_old == 'false' ) $cff_show_author = false;
|
217 |
+
if( $cff_show_author_old == 'true' ) $cff_show_author = true;
|
218 |
+
|
219 |
|
220 |
/********** META **********/
|
221 |
$cff_icon_style = $atts[ 'iconstyle' ];
|
383 |
//Assign the Access Token and Page ID variables
|
384 |
$access_token = trim( get_option('cff_access_token') );
|
385 |
$page_id = trim( $atts['id'] );
|
386 |
+
|
387 |
+
//If user is retarded and pastes their full URL into the Page ID field then strip it out
|
388 |
+
$cff_facebook_string = 'facebook.com';
|
389 |
+
$cff_page_id_url_check = stripos($page_id, $cff_facebook_string);
|
390 |
+
|
391 |
+
if ( $cff_facebook_string ) {
|
392 |
+
//Remove trailing slash if exists
|
393 |
+
$page_id = preg_replace('{/$}', '', $page_id);
|
394 |
+
//Get last part of url
|
395 |
+
$page_id = substr( $page_id, strrpos( $page_id, '/' )+1 );
|
396 |
+
}
|
397 |
+
|
398 |
//Get show posts attribute. If not set then default to 25
|
399 |
$show_posts = $atts['num'];
|
400 |
if (empty($show_posts)) $show_posts = 25;
|
464 |
$like_box = '<div class="cff-likebox';
|
465 |
if ($cff_like_box_outside) $like_box .= ' cff-outside';
|
466 |
$like_box .= ($cff_like_box_position == 'top') ? ' top' : ' bottom';
|
467 |
+
$like_box .= '" ' . $cff_likebox_styles . '><script src="https://connect.facebook.net/' . $cff_locale . '/all.js#xfbml=1"></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 .'"></fb:like-box></div>';
|
468 |
//Don't show like box if it's a group
|
469 |
if($cff_is_group) $like_box = '';
|
470 |
|
471 |
|
472 |
//Feed header
|
473 |
$cff_show_header = $atts['showheader'];
|
474 |
+
($cff_show_header == 'true' || $cff_show_header == 'on') ? $cff_show_header = true : $cff_show_header = false;
|
475 |
+
|
476 |
$cff_header_outside = $atts['headeroutside'];
|
477 |
+
($cff_header_outside == 'true' || $cff_header_outside == 'on') ? $cff_header_outside = true : $cff_header_outside = false;
|
478 |
+
|
479 |
$cff_header_text = $atts['headertext'];
|
480 |
$cff_header_icon = $atts['headericon'];
|
481 |
$cff_header_icon_color = $atts['headericoncolor'];
|
656 |
}
|
657 |
|
658 |
//POST AUTHOR
|
659 |
+
$cff_author = '<a class="cff-author" href="https://facebook.com/' . $news->from->id . '" '.$target.' title="'.$news->from->name.' on Facebook">';
|
660 |
+
$cff_author .= '<img src="https://graph.facebook.com/' . $news->from->id . '/picture" width=50 height=50>';
|
661 |
$cff_author .= '<span class="cff-page-name">'.$news->from->name.'</span>';
|
662 |
$cff_author .= '</a>';
|
663 |
|
1308 |
function cff_custom_css() {
|
1309 |
$options = get_option('cff_style_settings');
|
1310 |
isset($options[ 'cff_custom_css' ]) ? $cff_custom_css = $options[ 'cff_custom_css' ] : $cff_custom_css = '';
|
1311 |
+
|
1312 |
+
if( !empty($cff_custom_css) ) echo "\r\n";
|
1313 |
+
if( !empty($cff_custom_css) ) echo '<!-- Custom Facebook Feed Custom CSS -->';
|
1314 |
+
if( !empty($cff_custom_css) ) echo "\r\n";
|
1315 |
+
if( !empty($cff_custom_css) ) echo '<style type="text/css">';
|
1316 |
+
if( !empty($cff_custom_css) ) echo "\r\n";
|
1317 |
+
if( !empty($cff_custom_css) ) echo stripslashes($cff_custom_css);
|
1318 |
+
if( !empty($cff_custom_css) ) echo "\r\n";
|
1319 |
+
if( !empty($cff_custom_css) ) echo '</style>';
|
1320 |
+
if( !empty($cff_custom_css) ) echo "\r\n";
|
1321 |
}
|
1322 |
add_action( 'wp_footer', 'cff_js' );
|
1323 |
function cff_js() {
|
1324 |
$options = get_option('cff_style_settings');
|
1325 |
$cff_custom_js = isset($options[ 'cff_custom_js' ]) ? $options[ 'cff_custom_js' ] : '';
|
1326 |
|
1327 |
+
if( !empty($cff_custom_js) ) echo "\r\n";
|
1328 |
+
if( !empty($cff_custom_js) ) echo '<!-- Custom Facebook Feed JS -->';
|
1329 |
+
if( !empty($cff_custom_js) ) echo "\r\n";
|
1330 |
+
if( !empty($cff_custom_js) ) echo '<script type="text/javascript">';
|
1331 |
+
if( !empty($cff_custom_js) ) echo "\r\n";
|
1332 |
+
if( !empty($cff_custom_js) ) echo "jQuery( document ).ready(function($) {";
|
1333 |
+
if( !empty($cff_custom_js) ) echo "\r\n";
|
1334 |
+
if( !empty($cff_custom_js) ) echo stripslashes($cff_custom_js);
|
1335 |
+
if( !empty($cff_custom_js) ) echo "\r\n";
|
1336 |
+
if( !empty($cff_custom_js) ) echo "});";
|
1337 |
+
if( !empty($cff_custom_js) ) echo "\r\n";
|
1338 |
+
if( !empty($cff_custom_js) ) echo '</script>';
|
1339 |
+
if( !empty($cff_custom_js) ) echo "\r\n";
|
1340 |
}
|
1341 |
|
1342 |
//Comment out the line below to view errors
|