Custom Facebook Feed - Version 1.4.3

Version Description

  • Minor tweaks
Download this release

Release Info

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

Code changes from version 1.4.2 to 1.4.3

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.4.2
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -11,29 +11,23 @@ The Custom Facebook Feed allows you to display a customizable Facebook feed of a
11
12
== Description ==
13
14
- Display a **customizable**, **responsive** and **search engine crawlable** version of your Facebook feed on your WordPress site.
15
16
= Features =
17
18
- * **Completely Customizable** - By default the feed will adopt the style of your website, but can be completely customized to look however you like!
19
- * Feed content is **crawlable by search engines** adding SEO value to your site* - other Facebook plugins embed the feed using iframes which are not crawlable
20
* Completely **responsive** and mobile optimized - layout looks great on any screen size and in any container width
21
- * Select which parts of each post to display or hide
22
* Control the width, height, padding and background color of your feed
23
* Customize the size, weight and color of text
24
* Select the number of posts to display
25
- * Add your own custom CSS
26
- * Set a maximum length for both the post title and body text
27
- * Use the shortcode to display multiple feeds in a page, post or widget anywhere on your site
28
29
- To display photos, videos, the number of likes, shares and comments for each post, and for multiple layout options then [upgrade to the PRO version](http://smashballoon.com/custom-facebook-feed/wordpress-plugin/ "Custom Facebook Feed PRO"). Try out the [PRO demo](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
30
-
31
- = Why do I need this plugin? =
32
- **Small Business Owners & Marketers**
33
- Don't have time to blog? Save time by using the Custom Facebook Feed instead to generate dynamic, search engine crawlable content on your website. All of that quality Facebook content from posts and comments is directly embedded into your website.
34
-
35
- **Designers & Developers**
36
- Integrate Facebook feeds into your websites that completely match the look and feel of the site. No more uncustomizable iframes.
37
38
== Installation ==
39
@@ -61,29 +55,42 @@ An easy way to determine whether your page is set to public is to sign out of yo
61
62
An Access Token is required by Facebook in order to access their feeds. Don't worry, it's easy to get one. Just follow the step-by-step instructions [here](http://smashballoon.com/custom-facebook-feed/access-token/ "Getting an Access Token"). to get yours. Your Access Token will never expire.
63
64
= Can I show photos and videos in my feed? =
65
66
- This plugin only allows you to display textual updates from your feed. 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/wordpress-plugin/ "Custom Facebook Feed PRO").
67
68
= Can I show the comments associated with each post? =
69
70
- For this feature please upgrade to the [PRO version of the plugin](http://smashballoon.com/custom-facebook-feed/wordpress-plugin/ "Custom Facebook Feed PRO").
71
72
= Is the content of my feed crawlable by search engines? =
73
74
It sure is. Unlike other Facebook plugins which use iframes to embed your feed into your page once it's loaded, the Custom Facebook Feed uses PHP to embed your feed content directly into your page. This adds dynamic, search engine crawlable content to your site.
75
76
== Screenshots ==
77
78
- 1. By default the feed inherits your theme's default styles and is completely responsive.
79
- 2. Completely customize the way your feed looks to perfectly match your site.
80
- 3. Configuring the plugin
81
- 4. Use the styling options to customize your feed
82
- 5. It's super easy to display your feed in any page or post
83
- 6. Add the shortcode to a widget
84
85
== Changelog ==
86
87
= 1.4.2 =
88
* New: Add your own custom CSS to allow for even deeper customization
89
* New: Optionally link your post text to the Facebook post
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.4.3
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
11
12
== Description ==
13
14
+ Display a **customizable**, **responsive** and **search engine crawlable** version of your Facebook feed on your website. Completely match the look and feel of the site!
15
16
= Features =
17
18
+ * **Completely Customizable** - By default the feed will adopt the style of your website, but can be completely customized to look however you like - with tons of styling options and custom CSS!
19
+ * Feed content is **crawlable by search engines** adding SEO value to your site - other Facebook plugins embed the feed using iframes which are not crawlable
20
* Completely **responsive** and mobile optimized - layout looks great on any screen size and in any container width
21
+ * Display **feeds from multiple Facebook pages** and use the shortcode to embed them into a page, post or widget anywhere on your site
22
+ * Show **events** with name, date/time, location and description
23
+ * Add your own **custom CSS**
24
+ * Show and hide certain parts of each post
25
* Control the width, height, padding and background color of your feed
26
* Customize the size, weight and color of text
27
* Select the number of posts to display
28
+ * Set a maximum character length for both the post title and body text
29
30
+ To display photos, videos, the number of likes, shares and comments for each post, multiple layout options and more then [upgrade to the PRO version](http://smashballoon.com/custom-facebook-feed/wordpress-plugin/ "Custom Facebook Feed PRO"). Try out the [PRO demo](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
31
32
== Installation ==
33
55
56
An Access Token is required by Facebook in order to access their feeds. Don't worry, it's easy to get one. Just follow the step-by-step instructions [here](http://smashballoon.com/custom-facebook-feed/access-token/ "Getting an Access Token"). to get yours. Your Access Token will never expire.
57
58
+ = Can I display feeds from multiple Facebook pages? =
59
+
60
+ Yep. You set your default Facebook page ID in the plugin's settings but then you can 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: id=another_page_id.
61
+
62
= Can I show photos and videos in my feed? =
63
64
+ This plugin only allows you to display textual updates from your feed. 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").
65
66
= Can I show the comments associated with each post? =
67
68
+ For this feature please upgrade to the [PRO version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed PRO").
69
70
= Is the content of my feed crawlable by search engines? =
71
72
It sure is. Unlike other Facebook plugins which use iframes to embed your feed into your page once it's loaded, the Custom Facebook Feed uses PHP to embed your feed content directly into your page. This adds dynamic, search engine crawlable content to your site.
73
74
+ = How do I embed the feed directly into a WordPress page template? =
75
+
76
+ You can embed the feed directly into a template file by using the WordPress do_shortcode function: do_shortcode('[custom-facebook-feed]'');
77
+
78
== Screenshots ==
79
80
+ 1. By default the feed inherits your theme's default styles and is completely responsive
81
+ 2. Completely customize the way your feed looks to perfectly match your site
82
+ 3. Use custom CSS to customize every part of the feed
83
+ 4. Display events
84
+ 5. Configuring the plugin
85
+ 6. Use the styling options to customize your feed
86
+ 7. It's super easy to display your feed in any page or post
87
+ 8. Add the shortcode to a widget
88
89
== Changelog ==
90
91
+ = 1.4.3 =
92
+ * Minor tweaks
93
+
94
= 1.4.2 =
95
* New: Add your own custom CSS to allow for even deeper customization
96
* New: Optionally link your post text to the Facebook post
custom-facebook-feed-admin.php CHANGED
@@ -30,42 +30,6 @@ function cff_styling_menu() {
30
}
31
add_action('admin_menu', 'cff_styling_menu');
32
33
- //Add system info page
34
- function cff_system_menu() {
35
- add_submenu_page(
36
- 'cff-top',
37
- 'System Info',
38
- 'System Info',
39
- 'manage_options',
40
- 'cff-system',
41
- 'cff_system_info'
42
- );
43
- }
44
- add_action('admin_menu', 'cff_system_menu');
45
-
46
- //Create Settings page
47
- function cff_system_info() { ?>
48
-
49
- <div class="wrap">
50
- <h2><?php _e('System Info'); ?></h2>
51
-
52
- <p>PHP Version: <b><?php echo PHP_VERSION . "\n"; ?></b></p>
53
- <p>Web Server Info: <b><?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?></b></p>
54
-
55
- <p>PHP allow_url_fopen: <b><?php echo ini_get( 'allow_url_fopen' ) ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>"; ?></b></p>
56
- <p>PHP cURL: <b><?php echo is_callable('curl_init') ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
57
- <p>JSON: <b><?php echo function_exists("json_decode") ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
58
- </div>
59
-
60
- <?php
61
- } //End cff_system_info
62
-
63
- // function cff_register_option() {
64
- // // creates our settings in the options table
65
- // register_setting('cff_license', 'cff_license_key', 'cff_sanitize_license' );
66
- // }
67
- // add_action('admin_init', 'cff_register_option');
68
-
69
//Create Settings page
70
function cff_settings_page() {
71
//Declare variables for fields
@@ -126,15 +90,28 @@ function cff_settings_page() {
126
<hr />
127
<h4>Displaying your Feed</h4>
128
<p>Copy and paste this shortcode directly into the page, post or widget where you'd like the feed to show up:</p>
129
- <input type="text" value="[custom-facebook-feed]" size="23" />
130
<p>You can override the settings above directly in the shortcode like so:</p>
131
- <p>[custom-facebook-feed <b>id=Your_Page_ID show=3 titlelength=100 bodylength=150</b>]</p>
132
<br />
133
<hr />
134
<br />
135
<p><a href="http://smashballoon.com/custom-facebook-feed/support" target="_blank">Plugin Support</a> - Smash Balloon is committed to making this plugin better. Please let us know if you have had any issues when using this plugin so that we can continue to improve it!</p>
136
<br /><br />
137
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
138
<?php
139
} //End Settings_Page
140
//Create Style page
@@ -178,7 +155,6 @@ function cff_style_page() {
178
'cff_like_box_position' => 'bottom',
179
'cff_bg_color' => '',
180
'cff_likebox_bg_color' => '',
181
-
182
//New
183
'cff_custom_css' => '',
184
'cff_title_link' => false,
@@ -227,7 +203,6 @@ function cff_style_page() {
227
$cff_open_links = $options[ 'cff_open_links' ];
228
$cff_bg_color = $options[ 'cff_bg_color' ];
229
$cff_likebox_bg_color = $options[ 'cff_likebox_bg_color' ];
230
-
231
//New
232
$cff_custom_css = $options[ 'cff_custom_css' ];
233
$cff_title_link = $options[ 'cff_title_link' ];
@@ -295,7 +270,6 @@ function cff_style_page() {
295
$cff_event_title_link = $_POST[ 'cff_event_title_link' ];
296
$cff_sep_color = $_POST[ 'cff_sep_color' ];
297
$cff_sep_size = $_POST[ 'cff_sep_size' ];
298
-
299
//Update the options in the array in the database
300
//Include
301
$options[ 'cff_show_text' ] = $cff_show_text;
@@ -340,7 +314,6 @@ function cff_style_page() {
340
$options[ 'cff_event_title_link' ] = $cff_event_title_link;
341
$options[ 'cff_sep_color' ] = $cff_sep_color;
342
$options[ 'cff_sep_size' ] = $cff_sep_size;
343
-
344
//Update the array
345
update_option( 'cff_style_settings', $options );
346
// Put an settings updated message on the screen
@@ -387,13 +360,10 @@ function cff_style_page() {
387
</tr>
388
</tbody>
389
</table>
390
-
391
<br />
392
<hr />
393
-
394
<table class="form-table">
395
<tbody>
396
-
397
<h3><?php _e('Post Types'); ?></h3>
398
<tr valign="top">
399
<th scope="row"><?php _e('Show these types of posts:'); ?></th>
@@ -417,7 +387,6 @@ function cff_style_page() {
417
<i style="color: #666; font-size: 11px; margin-left: 5px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank">Upgrade to Pro</a></i>
418
</td>
419
</tr>
420
-
421
</tbody>
422
</table>
423
<br />
@@ -445,7 +414,7 @@ function cff_style_page() {
445
</div>
446
<div>
447
<input type="checkbox" name="cff_show_desc" id="cff_show_desc" <?php if($cff_show_desc == true) echo 'checked="checked"' ?> />
448
- <label for="cff_show_desc">Video/link description</label>
449
</div>
450
<div>
451
<input type="checkbox" name="cff_show_date" id="cff_show_date" <?php if($cff_show_date == true) echo 'checked="checked"' ?> />
@@ -746,7 +715,6 @@ function cff_style_page() {
746
747
<br />
748
<hr />
749
-
750
<h3><?php _e('Custom CSS'); ?></h3>
751
<table class="form-table">
752
<tbody>
@@ -764,7 +732,6 @@ function cff_style_page() {
764
</table>
765
<br />
766
<hr />
767
-
768
<h3><?php _e('Misc'); ?></h3>
769
<table class="form-table">
770
<tbody>
@@ -805,7 +772,6 @@ function cff_style_page() {
805
<span>Eg. ED9A00</span>&nbsp;&nbsp;<a href="http://www.colorpicker.com/" target="_blank">Color Picker</a>
806
</td>
807
</tr>
808
-
809
<tr><td><b style="font-size: 14px;"><?php _e('Separating Line'); ?></b></td></tr>
810
<tr valign="top">
811
<th scope="row"><?php _e('Separating Line Color'); ?></th>
@@ -821,7 +787,6 @@ function cff_style_page() {
821
<input name="cff_sep_size" type="text" value="<?php esc_attr_e( $cff_sep_size ); ?>" size="1" /><span>px</span> <i style="color: #666; font-size: 11px; margin-left: 5px;">(Leave empty to hide)</i>
822
</td>
823
</tr>
824
-
825
</tbody>
826
</table>
827
<?php submit_button(); ?>
30
}
31
add_action('admin_menu', 'cff_styling_menu');
32
33
//Create Settings page
34
function cff_settings_page() {
35
//Declare variables for fields
90
<hr />
91
<h4>Displaying your Feed</h4>
92
<p>Copy and paste this shortcode directly into the page, post or widget where you'd like the feed to show up:</p>
93
+ <input type="text" value="[custom-facebook-feed]" size="22" readonly="readonly" onclick="this.focus();this.select()" id="system-info-textarea" name="edd-sysinfo" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)." />
94
+
95
<p>You can override the settings above directly in the shortcode like so:</p>
96
+
97
+ <p>[custom-facebook-feed <b><span style='color: green;'>id=Your_Page_ID</span> <span style='color: purple;'>show=3</span> <span style='color: blue;'>height=500px</span></b>]</p>
98
+
99
+ <p><a href="http://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank">Click here</a> for a full list of shortcode options <i style="color: #666; font-size: 11px;">(Please note that some of them will only work with the Pro version of the plugin)</i></p>
100
<br />
101
<hr />
102
<br />
103
<p><a href="http://smashballoon.com/custom-facebook-feed/support" target="_blank">Plugin Support</a> - Smash Balloon is committed to making this plugin better. Please let us know if you have had any issues when using this plugin so that we can continue to improve it!</p>
104
<br /><br />
105
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
106
+
107
+ <div class="wrap">
108
+ <h2><?php _e('System Info'); ?></h2>
109
+ <p>PHP Version: <b><?php echo PHP_VERSION . "\n"; ?></b></p>
110
+ <p>Web Server Info: <b><?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?></b></p>
111
+ <p>PHP allow_url_fopen: <b><?php echo ini_get( 'allow_url_fopen' ) ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>"; ?></b></p>
112
+ <p>PHP cURL: <b><?php echo is_callable('curl_init') ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
113
+ <p>JSON: <b><?php echo function_exists("json_decode") ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
114
+ </div>
115
<?php
116
} //End Settings_Page
117
//Create Style page
155
'cff_like_box_position' => 'bottom',
156
'cff_bg_color' => '',
157
'cff_likebox_bg_color' => '',
158
//New
159
'cff_custom_css' => '',
160
'cff_title_link' => false,
203
$cff_open_links = $options[ 'cff_open_links' ];
204
$cff_bg_color = $options[ 'cff_bg_color' ];
205
$cff_likebox_bg_color = $options[ 'cff_likebox_bg_color' ];
206
//New
207
$cff_custom_css = $options[ 'cff_custom_css' ];
208
$cff_title_link = $options[ 'cff_title_link' ];
270
$cff_event_title_link = $_POST[ 'cff_event_title_link' ];
271
$cff_sep_color = $_POST[ 'cff_sep_color' ];
272
$cff_sep_size = $_POST[ 'cff_sep_size' ];
273
//Update the options in the array in the database
274
//Include
275
$options[ 'cff_show_text' ] = $cff_show_text;
314
$options[ 'cff_event_title_link' ] = $cff_event_title_link;
315
$options[ 'cff_sep_color' ] = $cff_sep_color;
316
$options[ 'cff_sep_size' ] = $cff_sep_size;
317
//Update the array
318
update_option( 'cff_style_settings', $options );
319
// Put an settings updated message on the screen
360
</tr>
361
</tbody>
362
</table>
363
<br />
364
<hr />
365
<table class="form-table">
366
<tbody>
367
<h3><?php _e('Post Types'); ?></h3>
368
<tr valign="top">
369
<th scope="row"><?php _e('Show these types of posts:'); ?></th>
387
<i style="color: #666; font-size: 11px; margin-left: 5px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank">Upgrade to Pro</a></i>
388
</td>
389
</tr>
390
</tbody>
391
</table>
392
<br />
414
</div>
415
<div>
416
<input type="checkbox" name="cff_show_desc" id="cff_show_desc" <?php if($cff_show_desc == true) echo 'checked="checked"' ?> />
417
+ <label for="cff_show_desc">Link description</label>
418
</div>
419
<div>
420
<input type="checkbox" name="cff_show_date" id="cff_show_date" <?php if($cff_show_date == true) echo 'checked="checked"' ?> />
715
716
<br />
717
<hr />
718
<h3><?php _e('Custom CSS'); ?></h3>
719
<table class="form-table">
720
<tbody>
732
</table>
733
<br />
734
<hr />
735
<h3><?php _e('Misc'); ?></h3>
736
<table class="form-table">
737
<tbody>
772
<span>Eg. ED9A00</span>&nbsp;&nbsp;<a href="http://www.colorpicker.com/" target="_blank">Color Picker</a>
773
</td>
774
</tr>
775
<tr><td><b style="font-size: 14px;"><?php _e('Separating Line'); ?></b></td></tr>
776
<tr valign="top">
777
<th scope="row"><?php _e('Separating Line Color'); ?></th>
787
<input name="cff_sep_size" type="text" value="<?php esc_attr_e( $cff_sep_size ); ?>" size="1" /><span>px</span> <i style="color: #666; font-size: 11px; margin-left: 5px;">(Leave empty to hide)</i>
788
</td>
789
</tr>
790
</tbody>
791
</table>
792
<?php submit_button(); ?>
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.2
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
@@ -70,7 +70,6 @@ function display_cff($atts) {
70
if ( !empty($cff_title_color) ) $cff_title_styles .= 'color:#' . $cff_title_color . ';';
71
$cff_title_styles .= '"';
72
$cff_title_link = $options[ 'cff_title_link' ];
73
-
74
//Description
75
$cff_body_size = $options[ 'cff_body_size' ];
76
$cff_body_weight = $options[ 'cff_body_weight' ];
@@ -126,18 +125,15 @@ function display_cff($atts) {
126
$cff_likebox_styles = 'style="';
127
if ( !empty($cff_likebox_bg_color) ) $cff_likebox_styles .= 'background-color:#' . $cff_likebox_bg_color . '; margin-left: 0; ';
128
$cff_likebox_styles .= '"';
129
-
130
//Separating Line
131
$cff_sep_color = $options[ 'cff_sep_color' ];
132
if (empty($cff_sep_color)) $cff_sep_color = 'ddd';
133
$cff_sep_size = $options[ 'cff_sep_size' ];
134
if (empty($cff_sep_size)) $cff_sep_size = 0;
135
-
136
//CFF item styles
137
$cff_item_styles = 'style="';
138
$cff_item_styles .= 'border-bottom: ' . $cff_sep_size . 'px solid #' . $cff_sep_color . '; ';
139
$cff_item_styles .= '"';
140
-
141
142
//Pass in shortcode attrbutes
143
$atts = shortcode_atts(
@@ -179,7 +175,6 @@ function display_cff($atts) {
179
$content = '<div id="cff" class="';
180
if ( !empty($cff_feed_height) ) $content .= 'fixed-height ';
181
$content .= '"' . $cff_feed_styles . '>';
182
-
183
//Add like box to top of feed
184
if ($cff_like_box_position == 'top' && $cff_show_like_box) $content .= $like_box;
185
//Limit var
@@ -226,8 +221,6 @@ function display_cff($atts) {
226
}
227
$cff_post_text .= '</' . $cff_title_format . '>';
228
if ($cff_title_link) $cff_post_text .= '</a>';
229
-
230
-
231
//DESCRIPTION
232
$cff_description = '';
233
if (!empty($news->description)) {
@@ -320,7 +313,6 @@ function display_cff($atts) {
320
$content .= '<div class="cff-item ';
321
if ($news->type == 'link') $content .= 'link-item';
322
$content .= '" ' . $cff_item_styles . '>';
323
-
324
//POST TEXT
325
if($cff_show_text) $content .= $cff_post_text;
326
//DESCRIPTION
@@ -477,9 +469,7 @@ function cff_activate() {
477
$options[ 'cff_show_event_details' ] = true;
478
$options[ 'cff_show_link' ] = true;
479
$options[ 'cff_show_like_box' ] = true;
480
-
481
$options[ 'cff_sep_size' ] = '1';
482
-
483
update_option( 'cff_style_settings', $options );
484
}
485
register_activation_hook( __FILE__, 'cff_activate' );
@@ -496,13 +486,10 @@ function cff_uninstall()
496
delete_option('cff_style_settings');
497
}
498
register_uninstall_hook( __FILE__, 'cff_uninstall' );
499
-
500
-
501
add_action( 'wp_head', 'cff_custom_css' );
502
function cff_custom_css() {
503
$options = get_option('cff_style_settings');
504
$cff_custom_css = $options[ 'cff_custom_css' ];
505
-
506
echo '<!-- Custom Facebook Feed Custom CSS -->';
507
echo "\r\n";
508
echo '<style type="text/css">';
@@ -512,8 +499,6 @@ function cff_custom_css() {
512
echo '</style>';
513
echo "\r\n";
514
}
515
-
516
-
517
//Comment out the line below to view errors
518
error_reporting(0);
519
?>
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.3
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
70
if ( !empty($cff_title_color) ) $cff_title_styles .= 'color:#' . $cff_title_color . ';';
71
$cff_title_styles .= '"';
72
$cff_title_link = $options[ 'cff_title_link' ];
73
//Description
74
$cff_body_size = $options[ 'cff_body_size' ];
75
$cff_body_weight = $options[ 'cff_body_weight' ];
125
$cff_likebox_styles = 'style="';
126
if ( !empty($cff_likebox_bg_color) ) $cff_likebox_styles .= 'background-color:#' . $cff_likebox_bg_color . '; margin-left: 0; ';
127
$cff_likebox_styles .= '"';
128
//Separating Line
129
$cff_sep_color = $options[ 'cff_sep_color' ];
130
if (empty($cff_sep_color)) $cff_sep_color = 'ddd';
131
$cff_sep_size = $options[ 'cff_sep_size' ];
132
if (empty($cff_sep_size)) $cff_sep_size = 0;
133
//CFF item styles
134
$cff_item_styles = 'style="';
135
$cff_item_styles .= 'border-bottom: ' . $cff_sep_size . 'px solid #' . $cff_sep_color . '; ';
136
$cff_item_styles .= '"';
137
138
//Pass in shortcode attrbutes
139
$atts = shortcode_atts(
175
$content = '<div id="cff" class="';
176
if ( !empty($cff_feed_height) ) $content .= 'fixed-height ';
177
$content .= '"' . $cff_feed_styles . '>';
178
//Add like box to top of feed
179
if ($cff_like_box_position == 'top' && $cff_show_like_box) $content .= $like_box;
180
//Limit var
221
}
222
$cff_post_text .= '</' . $cff_title_format . '>';
223
if ($cff_title_link) $cff_post_text .= '</a>';
224
//DESCRIPTION
225
$cff_description = '';
226
if (!empty($news->description)) {
313
$content .= '<div class="cff-item ';
314
if ($news->type == 'link') $content .= 'link-item';
315
$content .= '" ' . $cff_item_styles . '>';
316
//POST TEXT
317
if($cff_show_text) $content .= $cff_post_text;
318
//DESCRIPTION
469
$options[ 'cff_show_event_details' ] = true;
470
$options[ 'cff_show_link' ] = true;
471
$options[ 'cff_show_like_box' ] = true;
472
$options[ 'cff_sep_size' ] = '1';
473
update_option( 'cff_style_settings', $options );
474
}
475
register_activation_hook( __FILE__, 'cff_activate' );
486
delete_option('cff_style_settings');
487
}
488
register_uninstall_hook( __FILE__, 'cff_uninstall' );
489
add_action( 'wp_head', 'cff_custom_css' );
490
function cff_custom_css() {
491
$options = get_option('cff_style_settings');
492
$cff_custom_css = $options[ 'cff_custom_css' ];
493
echo '<!-- Custom Facebook Feed Custom CSS -->';
494
echo "\r\n";
495
echo '<style type="text/css">';
499
echo '</style>';
500
echo "\r\n";
501
}
502
//Comment out the line below to view errors
503
error_reporting(0);
504
?>