Custom Facebook Feed - Version 1.9.0

Version Description

  • New: Added the ability to change the text size and color of the post author
  • New: Define the format, size and color of shared link titles
  • New: You can now define the color of the links in your post text, descriptions and events
  • Tweak: Moved the Feed Header options to the Typography page
  • Tweak: Moved the Ajax setting to the Misc page
  • Tweak: Now removes any query strings attached to the Page ID
  • Fix: Fixed an issue with HTML characters not rendering correctly when linking the post text
  • Fix: Fixed an issue with some themes causing the clear element to prevent links being clickable
  • Fix: Some minor bug fixes
Download this release

Release Info

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

Code changes from version 1.8.2.3 to 1.9.0

README.txt CHANGED
@@ -3,10 +3,9 @@ Contributors: smashballoon
3
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook Like box, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social
4
Requires at least: 3.0
5
Tested up to: 3.8.1
6
- Stable tag: 1.8.2.3
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
@@ -29,11 +28,13 @@ Display a **completely customizable**, **responsive** and **search engine crawla
29
* Show **events** from your Facebook feed with name, date/time, location and description
30
* Add your own **custom CSS**
31
* **Caching** means that your Facebook posts load lightning fast. Set your own caching time - check for new posts on Facebook every few seconds, minutes, hours or days. You decide.
32
* Show and hide certain parts of each Facebook post
33
- * Choose to show the Facebook profile picture and name above each post
34
* Display Facebook posts by just the page owner, everyone who posts on your Facebook page, or only other people
35
* Control the width, height, padding and background color of your Facebook feed
36
* Customize the size, weight and color of text
37
* Select from a range of date formats or enter your own
38
* Use your own custom link text in place of the defaults
39
* Use the shortcode options to style multiple Facebook feeds in completely different ways
@@ -85,10 +86,6 @@ If your Facebook page has any restrictions on it (age, for example) then it mean
85
86
An easy way to determine whether your Facebook page is set to public is to sign out of your Facebook account and try to visit your page. If Facebook forces you to sign in to view your page then it isn't public. You can change your Facebook page to public in your Facebook page settings simply by removing any age or location restrictions you have on it ([screenshot](http://smashballoon.com/wp-content/uploads/2013/06/facebook-page-restrictions.png)), which will then allow the Custom Facebook Feed plugin to access and display your feed.
87
88
- = What's an Access Token and why do I need one? =
89
-
90
- 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.
91
-
92
= Can I display feeds from multiple Facebook pages or groups? =
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.
@@ -150,7 +147,7 @@ We understand that sometimes you need help, have issues or just have questions.
150
151
**For step-by-step instructions and screenshots on how to get a Facebook Access Token just follow the [Facebook Access Token instructions](http://smashballoon.com/custom-facebook-feed/access-token/ "Facebook Access Token instructions") on the Smash Balloon website.**
152
153
- In order to use the Custom Facebook Feed Plugin you will need to obtain an Access Token from Facebook. Don't worry though, this is really easy to do. Just follow the steps below:
154
155
**1)** Go to [developers.facebook.com](http://developers.facebook.com "Facebook developers website") and click on Log In in the top right. Log in using your personal Facebook credentials.
156
@@ -273,6 +270,17 @@ Credit [iMarketing Factory](http://www.imarketingfactory.com/facebook/ "The Impo
273
274
== Changelog ==
275
276
= 1.8.2.3 =
277
* New: Now supports Facebook tags - creates links when using the @ symbol to tag other people or Facebook pages in your posts
278
* Tweak: Changed the method used for link replacement in posts
3
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook Like box, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social
4
Requires at least: 3.0
5
Tested up to: 3.8.1
6
+ Stable tag: 1.9.0
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
28
* Show **events** from your Facebook feed with name, date/time, location and description
29
* Add your own **custom CSS**
30
* **Caching** means that your Facebook posts load lightning fast. Set your own caching time - check for new posts on Facebook every few seconds, minutes, hours or days. You decide.
31
+ * Super **simple to set up**. Just enter your Facebook page ID and you're done.
32
* Show and hide certain parts of each Facebook post
33
+ * Show or hide the Facebook profile picture and name of the author above each post
34
* Display Facebook posts by just the page owner, everyone who posts on your Facebook page, or only other people
35
* Control the width, height, padding and background color of your Facebook feed
36
* Customize the size, weight and color of text
37
+ * Supports Facebook tags - creates links when using the @ symbol to tag people in your Facebook posts
38
* Select from a range of date formats or enter your own
39
* Use your own custom link text in place of the defaults
40
* Use the shortcode options to style multiple Facebook feeds in completely different ways
86
87
An easy way to determine whether your Facebook page is set to public is to sign out of your Facebook account and try to visit your page. If Facebook forces you to sign in to view your page then it isn't public. You can change your Facebook page to public in your Facebook page settings simply by removing any age or location restrictions you have on it ([screenshot](http://smashballoon.com/wp-content/uploads/2013/06/facebook-page-restrictions.png)), which will then allow the Custom Facebook Feed plugin to access and display your feed.
88
89
= Can I display feeds from multiple Facebook pages or groups? =
90
91
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.
147
148
**For step-by-step instructions and screenshots on how to get a Facebook Access Token just follow the [Facebook Access Token instructions](http://smashballoon.com/custom-facebook-feed/access-token/ "Facebook Access Token instructions") on the Smash Balloon website.**
149
150
+ You no longer need your own Access Token to use the Custom Facebook Feed Plugin, but if you'd like to use your own then you will need to obtain one from Facebook. Don't worry though, this is really easy to do. Just follow the steps below:
151
152
**1)** Go to [developers.facebook.com](http://developers.facebook.com "Facebook developers website") and click on Log In in the top right. Log in using your personal Facebook credentials.
153
270
271
== Changelog ==
272
273
+ = 1.9.0 =
274
+ * New: Added the ability to change the text size and color of the post author
275
+ * New: Define the format, size and color of shared link titles
276
+ * New: You can now define the color of the links in your post text, descriptions and events
277
+ * Tweak: Moved the Feed Header options to the Typography page
278
+ * Tweak: Moved the Ajax setting to the Misc page
279
+ * Tweak: Now removes any query strings attached to the Page ID
280
+ * Fix: Fixed an issue with HTML characters not rendering correctly when linking the post text
281
+ * Fix: Fixed an issue with some themes causing the clear element to prevent links being clickable
282
+ * Fix: Some minor bug fixes
283
+
284
= 1.8.2.3 =
285
* New: Now supports Facebook tags - creates links when using the @ symbol to tag other people or Facebook pages in your posts
286
* Tweak: Changed the method used for link replacement in posts
css/cff-style.css CHANGED
@@ -42,6 +42,10 @@
42
}
43
/* Links */
44
#cff a {
45
text-decoration: underline;
46
}
47
#cff .cff-post-text-link{
@@ -126,6 +130,16 @@
126
max-width: 100%;
127
}
128
/*Link text*/
129
#cff .cff-text-link{
130
float: left;
131
clear: none;
@@ -221,6 +235,8 @@
221
.cff-clear {
222
display: inline-block;
223
display: block;
224
}
225
/*********************/
226
/*** STYLE OPTIONS ***/
42
}
43
/* Links */
44
#cff a {
45
+ text-decoration: none;
46
+ }
47
+ #cff a:hover,
48
+ #cff a:focus {
49
text-decoration: underline;
50
}
51
#cff .cff-post-text-link{
130
max-width: 100%;
131
}
132
/*Link text*/
133
+ #cff .cff-link-title{
134
+ float: left;
135
+ clear: both;
136
+ width: 100%;
137
+ display: block;
138
+ font-weight: bold;
139
+ }
140
+ #cff p.cff-link-title{
141
+ margin: 0;
142
+ }
143
#cff .cff-text-link{
144
float: left;
145
clear: none;
235
.cff-clear {
236
display: inline-block;
237
display: block;
238
+ /* Needs to be position static to override themes which set it to be relative*/
239
+ position: static;
240
}
241
/*********************/
242
/*** STYLE OPTIONS ***/
custom-facebook-feed-admin.php CHANGED
@@ -44,7 +44,6 @@ function cff_settings_page() {
44
$cff_cache_time = 'cff_cache_time';
45
$cff_cache_time_unit = 'cff_cache_time_unit';
46
$cff_locale = 'cff_locale';
47
- $cff_ajax = 'cff_ajax';
48
// Read in existing option value from database
49
$access_token_val = get_option( $access_token );
50
$page_id_val = get_option( $page_id );
@@ -67,7 +66,6 @@ function cff_settings_page() {
67
$cff_cache_time_val = $_POST[ $cff_cache_time ];
68
$cff_cache_time_unit_val = $_POST[ $cff_cache_time_unit ];
69
$cff_locale_val = $_POST[ $cff_locale ];
70
- $cff_ajax_val = $_POST[ $cff_ajax ];
71
// Save the posted value in the database
72
update_option( $access_token, $access_token_val );
73
update_option( $page_id, $page_id_val );
@@ -78,7 +76,6 @@ function cff_settings_page() {
78
update_option( $cff_cache_time, $cff_cache_time_val );
79
update_option( $cff_cache_time_unit, $cff_cache_time_unit_val );
80
update_option( $cff_locale, $cff_locale_val );
81
- update_option( $cff_ajax, $cff_ajax_val );
82
83
//Delete the transient for the main page ID
84
delete_transient( 'cff_posts_json_' .$page_id_val );
@@ -129,26 +126,9 @@ function cff_settings_page() {
129
<table class="form-table">
130
<tbody>
131
<tr valign="top">
132
- <th scope="row"><?php _e('Access Token'); ?></th>
133
<td>
134
- <input name="cff_access_token" id="cff_access_token" type="text" value="<?php esc_attr_e( $access_token_val ); ?>" size="60" />
135
- <!--<a href="#" id="verify-token" class="button-secondary"><?php _e('Verify Access Token'); ?></a>-->
136
- &nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("How do I get an Access Token?"); ?></a>
137
- <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123|ABC2fvp5h9tJe4-5-AbC123.</i>
138
-
139
- <div class="cff-notice cff-profile-error cff-access-token">
140
- <?php _e("<p>This doesn't appear to be an Access Token. Please be sure that you didn't enter your App Secret instead of your Access Token.<br />Your App ID and App Secret are used to obtain your Access Token; simply paste them into the fields in the last step of the <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>Access Token instructions</a> and click '<b>Get my Access Token</b>'.</p>"); ?>
141
- </div>
142
-
143
- <div class="cff-tooltip cff-more-info">
144
- <?php _e("<p>In order to use the plugin, Facebook requires you to obtain an access token to verify that you're authorized to access their data. Don't worry though, this is really easy to do. Just follow these <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>step-by-step instructions</a>.</p><p><b>Already have an App ID and App Secret?</b> Simply paste them into the fields in the last step of the <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>Access Token instructions</a> and click '<b>Get my Access Token</b>'.</p>"); ?>
145
- </div>
146
- </td>
147
- </tr>
148
- <tr valign="top">
149
- <th scope="row"><?php _e('Facebook Page ID (or slug)'); ?></th>
150
- <td>
151
- <input name="cff_page_id" id="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val ); ?>" size="60" />
152
&nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?'); ?></a>
153
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
154
<div class="cff-tooltip cff-more-info">
@@ -161,6 +141,25 @@ function cff_settings_page() {
161
</td>
162
</tr>
163
164
<tr valign="top" class="cff-page-type">
165
<th scope="row"><?php _e('Is this a page, group or profile?'); ?></th>
166
<td>
@@ -303,16 +302,6 @@ function cff_settings_page() {
303
<i style="color: #666; font-size: 11px;"><?php _e('Select a language'); ?></i>
304
</td>
305
</tr>
306
-
307
- <tr>
308
- <th><label for="cff_ajax" class="bump-left"><?php _e('Loading the feed via Ajax?'); ?></label></th>
309
- <td>
310
- <input name="cff_ajax" type="checkbox" id="cff_ajax" <?php if($cff_ajax_val == true) echo "checked"; ?> />
311
- <label for="cff_ajax"><?php _e('Yes'); ?></label>
312
- <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
313
- <p class="cff-tooltip cff-more-info"><?php _e('Some modern WordPress themes use Ajax to load content into the page after it has loaded. If your theme uses Ajax to load the Custom Facebook Feed content into the page then check this box. If you are not sure then please check with the theme author.'); ?></p>
314
- </td>
315
- </tr>
316
317
</tbody>
318
</table>
@@ -365,7 +354,11 @@ function cff_settings_page() {
365
<button class="button secondary-button" id="cff-api-test">Test connection to Facebook API</button>
366
367
<div id="cff-api-test-result">
368
- <?php $posts_json = cff_fetchUrl("https://graph.facebook.com/".get_option( $page_id )."/feed?access_token=".get_option( $access_token )."&limit=1"); ?>
369
<textarea readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."><?php echo $posts_json; ?></textarea>
370
</div>
371
@@ -408,9 +401,14 @@ function cff_style_page() {
408
'cff_title_size' => 'inherit',
409
'cff_title_weight' => 'inherit',
410
'cff_title_color' => '',
411
'cff_body_size' => 'inherit',
412
'cff_body_weight' => 'inherit',
413
'cff_body_color' => '',
414
//Event title
415
'cff_event_title_format' => 'p',
416
'cff_event_title_size' => 'inherit',
@@ -427,6 +425,7 @@ function cff_style_page() {
427
'cff_event_details_size' => 'inherit',
428
'cff_event_details_weight' => 'inherit',
429
'cff_event_details_color' => '',
430
//Date
431
'cff_date_position' => 'below',
432
'cff_date_size' => 'inherit',
@@ -444,7 +443,7 @@ function cff_style_page() {
444
'cff_link_color' => '',
445
'cff_facebook_link_text' => 'View on Facebook',
446
'cff_view_link_text' => 'View Link',
447
- 'cff_link_to_timeline' => false,
448
//Meta
449
'cff_icon_style' => 'light',
450
'cff_meta_text_color' => '',
@@ -474,14 +473,14 @@ function cff_style_page() {
474
'cff_title_link' => false,
475
'cff_post_tags' => true,
476
'cff_event_title_link' => false,
477
- 'cff_video_action' => 'file',
478
'cff_sep_color' => '',
479
'cff_sep_size' => '1',
480
481
//Feed Header
482
'cff_show_header' => '',
483
'cff_header_outside' => false,
484
- 'cff_header_text' => '',
485
'cff_header_bg_color' => '',
486
'cff_header_padding' => '',
487
'cff_header_text_size' => '',
@@ -491,6 +490,10 @@ function cff_style_page() {
491
'cff_header_icon_color' => '',
492
'cff_header_icon_size' => '28',
493
494
//Translate - general
495
'cff_see_more_text' => 'See More',
496
'cff_see_less_text' => 'See Less',
@@ -546,9 +549,14 @@ function cff_style_page() {
546
$cff_title_size = $options[ 'cff_title_size' ];
547
$cff_title_weight = $options[ 'cff_title_weight' ];
548
$cff_title_color = $options[ 'cff_title_color' ];
549
$cff_body_size = $options[ 'cff_body_size' ];
550
$cff_body_weight = $options[ 'cff_body_weight' ];
551
$cff_body_color = $options[ 'cff_body_color' ];
552
//Event title
553
$cff_event_title_format = $options[ 'cff_event_title_format' ];
554
$cff_event_title_size = $options[ 'cff_event_title_size' ];
@@ -565,6 +573,7 @@ function cff_style_page() {
565
$cff_event_details_size = $options[ 'cff_event_details_size' ];
566
$cff_event_details_weight = $options[ 'cff_event_details_weight' ];
567
$cff_event_details_color = $options[ 'cff_event_details_color' ];
568
//Date
569
$cff_date_position = $options[ 'cff_date_position' ];
570
$cff_date_size = $options[ 'cff_date_size' ];
@@ -640,6 +649,10 @@ function cff_style_page() {
640
$cff_header_icon_color = $options[ 'cff_header_icon_color' ];
641
$cff_header_icon_size = $options[ 'cff_header_icon_size' ];
642
643
//New
644
$cff_custom_css = $options[ 'cff_custom_css' ];
645
$cff_custom_js = $options[ 'cff_custom_js' ];
@@ -656,6 +669,11 @@ function cff_style_page() {
656
// Read in existing option value from database
657
$cff_title_length_val = get_option( $cff_title_length );
658
$cff_body_length_val = get_option( $cff_body_length );
659
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
660
if( isset($_POST[ $style_hidden_field_name ]) && $_POST[ $style_hidden_field_name ] == 'Y' ) {
661
//Update the General options
@@ -719,16 +737,42 @@ function cff_style_page() {
719
//Character limits
720
if (isset($_POST[ 'cff_title_length' ]) ) $cff_title_length_val = $_POST[ $cff_title_length ];
721
if (isset($_POST[ 'cff_body_length' ]) ) $cff_body_length_val = $_POST[ $cff_body_length ];
722
//Typography
723
if (isset($_POST[ 'cff_title_format' ]) ) $cff_title_format = $_POST[ 'cff_title_format' ];
724
if (isset($_POST[ 'cff_title_size' ]) ) $cff_title_size = $_POST[ 'cff_title_size' ];
725
if (isset($_POST[ 'cff_title_weight' ]) ) $cff_title_weight = $_POST[ 'cff_title_weight' ];
726
if (isset($_POST[ 'cff_title_color' ]) ) $cff_title_color = $_POST[ 'cff_title_color' ];
727
(isset($_POST[ 'cff_title_link' ]) ) ? $cff_title_link = $_POST[ 'cff_title_link' ] : $cff_title_link = '';
728
(isset($_POST[ 'cff_post_tags' ]) ) ? $cff_post_tags = $_POST[ 'cff_post_tags' ] : $cff_post_tags = '';
729
$cff_body_size = $_POST[ 'cff_body_size' ];
730
if (isset($_POST[ 'cff_body_weight' ]) ) $cff_body_weight = $_POST[ 'cff_body_weight' ];
731
if (isset($_POST[ 'cff_body_color' ]) ) $cff_body_color = $_POST[ 'cff_body_color' ];
732
//Event title
733
if (isset($_POST[ 'cff_event_title_format' ]) ) $cff_event_title_format = $_POST[ 'cff_event_title_format' ];
734
if (isset($_POST[ 'cff_event_title_size' ]) ) $cff_event_title_size = $_POST[ 'cff_event_title_size' ];
@@ -746,6 +790,7 @@ function cff_style_page() {
746
if (isset($_POST[ 'cff_event_details_size' ]) ) $cff_event_details_size = $_POST[ 'cff_event_details_size' ];
747
if (isset($_POST[ 'cff_event_details_weight' ]) ) $cff_event_details_weight = $_POST[ 'cff_event_details_weight' ];
748
if (isset($_POST[ 'cff_event_details_color' ]) ) $cff_event_details_color = $_POST[ 'cff_event_details_color' ];
749
//Date
750
if (isset($_POST[ 'cff_date_position' ]) ) $cff_date_position = $_POST[ 'cff_date_position' ];
751
if (isset($_POST[ 'cff_date_size' ]) ) $cff_date_size = $_POST[ 'cff_date_size' ];
@@ -781,19 +826,40 @@ function cff_style_page() {
781
if (isset($_POST[ 'cff_facebook_link_text' ]) ) $cff_facebook_link_text = $_POST[ 'cff_facebook_link_text' ];
782
if (isset($_POST[ 'cff_view_link_text' ]) ) $cff_view_link_text = $_POST[ 'cff_view_link_text' ];
783
if (isset($_POST[ 'cff_link_to_timeline' ]) ) $cff_link_to_timeline = $_POST[ 'cff_link_to_timeline' ];
784
//Character limits
785
update_option( $cff_title_length, $cff_title_length_val );
786
update_option( $cff_body_length, $cff_body_length_val );
787
//Typography
788
$options[ 'cff_title_format' ] = $cff_title_format;
789
$options[ 'cff_title_size' ] = $cff_title_size;
790
$options[ 'cff_title_weight' ] = $cff_title_weight;
791
$options[ 'cff_title_color' ] = $cff_title_color;
792
$options[ 'cff_title_link' ] = $cff_title_link;
793
$options[ 'cff_post_tags' ] = $cff_post_tags;
794
$options[ 'cff_body_size' ] = $cff_body_size;
795
$options[ 'cff_body_weight' ] = $cff_body_weight;
796
$options[ 'cff_body_color' ] = $cff_body_color;
797
//Event title
798
$options[ 'cff_event_title_format' ] = $cff_event_title_format;
799
$options[ 'cff_event_title_size' ] = $cff_event_title_size;
@@ -811,6 +877,7 @@ function cff_style_page() {
811
$options[ 'cff_event_details_size' ] = $cff_event_details_size;
812
$options[ 'cff_event_details_weight' ] = $cff_event_details_weight;
813
$options[ 'cff_event_details_color' ] = $cff_event_details_color;
814
//Date
815
$options[ 'cff_date_position' ] = $cff_date_position;
816
$options[ 'cff_date_size' ] = $cff_date_size;
@@ -869,24 +936,14 @@ function cff_style_page() {
869
(isset($_POST[ 'cff_like_box_faces' ])) ? $cff_like_box_faces = $_POST[ 'cff_like_box_faces' ] : $cff_like_box_faces = '';
870
(isset($_POST[ 'cff_like_box_border' ])) ? $cff_like_box_border = $_POST[ 'cff_like_box_border' ] : $cff_like_box_border = '';
871
872
- //Page Header
873
- (isset($_POST[ 'cff_show_header' ])) ? $cff_show_header = $_POST[ 'cff_show_header' ] : $cff_show_header = '';
874
- (isset($_POST[ 'cff_header_outside' ])) ? $cff_header_outside = $_POST[ 'cff_header_outside' ] : $cff_header_outside = '';
875
- if (isset($_POST[ 'cff_header_text' ])) $cff_header_text = $_POST[ 'cff_header_text' ];
876
- if (isset($_POST[ 'cff_header_bg_color' ])) $cff_header_bg_color = $_POST[ 'cff_header_bg_color' ];
877
- if (isset($_POST[ 'cff_header_padding' ])) $cff_header_padding = $_POST[ 'cff_header_padding' ];
878
- if (isset($_POST[ 'cff_header_text_size' ])) $cff_header_text_size = $_POST[ 'cff_header_text_size' ];
879
- if (isset($_POST[ 'cff_header_text_weight' ])) $cff_header_text_weight = $_POST[ 'cff_header_text_weight' ];
880
- if (isset($_POST[ 'cff_header_text_color' ])) $cff_header_text_color = $_POST[ 'cff_header_text_color' ];
881
- if (isset($_POST[ 'cff_header_icon' ])) $cff_header_icon = $_POST[ 'cff_header_icon' ];
882
- if (isset($_POST[ 'cff_header_icon_color' ])) $cff_header_icon_color = $_POST[ 'cff_header_icon_color' ];
883
- if (isset($_POST[ 'cff_header_icon_size' ])) $cff_header_icon_size = $_POST[ 'cff_header_icon_size' ];
884
-
885
if (isset($_POST[ 'cff_video_height' ])) $cff_video_height = $_POST[ 'cff_video_height' ];
886
if (isset($_POST[ 'cff_video_action' ])) $cff_video_action = $_POST[ 'cff_video_action' ];
887
if (isset($_POST[ 'cff_sep_color' ])) $cff_sep_color = $_POST[ 'cff_sep_color' ];
888
if (isset($_POST[ 'cff_sep_size' ])) $cff_sep_size = $_POST[ 'cff_sep_size' ];
889
if (isset($_POST[ 'cff_open_links' ])) $cff_open_links = $_POST[ 'cff_open_links' ];
890
//Meta
891
$options[ 'cff_icon_style' ] = $cff_icon_style;
892
$options[ 'cff_meta_text_color' ] = $cff_meta_text_color;
@@ -906,25 +963,14 @@ function cff_style_page() {
906
$options[ 'cff_likebox_width' ] = $cff_likebox_width;
907
$options[ 'cff_like_box_faces' ] = $cff_like_box_faces;
908
$options[ 'cff_like_box_border' ] = $cff_like_box_border;
909
-
910
- //Page Header
911
- $options[ 'cff_show_header' ] = $cff_show_header;
912
- $options[ 'cff_header_outside' ] = $cff_header_outside;
913
- $options[ 'cff_header_text' ] = $cff_header_text;
914
- $options[ 'cff_header_bg_color' ] = $cff_header_bg_color;
915
- $options[ 'cff_header_padding' ] = $cff_header_padding;
916
- $options[ 'cff_header_text_size' ] = $cff_header_text_size;
917
- $options[ 'cff_header_text_weight' ] = $cff_header_text_weight;
918
- $options[ 'cff_header_text_color' ] = $cff_header_text_color;
919
- $options[ 'cff_header_icon' ] = $cff_header_icon;
920
- $options[ 'cff_header_icon_color' ] = $cff_header_icon_color;
921
- $options[ 'cff_header_icon_size' ] = $cff_header_icon_size;
922
923
$options[ 'cff_video_height' ] = $cff_video_height;
924
$options[ 'cff_video_action' ] = $cff_video_action;
925
$options[ 'cff_sep_color' ] = $cff_sep_color;
926
$options[ 'cff_sep_size' ] = $cff_sep_size;
927
$options[ 'cff_open_links' ] = $cff_open_links;
928
}
929
//Update the Custom Text / Translate options
930
if( isset($_POST[ $style_custom_text_hidden_field_name ]) && $_POST[ $style_custom_text_hidden_field_name ] == 'Y' ) {
@@ -988,7 +1034,7 @@ function cff_style_page() {
988
989
<div id="cff-admin" class="wrap">
990
<div id="header">
991
- <h1><?php _e('Layout &amp; Style'); ?></h1>
992
</div>
993
<form name="form1" method="post" action="">
994
<input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
@@ -1072,6 +1118,10 @@ function cff_style_page() {
1072
<input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled checked />
1073
<label for="cff_show_links_type"><?php _e('Links'); ?></label>
1074
</div>
1075
</td>
1076
</tr>
1077
</tbody>
@@ -1174,38 +1224,211 @@ function cff_style_page() {
1174
<?php if( $active_tab == 'typography' ) { //Start Typography tab ?>
1175
<input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
1176
<br />
1177
- <h3><?php _e('Typography'); ?></h3>
1178
<p><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('"Inherit" means that the text will inherit the styles from your theme.'); ?></i></p>
1179
<div id="poststuff" class="metabox-holder">
1180
<div class="meta-box-sortables ui-sortable">
1181
- <div id="adminform" class="postbox" style="display: block;">
1182
<div class="handlediv" title="Click to toggle"><br></div>
1183
- <h3 class="hndle"><span><?php _e('Text Character Limits'); ?></span></h3>
1184
<div class="inside">
1185
<table class="form-table">
1186
<tbody>
1187
<tr valign="top">
1188
- <th scope="row"><label class="bump-left"><?php _e('Maximum Post Text Length'); ?></label></th>
1189
<td>
1190
- <input name="cff_title_length" type="text" value="<?php esc_attr_e( $cff_title_length_val ); ?>" size="4" /> <span><?php _e('Characters.'); ?></span> <span>Eg. 200</span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('If the post text exceeds this length then a "See More" button will be added. Leave empty to set no maximum length.'); ?></i>
1191
</td>
1192
</tr>
1193
<tr valign="top">
1194
- <th scope="row"><label class="bump-left"><?php _e('Maximum Description Length'); ?></label></th>
1195
<td>
1196
- <input name="cff_body_length" type="text" value="<?php esc_attr_e( $cff_body_length_val ); ?>" size="4" /> <span><?php _e('Characters.'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Leave empty to set no maximum length'); ?></i>
1197
</td>
1198
</tr>
1199
</tbody>
1200
</table>
1201
</div>
1202
</div>
1203
<div id="adminform" class="postbox" style="display: block;">
1204
<div class="handlediv" title="Click to toggle"><br></div>
1205
<h3 class="hndle"><span><?php _e('Post Text'); ?></span></h3>
1206
<div class="inside">
1207
<table class="form-table">
1208
<tbody>
1209
<tr>
1210
<th><label for="cff_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
1211
<td>
@@ -1226,6 +1449,7 @@ function cff_style_page() {
1226
<option value="10" <?php if($cff_title_size == "10") echo 'selected="selected"' ?> >10px</option>
1227
<option value="11" <?php if($cff_title_size == "11") echo 'selected="selected"' ?> >11px</option>
1228
<option value="12" <?php if($cff_title_size == "12") echo 'selected="selected"' ?> >12px</option>
1229
<option value="14" <?php if($cff_title_size == "14") echo 'selected="selected"' ?> >14px</option>
1230
<option value="16" <?php if($cff_title_size == "16") echo 'selected="selected"' ?> >16px</option>
1231
<option value="18" <?php if($cff_title_size == "18") echo 'selected="selected"' ?> >18px</option>
@@ -1236,7 +1460,7 @@ function cff_style_page() {
1236
<option value="36" <?php if($cff_title_size == "36") echo 'selected="selected"' ?> >36px</option>
1237
<option value="42" <?php if($cff_title_size == "42") echo 'selected="selected"' ?> >42px</option>
1238
<option value="48" <?php if($cff_title_size == "48") echo 'selected="selected"' ?> >48px</option>
1239
- <option value="60" <?php if($cff_title_size == "54") echo 'selected="selected"' ?> >54px</option>
1240
<option value="60" <?php if($cff_title_size == "60") echo 'selected="selected"' ?> >60px</option>
1241
</select>
1242
</td>
@@ -1258,16 +1482,22 @@ function cff_style_page() {
1258
</td>
1259
</tr>
1260
<tr>
1261
- <th><label for="cff_title_link" class="bump-left"><?php _e('Link text to Facebook post?'); ?></label></th>
1262
- <td><input type="checkbox" name="cff_title_link" id="cff_title_link" <?php if($cff_title_link == true) echo 'checked="checked"' ?> />&nbsp;Yes</td>
1263
</tr>
1264
1265
<tr>
1266
- <th><label for="cff_post_tags" class="bump-left"><?php _e('Enable Post Tags?'); ?></label></th>
1267
<td>
1268
<input type="checkbox" name="cff_post_tags" id="cff_post_tags" <?php if($cff_post_tags == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1269
<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What are Post Tags?'); ?></a>
1270
- <p class="cff-tooltip cff-more-info"><?php _e("When you use tag another Facebook page or user in your post using the @ symbol it creates a post tag, which is a link to either that Facebook page or user profile."); ?></p>
1271
</td>
1272
</tr>
1273
@@ -1281,6 +1511,13 @@ function cff_style_page() {
1281
<div class="inside">
1282
<table class="form-table">
1283
<tbody>
1284
1285
<tr>
1286
<th><label for="cff_body_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
@@ -1290,6 +1527,7 @@ function cff_style_page() {
1290
<option value="10" <?php if($cff_body_size == "10") echo 'selected="selected"' ?> >10px</option>
1291
<option value="11" <?php if($cff_body_size == "11") echo 'selected="selected"' ?> >11px</option>
1292
<option value="12" <?php if($cff_body_size == "12") echo 'selected="selected"' ?> >12px</option>
1293
<option value="14" <?php if($cff_body_size == "14") echo 'selected="selected"' ?> >14px</option>
1294
<option value="16" <?php if($cff_body_size == "16") echo 'selected="selected"' ?> >16px</option>
1295
<option value="18" <?php if($cff_body_size == "18") echo 'selected="selected"' ?> >18px</option>
@@ -1300,7 +1538,7 @@ function cff_style_page() {
1300
<option value="36" <?php if($cff_body_size == "36") echo 'selected="selected"' ?> >36px</option>
1301
<option value="42" <?php if($cff_body_size == "42") echo 'selected="selected"' ?> >42px</option>
1302
<option value="48" <?php if($cff_body_size == "48") echo 'selected="selected"' ?> >48px</option>
1303
- <option value="60" <?php if($cff_body_size == "54") echo 'selected="selected"' ?> >54px</option>
1304
<option value="60" <?php if($cff_body_size == "60") echo 'selected="selected"' ?> >60px</option>
1305
</select>
1306
</td>
@@ -1322,6 +1560,55 @@ function cff_style_page() {
1322
<input name="cff_body_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_body_color) ); ?>" class="cff-colorpicker" />
1323
</td>
1324
</tr>
1325
</tbody>
1326
</table>
1327
</div>
@@ -1331,7 +1618,7 @@ function cff_style_page() {
1331
</div>
1332
<div id="adminform" class="postbox" style="display: block;">
1333
<div class="handlediv" title="Click to toggle"><br></div>
1334
- <h3 class="hndle"><span><?php _e('Date'); ?></span></h3>
1335
<div class="inside">
1336
<table class="form-table">
1337
<tbody>
@@ -1352,6 +1639,7 @@ function cff_style_page() {
1352
<option value="10" <?php if($cff_date_size == "10") echo 'selected="selected"' ?> >10px</option>
1353
<option value="11" <?php if($cff_date_size == "11") echo 'selected="selected"' ?> >11px</option>
1354
<option value="12" <?php if($cff_date_size == "12") echo 'selected="selected"' ?> >12px</option>
1355
<option value="14" <?php if($cff_date_size == "14") echo 'selected="selected"' ?> >14px</option>
1356
<option value="16" <?php if($cff_date_size == "16") echo 'selected="selected"' ?> >16px</option>
1357
<option value="18" <?php if($cff_date_size == "18") echo 'selected="selected"' ?> >18px</option>
@@ -1362,7 +1650,7 @@ function cff_style_page() {
1362
<option value="36" <?php if($cff_date_size == "36") echo 'selected="selected"' ?> >36px</option>
1363
<option value="42" <?php if($cff_date_size == "42") echo 'selected="selected"' ?> >42px</option>
1364
<option value="48" <?php if($cff_date_size == "48") echo 'selected="selected"' ?> >48px</option>
1365
- <option value="60" <?php if($cff_date_size == "54") echo 'selected="selected"' ?> >54px</option>
1366
<option value="60" <?php if($cff_date_size == "60") echo 'selected="selected"' ?> >60px</option>
1367
</select>
1368
</td>
@@ -1387,7 +1675,7 @@ function cff_style_page() {
1387
<tr>
1388
<th><label for="cff_date_formatting" class="bump-left"><?php _e('Date formatting'); ?></label></th>
1389
<td>
1390
- <select name="cff_date_formatting" id="cff-date-formatting">
1391
<?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
1392
<option value="1" <?php if($cff_date_formatting == "1") echo 'selected="selected"' ?> ><?php _e('2 days ago'); ?></option>
1393
<option value="2" <?php if($cff_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:i a', $original); ?></option>
@@ -1403,61 +1691,6 @@ function cff_style_page() {
1403
<option value="12" <?php if($cff_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y', $original); ?></option>
1404
<option value="13" <?php if($cff_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y', $original); ?></option>
1405
</select>
1406
-
1407
- <i style="margin-left: 5px; font-size: 11px;"><a class="cff-tooltip-link" href="JavaScript:void(0);" id="cff-translate-date"><?php _e('Translate this'); ?></a></i>
1408
- <div class="cff-tooltip cff-more-info">
1409
- <div class="cff-tooltip-table">
1410
- <p style="margin-bottom: 15px;"><?php _e('Translate the text below into the language you would like to use:'); ?></p>
1411
-
1412
-
1413
- <label for="cff_translate_second"><?php _e("second"); ?></label>
1414
- <input name="cff_translate_second" type="text" value="<?php esc_attr_e( $cff_translate_second ); ?>" size="20" />
1415
- <br />
1416
- <label for="cff_translate_seconds"><?php _e("seconds"); ?></label>
1417
- <input name="cff_translate_seconds" type="text" value="<?php esc_attr_e( $cff_translate_second ); ?>" size="20" />
1418
- <br />
1419
- <label for="cff_translate_minute"><?php _e("minute"); ?></label>
1420
- <input name="cff_translate_minute" type="text" value="<?php esc_attr_e( $cff_translate_minute ); ?>" size="20" />
1421
- <br />
1422
- <label for="cff_translate_minutes"><?php _e("minutes"); ?></label>
1423
- <input name="cff_translate_minutes" type="text" value="<?php esc_attr_e( $cff_translate_minutes ); ?>" size="20" />
1424
- <br />
1425
- <label for="cff_translate_hour"><?php _e("hour"); ?></label>
1426
- <input name="cff_translate_hour" type="text" value="<?php esc_attr_e( $cff_translate_hour ); ?>" size="20" />
1427
- <br />
1428
- <label for="cff_translate_hours"><?php _e("hours"); ?></label>
1429
- <input name="cff_translate_hours" type="text" value="<?php esc_attr_e( $cff_translate_hours ); ?>" size="20" />
1430
- <br />
1431
- <label for="cff_translate_day"><?php _e("day"); ?></label>
1432
- <input name="cff_translate_day" type="text" value="<?php esc_attr_e( $cff_translate_day ); ?>" size="20" />
1433
- <br />
1434
- <label for="cff_translate_days"><?php _e("days"); ?></label>
1435
- <input name="cff_translate_days" type="text" value="<?php esc_attr_e( $cff_translate_days ); ?>" size="20" />
1436
- <br />
1437
- <label for="cff_translate_week"><?php _e("week"); ?></label>
1438
- <input name="cff_translate_week" type="text" value="<?php esc_attr_e( $cff_translate_week ); ?>" size="20" />
1439
- <br />
1440
- <label for="cff_translate_weeks"><?php _e("weeks"); ?></label>
1441
- <input name="cff_translate_weeks" type="text" value="<?php esc_attr_e( $cff_translate_weeks ); ?>" size="20" />
1442
- <br />
1443
- <label for="cff_translate_month"><?php _e("month"); ?></label>
1444
- <input name="cff_translate_month" type="text" value="<?php esc_attr_e( $cff_translate_month ); ?>" size="20" />
1445
- <br />
1446
- <label for="cff_translate_months"><?php _e("months"); ?></label>
1447
- <input name="cff_translate_months" type="text" value="<?php esc_attr_e( $cff_translate_months ); ?>" size="20" />
1448
- <br />
1449
- <label for="cff_translate_year"><?php _e("year"); ?></label>
1450
- <input name="cff_translate_year" type="text" value="<?php esc_attr_e( $cff_translate_year ); ?>" size="20" />
1451
- <br />
1452
- <label for="cff_translate_years"><?php _e("years"); ?></label>
1453
- <input name="cff_translate_years" type="text" value="<?php esc_attr_e( $cff_translate_years ); ?>" size="20" />
1454
- <br />
1455
- <label for="cff_translate_ago"><?php _e("ago"); ?></label>
1456
- <input name="cff_translate_ago" type="text" value="<?php esc_attr_e( $cff_translate_ago ); ?>" size="20" />
1457
- </div>
1458
- </div>
1459
-
1460
- </td>
1461
</tr>
1462
1463
<tr>
@@ -1562,7 +1795,7 @@ function cff_style_page() {
1562
<th><label for="cff_date_custom" class="bump-left"><?php _e('Custom format'); ?></label></th>
1563
<td>
1564
<input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
1565
- <i style="margin-left: 5px; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a></i>
1566
</td>
1567
</tr>
1568
<tr>
@@ -1605,6 +1838,7 @@ function cff_style_page() {
1605
<option value="10" <?php if($cff_event_title_size == "10") echo 'selected="selected"' ?> >10px</option>
1606
<option value="11" <?php if($cff_event_title_size == "11") echo 'selected="selected"' ?> >11px</option>
1607
<option value="12" <?php if($cff_event_title_size == "12") echo 'selected="selected"' ?> >12px</option>
1608
<option value="14" <?php if($cff_event_title_size == "14") echo 'selected="selected"' ?> >14px</option>
1609
<option value="16" <?php if($cff_event_title_size == "16") echo 'selected="selected"' ?> >16px</option>
1610
<option value="18" <?php if($cff_event_title_size == "18") echo 'selected="selected"' ?> >18px</option>
@@ -1615,7 +1849,7 @@ function cff_style_page() {
1615
<option value="36" <?php if($cff_event_title_size == "36") echo 'selected="selected"' ?> >36px</option>
1616
<option value="42" <?php if($cff_event_title_size == "42") echo 'selected="selected"' ?> >42px</option>
1617
<option value="48" <?php if($cff_event_title_size == "48") echo 'selected="selected"' ?> >48px</option>
1618
- <option value="60" <?php if($cff_event_title_size == "54") echo 'selected="selected"' ?> >54px</option>
1619
<option value="60" <?php if($cff_event_title_size == "60") echo 'selected="selected"' ?> >60px</option>
1620
</select>
1621
</td>
@@ -1637,8 +1871,8 @@ function cff_style_page() {
1637
</td>
1638
</tr>
1639
<tr>
1640
- <th><label for="cff_title_link" class="bump-left"><?php _e('Link title to Facebook event page?'); ?></label></th>
1641
- <td><input type="checkbox" name="cff_event_title_link" id="cff_event_title_link" <?php if($cff_event_title_link == true) echo 'checked="checked"' ?> />&nbsp;Yes</td>
1642
</tr>
1643
</tbody>
1644
</table>
@@ -1662,6 +1896,7 @@ function cff_style_page() {
1662
<option value="10" <?php if($cff_event_date_size == "10") echo 'selected="selected"' ?> >10px</option>
1663
<option value="11" <?php if($cff_event_date_size == "11") echo 'selected="selected"' ?> >11px</option>
1664
<option value="12" <?php if($cff_event_date_size == "12") echo 'selected="selected"' ?> >12px</option>
1665
<option value="14" <?php if($cff_event_date_size == "14") echo 'selected="selected"' ?> >14px</option>
1666
<option value="16" <?php if($cff_event_date_size == "16") echo 'selected="selected"' ?> >16px</option>
1667
<option value="18" <?php if($cff_event_date_size == "18") echo 'selected="selected"' ?> >18px</option>
@@ -1672,7 +1907,7 @@ function cff_style_page() {
1672
<option value="36" <?php if($cff_event_date_size == "36") echo 'selected="selected"' ?> >36px</option>
1673
<option value="42" <?php if($cff_event_date_size == "42") echo 'selected="selected"' ?> >42px</option>
1674
<option value="48" <?php if($cff_event_date_size == "48") echo 'selected="selected"' ?> >48px</option>
1675
- <option value="60" <?php if($cff_event_date_size == "54") echo 'selected="selected"' ?> >54px</option>
1676
<option value="60" <?php if($cff_event_date_size == "60") echo 'selected="selected"' ?> >60px</option>
1677
</select>
1678
</td>
@@ -1727,7 +1962,7 @@ function cff_style_page() {
1727
<th><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom event date format'); ?></label></th>
1728
<td>
1729
<input name="cff_event_date_custom" type="text" value="<?php esc_attr_e( $cff_event_date_custom ); ?>" size="10" placeholder="Eg. F j, Y - g:ia" />
1730
- <i style="margin-left: 5px; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a></i>
1731
</td>
1732
</tr>
1733
</tbody>
@@ -1749,6 +1984,7 @@ function cff_style_page() {
1749
<option value="10" <?php if($cff_event_details_size == "10") echo 'selected="selected"' ?> >10px</option>
1750
<option value="11" <?php if($cff_event_details_size == "11") echo 'selected="selected"' ?> >11px</option>
1751
<option value="12" <?php if($cff_event_details_size == "12") echo 'selected="selected"' ?> >12px</option>
1752
<option value="14" <?php if($cff_event_details_size == "14") echo 'selected="selected"' ?> >14px</option>
1753
<option value="16" <?php if($cff_event_details_size == "16") echo 'selected="selected"' ?> >16px</option>
1754
<option value="18" <?php if($cff_event_details_size == "18") echo 'selected="selected"' ?> >18px</option>
@@ -1759,7 +1995,7 @@ function cff_style_page() {
1759
<option value="36" <?php if($cff_event_details_size == "36") echo 'selected="selected"' ?> >36px</option>
1760
<option value="42" <?php if($cff_event_details_size == "42") echo 'selected="selected"' ?> >42px</option>
1761
<option value="48" <?php if($cff_event_details_size == "48") echo 'selected="selected"' ?> >48px</option>
1762
- <option value="60" <?php if($cff_event_details_size == "54") echo 'selected="selected"' ?> >54px</option>
1763
<option value="60" <?php if($cff_event_details_size == "60") echo 'selected="selected"' ?> >60px</option>
1764
</select>
1765
</td>
@@ -1780,6 +2016,13 @@ function cff_style_page() {
1780
<input name="cff_event_details_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_details_color) ); ?>" class="cff-colorpicker" />
1781
</td>
1782
</tr>
1783
</tbody>
1784
</table>
1785
</div>
@@ -1799,6 +2042,7 @@ function cff_style_page() {
1799
<option value="10" <?php if($cff_link_size == "10") echo 'selected="selected"' ?> >10px</option>
1800
<option value="11" <?php if($cff_link_size == "11") echo 'selected="selected"' ?> >11px</option>
1801
<option value="12" <?php if($cff_link_size == "12") echo 'selected="selected"' ?> >12px</option>
1802
<option value="14" <?php if($cff_link_size == "14") echo 'selected="selected"' ?> >14px</option>
1803
<option value="16" <?php if($cff_link_size == "16") echo 'selected="selected"' ?> >16px</option>
1804
<option value="18" <?php if($cff_link_size == "18") echo 'selected="selected"' ?> >18px</option>
@@ -1809,7 +2053,7 @@ function cff_style_page() {
1809
<option value="36" <?php if($cff_link_size == "36") echo 'selected="selected"' ?> >36px</option>
1810
<option value="42" <?php if($cff_link_size == "42") echo 'selected="selected"' ?> >42px</option>
1811
<option value="48" <?php if($cff_link_size == "48") echo 'selected="selected"' ?> >48px</option>
1812
- <option value="60" <?php if($cff_link_size == "54") echo 'selected="selected"' ?> >54px</option>
1813
<option value="60" <?php if($cff_link_size == "60") echo 'selected="selected"' ?> >60px</option>
1814
</select>
1815
</td>
@@ -1831,10 +2075,9 @@ function cff_style_page() {
1831
</td>
1832
</tr>
1833
<tr>
1834
- <th><label for="cff_facebook_link_text" class="bump-left"><?php _e('Custom "View on Facebook" text'); ?></label></th>
1835
<td>
1836
- <input name="cff_facebook_link_text" type="text" value="<?php esc_attr_e( $cff_facebook_link_text ); ?>" size="20" />
1837
- <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Use different text in place of the default "View on Facebook" link'); ?></i>
1838
</td>
1839
</tr>
1840
@@ -1847,6 +2090,7 @@ function cff_style_page() {
1847
<div style="margin-top: -15px;">
1848
<?php submit_button(); ?>
1849
</div>
1850
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1851
1852
<?php } //End Typography tab ?>
@@ -1855,40 +2099,6 @@ function cff_style_page() {
1855
<br />
1856
<h3><?php _e('Likes, Shares and Comments'); ?></h3><i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable likes, shares and comments'); ?></a></i>
1857
1858
- <hr />
1859
- <h3><?php _e('Custom CSS'); ?></h3>
1860
- <table class="form-table">
1861
- <tbody>
1862
- <tr valign="top">
1863
- <td>
1864
- <?php _e('Enter your own custom CSS in the box below'); ?>
1865
- <i style="margin-left: 5px; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank"><?php _e('See some examples'); ?></a></i>
1866
- </td>
1867
- </tr>
1868
- <tr valign="top">
1869
- <td>
1870
- <textarea name="cff_custom_css" id="cff_custom_css" style="width: 70%;" rows="7"><?php esc_attr_e( $cff_custom_css ); ?></textarea>
1871
- </td>
1872
- </tr>
1873
- </tbody>
1874
- </table>
1875
- <h3><?php _e('Custom JavaScript'); ?></h3>
1876
- <table class="form-table">
1877
- <tbody>
1878
- <tr valign="top">
1879
- <td>
1880
- <?php _e('Enter your own custom JavaScript/jQuery in the box below'); ?>
1881
- <i style="margin-left: 5px; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank"><?php _e('See some examples'); ?></a></i>
1882
- </td>
1883
- </tr>
1884
- <tr valign="top">
1885
- <td>
1886
- <textarea name="cff_custom_js" id="cff_custom_js" style="width: 70%;" rows="7"><?php esc_attr_e( stripslashes($cff_custom_js) ); ?></textarea>
1887
- </td>
1888
- </tr>
1889
- </tbody>
1890
- </table>
1891
- <?php submit_button(); ?>
1892
<hr />
1893
<h3><?php _e('Like Box'); ?></h3>
1894
<table class="form-table">
@@ -1905,8 +2115,8 @@ function cff_style_page() {
1905
<th class="bump-left" scope="row"><label><?php _e('Position'); ?></label></th>
1906
<td>
1907
<select name="cff_like_box_position">
1908
- <option value="bottom" <?php if($cff_like_box_position == "bottom") echo 'selected="selected"' ?> ><?php _e('Above posts'); ?></option>
1909
- <option value="top" <?php if($cff_like_box_position == "top") echo 'selected="selected"' ?> ><?php _e('Below posts'); ?></option>
1910
</select>
1911
</td>
1912
</tr>
@@ -1958,143 +2168,40 @@ function cff_style_page() {
1958
</tbody>
1959
</table>
1960
1961
-
1962
<hr />
1963
- <h3 id="cff-header"><?php _e('Feed Header'); ?></h3>
1964
<table class="form-table">
1965
<tbody>
1966
<tr valign="top">
1967
- <th class="bump-left" scope="row"><label><?php _e('Show Feed Header'); ?></label></th>
1968
<td>
1969
- <input type="checkbox" name="cff_show_header" id="cff_show_header" <?php if($cff_show_header == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1970
- <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This will show a header at the top of your feed'); ?></i>
1971
</td>
1972
</tr>
1973
<tr valign="top">
1974
- <th class="bump-left" scope="row"><label><?php _e('Display outside the scrollable area'); ?></label></th>
1975
- <td>
1976
- <input type="checkbox" name="cff_header_outside" id="cff_header_outside" <?php if($cff_header_outside == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1977
- <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Only applicable if you have set a height on the feed'); ?></i>
1978
- </td>
1979
- </tr>
1980
- </tr>
1981
- <th class="bump-left" scope="row"><label><?php _e('Text'); ?></label></th>
1982
<td>
1983
- <input name="cff_header_text" type="text" value="<?php esc_attr_e( $cff_header_text ); ?>" size="30" />
1984
- <span>Eg. Facebook Feed, Events, News..</span>
1985
</td>
1986
</tr>
1987
<tr valign="top">
1988
- <th class="bump-left" scope="row"><label><?php _e('Background Color'); ?></label></th>
1989
- <td>
1990
- <input name="cff_header_bg_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_bg_color) ); ?>" class="cff-colorpicker" />
1991
- </td>
1992
- </tr>
1993
- </tr>
1994
- <th class="bump-left" scope="row"><label><?php _e('Padding'); ?></label></th>
1995
- <td>
1996
- <input name="cff_header_padding" type="text" value="<?php esc_attr_e( $cff_header_padding ); ?>" size="6" />
1997
- <span>Eg. 20px, 5%. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This is the amount of padding/spacing that goes around the header.'); ?></i></span>
1998
- </td>
1999
- </tr>
2000
- <tr>
2001
- <th class="bump-left" scope="row"><label><?php _e('Text Size'); ?></label></th>
2002
<td>
2003
- <select name="cff_header_text_size">
2004
- <option value="inherit" <?php if($cff_header_text_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
2005
- <option value="10" <?php if($cff_header_text_size == "10") echo 'selected="selected"' ?> >10px</option>
2006
- <option value="11" <?php if($cff_header_text_size == "11") echo 'selected="selected"' ?> >11px</option>
2007
- <option value="12" <?php if($cff_header_text_size == "12") echo 'selected="selected"' ?> >12px</option>
2008
- <option value="14" <?php if($cff_header_text_size == "14") echo 'selected="selected"' ?> >14px</option>
2009
- <option value="16" <?php if($cff_header_text_size == "16") echo 'selected="selected"' ?> >16px</option>
2010
- <option value="18" <?php if($cff_header_text_size == "18") echo 'selected="selected"' ?> >18px</option>
2011
- <option value="20" <?php if($cff_header_text_size == "20") echo 'selected="selected"' ?> >20px</option>
2012
- <option value="24" <?php if($cff_header_text_size == "24") echo 'selected="selected"' ?> >24px</option>
2013
- <option value="28" <?php if($cff_header_text_size == "28") echo 'selected="selected"' ?> >28px</option>
2014
- <option value="32" <?php if($cff_header_text_size == "32") echo 'selected="selected"' ?> >32px</option>
2015
- <option value="36" <?php if($cff_header_text_size == "36") echo 'selected="selected"' ?> >36px</option>
2016
- <option value="42" <?php if($cff_header_text_size == "42") echo 'selected="selected"' ?> >42px</option>
2017
- <option value="48" <?php if($cff_header_text_size == "48") echo 'selected="selected"' ?> >48px</option>
2018
- <option value="54" <?php if($cff_header_text_size == "54") echo 'selected="selected"' ?> >54px</option>
2019
- <option value="60" <?php if($cff_header_text_size == "60") echo 'selected="selected"' ?> >60px</option>
2020
- </select>
2021
- </td>
2022
- </tr>
2023
- <tr>
2024
- <th class="bump-left" scope="row"><label><?php _e('Text Weight'); ?></label></th>
2025
- <td>
2026
- <select name="cff_header_text_weight">
2027
- <option value="inherit" <?php if($cff_header_text_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
2028
- <option value="normal" <?php if($cff_header_text_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
2029
- <option value="bold" <?php if($cff_header_text_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
2030
- </select>
2031
- </td>
2032
- </tr>
2033
- <tr>
2034
- <th class="bump-left" scope="row"><label><?php _e('Text Color'); ?></label></th>
2035
- <td>
2036
- <input name="cff_header_text_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_text_color) ); ?>" class="cff-colorpicker" />
2037
- </td>
2038
- </tr>
2039
- <tr>
2040
- <th class="bump-left" scope="row"><label><?php _e('Icon Type'); ?></label></th>
2041
- <td>
2042
- <select name="cff_header_icon" id="cff-header-icon">
2043
- <option value="facebook-square" <?php if($cff_header_icon == "facebook-square") echo 'selected="selected"' ?> >Facebook 1</option>
2044
- <option value="facebook" <?php if($cff_header_icon == "facebook") echo 'selected="selected"' ?> >Facebook 2</option>
2045
- <option value="calendar" <?php if($cff_header_icon == "calendar") echo 'selected="selected"' ?> >Events 1</option>
2046
- <option value="calendar-o" <?php if($cff_header_icon == "calendar-o") echo 'selected="selected"' ?> >Events 2</option>
2047
- <option value="picture-o" <?php if($cff_header_icon == "picture-o") echo 'selected="selected"' ?> >Photos</option>
2048
- <option value="users" <?php if($cff_header_icon == "users") echo 'selected="selected"' ?> >People</option>
2049
- <option value="thumbs-o-up" <?php if($cff_header_icon == "thumbs-o-up") echo 'selected="selected"' ?> >Thumbs Up 1</option>
2050
- <option value="thumbs-up" <?php if($cff_header_icon == "thumbs-up") echo 'selected="selected"' ?> >Thumbs Up 2</option>
2051
- <option value="comment-o" <?php if($cff_header_icon == "comment-o") echo 'selected="selected"' ?> >Speech Bubble 1</option>
2052
- <option value="comment" <?php if($cff_header_icon == "comment") echo 'selected="selected"' ?> >Speech Bubble 2</option>
2053
- <option value="ticket" <?php if($cff_header_icon == "ticket") echo 'selected="selected"' ?> >Ticket</option>
2054
- <option value="list-alt" <?php if($cff_header_icon == "list-alt") echo 'selected="selected"' ?> >News List</option>
2055
- <option value="file" <?php if($cff_header_icon == "file") echo 'selected="selected"' ?> >File 1</option>
2056
- <option value="file-o" <?php if($cff_header_icon == "file-o") echo 'selected="selected"' ?> >File 2</option>
2057
- <option value="file-text" <?php if($cff_header_icon == "file-text") echo 'selected="selected"' ?> >File 3</option>
2058
- <option value="file-text-o" <?php if($cff_header_icon == "file-text-o") echo 'selected="selected"' ?> >File 4</option>
2059
- <option value="youtube-play" <?php if($cff_header_icon == "youtube-play") echo 'selected="selected"' ?> >Video</option>
2060
- <option value="youtube" <?php if($cff_header_icon == "youtube") echo 'selected="selected"' ?> >YouTube</option>
2061
- <option value="vimeo-square" <?php if($cff_header_icon == "vimeo-square") echo 'selected="selected"' ?> >Vimeo</option>
2062
- </select>
2063
-
2064
- <i id="cff-header-icon-example" class="fa fa-facebook-square"></i>
2065
- </td>
2066
- </tr>
2067
- <tr>
2068
- <th class="bump-left" scope="row"><label><?php _e('Icon Color'); ?></label></th>
2069
- <td>
2070
- <input name="cff_header_icon_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_icon_color) ); ?>" class="cff-colorpicker" />
2071
</td>
2072
</tr>
2073
- <tr>
2074
- <th class="bump-left" scope="row"><label><?php _e('Icon Size'); ?></label></th>
2075
<td>
2076
- <select name="cff_header_icon_size" id="cff-header-icon-size">
2077
- <option value="10" <?php if($cff_header_icon_size == "10") echo 'selected="selected"' ?> >10px</option>
2078
- <option value="11" <?php if($cff_header_icon_size == "11") echo 'selected="selected"' ?> >11px</option>
2079
- <option value="12" <?php if($cff_header_icon_size == "12") echo 'selected="selected"' ?> >12px</option>
2080
- <option value="14" <?php if($cff_header_icon_size == "14") echo 'selected="selected"' ?> >14px</option>
2081
- <option value="16" <?php if($cff_header_icon_size == "16") echo 'selected="selected"' ?> >16px</option>
2082
- <option value="18" <?php if($cff_header_icon_size == "18") echo 'selected="selected"' ?> >18px</option>
2083
- <option value="20" <?php if($cff_header_icon_size == "20") echo 'selected="selected"' ?> >20px</option>
2084
- <option value="24" <?php if($cff_header_icon_size == "24") echo 'selected="selected"' ?> >24px</option>
2085
- <option value="28" <?php if($cff_header_icon_size == "28") echo 'selected="selected"' ?> >28px</option>
2086
- <option value="32" <?php if($cff_header_icon_size == "32") echo 'selected="selected"' ?> >32px</option>
2087
- <option value="36" <?php if($cff_header_icon_size == "36") echo 'selected="selected"' ?> >36px</option>
2088
- <option value="42" <?php if($cff_header_icon_size == "42") echo 'selected="selected"' ?> >42px</option>
2089
- <option value="48" <?php if($cff_header_icon_size == "48") echo 'selected="selected"' ?> >48px</option>
2090
- <option value="54" <?php if($cff_header_icon_size == "54") echo 'selected="selected"' ?> >54px</option>
2091
- <option value="60" <?php if($cff_header_icon_size == "60") echo 'selected="selected"' ?> >60px</option>
2092
- </select>
2093
</td>
2094
</tr>
2095
-
2096
</tbody>
2097
</table>
2098
2099
2100
<hr />
@@ -2115,6 +2222,23 @@ function cff_style_page() {
2115
</tr>
2116
</tbody>
2117
</table>
2118
<?php submit_button(); ?>
2119
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2120
<?php } //End Misc tab ?>
@@ -2227,7 +2351,7 @@ function cff_style_page() {
2227
} //End Style_Page
2228
//Enqueue admin styles
2229
function cff_admin_style() {
2230
- wp_register_style( 'custom_wp_admin_css', plugin_dir_url( __FILE__ ) . 'css/cff-admin-style.css?3', false, '1.0.0' );
2231
wp_enqueue_style( 'custom_wp_admin_css' );
2232
wp_enqueue_style( 'cff-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );
2233
wp_enqueue_style( 'wp-color-picker' );
@@ -2235,7 +2359,7 @@ function cff_admin_style() {
2235
add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
2236
//Enqueue admin scripts
2237
function cff_admin_scripts() {
2238
- wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js?2' );
2239
if( !wp_script_is('jquery-ui-draggable') ) {
2240
wp_enqueue_script(
2241
array(
44
$cff_cache_time = 'cff_cache_time';
45
$cff_cache_time_unit = 'cff_cache_time_unit';
46
$cff_locale = 'cff_locale';
47
// Read in existing option value from database
48
$access_token_val = get_option( $access_token );
49
$page_id_val = get_option( $page_id );
66
$cff_cache_time_val = $_POST[ $cff_cache_time ];
67
$cff_cache_time_unit_val = $_POST[ $cff_cache_time_unit ];
68
$cff_locale_val = $_POST[ $cff_locale ];
69
// Save the posted value in the database
70
update_option( $access_token, $access_token_val );
71
update_option( $page_id, $page_id_val );
76
update_option( $cff_cache_time, $cff_cache_time_val );
77
update_option( $cff_cache_time_unit, $cff_cache_time_unit_val );
78
update_option( $cff_locale, $cff_locale_val );
79
80
//Delete the transient for the main page ID
81
delete_transient( 'cff_posts_json_' .$page_id_val );
126
<table class="form-table">
127
<tbody>
128
<tr valign="top">
129
+ <th scope="row"><?php _e('Facebook Page ID<br /><i style="font-weight: normal; font-size: 12px;">ID of your Facebook Page or Group</i>'); ?></th>
130
<td>
131
+ <input name="cff_page_id" id="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val ); ?>" size="45" />
132
&nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?'); ?></a>
133
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
134
<div class="cff-tooltip cff-more-info">
141
</td>
142
</tr>
143
144
+ <tr valign="top">
145
+ <th scope="row" style="padding-bottom: 10px;"><?php _e('Facebook Access Token <i style="font-weight: normal; font-size: 12px;">(Optional)</i>'); ?></th>
146
+ <td>
147
+ <input name="cff_access_token" id="cff_access_token" type="text" value="<?php esc_attr_e( $access_token_val ); ?>" size="45" />
148
+ &nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
149
+
150
+ <div class="cff-notice cff-profile-error cff-access-token">
151
+ <?php _e("<p>This doesn't appear to be an Access Token. Please be sure that you didn't enter your App Secret instead of your Access Token.<br />Your App ID and App Secret are used to obtain your Access Token; simply paste them into the fields in the last step of the <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>Access Token instructions</a> and click '<b>Get my Access Token</b>'.</p>"); ?>
152
+ </div>
153
+
154
+ <p class="cff-tooltip cff-more-info"><?php _e("This is optional. If you have your own Facebook Access Token then you can enter it here. To get your own Access Token you can follow these <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>step-by-step instructions</a>"); ?>.</p>
155
+ </td>
156
+ </tr>
157
+ </tbody>
158
+ </table>
159
+ <hr />
160
+ <table class="form-table">
161
+ <tbody>
162
+ <h3><?php _e('Settings'); ?></h3>
163
<tr valign="top" class="cff-page-type">
164
<th scope="row"><?php _e('Is this a page, group or profile?'); ?></th>
165
<td>
302
<i style="color: #666; font-size: 11px;"><?php _e('Select a language'); ?></i>
303
</td>
304
</tr>
305
306
</tbody>
307
</table>
354
<button class="button secondary-button" id="cff-api-test">Test connection to Facebook API</button>
355
356
<div id="cff-api-test-result">
357
+ <?php
358
+ $access_token = get_option( $access_token );
359
+ if ( $access_token == '' || empty($access_token) ) $access_token = '1436737606570258|MGh1BX4_b_D9HzJtKe702cwMRPI';
360
+ ?>
361
+ <?php $posts_json = cff_fetchUrl("https://graph.facebook.com/".get_option( $page_id )."/feed?access_token=".$access_token."&limit=1"); ?>
362
<textarea readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."><?php echo $posts_json; ?></textarea>
363
</div>
364
401
'cff_title_size' => 'inherit',
402
'cff_title_weight' => 'inherit',
403
'cff_title_color' => '',
404
+ 'cff_posttext_link_color' => '',
405
'cff_body_size' => 'inherit',
406
'cff_body_weight' => 'inherit',
407
'cff_body_color' => '',
408
+ 'cff_link_title_format' => 'p',
409
+ 'cff_link_title_size' => 'inherit',
410
+ 'cff_link_title_color' => '',
411
+ 'cff_link_url_color' => '',
412
//Event title
413
'cff_event_title_format' => 'p',
414
'cff_event_title_size' => 'inherit',
425
'cff_event_details_size' => 'inherit',
426
'cff_event_details_weight' => 'inherit',
427
'cff_event_details_color' => '',
428
+ 'cff_event_link_color' => '',
429
//Date
430
'cff_date_position' => 'below',
431
'cff_date_size' => 'inherit',
443
'cff_link_color' => '',
444
'cff_facebook_link_text' => 'View on Facebook',
445
'cff_view_link_text' => 'View Link',
446
+ 'cff_link_to_timeline' => false,
447
//Meta
448
'cff_icon_style' => 'light',
449
'cff_meta_text_color' => '',
473
'cff_title_link' => false,
474
'cff_post_tags' => true,
475
'cff_event_title_link' => false,
476
+ 'cff_video_action' => 'post',
477
'cff_sep_color' => '',
478
'cff_sep_size' => '1',
479
480
//Feed Header
481
'cff_show_header' => '',
482
'cff_header_outside' => false,
483
+ 'cff_header_text' => 'Facebook Posts',
484
'cff_header_bg_color' => '',
485
'cff_header_padding' => '',
486
'cff_header_text_size' => '',
490
'cff_header_icon_color' => '',
491
'cff_header_icon_size' => '28',
492
493
+ //Author
494
+ 'cff_author_size' => 'inherit',
495
+ 'cff_author_color' => '',
496
+
497
//Translate - general
498
'cff_see_more_text' => 'See More',
499
'cff_see_less_text' => 'See Less',
549
$cff_title_size = $options[ 'cff_title_size' ];
550
$cff_title_weight = $options[ 'cff_title_weight' ];
551
$cff_title_color = $options[ 'cff_title_color' ];
552
+ $cff_posttext_link_color = $options[ 'cff_posttext_link_color' ];
553
$cff_body_size = $options[ 'cff_body_size' ];
554
$cff_body_weight = $options[ 'cff_body_weight' ];
555
$cff_body_color = $options[ 'cff_body_color' ];
556
+ $cff_link_title_format = $options[ 'cff_link_title_format' ];
557
+ $cff_link_title_size = $options[ 'cff_link_title_size' ];
558
+ $cff_link_title_color = $options[ 'cff_link_title_color' ];
559
+ $cff_link_url_color = $options[ 'cff_link_url_color' ];
560
//Event title
561
$cff_event_title_format = $options[ 'cff_event_title_format' ];
562
$cff_event_title_size = $options[ 'cff_event_title_size' ];
573
$cff_event_details_size = $options[ 'cff_event_details_size' ];
574
$cff_event_details_weight = $options[ 'cff_event_details_weight' ];
575
$cff_event_details_color = $options[ 'cff_event_details_color' ];
576
+ $cff_event_link_color = $options[ 'cff_event_link_color' ];
577
//Date
578
$cff_date_position = $options[ 'cff_date_position' ];
579
$cff_date_size = $options[ 'cff_date_size' ];
649
$cff_header_icon_color = $options[ 'cff_header_icon_color' ];
650
$cff_header_icon_size = $options[ 'cff_header_icon_size' ];
651
652
+ //Author
653
+ $cff_author_size = $options[ 'cff_author_size' ];
654
+ $cff_author_color = $options[ 'cff_author_color' ];
655
+
656
//New
657
$cff_custom_css = $options[ 'cff_custom_css' ];
658
$cff_custom_js = $options[ 'cff_custom_js' ];
669
// Read in existing option value from database
670
$cff_title_length_val = get_option( $cff_title_length );
671
$cff_body_length_val = get_option( $cff_body_length );
672
+
673
+ //Ajax
674
+ $cff_ajax = 'cff_ajax';
675
+ $cff_ajax_val = get_option( $cff_ajax );
676
+
677
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
678
if( isset($_POST[ $style_hidden_field_name ]) && $_POST[ $style_hidden_field_name ] == 'Y' ) {
679
//Update the General options
737
//Character limits
738
if (isset($_POST[ 'cff_title_length' ]) ) $cff_title_length_val = $_POST[ $cff_title_length ];
739
if (isset($_POST[ 'cff_body_length' ]) ) $cff_body_length_val = $_POST[ $cff_body_length ];
740
+
741
+ //Page Header
742
+ (isset($_POST[ 'cff_show_header' ])) ? $cff_show_header = $_POST[ 'cff_show_header' ] : $cff_show_header = '';
743
+ (isset($_POST[ 'cff_header_outside' ])) ? $cff_header_outside = $_POST[ 'cff_header_outside' ] : $cff_header_outside = '';
744
+ if (isset($_POST[ 'cff_header_text' ])) $cff_header_text = $_POST[ 'cff_header_text' ];
745
+ if (isset($_POST[ 'cff_header_bg_color' ])) $cff_header_bg_color = $_POST[ 'cff_header_bg_color' ];
746
+ if (isset($_POST[ 'cff_header_padding' ])) $cff_header_padding = $_POST[ 'cff_header_padding' ];
747
+ if (isset($_POST[ 'cff_header_text_size' ])) $cff_header_text_size = $_POST[ 'cff_header_text_size' ];
748
+ if (isset($_POST[ 'cff_header_text_weight' ])) $cff_header_text_weight = $_POST[ 'cff_header_text_weight' ];
749
+ if (isset($_POST[ 'cff_header_text_color' ])) $cff_header_text_color = $_POST[ 'cff_header_text_color' ];
750
+ if (isset($_POST[ 'cff_header_icon' ])) $cff_header_icon = $_POST[ 'cff_header_icon' ];
751
+ if (isset($_POST[ 'cff_header_icon_color' ])) $cff_header_icon_color = $_POST[ 'cff_header_icon_color' ];
752
+ if (isset($_POST[ 'cff_header_icon_size' ])) $cff_header_icon_size = $_POST[ 'cff_header_icon_size' ];
753
+
754
+ //Author
755
+ if (isset($_POST[ 'cff_author_size' ])) $cff_author_size = $_POST[ 'cff_author_size' ];
756
+ if (isset($_POST[ 'cff_author_color' ])) $cff_author_color = $_POST[ 'cff_author_color' ];
757
+
758
//Typography
759
if (isset($_POST[ 'cff_title_format' ]) ) $cff_title_format = $_POST[ 'cff_title_format' ];
760
if (isset($_POST[ 'cff_title_size' ]) ) $cff_title_size = $_POST[ 'cff_title_size' ];
761
if (isset($_POST[ 'cff_title_weight' ]) ) $cff_title_weight = $_POST[ 'cff_title_weight' ];
762
if (isset($_POST[ 'cff_title_color' ]) ) $cff_title_color = $_POST[ 'cff_title_color' ];
763
+ if (isset($_POST[ 'cff_posttext_link_color' ]) ) $cff_posttext_link_color = $_POST[ 'cff_posttext_link_color' ];
764
+
765
(isset($_POST[ 'cff_title_link' ]) ) ? $cff_title_link = $_POST[ 'cff_title_link' ] : $cff_title_link = '';
766
(isset($_POST[ 'cff_post_tags' ]) ) ? $cff_post_tags = $_POST[ 'cff_post_tags' ] : $cff_post_tags = '';
767
$cff_body_size = $_POST[ 'cff_body_size' ];
768
if (isset($_POST[ 'cff_body_weight' ]) ) $cff_body_weight = $_POST[ 'cff_body_weight' ];
769
if (isset($_POST[ 'cff_body_color' ]) ) $cff_body_color = $_POST[ 'cff_body_color' ];
770
+
771
+ if (isset($_POST[ 'cff_link_title_format' ]) ) $cff_link_title_format = $_POST[ 'cff_link_title_format' ];
772
+ if (isset($_POST[ 'cff_link_title_size' ]) ) $cff_link_title_size = $_POST[ 'cff_link_title_size' ];
773
+ if (isset($_POST[ 'cff_link_title_color' ]) ) $cff_link_title_color = $_POST[ 'cff_link_title_color' ];
774
+ if (isset($_POST[ 'cff_link_url_color' ]) ) $cff_link_url_color = $_POST[ 'cff_link_url_color' ];
775
+
776
//Event title
777
if (isset($_POST[ 'cff_event_title_format' ]) ) $cff_event_title_format = $_POST[ 'cff_event_title_format' ];
778
if (isset($_POST[ 'cff_event_title_size' ]) ) $cff_event_title_size = $_POST[ 'cff_event_title_size' ];
790
if (isset($_POST[ 'cff_event_details_size' ]) ) $cff_event_details_size = $_POST[ 'cff_event_details_size' ];
791
if (isset($_POST[ 'cff_event_details_weight' ]) ) $cff_event_details_weight = $_POST[ 'cff_event_details_weight' ];
792
if (isset($_POST[ 'cff_event_details_color' ]) ) $cff_event_details_color = $_POST[ 'cff_event_details_color' ];
793
+ if (isset($_POST[ 'cff_event_link_color' ]) ) $cff_event_link_color = $_POST[ 'cff_event_link_color' ];
794
//Date
795
if (isset($_POST[ 'cff_date_position' ]) ) $cff_date_position = $_POST[ 'cff_date_position' ];
796
if (isset($_POST[ 'cff_date_size' ]) ) $cff_date_size = $_POST[ 'cff_date_size' ];
826
if (isset($_POST[ 'cff_facebook_link_text' ]) ) $cff_facebook_link_text = $_POST[ 'cff_facebook_link_text' ];
827
if (isset($_POST[ 'cff_view_link_text' ]) ) $cff_view_link_text = $_POST[ 'cff_view_link_text' ];
828
if (isset($_POST[ 'cff_link_to_timeline' ]) ) $cff_link_to_timeline = $_POST[ 'cff_link_to_timeline' ];
829
+
830
//Character limits
831
update_option( $cff_title_length, $cff_title_length_val );
832
update_option( $cff_body_length, $cff_body_length_val );
833
+ //Page Header
834
+ $options[ 'cff_show_header' ] = $cff_show_header;
835
+ $options[ 'cff_header_outside' ] = $cff_header_outside;
836
+ $options[ 'cff_header_text' ] = $cff_header_text;
837
+ $options[ 'cff_header_bg_color' ] = $cff_header_bg_color;
838
+ $options[ 'cff_header_padding' ] = $cff_header_padding;
839
+ $options[ 'cff_header_text_size' ] = $cff_header_text_size;
840
+ $options[ 'cff_header_text_weight' ] = $cff_header_text_weight;
841
+ $options[ 'cff_header_text_color' ] = $cff_header_text_color;
842
+ $options[ 'cff_header_icon' ] = $cff_header_icon;
843
+ $options[ 'cff_header_icon_color' ] = $cff_header_icon_color;
844
+ $options[ 'cff_header_icon_size' ] = $cff_header_icon_size;
845
+ //Author
846
+ $options[ 'cff_author_size' ] = $cff_author_size;
847
+ $options[ 'cff_author_color' ] = $cff_author_color;
848
//Typography
849
$options[ 'cff_title_format' ] = $cff_title_format;
850
$options[ 'cff_title_size' ] = $cff_title_size;
851
$options[ 'cff_title_weight' ] = $cff_title_weight;
852
$options[ 'cff_title_color' ] = $cff_title_color;
853
+ $options[ 'cff_posttext_link_color' ] = $cff_posttext_link_color;
854
$options[ 'cff_title_link' ] = $cff_title_link;
855
$options[ 'cff_post_tags' ] = $cff_post_tags;
856
$options[ 'cff_body_size' ] = $cff_body_size;
857
$options[ 'cff_body_weight' ] = $cff_body_weight;
858
$options[ 'cff_body_color' ] = $cff_body_color;
859
+ $options[ 'cff_link_title_format' ] = $cff_link_title_format;
860
+ $options[ 'cff_link_title_size' ] = $cff_link_title_size;
861
+ $options[ 'cff_link_title_color' ] = $cff_link_title_color;
862
+ $options[ 'cff_link_url_color' ] = $cff_link_url_color;
863
//Event title
864
$options[ 'cff_event_title_format' ] = $cff_event_title_format;
865
$options[ 'cff_event_title_size' ] = $cff_event_title_size;
877
$options[ 'cff_event_details_size' ] = $cff_event_details_size;
878
$options[ 'cff_event_details_weight' ] = $cff_event_details_weight;
879
$options[ 'cff_event_details_color' ] = $cff_event_details_color;
880
+ $options[ 'cff_event_link_color' ] = $cff_event_link_color;
881
//Date
882
$options[ 'cff_date_position' ] = $cff_date_position;
883
$options[ 'cff_date_size' ] = $cff_date_size;
936
(isset($_POST[ 'cff_like_box_faces' ])) ? $cff_like_box_faces = $_POST[ 'cff_like_box_faces' ] : $cff_like_box_faces = '';
937
(isset($_POST[ 'cff_like_box_border' ])) ? $cff_like_box_border = $_POST[ 'cff_like_box_border' ] : $cff_like_box_border = '';
938
939
if (isset($_POST[ 'cff_video_height' ])) $cff_video_height = $_POST[ 'cff_video_height' ];
940
if (isset($_POST[ 'cff_video_action' ])) $cff_video_action = $_POST[ 'cff_video_action' ];
941
if (isset($_POST[ 'cff_sep_color' ])) $cff_sep_color = $_POST[ 'cff_sep_color' ];
942
if (isset($_POST[ 'cff_sep_size' ])) $cff_sep_size = $_POST[ 'cff_sep_size' ];
943
if (isset($_POST[ 'cff_open_links' ])) $cff_open_links = $_POST[ 'cff_open_links' ];
944
+
945
+ $cff_ajax_val = $_POST[ $cff_ajax ];
946
+
947
//Meta
948
$options[ 'cff_icon_style' ] = $cff_icon_style;
949
$options[ 'cff_meta_text_color' ] = $cff_meta_text_color;
963
$options[ 'cff_likebox_width' ] = $cff_likebox_width;
964
$options[ 'cff_like_box_faces' ] = $cff_like_box_faces;
965
$options[ 'cff_like_box_border' ] = $cff_like_box_border;
966
967
$options[ 'cff_video_height' ] = $cff_video_height;
968
$options[ 'cff_video_action' ] = $cff_video_action;
969
$options[ 'cff_sep_color' ] = $cff_sep_color;
970
$options[ 'cff_sep_size' ] = $cff_sep_size;
971
$options[ 'cff_open_links' ] = $cff_open_links;
972
+
973
+ update_option( $cff_ajax, $cff_ajax_val );
974
}
975
//Update the Custom Text / Translate options
976
if( isset($_POST[ $style_custom_text_hidden_field_name ]) && $_POST[ $style_custom_text_hidden_field_name ] == 'Y' ) {
1034
1035
<div id="cff-admin" class="wrap">
1036
<div id="header">
1037
+ <h2><?php _e('Customize'); ?></h2>
1038
</div>
1039
<form name="form1" method="post" action="">
1040
<input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
1118
<input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled checked />
1119
<label for="cff_show_links_type"><?php _e('Links'); ?></label>
1120
</div>
1121
+ <div>
1122
+ <input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled checked />
1123
+ <label for="cff_show_links_type"><?php _e('Albums'); ?></label>
1124
+ </div>
1125
</td>
1126
</tr>
1127
</tbody>
1224
<?php if( $active_tab == 'typography' ) { //Start Typography tab ?>
1225
<input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
1226
<br />
1227
<p><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('"Inherit" means that the text will inherit the styles from your theme.'); ?></i></p>
1228
+
1229
<div id="poststuff" class="metabox-holder">
1230
<div class="meta-box-sortables ui-sortable">
1231
+
1232
+
1233
+ <div id="adminform" class="postbox" style="display: block;">
1234
<div class="handlediv" title="Click to toggle"><br></div>
1235
+ <h3 class="hndle"><span><?php _e('Feed Header'); ?></span></h3>
1236
<div class="inside">
1237
<table class="form-table">
1238
<tbody>
1239
<tr valign="top">
1240
+ <th class="bump-left" scope="row"><label><?php _e('Show Feed Header'); ?></label></th>
1241
<td>
1242
+ <input type="checkbox" name="cff_show_header" id="cff_show_header" <?php if($cff_show_header == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1243
+ <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This will show a header at the top of your feed'); ?></i>
1244
+ </td>
1245
+ </tr>
1246
+ <tr valign="top">
1247
+ <th class="bump-left" scope="row"><label><?php _e('Display outside the scrollable area'); ?></label></th>
1248
+ <td>
1249
+ <input type="checkbox" name="cff_header_outside" id="cff_header_outside" <?php if($cff_header_outside == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1250
+ <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Only applicable if you have set a height on the feed'); ?></i>
1251
+ </td>
1252
+ </tr>
1253
+ </tr>
1254
+ <th class="bump-left" scope="row"><label><?php _e('Text'); ?></label></th>
1255
+ <td>
1256
+ <input name="cff_header_text" type="text" value="<?php esc_attr_e( $cff_header_text ); ?>" size="30" />
1257
+ <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('The text to display in the feed header'); ?></i>
1258
</td>
1259
</tr>
1260
<tr valign="top">
1261
+ <th class="bump-left" scope="row"><label><?php _e('Background Color'); ?></label></th>
1262
<td>
1263
+ <input name="cff_header_bg_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_bg_color) ); ?>" class="cff-colorpicker" />
1264
</td>
1265
</tr>
1266
+ </tr>
1267
+ <th class="bump-left" scope="row"><label><?php _e('Padding'); ?></label></th>
1268
+ <td>
1269
+ <input name="cff_header_padding" type="text" value="<?php esc_attr_e( $cff_header_padding ); ?>" size="6" />
1270
+ <span>Eg. 20px, 5%. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This is the amount of padding/spacing that goes around the header.'); ?></i></span>
1271
+ </td>
1272
+ </tr>
1273
+ <tr>
1274
+ <th class="bump-left" scope="row"><label><?php _e('Text Size'); ?></label></th>
1275
+ <td>
1276
+ <select name="cff_header_text_size">
1277
+ <option value="inherit" <?php if($cff_header_text_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1278
+ <option value="10" <?php if($cff_header_text_size == "10") echo 'selected="selected"' ?> >10px</option>
1279
+ <option value="11" <?php if($cff_header_text_size == "11") echo 'selected="selected"' ?> >11px</option>
1280
+ <option value="12" <?php if($cff_header_text_size == "12") echo 'selected="selected"' ?> >12px</option>
1281
+ <option value="13" <?php if($cff_header_text_size == "13") echo 'selected="selected"' ?> >13px</option>
1282
+ <option value="14" <?php if($cff_header_text_size == "14") echo 'selected="selected"' ?> >14px</option>
1283
+ <option value="16" <?php if($cff_header_text_size == "16") echo 'selected="selected"' ?> >16px</option>
1284
+ <option value="18" <?php if($cff_header_text_size == "18") echo 'selected="selected"' ?> >18px</option>
1285
+ <option value="20" <?php if($cff_header_text_size == "20") echo 'selected="selected"' ?> >20px</option>
1286
+ <option value="24" <?php if($cff_header_text_size == "24") echo 'selected="selected"' ?> >24px</option>
1287
+ <option value="28" <?php if($cff_header_text_size == "28") echo 'selected="selected"' ?> >28px</option>
1288
+ <option value="32" <?php if($cff_header_text_size == "32") echo 'selected="selected"' ?> >32px</option>
1289
+ <option value="36" <?php if($cff_header_text_size == "36") echo 'selected="selected"' ?> >36px</option>
1290
+ <option value="42" <?php if($cff_header_text_size == "42") echo 'selected="selected"' ?> >42px</option>
1291
+ <option value="48" <?php if($cff_header_text_size == "48") echo 'selected="selected"' ?> >48px</option>
1292
+ <option value="54" <?php if($cff_header_text_size == "54") echo 'selected="selected"' ?> >54px</option>
1293
+ <option value="60" <?php if($cff_header_text_size == "60") echo 'selected="selected"' ?> >60px</option>
1294
+ </select>
1295
+ </td>
1296
+ </tr>
1297
+ <tr>
1298
+ <th class="bump-left" scope="row"><label><?php _e('Text Weight'); ?></label></th>
1299
+ <td>
1300
+ <select name="cff_header_text_weight">
1301
+ <option value="inherit" <?php if($cff_header_text_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1302
+ <option value="normal" <?php if($cff_header_text_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1303
+ <option value="bold" <?php if($cff_header_text_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1304
+ </select>
1305
+ </td>
1306
+ </tr>
1307
+ <tr>
1308
+ <th class="bump-left" scope="row"><label><?php _e('Text Color'); ?></label></th>
1309
+ <td>
1310
+ <input name="cff_header_text_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_text_color) ); ?>" class="cff-colorpicker" />
1311
+ </td>
1312
+ </tr>
1313
+ <tr>
1314
+ <th class="bump-left" scope="row"><label><?php _e('Icon Type'); ?></label></th>
1315
+ <td>
1316
+ <select name="cff_header_icon" id="cff-header-icon">
1317
+ <option value="facebook-square" <?php if($cff_header_icon == "facebook-square") echo 'selected="selected"' ?> >Facebook 1</option>
1318
+ <option value="facebook" <?php if($cff_header_icon == "facebook") echo 'selected="selected"' ?> >Facebook 2</option>
1319
+ <option value="calendar" <?php if($cff_header_icon == "calendar") echo 'selected="selected"' ?> >Events 1</option>
1320
+ <option value="calendar-o" <?php if($cff_header_icon == "calendar-o") echo 'selected="selected"' ?> >Events 2</option>
1321
+ <option value="picture-o" <?php if($cff_header_icon == "picture-o") echo 'selected="selected"' ?> >Photos</option>
1322
+ <option value="users" <?php if($cff_header_icon == "users") echo 'selected="selected"' ?> >People</option>
1323
+ <option value="thumbs-o-up" <?php if($cff_header_icon == "thumbs-o-up") echo 'selected="selected"' ?> >Thumbs Up 1</option>
1324
+ <option value="thumbs-up" <?php if($cff_header_icon == "thumbs-up") echo 'selected="selected"' ?> >Thumbs Up 2</option>
1325
+ <option value="comment-o" <?php if($cff_header_icon == "comment-o") echo 'selected="selected"' ?> >Speech Bubble 1</option>
1326
+ <option value="comment" <?php if($cff_header_icon == "comment") echo 'selected="selected"' ?> >Speech Bubble 2</option>
1327
+ <option value="ticket" <?php if($cff_header_icon == "ticket") echo 'selected="selected"' ?> >Ticket</option>
1328
+ <option value="list-alt" <?php if($cff_header_icon == "list-alt") echo 'selected="selected"' ?> >News List</option>
1329
+ <option value="file" <?php if($cff_header_icon == "file") echo 'selected="selected"' ?> >File 1</option>
1330
+ <option value="file-o" <?php if($cff_header_icon == "file-o") echo 'selected="selected"' ?> >File 2</option>
1331
+ <option value="file-text" <?php if($cff_header_icon == "file-text") echo 'selected="selected"' ?> >File 3</option>
1332
+ <option value="file-text-o" <?php if($cff_header_icon == "file-text-o") echo 'selected="selected"' ?> >File 4</option>
1333
+ <option value="youtube-play" <?php if($cff_header_icon == "youtube-play") echo 'selected="selected"' ?> >Video</option>
1334
+ <option value="youtube" <?php if($cff_header_icon == "youtube") echo 'selected="selected"' ?> >YouTube</option>
1335
+ <option value="vimeo-square" <?php if($cff_header_icon == "vimeo-square") echo 'selected="selected"' ?> >Vimeo</option>
1336
+ </select>
1337
+
1338
+ <i id="cff-header-icon-example" class="fa fa-facebook-square"></i>
1339
+ </td>
1340
+ </tr>
1341
+ <tr>
1342
+ <th class="bump-left" scope="row"><label><?php _e('Icon Color'); ?></label></th>
1343
+ <td>
1344
+ <input name="cff_header_icon_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_icon_color) ); ?>" class="cff-colorpicker" />
1345
+ </td>
1346
+ </tr>
1347
+ <tr>
1348
+ <th class="bump-left" scope="row"><label><?php _e('Icon Size'); ?></label></th>
1349
+ <td>
1350
+ <select name="cff_header_icon_size" id="cff-header-icon-size">
1351
+ <option value="10" <?php if($cff_header_icon_size == "10") echo 'selected="selected"' ?> >10px</option>
1352
+ <option value="11" <?php if($cff_header_icon_size == "11") echo 'selected="selected"' ?> >11px</option>
1353
+ <option value="12" <?php if($cff_header_icon_size == "12") echo 'selected="selected"' ?> >12px</option>
1354
+ <option value="13" <?php if($cff_header_icon_size == "13") echo 'selected="selected"' ?> >13px</option>
1355
+ <option value="14" <?php if($cff_header_icon_size == "14") echo 'selected="selected"' ?> >14px</option>
1356
+ <option value="16" <?php if($cff_header_icon_size == "16") echo 'selected="selected"' ?> >16px</option>
1357
+ <option value="18" <?php if($cff_header_icon_size == "18") echo 'selected="selected"' ?> >18px</option>
1358
+ <option value="20" <?php if($cff_header_icon_size == "20") echo 'selected="selected"' ?> >20px</option>
1359
+ <option value="24" <?php if($cff_header_icon_size == "24") echo 'selected="selected"' ?> >24px</option>
1360
+ <option value="28" <?php if($cff_header_icon_size == "28") echo 'selected="selected"' ?> >28px</option>
1361
+ <option value="32" <?php if($cff_header_icon_size == "32") echo 'selected="selected"' ?> >32px</option>
1362
+ <option value="36" <?php if($cff_header_icon_size == "36") echo 'selected="selected"' ?> >36px</option>
1363
+ <option value="42" <?php if($cff_header_icon_size == "42") echo 'selected="selected"' ?> >42px</option>
1364
+ <option value="48" <?php if($cff_header_icon_size == "48") echo 'selected="selected"' ?> >48px</option>
1365
+ <option value="54" <?php if($cff_header_icon_size == "54") echo 'selected="selected"' ?> >54px</option>
1366
+ <option value="60" <?php if($cff_header_icon_size == "60") echo 'selected="selected"' ?> >60px</option>
1367
+ </select>
1368
+ </td>
1369
+ </tr>
1370
+
1371
</tbody>
1372
</table>
1373
</div>
1374
</div>
1375
+
1376
+ <div id="adminform" class="postbox" style="display: block;">
1377
+ <div class="handlediv" title="Click to toggle"><br></div>
1378
+ <h3 class="hndle"><span><?php _e('Post Author'); ?></span></h3>
1379
+ <div class="inside">
1380
+ <table class="form-table">
1381
+ <tbody>
1382
+ <tr>
1383
+ <th><label for="cff_author_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1384
+ <td>
1385
+ <select name="cff_author_size">
1386
+ <option value="inherit" <?php if($cff_author_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1387
+ <option value="10" <?php if($cff_author_size == "10") echo 'selected="selected"' ?> >10px</option>
1388
+ <option value="11" <?php if($cff_author_size == "11") echo 'selected="selected"' ?> >11px</option>
1389
+ <option value="12" <?php if($cff_author_size == "12") echo 'selected="selected"' ?> >12px</option>
1390
+ <option value="13" <?php if($cff_author_size == "13") echo 'selected="selected"' ?> >13px</option>
1391
+ <option value="14" <?php if($cff_author_size == "14") echo 'selected="selected"' ?> >14px</option>
1392
+ <option value="16" <?php if($cff_author_size == "16") echo 'selected="selected"' ?> >16px</option>
1393
+ <option value="18" <?php if($cff_author_size == "18") echo 'selected="selected"' ?> >18px</option>
1394
+ <option value="20" <?php if($cff_author_size == "20") echo 'selected="selected"' ?> >20px</option>
1395
+ <option value="24" <?php if($cff_author_size == "24") echo 'selected="selected"' ?> >24px</option>
1396
+ <option value="28" <?php if($cff_author_size == "28") echo 'selected="selected"' ?> >28px</option>
1397
+ <option value="32" <?php if($cff_author_size == "32") echo 'selected="selected"' ?> >32px</option>
1398
+ <option value="36" <?php if($cff_author_size == "36") echo 'selected="selected"' ?> >36px</option>
1399
+ <option value="42" <?php if($cff_author_size == "42") echo 'selected="selected"' ?> >42px</option>
1400
+ <option value="48" <?php if($cff_author_size == "48") echo 'selected="selected"' ?> >48px</option>
1401
+ <option value="54" <?php if($cff_author_size == "54") echo 'selected="selected"' ?> >54px</option>
1402
+ <option value="60" <?php if($cff_author_size == "60") echo 'selected="selected"' ?> >60px</option>
1403
+ </select>
1404
+ </td>
1405
+ </tr>
1406
+ <tr>
1407
+ <th><label for="cff_author_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1408
+ <td>
1409
+ <input name="cff_author_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_author_color) ); ?>" class="cff-colorpicker" />
1410
+ </td>
1411
+ </tr>
1412
+ </tbody>
1413
+ </table>
1414
+ </div>
1415
+ </div>
1416
+
1417
+ <div style="margin-top: -15px;">
1418
+ <?php submit_button(); ?>
1419
+ </div>
1420
<div id="adminform" class="postbox" style="display: block;">
1421
<div class="handlediv" title="Click to toggle"><br></div>
1422
<h3 class="hndle"><span><?php _e('Post Text'); ?></span></h3>
1423
<div class="inside">
1424
<table class="form-table">
1425
<tbody>
1426
+ <tr valign="top">
1427
+ <th scope="row"><label class="bump-left"><?php _e('Maximum Post Text Length'); ?></label></th>
1428
+ <td>
1429
+ <input name="cff_title_length" type="text" value="<?php esc_attr_e( $cff_title_length_val ); ?>" size="4" /> <span><?php _e('Characters.'); ?></span> <span>Eg. 200</span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('If the post text exceeds this length then a "See More" button will be added. Leave empty to set no maximum length.'); ?></i>
1430
+ </td>
1431
+ </tr>
1432
<tr>
1433
<th><label for="cff_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
1434
<td>
1449
<option value="10" <?php if($cff_title_size == "10") echo 'selected="selected"' ?> >10px</option>
1450
<option value="11" <?php if($cff_title_size == "11") echo 'selected="selected"' ?> >11px</option>
1451
<option value="12" <?php if($cff_title_size == "12") echo 'selected="selected"' ?> >12px</option>
1452
+ <option value="13" <?php if($cff_title_size == "13") echo 'selected="selected"' ?> >13px</option>
1453
<option value="14" <?php if($cff_title_size == "14") echo 'selected="selected"' ?> >14px</option>
1454
<option value="16" <?php if($cff_title_size == "16") echo 'selected="selected"' ?> >16px</option>
1455
<option value="18" <?php if($cff_title_size == "18") echo 'selected="selected"' ?> >18px</option>
1460
<option value="36" <?php if($cff_title_size == "36") echo 'selected="selected"' ?> >36px</option>
1461
<option value="42" <?php if($cff_title_size == "42") echo 'selected="selected"' ?> >42px</option>
1462
<option value="48" <?php if($cff_title_size == "48") echo 'selected="selected"' ?> >48px</option>
1463
+ <option value="54" <?php if($cff_title_size == "54") echo 'selected="selected"' ?> >54px</option>
1464
<option value="60" <?php if($cff_title_size == "60") echo 'selected="selected"' ?> >60px</option>
1465
</select>
1466
</td>
1482
</td>
1483
</tr>
1484
<tr>
1485
+ <th><label for="cff_posttext_link_color" class="bump-left"><?php _e('Link Color'); ?></label></th>
1486
+ <td>
1487
+ <input name="cff_posttext_link_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_posttext_link_color) ); ?>" class="cff-colorpicker" />
1488
+ </td>
1489
+ </tr>
1490
+ <tr>
1491
+ <th><label for="cff_title_link" class="bump-left"><?php _e('Link Text to Facebook Post?'); ?></label></th>
1492
+ <td><input type="checkbox" name="cff_title_link" id="cff_title_link" <?php if($cff_title_link == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?></td>
1493
</tr>
1494
1495
<tr>
1496
+ <th><label for="cff_post_tags" class="bump-left"><?php _e('Link Post Tags?'); ?></label></th>
1497
<td>
1498
<input type="checkbox" name="cff_post_tags" id="cff_post_tags" <?php if($cff_post_tags == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1499
<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What are Post Tags?'); ?></a>
1500
+ <p class="cff-tooltip cff-more-info"><?php _e("When you tag another Facebook page or user in your post using the @ symbol it creates a post tag, which is a link to either that Facebook page or user profile."); ?></p>
1501
</td>
1502
</tr>
1503
1511
<div class="inside">
1512
<table class="form-table">
1513
<tbody>
1514
+
1515
+ <tr valign="top">
1516
+ <th scope="row"><label class="bump-left"><?php _e('Maximum Description Length'); ?></label></th>
1517
+ <td>
1518
+ <input name="cff_body_length" type="text" value="<?php esc_attr_e( $cff_body_length_val ); ?>" size="4" /> <span><?php _e('Characters. Eg. 200'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Leave empty to set no maximum length'); ?></i>
1519
+ </td>
1520
+ </tr>
1521
1522
<tr>
1523
<th><label for="cff_body_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1527
<option value="10" <?php if($cff_body_size == "10") echo 'selected="selected"' ?> >10px</option>
1528
<option value="11" <?php if($cff_body_size == "11") echo 'selected="selected"' ?> >11px</option>
1529
<option value="12" <?php if($cff_body_size == "12") echo 'selected="selected"' ?> >12px</option>
1530
+ <option value="13" <?php if($cff_body_size == "13") echo 'selected="selected"' ?> >13px</option>
1531
<option value="14" <?php if($cff_body_size == "14") echo 'selected="selected"' ?> >14px</option>
1532
<option value="16" <?php if($cff_body_size == "16") echo 'selected="selected"' ?> >16px</option>
1533
<option value="18" <?php if($cff_body_size == "18") echo 'selected="selected"' ?> >18px</option>
1538
<option value="36" <?php if($cff_body_size == "36") echo 'selected="selected"' ?> >36px</option>
1539
<option value="42" <?php if($cff_body_size == "42") echo 'selected="selected"' ?> >42px</option>
1540
<option value="48" <?php if($cff_body_size == "48") echo 'selected="selected"' ?> >48px</option>
1541
+ <option value="54" <?php if($cff_body_size == "54") echo 'selected="selected"' ?> >54px</option>
1542
<option value="60" <?php if($cff_body_size == "60") echo 'selected="selected"' ?> >60px</option>
1543
</select>
1544
</td>
1560
<input name="cff_body_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_body_color) ); ?>" class="cff-colorpicker" />
1561
</td>
1562
</tr>
1563
+ <tr>
1564
+ <th><label for="cff_link_title_format" class="bump-left"><?php _e('Shared Link Title Format'); ?></label></th>
1565
+ <td>
1566
+ <select name="cff_link_title_format">
1567
+ <option value="p" <?php if($cff_link_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
1568
+ <option value="h3" <?php if($cff_link_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
1569
+ <option value="h4" <?php if($cff_link_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
1570
+ <option value="h5" <?php if($cff_link_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
1571
+ <option value="h6" <?php if($cff_link_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
1572
+ </select>
1573
+ </td>
1574
+ </tr>
1575
+ <tr>
1576
+ <th><label for="cff_link_title_size" class="bump-left"><?php _e('Shared Link Title Size'); ?></label></th>
1577
+ <td>
1578
+ <select name="cff_link_title_size">
1579
+ <option value="inherit" <?php if($cff_link_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1580
+ <option value="10" <?php if($cff_link_title_size == "10") echo 'selected="selected"' ?> >10px</option>
1581
+ <option value="11" <?php if($cff_link_title_size == "11") echo 'selected="selected"' ?> >11px</option>
1582
+ <option value="12" <?php if($cff_link_title_size == "12") echo 'selected="selected"' ?> >12px</option>
1583
+ <option value="13" <?php if($cff_link_title_size == "13") echo 'selected="selected"' ?> >13px</option>
1584
+ <option value="14" <?php if($cff_link_title_size == "14") echo 'selected="selected"' ?> >14px</option>
1585
+ <option value="16" <?php if($cff_link_title_size == "16") echo 'selected="selected"' ?> >16px</option>
1586
+ <option value="18" <?php if($cff_link_title_size == "18") echo 'selected="selected"' ?> >18px</option>
1587
+ <option value="20" <?php if($cff_link_title_size == "20") echo 'selected="selected"' ?> >20px</option>
1588
+ <option value="24" <?php if($cff_link_title_size == "24") echo 'selected="selected"' ?> >24px</option>
1589
+ <option value="28" <?php if($cff_link_title_size == "28") echo 'selected="selected"' ?> >28px</option>
1590
+ <option value="32" <?php if($cff_link_title_size == "32") echo 'selected="selected"' ?> >32px</option>
1591
+ <option value="36" <?php if($cff_link_title_size == "36") echo 'selected="selected"' ?> >36px</option>
1592
+ <option value="42" <?php if($cff_link_title_size == "42") echo 'selected="selected"' ?> >42px</option>
1593
+ <option value="48" <?php if($cff_link_title_size == "48") echo 'selected="selected"' ?> >48px</option>
1594
+ <option value="54" <?php if($cff_link_title_size == "54") echo 'selected="selected"' ?> >54px</option>
1595
+ <option value="60" <?php if($cff_link_title_size == "60") echo 'selected="selected"' ?> >60px</option>
1596
+ </select>
1597
+ </td>
1598
+ </tr>
1599
+ <tr>
1600
+ <th><label for="cff_link_title_color" class="bump-left"><?php _e('Shared Link Title Color'); ?></label></th>
1601
+ <td>
1602
+ <input name="cff_link_title_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_title_color) ); ?>" class="cff-colorpicker" />
1603
+ </td>
1604
+ </tr>
1605
+ <tr>
1606
+ <th><label for="cff_link_url_color" class="bump-left"><?php _e('Shared Link URL Color'); ?></label></th>
1607
+ <td>
1608
+ <input name="cff_link_url_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_url_color) ); ?>" class="cff-colorpicker" />
1609
+ </td>
1610
+ </tr>
1611
+
1612
</tbody>
1613
</table>
1614
</div>
1618
</div>
1619
<div id="adminform" class="postbox" style="display: block;">
1620
<div class="handlediv" title="Click to toggle"><br></div>
1621
+ <h3 class="hndle"><span><?php _e('Post Date'); ?></span></h3>
1622
<div class="inside">
1623
<table class="form-table">
1624
<tbody>
1639
<option value="10" <?php if($cff_date_size == "10") echo 'selected="selected"' ?> >10px</option>
1640
<option value="11" <?php if($cff_date_size == "11") echo 'selected="selected"' ?> >11px</option>
1641
<option value="12" <?php if($cff_date_size == "12") echo 'selected="selected"' ?> >12px</option>
1642
+ <option value="13" <?php if($cff_date_size == "13") echo 'selected="selected"' ?> >13px</option>
1643
<option value="14" <?php if($cff_date_size == "14") echo 'selected="selected"' ?> >14px</option>
1644
<option value="16" <?php if($cff_date_size == "16") echo 'selected="selected"' ?> >16px</option>
1645
<option value="18" <?php if($cff_date_size == "18") echo 'selected="selected"' ?> >18px</option>
1650
<option value="36" <?php if($cff_date_size == "36") echo 'selected="selected"' ?> >36px</option>
1651
<option value="42" <?php if($cff_date_size == "42") echo 'selected="selected"' ?> >42px</option>
1652
<option value="48" <?php if($cff_date_size == "48") echo 'selected="selected"' ?> >48px</option>
1653
+ <option value="54" <?php if($cff_date_size == "54") echo 'selected="selected"' ?> >54px</option>
1654
<option value="60" <?php if($cff_date_size == "60") echo 'selected="selected"' ?> >60px</option>
1655
</select>
1656
</td>
1675
<tr>
1676
<th><label for="cff_date_formatting" class="bump-left"><?php _e('Date formatting'); ?></label></th>
1677
<td>
1678
+ <select name="cff_date_formatting">
1679
<?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
1680
<option value="1" <?php if($cff_date_formatting == "1") echo 'selected="selected"' ?> ><?php _e('2 days ago'); ?></option>
1681
<option value="2" <?php if($cff_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:i a', $original); ?></option>
1691
<option value="12" <?php if($cff_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y', $original); ?></option>
1692
<option value="13" <?php if($cff_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y', $original); ?></option>
1693
</select>
1694
</tr>
1695
1696
<tr>
1795
<th><label for="cff_date_custom" class="bump-left"><?php _e('Custom format'); ?></label></th>
1796
<td>
1797
<input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
1798
+ <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
1799
</td>
1800
</tr>
1801
<tr>
1838
<option value="10" <?php if($cff_event_title_size == "10") echo 'selected="selected"' ?> >10px</option>
1839
<option value="11" <?php if($cff_event_title_size == "11") echo 'selected="selected"' ?> >11px</option>
1840
<option value="12" <?php if($cff_event_title_size == "12") echo 'selected="selected"' ?> >12px</option>
1841
+ <option value="13" <?php if($cff_event_title_size == "13") echo 'selected="selected"' ?> >13px</option>
1842
<option value="14" <?php if($cff_event_title_size == "14") echo 'selected="selected"' ?> >14px</option>
1843
<option value="16" <?php if($cff_event_title_size == "16") echo 'selected="selected"' ?> >16px</option>
1844
<option value="18" <?php if($cff_event_title_size == "18") echo 'selected="selected"' ?> >18px</option>
1849
<option value="36" <?php if($cff_event_title_size == "36") echo 'selected="selected"' ?> >36px</option>
1850
<option value="42" <?php if($cff_event_title_size == "42") echo 'selected="selected"' ?> >42px</option>
1851
<option value="48" <?php if($cff_event_title_size == "48") echo 'selected="selected"' ?> >48px</option>
1852
+ <option value="54" <?php if($cff_event_title_size == "54") echo 'selected="selected"' ?> >54px</option>
1853
<option value="60" <?php if($cff_event_title_size == "60") echo 'selected="selected"' ?> >60px</option>
1854
</select>
1855
</td>
1871
</td>
1872
</tr>
1873
<tr>
1874
+ <th><label for="cff_event_title_link" class="bump-left"><?php _e('Link title to Facebook event page?'); ?></label></th>
1875
+ <td><input type="checkbox" name="cff_event_title_link" id="cff_event_title_link" <?php if($cff_event_title_link == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?></td>
1876
</tr>
1877
</tbody>
1878
</table>
1896
<option value="10" <?php if($cff_event_date_size == "10") echo 'selected="selected"' ?> >10px</option>
1897
<option value="11" <?php if($cff_event_date_size == "11") echo 'selected="selected"' ?> >11px</option>
1898
<option value="12" <?php if($cff_event_date_size == "12") echo 'selected="selected"' ?> >12px</option>
1899
+ <option value="13" <?php if($cff_event_date_size == "13") echo 'selected="selected"' ?> >13px</option>
1900
<option value="14" <?php if($cff_event_date_size == "14") echo 'selected="selected"' ?> >14px</option>
1901
<option value="16" <?php if($cff_event_date_size == "16") echo 'selected="selected"' ?> >16px</option>
1902
<option value="18" <?php if($cff_event_date_size == "18") echo 'selected="selected"' ?> >18px</option>
1907
<option value="36" <?php if($cff_event_date_size == "36") echo 'selected="selected"' ?> >36px</option>
1908
<option value="42" <?php if($cff_event_date_size == "42") echo 'selected="selected"' ?> >42px</option>
1909
<option value="48" <?php if($cff_event_date_size == "48") echo 'selected="selected"' ?> >48px</option>
1910
+ <option value="54" <?php if($cff_event_date_size == "54") echo 'selected="selected"' ?> >54px</option>
1911
<option value="60" <?php if($cff_event_date_size == "60") echo 'selected="selected"' ?> >60px</option>
1912
</select>
1913
</td>
1962
<th><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom event date format'); ?></label></th>
1963
<td>
1964
<input name="cff_event_date_custom" type="text" value="<?php esc_attr_e( $cff_event_date_custom ); ?>" size="10" placeholder="Eg. F j, Y - g:ia" />
1965
+ <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
1966
</td>
1967
</tr>
1968
</tbody>
1984
<option value="10" <?php if($cff_event_details_size == "10") echo 'selected="selected"' ?> >10px</option>
1985
<option value="11" <?php if($cff_event_details_size == "11") echo 'selected="selected"' ?> >11px</option>
1986
<option value="12" <?php if($cff_event_details_size == "12") echo 'selected="selected"' ?> >12px</option>
1987
+ <option value="13" <?php if($cff_event_details_size == "13") echo 'selected="selected"' ?> >13px</option>
1988
<option value="14" <?php if($cff_event_details_size == "14") echo 'selected="selected"' ?> >14px</option>
1989
<option value="16" <?php if($cff_event_details_size == "16") echo 'selected="selected"' ?> >16px</option>
1990
<option value="18" <?php if($cff_event_details_size == "18") echo 'selected="selected"' ?> >18px</option>
1995
<option value="36" <?php if($cff_event_details_size == "36") echo 'selected="selected"' ?> >36px</option>
1996
<option value="42" <?php if($cff_event_details_size == "42") echo 'selected="selected"' ?> >42px</option>
1997
<option value="48" <?php if($cff_event_details_size == "48") echo 'selected="selected"' ?> >48px</option>
1998
+ <option value="54" <?php if($cff_event_details_size == "54") echo 'selected="selected"' ?> >54px</option>
1999
<option value="60" <?php if($cff_event_details_size == "60") echo 'selected="selected"' ?> >60px</option>
2000
</select>
2001
</td>
2016
<input name="cff_event_details_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_details_color) ); ?>" class="cff-colorpicker" />
2017
</td>
2018
</tr>
2019
+ <tr>
2020
+ <th><label for="cff_event_link_color" class="bump-left"><?php _e('Link Color'); ?></label></th>
2021
+ <td>
2022
+ <input name="cff_event_link_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_link_color) ); ?>" class="cff-colorpicker" />
2023
+ </td>
2024
+ </tr>
2025
+
2026
</tbody>
2027
</table>
2028
</div>
2042
<option value="10" <?php if($cff_link_size == "10") echo 'selected="selected"' ?> >10px</option>
2043
<option value="11" <?php if($cff_link_size == "11") echo 'selected="selected"' ?> >11px</option>
2044
<option value="12" <?php if($cff_link_size == "12") echo 'selected="selected"' ?> >12px</option>
2045
+ <option value="13" <?php if($cff_link_size == "13") echo 'selected="selected"' ?> >13px</option>
2046
<option value="14" <?php if($cff_link_size == "14") echo 'selected="selected"' ?> >14px</option>
2047
<option value="16" <?php if($cff_link_size == "16") echo 'selected="selected"' ?> >16px</option>
2048
<option value="18" <?php if($cff_link_size == "18") echo 'selected="selected"' ?> >18px</option>
2053
<option value="36" <?php if($cff_link_size == "36") echo 'selected="selected"' ?> >36px</option>
2054
<option value="42" <?php if($cff_link_size == "42") echo 'selected="selected"' ?> >42px</option>
2055
<option value="48" <?php if($cff_link_size == "48") echo 'selected="selected"' ?> >48px</option>
2056
+ <option value="54" <?php if($cff_link_size == "54") echo 'selected="selected"' ?> >54px</option>
2057
<option value="60" <?php if($cff_link_size == "60") echo 'selected="selected"' ?> >60px</option>
2058
</select>
2059
</td>
2075
</td>
2076
</tr>
2077
<tr>
2078
+ <th><label for="cff_facebook_link_text" class="bump-left"><?php _e('Text'); ?></label></th>
2079
<td>
2080
+ <input name="cff_facebook_link_text" type="text" value="<?php esc_attr_e( $cff_facebook_link_text ); ?>" size="25" />
2081
</td>
2082
</tr>
2083
2090
<div style="margin-top: -15px;">
2091
<?php submit_button(); ?>
2092
</div>
2093
+
2094
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2095
2096
<?php } //End Typography tab ?>
2099
<br />
2100
<h3><?php _e('Likes, Shares and Comments'); ?></h3><i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable likes, shares and comments'); ?></a></i>
2101
2102
<hr />
2103
<h3><?php _e('Like Box'); ?></h3>
2104
<table class="form-table">
2115
<th class="bump-left" scope="row"><label><?php _e('Position'); ?></label></th>
2116
<td>
2117
<select name="cff_like_box_position">
2118
+ <option value="bottom" <?php if($cff_like_box_position == "bottom") echo 'selected="selected"' ?> ><?php _e('Below posts'); ?></option>
2119
+ <option value="top" <?php if($cff_like_box_position == "top") echo 'selected="selected"' ?> ><?php _e('Above posts'); ?></option>
2120
</select>
2121
</td>
2122
</tr>
2168
</tbody>
2169
</table>
2170
2171
<hr />
2172
+ <h3><?php _e('Custom CSS'); ?></h3>
2173
<table class="form-table">
2174
<tbody>
2175
<tr valign="top">
2176
<td>
2177
+ <?php _e('Enter your own custom CSS in the box below'); ?>
2178
+ <i style="margin-left: 5px; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank"><?php _e('See some examples'); ?></a></i>
2179
</td>
2180
</tr>
2181
<tr valign="top">
2182
<td>
2183
+ <textarea name="cff_custom_css" id="cff_custom_css" style="width: 70%;" rows="7"><?php esc_attr_e( $cff_custom_css ); ?></textarea>
2184
</td>
2185
</tr>
2186
+ </tbody>
2187
+ </table>
2188
+ <h3><?php _e('Custom JavaScript'); ?></h3>
2189
+ <table class="form-table">
2190
+ <tbody>
2191
<tr valign="top">
2192
<td>
2193
+ <?php _e('Enter your own custom JavaScript/jQuery in the box below'); ?>
2194
+ <i style="margin-left: 5px; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank"><?php _e('See some examples'); ?></a></i>
2195
</td>
2196
</tr>
2197
+ <tr valign="top">
2198
<td>
2199
+ <textarea name="cff_custom_js" id="cff_custom_js" style="width: 70%;" rows="7"><?php esc_attr_e( stripslashes($cff_custom_js) ); ?></textarea>
2200
</td>
2201
</tr>
2202
</tbody>
2203
</table>
2204
+ <?php submit_button(); ?>
2205
2206
2207
<hr />
2222
</tr>
2223
</tbody>
2224
</table>
2225
+
2226
+ <hr />
2227
+ <h3><?php _e('Misc Settings'); ?></h3>
2228
+ <table class="form-table">
2229
+ <tbody>
2230
+ <tr>
2231
+ <th><label for="cff_ajax" class="bump-left"><?php _e('Is your theme loading the Facebook feed via Ajax?'); ?></label></th>
2232
+ <td>
2233
+ <input name="cff_ajax" type="checkbox" id="cff_ajax" <?php if($cff_ajax_val == true) echo "checked"; ?> />
2234
+ <label for="cff_ajax"><?php _e('Yes'); ?></label>
2235
+ <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
2236
+ <p class="cff-tooltip cff-more-info"><?php _e('Some modern WordPress themes use Ajax to load content into the page after it has loaded. If your theme uses Ajax to load the Custom Facebook Feed content into the page then check this box. If you are not sure then please check with the theme author.'); ?></p>
2237
+ </td>
2238
+ </tr>
2239
+ </tbody>
2240
+ </table>
2241
+
2242
<?php submit_button(); ?>
2243
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2244
<?php } //End Misc tab ?>
2351
} //End Style_Page
2352
//Enqueue admin styles
2353
function cff_admin_style() {
2354
+ wp_register_style( 'custom_wp_admin_css', plugin_dir_url( __FILE__ ) . 'css/cff-admin-style.css?4', false, '1.0.0' );
2355
wp_enqueue_style( 'custom_wp_admin_css' );
2356
wp_enqueue_style( 'cff-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );
2357
wp_enqueue_style( 'wp-color-picker' );
2359
add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
2360
//Enqueue admin scripts
2361
function cff_admin_scripts() {
2362
+ wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js?4' );
2363
if( !wp_script_is('jquery-ui-draggable') ) {
2364
wp_enqueue_script(
2365
array(
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.8.2.3
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
@@ -73,11 +73,22 @@ function display_cff($atts) {
73
'textsize' => isset($options[ 'cff_title_size' ]) ? $options[ 'cff_title_size' ] : '',
74
'textweight' => isset($options[ 'cff_title_weight' ]) ? $options[ 'cff_title_weight' ] : '',
75
'textcolor' => isset($options[ 'cff_title_color' ]) ? $options[ 'cff_title_color' ] : '',
76
'textlink' => isset($options[ 'cff_title_link' ]) ? $options[ 'cff_title_link' ] : '',
77
'posttags' => isset($options[ 'cff_post_tags' ]) ? $options[ 'cff_post_tags' ] : '',
78
'descsize' => isset($options[ 'cff_body_size' ]) ? $options[ 'cff_body_size' ] : '',
79
'descweight' => isset($options[ 'cff_body_weight' ]) ? $options[ 'cff_body_weight' ] : '',
80
'desccolor' => isset($options[ 'cff_body_color' ]) ? $options[ 'cff_body_color' ] : '',
81
//Event title
82
'eventtitleformat' => isset($options[ 'cff_event_title_format' ]) ? $options[ 'cff_event_title_format' ] : '',
83
'eventtitlesize' => isset($options[ 'cff_event_title_size' ]) ? $options[ 'cff_event_title_size' ] : '',
@@ -95,6 +106,7 @@ function display_cff($atts) {
95
'eventdetailssize' => isset($options[ 'cff_event_details_size' ]) ? $options[ 'cff_event_details_size' ] : '',
96
'eventdetailsweight' => isset($options[ 'cff_event_details_weight' ]) ? $options[ 'cff_event_details_weight' ] : '',
97
'eventdetailscolor' => isset($options[ 'cff_event_details_color' ]) ? $options[ 'cff_event_details_color' ] : '',
98
//Date
99
'datepos' => isset($options[ 'cff_date_position' ]) ? $options[ 'cff_date_position' ] : '',
100
'datesize' => isset($options[ 'cff_date_size' ]) ? $options[ 'cff_date_size' ] : '',
@@ -265,6 +277,15 @@ function display_cff($atts) {
265
if ( !empty($cff_title_color) ) $cff_title_styles .= 'color:#' . str_replace('#', '', $cff_title_color) . ';';
266
$cff_title_styles .= '"';
267
$cff_title_link = $atts[ 'textlink' ];
268
//Description
269
$cff_body_size = $atts[ 'descsize' ];
270
$cff_body_weight = $atts[ 'descweight' ];
@@ -274,6 +295,18 @@ function display_cff($atts) {
274
if ( !empty($cff_body_weight) && $cff_body_weight != 'inherit' ) $cff_body_styles .= 'font-weight:' . $cff_body_weight . '; ';
275
if ( !empty($cff_body_color) ) $cff_body_styles .= 'color:#' . str_replace('#', '', $cff_body_color) . ';';
276
$cff_body_styles .= '"';
277
//Event Title
278
$cff_event_title_format = $atts[ 'eventtitleformat' ];
279
if (empty($cff_event_title_format)) $cff_event_title_format = 'p';
@@ -302,6 +335,7 @@ function display_cff($atts) {
302
$cff_event_details_size = $atts[ 'eventdetailssize' ];
303
$cff_event_details_weight = $atts[ 'eventdetailsweight' ];
304
$cff_event_details_color = $atts[ 'eventdetailscolor' ];
305
$cff_event_details_styles = 'style="';
306
if ( !empty($cff_event_details_size) && $cff_event_details_size != 'inherit' ) $cff_event_details_styles .= 'font-size:' . $cff_event_details_size . 'px; ';
307
if ( !empty($cff_event_details_weight) && $cff_event_details_weight != 'inherit' ) $cff_event_details_styles .= 'font-weight:' . $cff_event_details_weight . '; ';
@@ -391,7 +425,12 @@ function display_cff($atts) {
391
$cff_sep_color = $atts[ 'sepcolor' ];
392
if (empty($cff_sep_color)) $cff_sep_color = 'ddd';
393
$cff_sep_size = $atts[ 'sepsize' ];
394
- if (empty($cff_sep_size)) $cff_sep_size = 0;
395
//CFF item styles
396
$cff_item_styles = 'style="';
397
$cff_item_styles .= 'border-bottom: ' . $cff_sep_size . 'px solid #' . str_replace('#', '', $cff_sep_color) . '; ';
@@ -416,18 +455,18 @@ function display_cff($atts) {
416
$page_id = substr( $page_id, strrpos( $page_id, '/' )+1 );
417
}
418
419
//Get show posts attribute. If not set then default to 25
420
$show_posts = $atts['num'];
421
if (empty($show_posts)) $show_posts = 25;
422
if ( $show_posts == 0 || $show_posts == 'undefined' ) $show_posts = 25;
423
- //Check whether the Access Token is present and valid
424
- if ($access_token == '') {
425
- echo 'Please enter a valid Access Token. You can do this in the Custom Facebook Feed plugin settings.<br /><br />';
426
- return false;
427
- }
428
//Check whether a Page ID has been defined
429
if ($page_id == '') {
430
- echo "Please enter the Page ID of the Facebook feed you'd like to display. You can do this in either the Custom Facebook Feed plugin settings or in the shortcode itself. For example [custom_facebook_feed id=<b>YOUR_PAGE_ID</b>].<br /><br />";
431
return false;
432
}
433
@@ -515,7 +554,7 @@ function display_cff($atts) {
515
$cff_header .= '"' . $cff_header_styles . '>';
516
$cff_header .= '<i class="fa fa-' . $cff_header_icon . '"';
517
if(!empty($cff_header_icon_color) || !empty($cff_header_icon_size)) $cff_header .= ' style="';
518
- if(!empty($cff_header_icon_color)) $cff_header .= 'color: #' . $cff_header_icon_color . ';';
519
if(!empty($cff_header_icon_size)) $cff_header .= ' font-size: ' . $cff_header_icon_size . 'px;';
520
if(!empty($cff_header_icon_color) || !empty($cff_header_icon_size))$cff_header .= '"';
521
$cff_header .= '></i>';
@@ -689,7 +728,7 @@ function display_cff($atts) {
689
}
690
691
//POST AUTHOR
692
- $cff_author = '<a class="cff-author" href="https://facebook.com/' . $news->from->id . '" '.$target.' title="'.$news->from->name.' on Facebook">';
693
694
//Set the author image as a variable. If it already exists then don't query the api for it again.
695
$cff_author_img_var = '$cff_author_img_' . $news->from->id;
@@ -742,17 +781,19 @@ function display_cff($atts) {
742
//Add message and story tags if there are any and the post text is the message or the story
743
if( $cff_post_tags && ( isset($news->message_tags) || isset($news->story_tags) ) && ($cff_post_text_type == 'message' || $cff_post_text_type == 'story') && $cff_title_link != 'true' ){
744
//Use message_tags or story_tags?
745
- ( $cff_post_text_type == 'message' )? $text_tags = $news->message_tags : $text_tags = $news->story_tags;
746
747
//Does the Post Text contain any html tags? - the & symbol is the best indicator of this
748
$html_check = stripos($post_text, '&');
749
750
//If it contains HTML tags then use the name replace method
751
if( $html_check ) {
752
//Loop through the tags
753
foreach($text_tags as $message_tag ) {
754
$tag_name = $message_tag[0]->name;
755
- $tag_link = '<a href="http://facebook.com/' . $message_tag[0]->id . '" target="_blank">' . $message_tag[0]->name . '</a>';
756
757
$post_text = str_replace($tag_name, $tag_link, $post_text);
758
}
@@ -795,16 +836,16 @@ function display_cff($atts) {
795
//If the text is wrapped in a link then don't hyperlink any text within
796
if ($cff_title_link) {
797
//Wrap links in a span so we can break the text if it's too long
798
- $cff_post_text .= cff_autolink( htmlspecialchars($post_text), true ) . ' ';
799
} else {
800
//Don't use htmlspecialchars for post_text as it's added above so that it doesn't mess up the message_tag offsets
801
- $cff_post_text .= cff_autolink( $post_text ) . ' ';
802
}
803
804
if ($cff_title_link) $cff_post_text .= '</a>';
805
$cff_post_text .= '</span>';
806
//'See More' link
807
- $cff_post_text .= '<span class="cff-expand">... <a href="#"><span class="cff-more">' . $cff_see_more_text . '</span><span class="cff-less">' . $cff_see_less_text . '</span></a></span>';
808
$cff_post_text .= '</' . $cff_title_format . '>';
809
810
//DESCRIPTION
@@ -839,8 +880,10 @@ function display_cff($atts) {
839
if (!empty($news->description)) {
840
$cff_shared_link .= '<div class="cff-text-link ';
841
$cff_shared_link .= 'cff-no-image';
842
- $cff_shared_link .= '"><a class="cff-link-title" href="'.$link.'" '.$target.'>'. '<b>' . $news->name . '</b></a>';
843
- if(!empty($news->caption)) $cff_shared_link .= '<p class="cff-link-caption">'.$news->caption.'</p>';
844
if ($cff_show_desc) {
845
$cff_shared_link .= $cff_description;
846
}
@@ -919,7 +962,7 @@ function display_cff($atts) {
919
if (!empty($body_limit)) {
920
if (strlen($description) > $body_limit) $description = substr($description, 0, $body_limit) . '...';
921
}
922
- $cff_event .= '<p class="cff-info" ' . $cff_event_details_styles . '>' . cff_autolink($description) . '</p>';
923
}
924
}
925
$cff_event .= '</div>';
@@ -938,7 +981,13 @@ function display_cff($atts) {
938
isset($news->description) ? $description_text = $news->description : $description_text = '';
939
$cff_description = '<div class="cff-desc-wrap ';
940
if (empty($picture)) $cff_description .= 'cff-no-image';
941
- $cff_description .= '"><a class="cff-link-title" href="'.$link.'" '.$target.'>'. '<b>' . $video_name . '</b></a>';
942
$cff_description .= '<p class="cff-post-desc" '.$cff_body_styles.'><span>' . cff_autolink( htmlspecialchars($description_text) ) . '</span></p></div>';
943
}
944
}
@@ -1342,7 +1391,7 @@ add_filter('widget_text', 'do_shortcode');
1342
add_action( 'wp_enqueue_scripts', 'cff_add_my_stylesheet' );
1343
function cff_add_my_stylesheet() {
1344
// Respects SSL, Style.css is relative to the current file
1345
- wp_register_style( 'cff', plugins_url('css/cff-style.css?5', __FILE__) );
1346
wp_enqueue_style( 'cff' );
1347
wp_enqueue_style( 'cff-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );
1348
}
@@ -1350,7 +1399,7 @@ function cff_add_my_stylesheet() {
1350
add_action( 'wp_enqueue_scripts', 'cff_scripts_method' );
1351
function cff_scripts_method() {
1352
//Register the script to make it available
1353
- wp_register_script( 'cffscripts', plugins_url( '/js/cff-scripts.js?5' , __FILE__ ), array('jquery'), '1.8', true );
1354
//Enqueue it to load it onto the page
1355
wp_enqueue_script('cffscripts');
1356
}
@@ -1433,326 +1482,328 @@ function cff_js() {
1433
}
1434
1435
1436
- $GLOBALS['autolink_options'] = array(
1437
1438
- # Should http:// be visibly stripped from the front
1439
- # of URLs?
1440
- 'strip_protocols' => true,
1441
1442
- );
1443
1444
- ####################################################################
1445
1446
- function cff_autolink($text, $span_tag = false, $limit=100, $tagfill='class="cff-break-word"', $auto_title = true){
1447
1448
- $text = cff_autolink_do($text, '![a-z][a-z-]+://!i', $limit, $tagfill, $auto_title, $span_tag);
1449
- $text = cff_autolink_do($text, '!(mailto|skype):!i', $limit, $tagfill, $auto_title, $span_tag);
1450
- $text = cff_autolink_do($text, '!www\\.!i', $limit, $tagfill, $auto_title, 'http://', $span_tag);
1451
- return $text;
1452
- }
1453
1454
- ####################################################################
1455
1456
- function cff_autolink_do($text, $sub, $limit, $tagfill, $auto_title, $span_tag, $force_prefix=null){
1457
1458
- $text_l = StrToLower($text);
1459
- $cursor = 0;
1460
- $loop = 1;
1461
- $buffer = '';
1462
1463
- while (($cursor < strlen($text)) && $loop){
1464
1465
- $ok = 1;
1466
- $matched = preg_match($sub, $text_l, $m, PREG_OFFSET_CAPTURE, $cursor);
1467
1468
- if (!$matched){
1469
1470
- $loop = 0;
1471
- $ok = 0;
1472
1473
- }else{
1474
1475
- $pos = $m[0][1];
1476
- $sub_len = strlen($m[0][0]);
1477
1478
- $pre_hit = substr($text, $cursor, $pos-$cursor);
1479
- $hit = substr($text, $pos, $sub_len);
1480
- $pre = substr($text, 0, $pos);
1481
- $post = substr($text, $pos + $sub_len);
1482
1483
- $fail_text = $pre_hit.$hit;
1484
- $fail_len = strlen($fail_text);
1485
1486
- #
1487
- # substring found - first check to see if we're inside a link tag already...
1488
- #
1489
1490
- $bits = preg_split("!</a>!i", $pre);
1491
- $last_bit = array_pop($bits);
1492
- if (preg_match("!<a\s!i", $last_bit)){
1493
1494
- #echo "fail 1 at $cursor<br />\n";
1495
1496
- $ok = 0;
1497
- $cursor += $fail_len;
1498
- $buffer .= $fail_text;
1499
- }
1500
}
1501
1502
- #
1503
- # looks like a nice spot to autolink from - check the pre
1504
- # to see if there was whitespace before this match
1505
- #
1506
1507
- if ($ok){
1508
1509
- if ($pre){
1510
- if (!preg_match('![\s\(\[\{>]$!s', $pre)){
1511
1512
- #echo "fail 2 at $cursor ($pre)<br />\n";
1513
1514
- $ok = 0;
1515
- $cursor += $fail_len;
1516
- $buffer .= $fail_text;
1517
- }
1518
}
1519
}
1520
1521
- #
1522
- # we want to autolink here - find the extent of the url
1523
- #
1524
1525
- if ($ok){
1526
- if (preg_match('/^([a-z0-9\-\.\/\-_%~!?=,:;&+*#@\(\)\$]+)/i', $post, $matches)){
1527
1528
- $url = $hit.$matches[1];
1529
1530
- $cursor += strlen($url) + strlen($pre_hit);
1531
- $buffer .= $pre_hit;
1532
1533
- $url = html_entity_decode($url);
1534
1535
1536
- #
1537
- # remove trailing punctuation from url
1538
- #
1539
1540
- while (preg_match('|[.,!;:?]$|', $url)){
1541
$url = substr($url, 0, strlen($url)-1);
1542
$cursor--;
1543
}
1544
- foreach (array('()', '[]', '{}') as $pair){
1545
- $o = substr($pair, 0, 1);
1546
- $c = substr($pair, 1, 1);
1547
- if (preg_match("!^(\\$c|^)[^\\$o]+\\$c$!", $url)){
1548
- $url = substr($url, 0, strlen($url)-1);
1549
- $cursor--;
1550
- }
1551
- }
1552
1553
1554
- #
1555
- # nice-i-fy url here
1556
- #
1557
1558
- $link_url = $url;
1559
- $display_url = $url;
1560
1561
- if ($force_prefix) $link_url = $force_prefix.$link_url;
1562
1563
- if ($GLOBALS['autolink_options']['strip_protocols']){
1564
- if (preg_match('!^(http|https)://!i', $display_url, $m)){
1565
1566
- $display_url = substr($display_url, strlen($m[1])+3);
1567
- }
1568
}
1569
1570
- $display_url = cff_autolink_label($display_url, $limit);
1571
1572
1573
- #
1574
- # add the url
1575
- #
1576
-
1577
- if ($display_url != $link_url && !preg_match('@title=@msi',$tagfill) && $auto_title) {
1578
1579
- $display_quoted = preg_quote($display_url, '!');
1580
1581
- if (!preg_match("!^(http|https)://{$display_quoted}$!i", $link_url)){
1582
1583
- $tagfill .= ' title="'.$link_url.'"';
1584
- }
1585
}
1586
1587
- $link_url_enc = HtmlSpecialChars($link_url);
1588
- $display_url_enc = HtmlSpecialChars($display_url);
1589
1590
- if($span_tag == true){
1591
- $buffer .= "<span $tagfill>{$display_url_enc}</span>";
1592
- } else {
1593
- $buffer .= "<a target='_blank' href=\"{$link_url_enc}\"$tagfill>{$display_url_enc}</a>";
1594
- }
1595
-
1596
1597
- }else{
1598
- #echo "fail 3 at $cursor<br />\n";
1599
1600
- $ok = 0;
1601
- $cursor += $fail_len;
1602
- $buffer .= $fail_text;
1603
- }
1604
}
1605
-
1606
}
1607
1608
- #
1609
- # add everything from the cursor to the end onto the buffer.
1610
- #
1611
1612
- $buffer .= substr($text, $cursor);
1613
1614
- return $buffer;
1615
- }
1616
1617
- ####################################################################
1618
1619
- function cff_autolink_label($text, $limit){
1620
1621
- if (!$limit){ return $text; }
1622
1623
- if (strlen($text) > $limit){
1624
- return substr($text, 0, $limit-3).'...';
1625
- }
1626
1627
- return $text;
1628
}
1629
1630
- ####################################################################
1631
-
1632
- function cff_autolink_email($text, $tagfill=''){
1633
1634
- $atom = '[^()<>@,;:\\\\".\\[\\]\\x00-\\x20\\x7f]+'; # from RFC822
1635
1636
- #die($atom);
1637
1638
- $text_l = StrToLower($text);
1639
- $cursor = 0;
1640
- $loop = 1;
1641
- $buffer = '';
1642
1643
- while(($cursor < strlen($text)) && $loop){
1644
1645
- #
1646
- # find an '@' symbol
1647
- #
1648
1649
- $ok = 1;
1650
- $pos = strpos($text_l, '@', $cursor);
1651
1652
- if ($pos === false){
1653
-
1654
- $loop = 0;
1655
- $ok = 0;
1656
-
1657
- }else{
1658
1659
- $pre = substr($text, $cursor, $pos-$cursor);
1660
- $hit = substr($text, $pos, 1);
1661
- $post = substr($text, $pos + 1);
1662
1663
- $fail_text = $pre.$hit;
1664
- $fail_len = strlen($fail_text);
1665
1666
- #die("$pre::$hit::$post::$fail_text");
1667
1668
- #
1669
- # substring found - first check to see if we're inside a link tag already...
1670
- #
1671
1672
- $bits = preg_split("!</a>!i", $pre);
1673
- $last_bit = array_pop($bits);
1674
- if (preg_match("!<a\s!i", $last_bit)){
1675
1676
- #echo "fail 1 at $cursor<br />\n";
1677
1678
- $ok = 0;
1679
- $cursor += $fail_len;
1680
- $buffer .= $fail_text;
1681
- }
1682
- }
1683
1684
#
1685
- # check backwards
1686
#
1687
1688
- if ($ok){
1689
- if (preg_match("!($atom(\.$atom)*)\$!", $pre, $matches)){
1690
1691
- # move matched part of address into $hit
1692
1693
- $len = strlen($matches[1]);
1694
- $plen = strlen($pre);
1695
1696
- $hit = substr($pre, $plen-$len).$hit;
1697
- $pre = substr($pre, 0, $plen-$len);
1698
1699
- }else{
1700
1701
- #echo "fail 2 at $cursor ($pre)<br />\n";
1702
1703
- $ok = 0;
1704
- $cursor += $fail_len;
1705
- $buffer .= $fail_text;
1706
- }
1707
- }
1708
1709
- #
1710
- # check forwards
1711
- #
1712
1713
- if ($ok){
1714
- if (preg_match("!^($atom(\.$atom)*)!", $post, $matches)){
1715
1716
- # move matched part of address into $hit
1717
1718
- $len = strlen($matches[1]);
1719
1720
- $hit .= substr($post, 0, $len);
1721
- $post = substr($post, $len);
1722
1723
- }else{
1724
- #echo "fail 3 at $cursor ($post)<br />\n";
1725
1726
- $ok = 0;
1727
- $cursor += $fail_len;
1728
- $buffer .= $fail_text;
1729
- }
1730
- }
1731
1732
- #
1733
- # commit
1734
- #
1735
1736
- if ($ok) {
1737
1738
- $cursor += strlen($pre) + strlen($hit);
1739
- $buffer .= $pre;
1740
- $buffer .= "<a href=\"mailto:$hit\"$tagfill>$hit</a>";
1741
1742
}
1743
-
1744
}
1745
1746
#
1747
- # add everything from the cursor to the end onto the buffer.
1748
#
1749
1750
- $buffer .= substr($text, $cursor);
1751
1752
- return $buffer;
1753
}
1754
1755
- ####################################################################
1756
1757
1758
//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.9.0
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
73
'textsize' => isset($options[ 'cff_title_size' ]) ? $options[ 'cff_title_size' ] : '',
74
'textweight' => isset($options[ 'cff_title_weight' ]) ? $options[ 'cff_title_weight' ] : '',
75
'textcolor' => isset($options[ 'cff_title_color' ]) ? $options[ 'cff_title_color' ] : '',
76
+ 'textlinkcolor' => isset($options[ 'cff_posttext_link_color' ]) ? $options[ 'cff_posttext_link_color' ] : '',
77
'textlink' => isset($options[ 'cff_title_link' ]) ? $options[ 'cff_title_link' ] : '',
78
'posttags' => isset($options[ 'cff_post_tags' ]) ? $options[ 'cff_post_tags' ] : '',
79
+ //Description
80
'descsize' => isset($options[ 'cff_body_size' ]) ? $options[ 'cff_body_size' ] : '',
81
'descweight' => isset($options[ 'cff_body_weight' ]) ? $options[ 'cff_body_weight' ] : '',
82
'desccolor' => isset($options[ 'cff_body_color' ]) ? $options[ 'cff_body_color' ] : '',
83
+ 'linktitleformat' => isset($options[ 'cff_link_title_format' ]) ? $options[ 'cff_link_title_format' ] : '',
84
+ 'linktitlesize' => isset($options[ 'cff_link_title_size' ]) ? $options[ 'cff_link_title_size' ] : '',
85
+ 'linktitlecolor' => isset($options[ 'cff_link_title_color' ]) ? $options[ 'cff_link_title_color' ] : '',
86
+ 'linkurlcolor' => isset($options[ 'cff_link_url_color' ]) ? $options[ 'cff_link_url_color' ] : '',
87
+
88