Custom Facebook Feed - Version 2.1.2

Version Description

  • Fix: Added in a missing closing div tag to the feed when an error is being displayed
Download this release

Release Info

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

Code changes from version 2.2 to 2.1.2

README.txt CHANGED
@@ -2,8 +2,8 @@
2
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 media
4
Requires at least: 3.0
5
- Tested up to: 4.0
6
- Stable tag: 2.2
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -45,7 +45,7 @@ Display a **completely customizable**, **responsive** and **search engine crawla
45
* Create a customizable header with a range of icons for your Custom Facebook Feed
46
* Localization/i18n support to allow every part of the feed to be displayed in your language
47
48
- To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options, post filtering by type or #hashtag/string and more then [upgrade to the Pro version](https://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). Try out the [Pro demo](https://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
49
50
= Benefits =
51
@@ -70,15 +70,15 @@ To display photos, videos, the number of likes, shares and comments for each Fac
70
71
== Frequently Asked Questions ==
72
73
- For a full list of FAQs and help with troubleshooting please visit the **[FAQ & Troubleshooting](https://smashballoon.com/custom-facebook-feed/faq/)** section of the Smash Balloon website
74
75
= How do I find the Page ID of my Facebook page or group? =
76
77
- If you have a Facebook **page** with a URL like this: `https://www.facebook.com/smashballoon` then the Page ID is just `smashballoon`. If your page URL is structured like this: `https://www.facebook.com/pages/smashballoon/123654123654123` then the Page ID is actually the number at the end, so in this case `123654123654123`.
78
79
If you have a Facebook **group** then use [this tool](http://lookup-id.com/ "Look Up my ID") to find your Group ID.
80
81
- Copy and paste the ID into the [Pro demo](https://smashballoon.com/custom-facebook-feed/demo/) to test it.
82
83
= Are there any limitations on which Facebook page or group feeds I can display? =
84
@@ -86,7 +86,7 @@ The Facebook feed you're trying to display has to be from a publicly accessible
86
87
If your Facebook page has any restrictions on it (age, for example) then it means that people have to be signed into Facebook in order to view your page. This isn't desirable for most Facebook pages as it means that it isn't accessible by people who don't have a Facebook account and that your Facebook page can't be crawled and indexed by search engines.
88
89
- 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](https://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.
90
91
= Can I display feeds from multiple Facebook pages or groups? =
92
@@ -102,11 +102,11 @@ Once you've done so, the plugin will be able to retrieve and display all of your
102
103
= Can I show photos and videos in my Custom Facebook feed? =
104
105
- This free plugin only allows you to display text from your Facebook posts. To display photos and videos in your feed you would need to upgrade to the Pro version of the plugin. Try out a demo of the Pro version on the [Custom Facebook Feed website](https://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo"), and find out more about the Pro version [here](https://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
106
107
= Can I show the comments, shares and likes associated with each Facebook post? =
108
109
- This is a feature of the [Pro version of the plugin](https://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). To display comments, shares and likes you would need to upgrade from the free version to the Pro version.
110
111
= Is the content of my Custom Facebook Feed crawlable by search engines? =
112
@@ -147,7 +147,7 @@ We understand that sometimes you need help, have issues or just have questions.
147
148
= How to get a Facebook Access Token =
149
150
- **For step-by-step instructions and screenshots on how to get a Facebook Access Token just follow the [Facebook Access Token instructions](https://smashballoon.com/custom-facebook-feed/access-token/ "Facebook Access Token instructions") on the Smash Balloon website.**
151
152
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:
153
@@ -177,11 +177,11 @@ You no longer need your own Access Token to use the Custom Facebook Feed Plugin,
177
178
**11)** Fill in Facebook's Security Check and click Continue.
179
180
- **12)** Your Facebook App should now be set up. Copy and paste your Facebook App ID and Facebook App Secret into the fields in the last step of the [Access Token instructions](https://smashballoon.com/custom-facebook-feed/access-token/ "How to get a Facebook Access Token") to retrieve your Facebook Access Token.
181
182
= What some of our users think =
183
184
- **See all of the reviews [here](https://smashballoon.com/custom-facebook-feed/#support "Custom Facebook Feed customer reviews")**
185
186
"Loving the Facebook feed plugin from @smashballoon. It's gonna transform my work's website! Great customer service too :)" - Grace Snow
187
@@ -271,20 +271,6 @@ Credit iMarketing Factory - "The Importance of Facebook for Small Businesses"
271
9. It's super easy to display your Facebook feed in any page or post
272
273
== Changelog ==
274
- = 2.2 =
275
- * New: Added a text area to the Support tab which contains all of the plugin settings and site info for easier troubleshooting
276
- * New: You can now set the number of Facebook posts to '0' if you just want to show the Facebook Like box widget and no posts
277
- * Tweak: If the user doesn't add a unit to the width, height or padding then automatically add 'px'
278
- * Tweak: Added social media sharing links to the bottom of the settings page and an option to add a credit link to the bottom of the feed
279
- * Fix: Fixed an issue with Facebook hashtags not being linked when followed immediately by punctuation
280
- * Fix: When displaying a shared link if the caption is the same as the link URL then don't display it
281
- * Fix: Added a space before the feed header's style attribute to remove HTML validation error
282
- * Fix: Prefixed the 'top' and 'bottom' classes used on the Facebook Like box to prevent CSS conflicts
283
- * Fix: Fixed an issue with the link color not being applied to Facebook hashtag links
284
-
285
- = 2.1.3 =
286
- * Fix: Fixed an issue with the Facebook Access Token used in the plugin hitting its request limit
287
-
288
= 2.1.2 =
289
* Fix: Added in a missing closing div tag to the feed when an error is being displayed
290
@@ -307,7 +293,7 @@ Credit iMarketing Factory - "The Importance of Facebook for Small Businesses"
307
* Fix: When linking the post text to the Facebook post the correct text color is now applied
308
309
= 2.0.1 =
310
- * Tweak: Improved error handling and added an [Error Message reference](https://smashballoon.com/custom-facebook-feed/docs/errors/) to the website
311
312
= 2.0 =
313
* New: Added an option to display the post date immediately below the author name - as it is on Facebook. This is now the default date position.
2
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 media
4
Requires at least: 3.0
5
+ Tested up to: 4.0.1
6
+ Stable tag: 2.1.2
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
45
* Create a customizable header with a range of icons for your Custom Facebook Feed
46
* Localization/i18n support to allow every part of the feed to be displayed in your language
47
48
+ To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options, post filtering by type or #hashtag/string and more then [upgrade to the Pro version](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). Try out the [Pro demo](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
49
50
= Benefits =
51
70
71
== Frequently Asked Questions ==
72
73
+ For a full list of FAQs and help with troubleshooting please visit the **[FAQ & Troubleshooting](http://smashballoon.com/custom-facebook-feed/faq/)** section of the Smash Balloon website
74
75
= How do I find the Page ID of my Facebook page or group? =
76
77
+ If you have a Facebook **page** with a URL like this: `http://www.facebook.com/smashballoon` then the Page ID is just `smashballoon`. If your page URL is structured like this: `http://www.facebook.com/pages/smashballoon/123654123654123` then the Page ID is actually the number at the end, so in this case `123654123654123`.
78
79
If you have a Facebook **group** then use [this tool](http://lookup-id.com/ "Look Up my ID") to find your Group ID.
80
81
+ Copy and paste the ID into the [Pro demo](http://smashballoon.com/custom-facebook-feed/demo/) to test it.
82
83
= Are there any limitations on which Facebook page or group feeds I can display? =
84
86
87
If your Facebook page has any restrictions on it (age, for example) then it means that people have to be signed into Facebook in order to view your page. This isn't desirable for most Facebook pages as it means that it isn't accessible by people who don't have a Facebook account and that your Facebook page can't be crawled and indexed by search engines.
88
89
+ 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.
90
91
= Can I display feeds from multiple Facebook pages or groups? =
92
102
103
= Can I show photos and videos in my Custom Facebook feed? =
104
105
+ This free plugin only allows you to display text from your Facebook posts. To display photos and videos in your feed you would need to upgrade to the Pro version of the plugin. Try out a demo of the Pro version on the [Custom Facebook Feed website](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo"), and find out more about the Pro version [here](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
106
107
= Can I show the comments, shares and likes associated with each Facebook post? =
108
109
+ This is a feature of the [Pro version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). To display comments, shares and likes you would need to upgrade from the free version to the Pro version.
110
111
= Is the content of my Custom Facebook Feed crawlable by search engines? =
112
147
148
= How to get a Facebook Access Token =
149
150
+ **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.**
151
152
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:
153
177
178
**11)** Fill in Facebook's Security Check and click Continue.
179
180
+ **12)** Your Facebook App should now be set up. Copy and paste your Facebook App ID and Facebook App Secret into the fields in the last step of the [Access Token instructions](http://smashballoon.com/custom-facebook-feed/access-token/ "How to get a Facebook Access Token") to retrieve your Facebook Access Token.
181
182
= What some of our users think =
183
184
+ **See all of the reviews [here](http://smashballoon.com/custom-facebook-feed/#support "Custom Facebook Feed customer reviews")**
185
186
"Loving the Facebook feed plugin from @smashballoon. It's gonna transform my work's website! Great customer service too :)" - Grace Snow
187
271
9. It's super easy to display your Facebook feed in any page or post
272
273
== Changelog ==
274
= 2.1.2 =
275
* Fix: Added in a missing closing div tag to the feed when an error is being displayed
276
293
* Fix: When linking the post text to the Facebook post the correct text color is now applied
294
295
= 2.0.1 =
296
+ * Tweak: Improved error handling and added an [Error Message reference](http://smashballoon.com/custom-facebook-feed/docs/errors/) to the website
297
298
= 2.0 =
299
* New: Added an option to display the post date immediately below the author name - as it is on Facebook. This is now the default date position.
css/cff-style.css CHANGED
@@ -286,10 +286,10 @@
286
height: 100%;
287
}
288
/*Like box is not inside of #cff*/
289
- .cff-likebox.cff-top.cff-outside{
290
margin-bottom: 10px;
291
}
292
- .cff-likebox.cff-bottom.cff-outside{
293
margin-top: 10px;
294
}
295
@@ -327,16 +327,4 @@
327
display: none;
328
padding: 5px 0 0 0;
329
clear: both;
330
- }
331
-
332
- /* Credit link */
333
- #cff .cff-credit{
334
- font-size: 11px;
335
- }
336
- #cff .cff-credit a{
337
- text-decoration: none;
338
- }
339
- #cff .cff-credit .fa{
340
- padding-right: 5px;
341
- font-size: 13px;
342
}
286
height: 100%;
287
}
288
/*Like box is not inside of #cff*/
289
+ .cff-likebox.top.cff-outside{
290
margin-bottom: 10px;
291
}
292
+ .cff-likebox.bottom.cff-outside{
293
margin-top: 10px;
294
}
295
327
display: none;
328
padding: 5px 0 0 0;
329
clear: both;
330
}
custom-facebook-feed-admin.php CHANGED
@@ -138,9 +138,9 @@ function cff_settings_page() {
138
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
139
<div class="cff-tooltip cff-more-info">
140
<ul>
141
- <li><?php _e('If you have a Facebook <b>page</b> with a URL like this: <code>https://www.facebook.com/your_page_name</code> then the Page ID is just <b>your_page_name</b>. If your page URL is structured like this: <code>https://www.facebook.com/pages/your_page_name/123654123654123</code> then the Page ID is actually the number at the end, so in this case <b>123654123654123</b>.</li>'); ?>
142
<li><?php _e('If you have a Facebook <b>group</b> then use <a href="http://lookup-id.com/" target="_blank" title="Find my ID">this tool</a> to find your ID.'); ?></li>
143
- <li><?php _e('You can copy and paste your ID into the <a href="https://smashballoon.com/custom-facebook-feed/demo/" target="_blank">demo</a> to test it.'); ?></li>
144
</ul>
145
</div>
146
</td>
@@ -150,7 +150,7 @@ function cff_settings_page() {
150
<th scope="row" style="padding-bottom: 10px;"><?php _e('Enter my own Access Token <i style="font-weight: normal; font-size: 12px;">This is Optional</i>'); ?></th>
151
<td>
152
<input name="cff_show_access_token" type="checkbox" id="cff_show_access_token" <?php if($show_access_token_val == true) echo "checked"; ?> />&nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
153
- <p class="cff-tooltip cff-more-info"><?php _e("A Facebook Access Token is not required to use this plugin, but if you have your own that you'd like to use then you can check this box and enter it here. To get your own Access Token you can follow these <a href='https://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>step-by-step instructions</a>"); ?>.</p>
154
</td>
155
</tr>
156
@@ -160,7 +160,7 @@ function cff_settings_page() {
160
<input name="cff_access_token" id="cff_access_token" type="text" value="<?php esc_attr_e( $access_token_val ); ?>" size="45" />
161
162
<div class="cff-notice cff-profile-error cff-access-token">
163
- <?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='https://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>Access Token instructions</a> and click '<b>Get my Access Token</b>'.</p>"); ?>
164
</div>
165
</td>
166
</tr>
@@ -326,42 +326,10 @@ function cff_settings_page() {
326
<h3><?php _e('Customizing your Feed'); ?></h3>
327
<p><?php _e("Use the <a href='admin.php?page=cff-style'>Customize</a> page to customize your feed. If you're displaying multiple feeds then you can override your settings and customizations by using options directly in the shortcode, like so:"); ?></p>
328
<p>[custom-facebook-feed id=some-other-page-id num=3 height=500px]</p>
329
- <p><a href="https://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank"><?php _e('See a full list of shortcode options'); ?></a></p>
330
331
<br />
332
- <a href="https://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
333
-
334
- <hr />
335
- <h3><?php _e('Like the plugin? Help spread the word!'); ?></h3>
336
-
337
- <!-- TWITTER -->
338
- <a href="https://twitter.com/share" class="twitter-share-button" data-url="https://wordpress.org/plugins/custom-facebook-feed/" data-text="Display your Facebook posts on your site your way using the Custom Facebook Feed WordPress plugin!" data-via="smashballoon" data-dnt="true">Tweet</a>
339
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
340
- <style type="text/css">
341
- #twitter-widget-0{ float: left; width: 100px !important; }
342
- .IN-widget{ margin-right: 20px; }
343
- </style>
344
-
345
- <!-- FACEBOOK -->
346
- <div id="fb-root" style="display: none;"></div>
347
- <script>(function(d, s, id) {
348
- var js, fjs = d.getElementsByTagName(s)[0];
349
- if (d.getElementById(id)) return;
350
- js = d.createElement(s); js.id = id;
351
- js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=640861236031365&version=v2.0";
352
- fjs.parentNode.insertBefore(js, fjs);
353
- }(document, 'script', 'facebook-jssdk'));</script>
354
- <div class="fb-like" data-href="https://wordpress.org/plugins/custom-facebook-feed/" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true" style="display: block; float: left; margin-right: 20px;"></div>
355
-
356
- <!-- LINKEDIN -->
357
- <script src="//platform.linkedin.com/in.js" type="text/javascript">
358
- lang: en_US
359
- </script>
360
- <script type="IN/Share" data-url="https://wordpress.org/plugins/custom-facebook-feed/"></script>
361
-
362
- <!-- GOOGLE + -->
363
- <script src="https://apis.google.com/js/platform.js" async defer></script>
364
- <div class="g-plusone" data-size="medium" data-href="https://wordpress.org/plugins/custom-facebook-feed/"></div>
365
366
<?php } //End config tab ?>
367
@@ -372,88 +340,40 @@ function cff_settings_page() {
372
<h3><?php _e('FAQs and Troubleshooting'); ?></h3>
373
<p>Having trouble getting the plugin to work? Try the links below:</p>
374
<ul>
375
- <li>- <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/faq/general/" target="_blank">General Questions</a>'); ?></li>
376
- <li>- <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/faq/setup/" target="_blank">Setting Up &amp; Displaying your Feed</a>'); ?></li>
377
- <li>- <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/faq/troubleshooting/" target="_blank">Troubleshooting &amp; Common Support Questions</a>'); ?></li>
378
</ul>
379
<br />
380
<h3>Documentation</h3>
381
<p>Need help setting up, configuring or customizing the plugin? Check out the links below:</p>
382
<ul>
383
- <li>- <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/docs/wordpress/" target="_blank">Installation and Configuration</a>'); ?></li>
384
- <li>- <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank">Shortcode Reference</a>'); ?></li>
385
- <li>- <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank">Custom CSS and JavaScript Snippets</a>'); ?></li>
386
</ul>
387
388
<br />
389
- <p><?php _e('Still need help? <a href="http://smashballoon.com/custom-facebook-feed/support/" target="_blank">Request support</a>. Please include your <b>System Info</b> below with all support requests.'); ?></p>
390
391
<br />
392
- <h3><?php _e('System Info &nbsp; <i style="color: #666; font-size: 11px; font-weight: normal;">Click the text below to select all</i>'); ?></h3>
393
-
394
- <?php
395
- $access_token = get_option( $access_token );
396
- if ( $access_token == '' || empty($access_token) ) $access_token = '611606915581035|RdRHbHtrHseQw4C7SDUBFWIrJLA';
397
- ?>
398
- <?php $posts_json = cff_fetchUrl("https://graph.facebook.com/".get_option( trim($page_id) )."/feed?access_token=". trim($access_token) ."&limit=1"); ?>
399
-
400
-
401
- <textarea readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)." style="width: 70%; height: 500px; white-space: pre; font-family: Menlo,Monaco,monospace;">
402
- ## SITE/SERVER INFO: ##
403
- Site URL: <?php echo site_url() . "\n"; ?>
404
- Home URL: <?php echo home_url() . "\n"; ?>
405
- WordPress Version: <?php echo get_bloginfo( 'version' ) . "\n"; ?>
406
- PHP Version: <?php echo PHP_VERSION . "\n"; ?>
407
- Web Server Info: <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
408
- PHP allow_url_fopen: <?php echo ini_get( 'allow_url_fopen' ) ? "Yes" . "\n" : "No" . "\n"; ?>
409
- PHP cURL: <?php echo is_callable('curl_init') ? "Yes" . "\n" : "No" . "\n"; ?>
410
- JSON: <?php echo function_exists("json_decode") ? "Yes" . "\n" : "No" . "\n" ?>
411
-
412
- ## ACTIVE PLUGINS: ##
413
- <?php
414
- $plugins = get_plugins();
415
- $active_plugins = get_option( 'active_plugins', array() );
416
-
417
- foreach ( $plugins as $plugin_path => $plugin ) {
418
- // If the plugin isn't active, don't show it.
419
- if ( ! in_array( $plugin_path, $active_plugins ) )
420
- continue;
421
-
422
- echo $plugin['Name'] . ': ' . $plugin['Version'] ."\n";
423
- }
424
- ?>
425
-
426
- ## PLUGIN SETTINGS: ##
427
- Use own Access Token: <?php echo get_option( 'cff_show_access_token' ) ."\n"; ?>
428
- Access Token: <?php echo get_option( 'cff_access_token' ) ."\n"; ?>
429
- Page ID: <?php echo get_option( 'cff_page_id' ) ."\n"; ?>
430
- Page Type: <?php echo get_option( 'cff_page_type' ) ."\n"; ?>
431
- Number of Posts: <?php echo get_option( 'cff_num_show' ) ."\n"; ?>
432
- Post Limit: <?php echo get_option( 'cff_post_limit' ) ."\n"; ?>
433
- Show Posts by: <?php echo get_option( 'cff_show_others' ) ."\n"; ?>
434
- Cache Time: <?php echo get_option( 'cff_cache_time' ) ."\n"; ?>
435
- Cache Unit: <?php echo get_option( 'cff_cache_time_unit' ) ."\n"; ?>
436
- Locale: <?php echo get_option( 'cff_locale' ) ."\n"; ?>
437
- Timezone: <?php $options = get_option( 'cff_style_settings', array() );
438
- echo $options[ 'cff_timezone' ] ."\n"; ?>
439
-
440
- ## EXTENSIONS: ##
441
- Extensions Plugin: <?php echo get_option('cff_extensions_status') ."\n"; ?>
442
- Date Range From: <?php echo get_option( 'cff_date_from' ) ."\n"; ?>
443
- Date Range Until: <?php echo get_option( 'cff_date_until' ) ."\n"; ?>
444
- Featured Post: <?php echo get_option( 'cff_featured_post_id' ) ."\n"; ?>
445
- Lightbox: <?php echo get_option( 'cff_lightbox' ) ."\n"; ?>
446
-
447
- ## CUSTOMIZE: ##
448
- <?php
449
- while (list($key, $val) = each($options)) {
450
- echo "$key => $val\n";
451
- }
452
- ?>
453
-
454
- ## FACEBOOK API RESPONSE: ##
455
- <?php echo $posts_json; ?>
456
- </textarea>
457
458
<?php } ?>
459
@@ -579,7 +499,6 @@ function cff_style_page() {
579
'cff_event_title_link' => false,
580
'cff_video_action' => 'post',
581
'cff_app_id' => '',
582
- 'cff_show_credit' => '',
583
'cff_sep_color' => '',
584
'cff_sep_size' => '1',
585
@@ -751,7 +670,6 @@ function cff_style_page() {
751
$cff_class = $options[ 'cff_class' ];
752
$cff_open_links = $options[ 'cff_open_links' ];
753
$cff_app_id = $options[ 'cff_app_id' ];
754
- $cff_show_credit = $options[ 'cff_show_credit' ];
755
$cff_preserve_settings = 'cff_preserve_settings';
756
$cff_preserve_settings_val = get_option( $cff_preserve_settings );
757
@@ -1084,7 +1002,6 @@ function cff_style_page() {
1084
1085
(isset($_POST[ $cff_ajax ])) ? $cff_ajax_val = $_POST[ 'cff_ajax' ] : $cff_ajax_val = '';
1086
if (isset($_POST[ 'cff_app_id' ])) $cff_app_id = $_POST[ 'cff_app_id' ];
1087
- (isset($_POST[ 'cff_show_credit' ])) ? $cff_show_credit = $_POST[ 'cff_show_credit' ] : $cff_show_credit = '';
1088
$cff_preserve_settings_val = $_POST[ $cff_preserve_settings ];
1089
1090
//Meta
@@ -1114,7 +1031,6 @@ function cff_style_page() {
1114
1115
update_option( $cff_ajax, $cff_ajax_val );
1116
$options[ 'cff_app_id' ] = $cff_app_id;
1117
- $options[ 'cff_show_credit' ] = $cff_show_credit;
1118
update_option( $cff_preserve_settings, $cff_preserve_settings_val );
1119
}
1120
//Update the Custom Text / Translate options
@@ -1241,7 +1157,7 @@ function cff_style_page() {
1241
<h3><?php _e('Post Types'); ?></h3>
1242
<tr valign="top">
1243
<th scope="row"><?php _e('Only show these types of posts:'); ?><br />
1244
- <i style="color: #666; font-size: 11px;"><a href="https://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable post types, photos, videos and more'); ?></a></i></th>
1245
<td>
1246
<div>
1247
<input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled checked />
@@ -1273,7 +1189,7 @@ function cff_style_page() {
1273
</table>
1274
<?php submit_button(); ?>
1275
1276
- <a href="https://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1277
<?php } //End General tab ?>
1278
<?php if( $active_tab == 'post_layout' ) { //Start Post Layout tab ?>
1279
<input type="hidden" name="<?php echo $style_post_layout_hidden_field_name; ?>" value="Y">
@@ -1285,7 +1201,7 @@ function cff_style_page() {
1285
<tr>
1286
<td>
1287
<p><?php _e("Choose a layout from the 3 below."); ?>
1288
- <i style="color: #666; font-size: 11px; margin-left: 5px;"><a href="https://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable post layouts'); ?></a></i>
1289
</p>
1290
</td>
1291
</tr>
@@ -1340,7 +1256,7 @@ function cff_style_page() {
1340
<tbody>
1341
<tr valign="top">
1342
<th scope="row"><?php _e('Include the following in posts: <i style="font-size: 11px;">(when applicable)</i>'); ?>
1343
- <br /><i style="color: #666; font-size: 11px;"><a href="https://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable all of these options'); ?></a></i></th>
1344
<td>
1345
<div>
1346
<input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
@@ -1419,7 +1335,7 @@ function cff_style_page() {
1419
</table>
1420
1421
<?php submit_button(); ?>
1422
- <a href="https://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1423
<?php } //End Post Layout tab ?>
1424
<?php if( $active_tab == 'typography' ) { //Start Typography tab ?>
1425
<input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
@@ -1956,7 +1872,7 @@ function cff_style_page() {
1956
<th><label for="cff_date_custom" class="bump-left"><?php _e('Custom format'); ?></label></th>
1957
<td>
1958
<input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
1959
- <a href="https://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
1960
</td>
1961
</tr>
1962
<tr>
@@ -2207,7 +2123,7 @@ function cff_style_page() {
2207
<th><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom event date format'); ?></label></th>
2208
<td>
2209
<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" />
2210
- <a href="https://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
2211
</td>
2212
</tr>
2213
</tbody>
@@ -2336,13 +2252,13 @@ function cff_style_page() {
2336
<?php submit_button(); ?>
2337
</div>
2338
2339
- <a href="https://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2340
2341
<?php } //End Typography tab ?>
2342
<?php if( $active_tab == 'misc' ) { //Start Misc tab ?>
2343
<input type="hidden" name="<?php echo $style_misc_hidden_field_name; ?>" value="Y">
2344
<br />
2345
- <h3><?php _e('Likes, Shares and Comments'); ?></h3><i style="color: #666; font-size: 11px;"><a href="https://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable likes, shares and comments'); ?></a></i>
2346
2347
<hr />
2348
<h3><?php _e('Like Box'); ?></h3>
@@ -2429,7 +2345,7 @@ function cff_style_page() {
2429
<tr valign="top">
2430
<td>
2431
<?php _e('Enter your own custom CSS in the box below'); ?>
2432
- <i style="margin-left: 5px; font-size: 11px;"><a href="https://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank"><?php _e('See some examples'); ?></a></i>
2433
</td>
2434
</tr>
2435
<tr valign="top">
@@ -2445,7 +2361,7 @@ function cff_style_page() {
2445
<tr valign="top">
2446
<td>
2447
<?php _e('Enter your own custom JavaScript/jQuery in the box below'); ?>
2448
- <i style="margin-left: 5px; font-size: 11px;"><a href="https://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank"><?php _e('See some examples'); ?></a></i>
2449
</td>
2450
</tr>
2451
<tr valign="top">
@@ -2487,19 +2403,11 @@ function cff_style_page() {
2487
<p class="cff-tooltip cff-more-info"><?php _e('When removing the plugin your settings are automatically deleted from your database. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.'); ?></p>
2488
</td>
2489
</tr>
2490
- <tr>
2491
- <th class="bump-left"><label for="cff_show_credit" class="bump-left"><?php _e("Display credit link"); ?></label></th>
2492
- <td>
2493
- <input name="cff_show_credit" type="checkbox" id="cff_show_credit" <?php if($cff_show_credit == true) echo "checked"; ?> />
2494
- <label for="cff_show_credit"><?php _e('Yes'); ?></label>
2495
- <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Display a link at the bottom of the feed to help promote the plugin'); ?></i>
2496
- </td>
2497
- </tr>
2498
</tbody>
2499
</table>
2500
2501
<?php submit_button(); ?>
2502
- <a href="https://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2503
<?php } //End Misc tab ?>
2504
2505
@@ -2603,43 +2511,9 @@ function cff_style_page() {
2603
</table>
2604
2605
<?php submit_button(); ?>
2606
- <a href="https://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2607
<?php } //End Custom Text tab ?>
2608
2609
</form>
2610
-
2611
- <hr />
2612
- <h3><?php _e('Like the plugin? Help spread the word!'); ?></h3>
2613
-
2614
- <!-- TWITTER -->
2615
- <a href="https://twitter.com/share" class="twitter-share-button" data-url="https://wordpress.org/plugins/custom-facebook-feed/" data-text="Display your Facebook posts on your site your way using the Custom Facebook Feed WordPress plugin!" data-via="smashballoon" data-dnt="true">Tweet</a>
2616
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
2617
- <style type="text/css">
2618
- #twitter-widget-0{ float: left; width: 100px !important; }
2619
- .IN-widget{ margin-right: 20px; }
2620
- </style>
2621
-
2622
- <!-- FACEBOOK -->
2623
- <div id="fb-root" style="display: none;"></div>
2624
- <script>(function(d, s, id) {
2625
- var js, fjs = d.getElementsByTagName(s)[0];
2626
- if (d.getElementById(id)) return;
2627
- js = d.createElement(s); js.id = id;
2628
- js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=640861236031365&version=v2.0";
2629
- fjs.parentNode.insertBefore(js, fjs);
2630
- }(document, 'script', 'facebook-jssdk'));</script>
2631
- <div class="fb-like" data-href="https://wordpress.org/plugins/custom-facebook-feed/" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true" style="display: block; float: left; margin-right: 20px;"></div>
2632
-
2633
- <!-- LINKEDIN -->
2634
- <script src="//platform.linkedin.com/in.js" type="text/javascript">
2635
- lang: en_US
2636
- </script>
2637
- <script type="IN/Share" data-url="https://wordpress.org/plugins/custom-facebook-feed/"></script>
2638
-
2639
- <!-- GOOGLE + -->
2640
- <script src="https://apis.google.com/js/platform.js" async defer></script>
2641
- <div class="g-plusone" data-size="medium" data-href="https://wordpress.org/plugins/custom-facebook-feed/"></div>
2642
-
2643
<?php
2644
} //End Style_Page
2645
//Enqueue admin styles
138
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
139
<div class="cff-tooltip cff-more-info">
140
<ul>
141
+ <li><?php _e('If you have a Facebook <b>page</b> with a URL like this: <code>http://www.facebook.com/your_page_name</code> then the Page ID is just <b>your_page_name</b>. If your page URL is structured like this: <code>http://www.facebook.com/pages/your_page_name/123654123654123</code> then the Page ID is actually the number at the end, so in this case <b>123654123654123</b>.</li>'); ?>
142
<li><?php _e('If you have a Facebook <b>group</b> then use <a href="http://lookup-id.com/" target="_blank" title="Find my ID">this tool</a> to find your ID.'); ?></li>
143
+ <li><?php _e('You can copy and paste your ID into the <a href="http://smashballoon.com/custom-facebook-feed/demo/" target="_blank">demo</a> to test it.'); ?></li>
144
</ul>
145
</div>
146
</td>
150
<th scope="row" style="padding-bottom: 10px;"><?php _e('Enter my own Access Token <i style="font-weight: normal; font-size: 12px;">This is Optional</i>'); ?></th>
151
<td>
152
<input name="cff_show_access_token" type="checkbox" id="cff_show_access_token" <?php if($show_access_token_val == true) echo "checked"; ?> />&nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
153
+ <p class="cff-tooltip cff-more-info"><?php _e("A Facebook Access Token is not required to use this plugin, but if you have your own that you'd like to use then you can check this box and 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>
154
</td>
155
</tr>
156
160
<input name="cff_access_token" id="cff_access_token" type="text" value="<?php esc_attr_e( $access_token_val ); ?>" size="45" />
161
162
<div class="cff-notice cff-profile-error cff-access-token">
163
+ <?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>"); ?>
164
</div>
165
</td>
166
</tr>
326
<h3><?php _e('Customizing your Feed'); ?></h3>
327
<p><?php _e("Use the <a href='admin.php?page=cff-style'>Customize</a> page to customize your feed. If you're displaying multiple feeds then you can override your settings and customizations by using options directly in the shortcode, like so:"); ?></p>
328
<p>[custom-facebook-feed id=some-other-page-id num=3 height=500px]</p>
329
+ <p><a href="http://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank"><?php _e('See a full list of shortcode options'); ?></a></p>
330
331
<br />
332
+ <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
333
334
<?php } //End config tab ?>
335
340
<h3><?php _e('FAQs and Troubleshooting'); ?></h3>
341
<p>Having trouble getting the plugin to work? Try the links below:</p>
342
<ul>
343
+ <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/faq/general/" target="_blank">General Questions</a>'); ?></li>
344
+ <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/faq/setup/" target="_blank">Setting Up &amp; Displaying your Feed</a>'); ?></li>
345
+ <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/faq/troubleshooting/" target="_blank">Troubleshooting &amp; Common Support Questions</a>'); ?></li>
346
</ul>
347
<br />
348
<h3>Documentation</h3>
349
<p>Need help setting up, configuring or customizing the plugin? Check out the links below:</p>
350
<ul>
351
+ <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/docs/wordpress/" target="_blank">Installation and Configuration</a>'); ?></li>
352
+ <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank">Shortcode Reference</a>'); ?></li>
353
+ <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/docs/snippets/" target="_blank">Custom CSS and JavaScript Snippets</a>'); ?></li>
354
</ul>
355
356
<br />
357
+ <p><?php _e('Still need help? <a href="http://smashballoon.com/custom-facebook-feed/support/" target="_blank">Request support</a>.'); ?></p>
358
359
<br />
360
+ <h3><?php _e('System Info'); ?></h3>
361
+ <p>PHP Version: <b><?php echo PHP_VERSION . "\n"; ?></b></p>
362
+ <p>Web Server Info: <b><?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?></b></p>
363
+ <p>PHP allow_url_fopen: <b><?php echo ini_get( 'allow_url_fopen' ) ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>"; ?></b></p>
364
+ <p>PHP cURL: <b><?php echo is_callable('curl_init') ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
365
+ <p>JSON: <b><?php echo function_exists("json_decode") ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
366
+
367
+ <button class="button secondary-button" id="cff-api-test">Test connection to Facebook API</button>
368
+
369
+ <div id="cff-api-test-result">
370
+ <?php
371
+ $access_token = get_option( $access_token );
372
+ if ( $access_token == '' || empty($access_token) ) $access_token = '1436737606570258|MGh1BX4_b_D9HzJtKe702cwMRPI';
373
+ ?>
374
+ <?php $posts_json = cff_fetchUrl("http://graph.facebook.com/".get_option( trim($page_id) )."/feed?access_token=". trim($access_token) ."&limit=1"); ?>
375
+ <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>
376
+ </div>
377
378
<?php } ?>
379
499
'cff_event_title_link' => false,
500
'cff_video_action' => 'post',
501
'cff_app_id' => '',
502
'cff_sep_color' => '',
503
'cff_sep_size' => '1',
504
670
$cff_class = $options[ 'cff_class' ];
671
$cff_open_links = $options[ 'cff_open_links' ];
672
$cff_app_id = $options[ 'cff_app_id' ];
673
$cff_preserve_settings = 'cff_preserve_settings';
674
$cff_preserve_settings_val = get_option( $cff_preserve_settings );
675
1002
1003
(isset($_POST[ $cff_ajax ])) ? $cff_ajax_val = $_POST[ 'cff_ajax' ] : $cff_ajax_val = '';
1004
if (isset($_POST[ 'cff_app_id' ])) $cff_app_id = $_POST[ 'cff_app_id' ];
1005
$cff_preserve_settings_val = $_POST[ $cff_preserve_settings ];
1006
1007
//Meta
1031
1032
update_option( $cff_ajax, $cff_ajax_val );
1033
$options[ 'cff_app_id' ] = $cff_app_id;
1034
update_option( $cff_preserve_settings, $cff_preserve_settings_val );
1035
}
1036
//Update the Custom Text / Translate options
1157
<h3><?php _e('Post Types'); ?></h3>
1158
<tr valign="top">
1159
<th scope="row"><?php _e('Only show these types of posts:'); ?><br />
1160
+ <i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable post types, photos, videos and more'); ?></a></i></th>
1161
<td>
1162
<div>
1163
<input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled checked />
1189
</table>
1190
<?php submit_button(); ?>
1191
1192
+ <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1193
<?php } //End General tab ?>
1194
<?php if( $active_tab == 'post_layout' ) { //Start Post Layout tab ?>
1195
<input type="hidden" name="<?php echo $style_post_layout_hidden_field_name; ?>" value="Y">
1201
<tr>
1202
<td>
1203
<p><?php _e("Choose a layout from the 3 below."); ?>
1204
+ <i style="color: #666; font-size: 11px; margin-left: 5px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable post layouts'); ?></a></i>
1205
</p>
1206
</td>
1207
</tr>
1256
<tbody>
1257
<tr valign="top">
1258
<th scope="row"><?php _e('Include the following in posts: <i style="font-size: 11px;">(when applicable)</i>'); ?>
1259
+ <br /><i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable all of these options'); ?></a></i></th>
1260
<td>
1261
<div>
1262
<input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
1335
</table>
1336
1337
<?php submit_button(); ?>
1338
+ <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1339
<?php } //End Post Layout tab ?>
1340
<?php if( $active_tab == 'typography' ) { //Start Typography tab ?>
1341
<input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
1872
<th><label for="cff_date_custom" class="bump-left"><?php _e('Custom format'); ?></label></th>
1873
<td>
1874
<input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
1875
+ <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
1876
</td>
1877
</tr>
1878
<tr>
2123
<th><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom event date format'); ?></label></th>
2124
<td>
2125
<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" />
2126
+ <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
2127
</td>
2128
</tr>
2129
</tbody>
2252
<?php submit_button(); ?>
2253
</div>
2254
2255
+ <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2256
2257
<?php } //End Typography tab ?>
2258
<?php if( $active_tab == 'misc' ) { //Start Misc tab ?>
2259
<input type="hidden" name="<?php echo $style_misc_hidden_field_name; ?>" value="Y">
2260
<br />
2261
+ <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>
2262
2263
<hr />
2264
<h3><?php _e('Like Box'); ?></h3>
2345
<tr valign="top">
2346
<td>
2347
<?php _e('Enter your own custom CSS in the box below'); ?>
2348
+ <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>
2349
</td>
2350
</tr>
2351
<tr valign="top">
2361
<tr valign="top">
2362
<td>
2363
<?php _e('Enter your own custom JavaScript/jQuery in the box below'); ?>
2364
+ <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>
2365
</td>
2366
</tr>
2367
<tr valign="top">
2403
<p class="cff-tooltip cff-more-info"><?php _e('When removing the plugin your settings are automatically deleted from your database. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.'); ?></p>
2404
</td>
2405
</tr>
2406
</tbody>
2407
</table>
2408
2409
<?php submit_button(); ?>
2410
+ <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2411
<?php } //End Misc tab ?>
2412
2413
2511
</table>
2512
2513
<?php submit_button(); ?>
2514
<?php } //End Custom Text tab ?>
2515
2516
</form>
2517
<?php
2518
} //End Style_Page
2519
//Enqueue admin styles
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: 2.2
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
@@ -146,7 +146,6 @@ function display_cff($atts) {
146
'likeboxheight' => isset($options[ 'cff_likebox_height' ]) ? $options[ 'cff_likebox_height' ] : '',
147
'likeboxfaces' => isset($options[ 'cff_like_box_faces' ]) ? $options[ 'cff_like_box_faces' ] : '',
148
'likeboxborder' => isset($options[ 'cff_like_box_border' ]) ? $options[ 'cff_like_box_border' ] : '',
149
- 'credit' => isset($options[ 'cff_show_credit' ]) ? $options[ 'cff_show_credit' ] : '',
150
151
//Page Header
152
'showheader' => isset($options[ 'cff_show_header' ]) ? $options[ 'cff_show_header' ] : '',
@@ -177,15 +176,9 @@ function display_cff($atts) {
177
$cff_page_type = $atts[ 'pagetype' ];
178
($cff_page_type == 'group') ? $cff_is_group = true : $cff_is_group = false;
179
180
- $cff_feed_width = $atts[ 'width' ];
181
- if ( is_numeric(substr($cff_feed_width, -1, 1)) ) $cff_feed_width = $cff_feed_width . 'px';
182
-
183
$cff_feed_height = $atts[ 'height' ];
184
- if ( is_numeric(substr($cff_feed_height, -1, 1)) ) $cff_feed_height = $cff_feed_height . 'px';
185
-
186
$cff_feed_padding = $atts[ 'padding' ];
187
- if ( is_numeric(substr($cff_feed_padding, -1, 1)) ) $cff_feed_padding = $cff_feed_padding . 'px';
188
-
189
$cff_bg_color = $atts[ 'bgcolor' ];
190
$cff_show_author = $atts[ 'showauthornew' ];
191
$cff_cache_time = $atts[ 'cachetime' ];
@@ -411,8 +404,6 @@ function display_cff($atts) {
411
if ($cff_like_box_text_color == 'white') $cff_like_box_colorscheme = 'dark';
412
413
$cff_likebox_width = $atts[ 'likeboxwidth' ];
414
- if ( is_numeric(substr($cff_likebox_width, -1, 1)) ) $cff_likebox_width = $cff_likebox_width . 'px';
415
-
416
$cff_likebox_height = $atts[ 'likeboxheight' ];
417
$cff_likebox_height = preg_replace('/px#x2F;', '', $cff_likebox_height);
418
@@ -438,8 +429,6 @@ function display_cff($atts) {
438
//Get feed header settings
439
$cff_header_bg_color = $atts['headerbg'];
440
$cff_header_padding = $atts['headerpadding'];
441
- if ( is_numeric(substr($cff_header_padding, -1, 1)) ) $cff_header_padding = $cff_header_padding . 'px';
442
-
443
$cff_header_text_size = $atts['headertextsize'];
444
$cff_header_text_weight = $atts['headertextweight'];
445
$cff_header_text_color = $atts['headertextcolor'];
@@ -511,24 +500,13 @@ function display_cff($atts) {
511
//Get show posts attribute. If not set then default to 25
512
$show_posts = $atts['num'];
513
if (empty($show_posts)) $show_posts = 25;
514
- if ( $show_posts == 'undefined' ) $show_posts = 25;
515
516
//If the 'Enter my own Access Token' box is unchecked then don't use the user's access token, even if there's one in the field
517
get_option('cff_show_access_token') ? $cff_show_access_token = true : $cff_show_access_token = false;
518
519
//If there's no Access Token then use the default
520
- // if ($access_token == '' || !$cff_show_access_token) $access_token = '1436737606570258|MGh1BX4_b_D9HzJtKe702cwMRPI';
521
- $access_token_array = array(
522
- '1489500477999288|KFys5ppNi3sreihdreqPkU2ChIE',
523
- '859332767418162|BR-YU8zjzvonNrszlll_1a4y_xE',
524
- '360558880785446|4jyruti_VkxxK7gS7JeyX-EuSXs',
525
- '1487072591579718|0KQzP-O2E4mvFCPxTLWP1b87I4Q',
526
- '640861236031365|2rENQzxtWtG12DtlZwqfZ6Vu6BE'
527
- );
528
- if ($access_token == '' || !$cff_show_access_token) $access_token = $access_token_array[rand(0, 4)];
529
-
530
-
531
-
532
//Check whether a Page ID has been defined
533
if ($page_id == '') {
534
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=YOUR_PAGE_ID_HERE].<br /><br />";
@@ -598,7 +576,7 @@ function display_cff($atts) {
598
( isset($cff_app_id) && !empty($cff_app_id) ) ? $cff_like_box_params = '&appId=' .$cff_app_id : $cff_like_box_params = '';
599
$like_box = '<div class="cff-likebox';
600
if ($cff_like_box_outside) $like_box .= ' cff-outside';
601
- $like_box .= ($cff_like_box_position == 'top') ? ' cff-top' : ' cff-bottom';
602
$like_box .= '" ' . $cff_likebox_styles . '><script src="https://connect.facebook.net/' . $cff_locale . '/all.js#xfbml=1 '.$cff_like_box_params.'"></script><fb:like-box href="http://www.facebook.com/' . $page_id . '" show_faces="'.$cff_like_box_faces.'" stream="false" header="false" colorscheme="'. $cff_like_box_colorscheme .'" show_border="'. $cff_like_box_border .'" data-height="'.$cff_likebox_height.'"></fb:like-box><div id="fb-root"></div></div>';
603
//Don't show like box if it's a group
604
if($cff_is_group) $like_box = '';
@@ -618,7 +596,7 @@ function display_cff($atts) {
618
619
$cff_header = '<h3 class="cff-header';
620
if ($cff_header_outside) $cff_header .= ' cff-outside';
621
- $cff_header .= '" ' . $cff_header_styles . '>';
622
$cff_header .= '<i class="fa fa-' . $cff_header_icon . '"';
623
if(!empty($cff_header_icon_color) || !empty($cff_header_icon_size)) $cff_header .= ' style="';
624
if(!empty($cff_header_icon_color)) $cff_header .= 'color: #' . str_replace('#', '', $cff_header_icon_color) . ';';
@@ -628,11 +606,6 @@ function display_cff($atts) {
628
$cff_header .= '<span class="header-text" style="height: '.$cff_header_icon_size.'px;">' . $cff_header_text . '</span>';
629
$cff_header .= '</h3>';
630
631
- //If the number of posts is set to zero then don't show any and set limit to one
632
- if ( ($atts['num'] == '0' || $atts['num'] == 0) && $atts['num'] !== ''){
633
- $show_posts = 0;
634
- $cff_post_limit = 1;
635
- }
636
637
//***START FEED***
638
$cff_content = '';
@@ -867,11 +840,8 @@ function display_cff($atts) {
867
$cff_translate_photos_text = $atts['photostext'];
868
if (!isset($cff_translate_photos_text) || empty($cff_translate_photos_text)) $cff_translate_photos_text = 'photos';
869
$cff_post_text = '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
870
-
871
- //Start HTML for post text
872
- $cff_post_text .= '<span class="cff-text" rel="'.str_replace('#', '', $atts['textlinkcolor'] ).'">';
873
if ($cff_title_link) $cff_post_text .= '<a class="cff-post-text-link" '.$cff_title_styles.' href="'.$link.'" '.$target.'>';
874
-
875
//Which content should we use?
876
$cff_post_text_type = '';
877
//Use the story
@@ -996,7 +966,7 @@ function display_cff($atts) {
996
if (!empty($body_limit)) {
997
if (strlen($description_text) > $body_limit) $description_text = substr($description_text, 0, $body_limit) . '...';
998
}
999
- $cff_description .= '<p class="cff-post-desc" '.$cff_body_styles.'><span>' . cff_autolink( htmlspecialchars($description_text), $link_color=str_replace('#', '', $atts['textlinkcolor']) ) . ' </span></p>';
1000
1001
//If the post text and description/caption are the same then don't show the description
1002
if($post_text == $description_text) $cff_description = '';
@@ -1019,10 +989,9 @@ function display_cff($atts) {
1019
//The link title:
1020
$cff_shared_link .= '"><'.$cff_link_title_format.' class="cff-link-title" '.$cff_link_title_styles.'><a href="'.$link.'" '.$target.' style="color:#' . str_replace('#', '', $cff_link_title_color) . ';">'. $news->name . '</a></'.$cff_link_title_format.'>';
1021
//The link source:
1022
- (!empty($news->caption)) ? $cff_link_caption = $news->caption : $cff_link_caption = '';
1023
- if(!empty($cff_link_caption)) $cff_shared_link .= '<p class="cff-link-caption" style="color:#' . str_replace('#', '', $cff_link_url_color) . ';">'.$cff_link_caption.'</p>';
1024
if ($cff_show_desc) {
1025
- if( $description_text != $cff_link_caption ) $cff_shared_link .= $cff_description;
1026
}
1027
$cff_shared_link .= '</div>';
1028
}
@@ -1239,11 +1208,6 @@ function display_cff($atts) {
1239
date_default_timezone_set( $cff_orig_timezone );
1240
//Add the Like Box inside
1241
if ($cff_like_box_position == 'bottom' && $cff_show_like_box && !$cff_like_box_outside) $cff_content .= $like_box;
1242
- /* Credit link */
1243
- $cff_show_credit = $atts['credit'];
1244
- ($cff_show_credit == 'true' || $cff_show_credit == 'on') ? $cff_show_credit = true : $cff_show_credit = false;
1245
-
1246
- if($cff_show_credit) $cff_content .= '<p class="cff-credit"><a href="https://smashballoon.com/custom-facebook-feed/" target="_blank" style="color: #'.$link_color=str_replace('#', '', $atts['textlinkcolor'] ).'"><i class="fa fa-facebook-square"></i>The Custom Facebook Feed plugin</a></p>';
1247
//End the feed
1248
$cff_content .= '</div><div class="cff-clear"></div>';
1249
//Add the Like Box outside
@@ -1657,7 +1621,7 @@ add_filter('widget_text', 'do_shortcode');
1657
add_action( 'wp_enqueue_scripts', 'cff_add_my_stylesheet' );
1658
function cff_add_my_stylesheet() {
1659
// Respects SSL, Style.css is relative to the current file
1660
- wp_register_style( 'cff', plugins_url('css/cff-style.css?10', __FILE__) );
1661
wp_enqueue_style( 'cff' );
1662
wp_enqueue_style( 'cff-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );
1663
}
@@ -1665,7 +1629,7 @@ function cff_add_my_stylesheet() {
1665
add_action( 'wp_enqueue_scripts', 'cff_scripts_method' );
1666
function cff_scripts_method() {
1667
//Register the script to make it available
1668
- wp_register_script( 'cffscripts', plugins_url( '/js/cff-scripts.js?10' , __FILE__ ), array('jquery'), '1.9', true );
1669
//Enqueue it to load it onto the page
1670
wp_enqueue_script('cffscripts');
1671
}
@@ -1927,7 +1891,7 @@ function cff_autolink_do($text, $link_color, $sub, $limit, $tagfill, $auto_title
1927
1928
1929
if( substr( $link_url_enc, 0, 4 ) !== "http" ) $link_url_enc = 'http://' . $link_url_enc;
1930
- $buffer .= "<a target='_blank' style='color:#".$link_color."' href=\"{$link_url_enc}\"$tagfill>{$display_url_enc}</a>";
1931
1932
1933
}else{
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: 2.1.2
7
Author: Smash Balloon
8
Author URI: http://smashballoon.com/
9
License: GPLv2 or later
146
'likeboxheight' => isset($options[ 'cff_likebox_height' ]) ? $options[ 'cff_likebox_height' ] : '',
147
'likeboxfaces' => isset($options[ 'cff_like_box_faces' ]) ? $options[ 'cff_like_box_faces' ] : '',
148
'likeboxborder' => isset($options[ 'cff_like_box_border' ]) ? $options[ 'cff_like_box_border' ] : '',
149
150
//Page Header
151
'showheader' => isset($options[ 'cff_show_header' ]) ? $options[ 'cff_show_header' ] : '',
176
$cff_page_type = $atts[ 'pagetype' ];
177
($cff_page_type == 'group') ? $cff_is_group = true : $cff_is_group = false;
178
179
+ $cff_feed_width = $atts['width'];
180
$cff_feed_height = $atts[ 'height' ];
181
$cff_feed_padding = $atts[ 'padding' ];
182
$cff_bg_color = $atts[ 'bgcolor' ];
183
$cff_show_author = $atts[ 'showauthornew' ];
184
$cff_cache_time = $atts[ 'cachetime' ];
404
if ($cff_like_box_text_color == 'white') $cff_like_box_colorscheme = 'dark';
405
406
$cff_likebox_width = $atts[ 'likeboxwidth' ];
407
$cff_likebox_height = $atts[ 'likeboxheight' ];
408
$cff_likebox_height = preg_replace('/px#x2F;', '', $cff_likebox_height);
409
429
//Get feed header settings
430
$cff_header_bg_color = $atts['headerbg'];
431
$cff_header_padding = $atts['headerpadding'];
432
$cff_header_text_size = $atts['headertextsize'];
433
$cff_header_text_weight = $atts['headertextweight'];
434
$cff_header_text_color = $atts['headertextcolor'];
500
//Get show posts attribute. If not set then default to 25
501
$show_posts = $atts['num'];
502
if (empty($show_posts)) $show_posts = 25;
503
+ if ( $show_posts == 0 || $show_posts == 'undefined' ) $show_posts = 25;
504
505
//If the 'Enter my own Access Token' box is unchecked then don't use the user's access token, even if there's one in the field
506
get_option('cff_show_access_token') ? $cff_show_access_token = true : $cff_show_access_token = false;
507
508
//If there's no Access Token then use the default
509
+ if ($access_token == '' || !$cff_show_access_token) $access_token = '1436737606570258|MGh1BX4_b_D9HzJtKe702cwMRPI';
510
//Check whether a Page ID has been defined
511
if ($page_id == '') {
512
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=YOUR_PAGE_ID_HERE].<br /><br />";
576
( isset($cff_app_id) && !empty($cff_app_id) ) ? $cff_like_box_params = '&appId=' .$cff_app_id : $cff_like_box_params = '';
577
$like_box = '<div class="cff-likebox';
578
if ($cff_like_box_outside) $like_box .= ' cff-outside';
579
+ $like_box .= ($cff_like_box_position == 'top') ? ' top' : ' bottom';
580
$like_box .= '" ' . $cff_likebox_styles . '><script src="https://connect.facebook.net/' . $cff_locale . '/all.js#xfbml=1 '.$cff_like_box_params.'"></script><fb:like-box href="http://www.facebook.com/' . $page_id . '" show_faces="'.$cff_like_box_faces.'" stream="false" header="false" colorscheme="'. $cff_like_box_colorscheme .'" show_border="'. $cff_like_box_border .'" data-height="'.$cff_likebox_height.'"></fb:like-box><div id="fb-root"></div></div>';
581
//Don't show like box if it's a group
582
if($cff_is_group) $like_box = '';
596
597
$cff_header = '<h3 class="cff-header';
598
if ($cff_header_outside) $cff_header .= ' cff-outside';
599
+ $cff_header .= '"' . $cff_header_styles . '>';
600
$cff_header .= '<i class="fa fa-' . $cff_header_icon . '"';
601
if(!empty($cff_header_icon_color) || !empty($cff_header_icon_size)) $cff_header .= ' style="';
602
if(!empty($cff_header_icon_color)) $cff_header .= 'color: #' . str_replace('#', '', $cff_header_icon_color) . ';';
606
$cff_header .= '<span class="header-text" style="height: '.$cff_header_icon_size.'px;">' . $cff_header_text . '</span>';
607
$cff_header .= '</h3>';
608
609
610
//***START FEED***
611
$cff_content = '';
840
$cff_translate_photos_text = $atts['photostext'];
841
if (!isset($cff_translate_photos_text) || empty($cff_translate_photos_text)) $cff_translate_photos_text = 'photos';
842
$cff_post_text = '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
843
+ $cff_post_text .= '<span class="cff-text">';
844
if ($cff_title_link) $cff_post_text .= '<a class="cff-post-text-link" '.$cff_title_styles.' href="'.$link.'" '.$target.'>';
845
//Which content should we use?
846
$cff_post_text_type = '';
847
//Use the story
966
if (!empty($body_limit)) {
967
if (strlen($description_text) > $body_limit) $description_text = substr($description_text, 0, $body_limit) . '...';
968
}
969
+ $cff_description .= '<p class="cff-post-desc" '.$cff_body_styles.'><span>' . cff_autolink( htmlspecialchars($description_text) ) . ' </span></p>';
970
971
//If the post text and description/caption are the same then don't show the description
972
if($post_text == $description_text) $cff_description = '';
989
//The link title:
990
$cff_shared_link .= '"><'.$cff_link_title_format.' class="cff-link-title" '.$cff_link_title_styles.'><a href="'.$link.'" '.$target.' style="color:#' . str_replace('#', '', $cff_link_title_color) . ';">'. $news->name . '</a></'.$cff_link_title_format.'>';
991
//The link source:
992
+ if(!empty($news->caption)) $cff_shared_link .= '<p class="cff-link-caption" style="color:#' . str_replace('#', '', $cff_link_url_color) . ';">'.$news->caption.'</p>';
993
if ($cff_show_desc) {
994
+ $cff_shared_link .= $cff_description;
995
}
996
$cff_shared_link .= '</div>';
997
}
1208
date_default_timezone_set( $cff_orig_timezone );
1209
//Add the Like Box inside
1210
if ($cff_like_box_position == 'bottom' && $cff_show_like_box && !$cff_like_box_outside) $cff_content .= $like_box;
1211
//End the feed
1212
$cff_content .= '</div><div class="cff-clear"></div>';
1213
//Add the Like Box outside
1621
add_action( 'wp_enqueue_scripts', 'cff_add_my_stylesheet' );
1622
function cff_add_my_stylesheet() {
1623
// Respects SSL, Style.css is relative to the current file
1624
+ wp_register_style( 'cff', plugins_url('css/cff-style.css?8', __FILE__) );
1625
wp_enqueue_style( 'cff' );
1626
wp_enqueue_style( 'cff-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );
1627
}
1629
add_action( 'wp_enqueue_scripts', 'cff_scripts_method' );
1630
function cff_scripts_method() {
1631
//Register the script to make it available
1632
+ wp_register_script( 'cffscripts', plugins_url( '/js/cff-scripts.js?7' , __FILE__ ), array('jquery'), '1.9', true );
1633
//Enqueue it to load it onto the page
1634
wp_enqueue_script('cffscripts');
1635
}
1891
1892
1893
if( substr( $link_url_enc, 0, 4 ) !== "http" ) $link_url_enc = 'http://' . $link_url_enc;
1894
+ $buffer .= "<a target='_blank' style='color: #".$link_color."' href=\"{$link_url_enc}\"$tagfill>{$display_url_enc}</a>";
1895
1896
1897
}else{
js/cff-scripts.js CHANGED
@@ -48,7 +48,6 @@ jQuery(document).ready(function() {
48
$more.show();
49
$less.hide();
50
}
51
- cffLinkHashtags();
52
});
53
54
//Hide the shared link box if it's empty
@@ -57,36 +56,25 @@ jQuery(document).ready(function() {
57
$sharedLink.remove();
58
}
59
60
- function cffLinkHashtags(){
61
- //Link hashtags
62
- var cffTextStr = $self.find('.cff-text').html(),
63
- cffDescStr = $self.find('.cff-post-desc').html(),
64
- regex = /(^|\s)#(\w*[a-zA-Z_]+\w*)/gi,
65
- linkcolor = $self.find('.cff-text').attr('rel');
66
67
- function replacer(hash){
68
- //Remove white space at beginning of hash
69
- var replacementString = jQuery.trim(hash);
70
- //If the hash is a hex code then don't replace it with a link as it's likely in the style attr, eg: "color: #ff0000"
71
- if ( /^#[0-9A-F]{6}#x2F;i.test( replacementString ) ){
72
- return replacementString;
73
- } else {
74
- return ' <a href="https://www.facebook.com/hashtag/'+ replacementString.substring(1) +'" target="_blank" style="color:#' + linkcolor + '">' + replacementString + '</a>';
75
- }
76
- }
77
-
78
- if(cfflinkhashtags == 'true'){
79
- //Replace hashtags in text
80
- var $cffText = $self.find('.cff-text');
81
- //Add a space after all <br> tags so that #hashtags immediatelly after them are also converted to hashtag links. Without the space they aren't captured by the regex.
82
- cffTextStr = cffTextStr.replace(/<br>/g, "<br> ");
83
- if($cffText.length > 0) $cffText.html( cffTextStr.replace( regex , replacer ) );
84
- }
85
86
- //Replace hashtags in desc
87
- if( $self.find('.cff-post-desc').length > 0 ) $self.find('.cff-post-desc').html( cffDescStr.replace( regex , replacer ) );
88
}
89
- cffLinkHashtags();
90
91
});
92
});
48
$more.show();
49
$less.hide();
50
}
51
});
52
53
//Hide the shared link box if it's empty
56
$sharedLink.remove();
57
}
58
59
+ //Link hashtags
60
+ var cffTextStr = $self.find('.cff-text').html(),
61
+ cffDescStr = $self.find('.cff-post-desc').html(),
62
+ regex = /(?:\s|^)(?:#(?!\d+(?:\s|$)))(\w+)(?=\s|$)/gi,
63
+ linkcolor = $self.find('.cff-text').attr('rel');
64
65
+ function replacer(hash){
66
+ var replacementString = jQuery.trim(hash);
67
+ return ' <a href="https://www.facebook.com/hashtag/'+ replacementString.substring(1) +'" target="_blank" style="color: #' + linkcolor + '">' + replacementString + '</a>';
68
+ }
69
70
+ if(cfflinkhashtags == 'true'){
71
+ //Replace hashtags in text
72
+ var $cffText = $self.find('.cff-text');
73
+ if($cffText.length > 0) $cffText.html( cffTextStr.replace( regex , replacer ) );
74
}
75
+
76
+ //Replace hashtags in desc
77
+ if( $self.find('.cff-post-desc').length > 0 ) $self.find('.cff-post-desc').html( cffDescStr.replace( regex , replacer ) );
78
79
});
80
});