Custom Facebook Feed - Version 1.6.7

Version Description

  • New: Your feed can now be completely displayed in any language - added i18n support for date translation
  • Tweak: Improved documentation within the plugin
  • Tweak: Changed order of methods used to retrieve feed data
Download this release

Release Info

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

Code changes from version 1.6.6.3 to 1.6.7

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
3
  Tags: facebook, custom, customizable, feed, events, seo, search engine, responsive, mobile, shortcode, social, status, posts
4
  Requires at least: 3.0
5
  Tested up to: 3.7.1
6
- Stable tag: 1.6.6.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -38,7 +38,7 @@ Display a **completely customizable**, **responsive** and **search engine crawla
38
  * Use the shortcode options to style multiple Facebook feeds in completely different ways
39
  * Select the number of Facebook posts to display
40
  * Set a maximum character length for both the text and descriptions of your Facebook posts
41
- * Localization support
42
 
43
  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").
44
 
@@ -52,19 +52,21 @@ To display photos, videos, the number of likes, shares and comments for each Fac
52
 
53
  == Frequently Asked Questions ==
54
 
55
- = How do I find the Page ID of my Facebook page? =
56
 
57
- If you have a Facebook page with a URL like this: `https://www.facebook.com/Your_Page_Name` then the Page ID is just `Your_Page_Name`. If your Facebook page URL is structured like this: `https://www.facebook.com/pages/Your_Page_Name/123654123654123` then the Page ID is actually the number at the end, so in this case `123654123654123`.
58
 
59
- If you have a Facebook group with a URL like this: `https://www.facebook.com/groups/123654123654123`, then the Page ID is simply `123654123654123`.
60
 
61
- = Are there any limitations on which Facebook page feeds I can display? =
 
 
62
 
63
  The Facebook feed you're trying to display has to be from a publicly accessible Facebook page or group. This means that you can't display the feed from your own personal Facebook profile or private Facebook group. This is to do with Facebook's privacy policies. You can't display a non-public Facebook feed publicly.
64
 
65
  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.
66
 
67
- 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 restrictions you have on it, which will then allow the Custom Facebook Feed plugin to access and display your feed.
68
 
69
  = What's an Access Token and why do I need one? =
70
 
@@ -72,20 +74,28 @@ An Access Token is required by Facebook in order to access their feeds. Don't w
72
 
73
  = Can I display feeds from multiple Facebook pages or groups? =
74
 
75
- Yep. You set your default Facebook page ID in the plugin's settings but then you can define different Facebook page IDs in the shortcodes you use to show multiple feeds from different Facebook pages. Just use the id option in your shortcode like so: id=another_page_id.
76
 
77
  = Why isn't the feed from my group displaying? =
78
 
79
  Firstly, check that your group is public and not a private group.
80
  Secondly, be sure to check the 'Show posts by others on my page' option in the Custom Facebook Feed settings page.
81
 
 
 
 
 
 
 
 
 
82
  = Can I show photos and videos in my Custom Facebook feed? =
83
 
84
  This free plugin only allows you to display textual updates from your Facebook feed. To display photos and videos in your feed you need to upgrade to the Pro version of the plugin. Try out a demo of the Pro version on the [Custom Facebook Feed website](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo"), and find out more about the Pro version [here](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
85
 
86
  = Can I show the comments associated with each Facebook post? =
87
 
88
- For this feature please upgrade to the [Pro version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro).
89
 
90
  = Is the content of my Custom Facebook Feed crawlable by search engines? =
91
 
@@ -93,7 +103,9 @@ It sure is. Unlike other Facebook plugins which use iframes to embed your Facebo
93
 
94
  = How do I embed the Custom Facebook Feed directly into a WordPress page template? =
95
 
96
- You can embed your Facebook feed directly into a template file by using the WordPress do_shortcode function: do_shortcode('[custom-facebook-feed]'');
 
 
97
 
98
  == Screenshots ==
99
 
@@ -109,6 +121,11 @@ You can embed your Facebook feed directly into a template file by using the Word
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
112
  = 1.6.6.3 =
113
  * New: Added support for group events
114
 
3
  Tags: facebook, custom, customizable, feed, events, seo, search engine, responsive, mobile, shortcode, social, status, posts
4
  Requires at least: 3.0
5
  Tested up to: 3.7.1
6
+ Stable tag: 1.6.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
38
  * Use the shortcode options to style multiple Facebook feeds in completely different ways
39
  * Select the number of Facebook posts to display
40
  * Set a maximum character length for both the text and descriptions of your Facebook posts
41
+ * Localization/i18n support to allow every part of the feed to be displayed in your language
42
 
43
  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").
44
 
52
 
53
  == Frequently Asked Questions ==
54
 
55
+ = How do I find the Page ID of my Facebook page or group? =
56
 
57
+ 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`.
58
 
59
+ If you have a Facebook **group** then use [this tool](http://lookup-id.com/ "Look Up my ID") to find your Group ID.
60
 
61
+ Copy and paste the ID into the [Pro demo](http://smashballoon.com/custom-facebook-feed/demo/) to test it.
62
+
63
+ = Are there any limitations on which Facebook page or group feeds I can display? =
64
 
65
  The Facebook feed you're trying to display has to be from a publicly accessible Facebook page or group. This means that you can't display the feed from your own personal Facebook profile or private Facebook group. This is to do with Facebook's privacy policies. You can't display a non-public Facebook feed publicly.
66
 
67
  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.
68
 
69
+ 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.
70
 
71
  = What's an Access Token and why do I need one? =
72
 
74
 
75
  = Can I display feeds from multiple Facebook pages or groups? =
76
 
77
+ 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.
78
 
79
  = Why isn't the feed from my group displaying? =
80
 
81
  Firstly, check that your group is public and not a private group.
82
  Secondly, be sure to check the 'Show posts by others on my page' option in the Custom Facebook Feed settings page.
83
 
84
+ = Can I display the feed from a personal Facebook profile? =
85
+
86
+ Due to Facebook's privacy policy you're not able to use the plugin to display all of your posts from a personal profile, only from a public page or group, as posts from a personal profile are protected for privacy reasons. You may have limited success in displaying certain posts from a personal profile but most posts are not able to be displayed.
87
+
88
+ If you're using the profile to represent a business, organization, product, public figure or the like, then we'd advise converting your profile to a page per [Facebook's recommendation](http://www.facebook.com/help/175644189234902/), as there are many advantages to using pages over profiles.
89
+
90
+ Once you've done so, the plugin will be able to retrieve and display all of your posts.
91
+
92
  = Can I show photos and videos in my Custom Facebook feed? =
93
 
94
  This free plugin only allows you to display textual updates from your Facebook feed. To display photos and videos in your feed you need to upgrade to the Pro version of the plugin. Try out a demo of the Pro version on the [Custom Facebook Feed website](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo"), and find out more about the Pro version [here](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
95
 
96
  = Can I show the comments associated with each Facebook post? =
97
 
98
+ For this feature please upgrade to the [Pro version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
99
 
100
  = Is the content of my Custom Facebook Feed crawlable by search engines? =
101
 
103
 
104
  = How do I embed the Custom Facebook Feed directly into a WordPress page template? =
105
 
106
+ You can embed your Facebook feed directly into a template file by using the WordPress do_shortcode function: <?php do_shortcode('[custom-facebook-feed]'); ?>.
107
+
108
+ **For more detailed FAQs and help with troubleshooting please visit the [FAQ & Troubleshooting](http://smashballoon.com/custom-facebook-feed/faq/) section of the Smash Balloon website**
109
 
110
  == Screenshots ==
111
 
121
 
122
  == Changelog ==
123
 
124
+ = 1.6.7 =
125
+ * New: Your feed can now be completely displayed in any language - added i18n support for date translation
126
+ * Tweak: Improved documentation within the plugin
127
+ * Tweak: Changed order of methods used to retrieve feed data
128
+
129
  = 1.6.6.3 =
130
  * New: Added support for group events
131
 
custom-facebook-feed-admin.php CHANGED
@@ -115,7 +115,7 @@ function cff_settings_page() {
115
  <!--<a href="#" id="verify-token" class="button-secondary"><?php _e('Verify Access Token'); ?></a>-->
116
  &nbsp;<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('How to get an Access Token'); ?></a>
117
  <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123|ABC2fvp5h9tJe4-5-AbC123</i>
118
- <p class="tooltip"><?php _e("In order to use the plugin, Facebook requires you to obtain an access token to access their data. Don't worry though, this is really easy to do. Just follow the step-by-step instructions at the following link: <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>How to get a Facebook Access Token</a>"); ?>.</p>
119
  </td>
120
  </tr>
121
  <tr valign="top">
@@ -124,7 +124,13 @@ function cff_settings_page() {
124
  <input name="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val ); ?>" size="60" />
125
  &nbsp;<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?'); ?></a>
126
  <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
127
- <p class="tooltip"><?php _e('If you have a Facebook page with a URL like this:'); ?> <code>https://www.facebook.com/your_page_name</code> <?php _e('then the Page ID is just'); ?> <b>your_page_name</b>. <?php _e('If your page URL is structured like this:'); ?> <code>https://www.facebook.com/pages/your_page_name/123654123654123</code> <?php _e('then the Page ID is actually the number at the end, so in this case'); ?> <b>123654123654123</b>.</p>
 
 
 
 
 
 
128
  </td>
129
  </tr>
130
  <tr valign="top">
@@ -139,11 +145,11 @@ function cff_settings_page() {
139
  <td>
140
  <input name="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
141
  <i style="color: #666; font-size: 11px;">Eg. 50</i> <a class="tooltip-link bump-left" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
142
- <p class="tooltip"><?php _e('By default the Facebook API only returns your latest 25 posts. If you would like to retrieve more than 25 posts then you can increase the limit by specifying a higher value here. However, the more posts you request the slower the page load time may be when the plugin needs to check Facebook for new posts. Similarly, if you only intend to retrieve a few posts then you may wish to set a lower post limit here so that you aren\'t retrieving more posts than necessary.'); ?></p>
143
  </td>
144
  </tr>
145
  <tr valign="top">
146
- <th scope="row"><?php _e('Show posts by others on my page'); ?><br /><i style="color: #666; font-size: 11px;"><?php _e('(Check this if using a group)'); ?></i></th>
147
  <td>
148
  <input name="cff_show_others" type="checkbox" id="cff_show_others" <?php if($cff_show_others_val == true) echo "checked"; ?> />
149
  <i style="color: #666; font-size: 11px;"><?php _e('By default only posts by the page owner will be shown. Check this box to also show posts by others.'); ?></i>
@@ -254,7 +260,7 @@ function cff_settings_page() {
254
  <?php submit_button(); ?>
255
  </form>
256
  <h3><?php _e('Support'); ?></h3>
257
- <p>Having trouble getting the plugin to work? Try visiting the <a href="http://smashballoon.com/custom-facebook-feed/troubleshooting/" target="_blank" />Troubleshooting</a> page, <a href="http://smashballoon.com/custom-facebook-feed/faq/" target="_blank" />FAQ</a> page, or contact <a href="http://smashballoon.com/custom-facebook-feed/support" target="_blank">support</a>.<br />Smash Balloon is committed to making this plugin better. Please let us know if you have had any issues when using this plugin so that we can continue to improve it!</p>
258
  <hr />
259
  <h3><?php _e('Displaying your Feed'); ?></h3>
260
  <p><?php _e('Copy and paste this shortcode directly into the page, post or widget where you\'d like the feed to show up:'); ?></p>
115
  <!--<a href="#" id="verify-token" class="button-secondary"><?php _e('Verify Access Token'); ?></a>-->
116
  &nbsp;<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('How to get an Access Token'); ?></a>
117
  <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123|ABC2fvp5h9tJe4-5-AbC123</i>
118
+ <p class="tooltip"><?php _e("In order to use the plugin, Facebook requires you to obtain an access token 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>
119
  </td>
120
  </tr>
121
  <tr valign="top">
124
  <input name="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val ); ?>" size="60" />
125
  &nbsp;<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?'); ?></a>
126
  <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
127
+ <div class="tooltip">
128
+ <ul>
129
+ <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>'); ?>
130
+ <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>
131
+ <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>
132
+ </ul>
133
+ </div>
134
  </td>
135
  </tr>
136
  <tr valign="top">
145
  <td>
146
  <input name="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
147
  <i style="color: #666; font-size: 11px;">Eg. 50</i> <a class="tooltip-link bump-left" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
148
+ <p class="tooltip"><?php _e('By default the Facebook API only returns your latest 25 posts. If you would like to retrieve more than 25 posts then you can increase the limit by specifying a higher value here. However, the more posts you request the slower the page load time may be when the plugin needs to check Facebook for new posts. Similarly, if you only intend to retrieve a few posts then you may wish to set a lower post limit here so that you aren\'t retrieving more posts than necessary. It\'s best to set this higher than the actual number of posts you want to display as some posts may be filtered out.'); ?></p>
149
  </td>
150
  </tr>
151
  <tr valign="top">
152
+ <th scope="row"><?php _e('Show posts by others on my page'); ?><br /><i style="color: #666; font-size: 11px;"><?php _e('(Check this if using a <b>group</b>)'); ?></i></th>
153
  <td>
154
  <input name="cff_show_others" type="checkbox" id="cff_show_others" <?php if($cff_show_others_val == true) echo "checked"; ?> />
155
  <i style="color: #666; font-size: 11px;"><?php _e('By default only posts by the page owner will be shown. Check this box to also show posts by others.'); ?></i>
260
  <?php submit_button(); ?>
261
  </form>
262
  <h3><?php _e('Support'); ?></h3>
263
+ <p>Having trouble getting the plugin to work? Try visiting the <a href="http://smashballoon.com/custom-facebook-feed/faq/" target="_blank" />Troubleshooting &amp; FAQ</a> page or contact <a href="http://smashballoon.com/custom-facebook-feed/support" target="_blank">support</a>.<br />Smash Balloon is committed to making this plugin better. Please let us know if you have had any issues when using this plugin so that we can continue to improve it!</p>
264
  <hr />
265
  <h3><?php _e('Displaying your Feed'); ?></h3>
266
  <p><?php _e('Copy and paste this shortcode directly into the page, post or widget where you\'d like the feed to show up:'); ?></p>
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.6.6.3
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
@@ -621,8 +621,11 @@ function display_cff($atts) {
621
  }
622
  //Get JSON object of feed data
623
  function cff_fetchUrl($url){
624
- //Can we use cURL?
625
- if(is_callable('curl_init')){
 
 
 
626
  $ch = curl_init();
627
  curl_setopt($ch, CURLOPT_URL, $url);
628
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -630,10 +633,7 @@ function cff_fetchUrl($url){
630
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
631
  $feedData = curl_exec($ch);
632
  curl_close($ch);
633
- //If not then use file_get_contents
634
- } elseif ( ini_get('allow_url_fopen') == 1 || ini_get('allow_url_fopen') === TRUE ) {
635
- $feedData = @file_get_contents($url);
636
- //Or else use the WP HTTP API
637
  } else {
638
  if( !class_exists( 'WP_Http' ) ) include_once( ABSPATH . WPINC. '/class-http.php' );
639
  $request = new WP_Http;
@@ -734,40 +734,40 @@ function cff_getdate($original, $date_format, $custom_date) {
734
  switch ($date_format) {
735
 
736
  case '2':
737
- $print = date('F jS, g:i a', $original);
738
  break;
739
  case '3':
740
- $print = date('F jS', $original);
741
  break;
742
  case '4':
743
- $print = date('D F jS', $original);
744
  break;
745
  case '5':
746
- $print = date('l F jS', $original);
747
  break;
748
  case '6':
749
- $print = date('D M jS, Y', $original);
750
  break;
751
  case '7':
752
- $print = date('l F jS, Y', $original);
753
  break;
754
  case '8':
755
- $print = date('l F jS, Y - g:i a', $original);
756
  break;
757
  case '9':
758
- $print = date("l M jS, 'y", $original);
759
  break;
760
  case '10':
761
- $print = date('m.d.y', $original);
762
  break;
763
  case '11':
764
- $print = date('m/d/y', $original);
765
  break;
766
  case '12':
767
- $print = date('d.m.y', $original);
768
  break;
769
  case '13':
770
- $print = date('d/m/y', $original);
771
  break;
772
  default:
773
 
@@ -797,7 +797,7 @@ function cff_getdate($original, $date_format, $custom_date) {
797
 
798
  }
799
  if ( !empty($custom_date) ){
800
- $print = date($custom_date, $original);
801
  }
802
  return $print;
803
  }
@@ -805,47 +805,47 @@ function cff_eventdate($original, $date_format, $custom_date) {
805
  switch ($date_format) {
806
 
807
  case '2':
808
- $print = date('F jS, g:ia', $original);
809
  break;
810
  case '3':
811
- $print = date('g:ia - F jS', $original);
812
  break;
813
  case '4':
814
- $print = date('g:ia, F jS', $original);
815
  break;
816
  case '5':
817
- $print = date('l F jS - g:ia', $original);
818
  break;
819
  case '6':
820
- $print = date('D M jS, Y, g:iA', $original);
821
  break;
822
  case '7':
823
- $print = date('l F jS, Y, g:iA', $original);
824
  break;
825
  case '8':
826
- $print = date('l F jS, Y - g:ia', $original);
827
  break;
828
  case '9':
829
- $print = date("l M jS, 'y", $original);
830
  break;
831
  case '10':
832
- $print = date('m.d.y - g:iA', $original);
833
  break;
834
  case '11':
835
- $print = date('m/d/y, g:ia', $original);
836
  break;
837
  case '12':
838
- $print = date('d.m.y - g:iA', $original);
839
  break;
840
  case '13':
841
- $print = date('d/m/y, g:ia', $original);
842
  break;
843
  default:
844
- $print = date('F j, Y, g:ia', $original);
845
  break;
846
  }
847
  if ( !empty($custom_date) ){
848
- $print = date($custom_date, $original);
849
  }
850
  return $print;
851
  }
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.6.7
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
621
  }
622
  //Get JSON object of feed data
623
  function cff_fetchUrl($url){
624
+ //Can we use file_get_contents?
625
+ if ( ini_get('allow_url_fopen') == 1 || ini_get('allow_url_fopen') === TRUE ) {
626
+ $feedData = @file_get_contents($url);
627
+ //If not then can we use cURL?
628
+ } elseif(is_callable('curl_init')){
629
  $ch = curl_init();
630
  curl_setopt($ch, CURLOPT_URL, $url);
631
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
633
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
634
  $feedData = curl_exec($ch);
635
  curl_close($ch);
636
+ //Else use the WP HTTP API
 
 
 
637
  } else {
638
  if( !class_exists( 'WP_Http' ) ) include_once( ABSPATH . WPINC. '/class-http.php' );
639
  $request = new WP_Http;
734
  switch ($date_format) {
735
 
736
  case '2':
737
+ $print = date_i18n('F jS, g:i a', $original);
738
  break;
739
  case '3':
740
+ $print = date_i18n('F jS', $original);
741
  break;
742
  case '4':
743
+ $print = date_i18n('D F jS', $original);
744
  break;
745
  case '5':
746
+ $print = date_i18n('l F jS', $original);
747
  break;
748
  case '6':
749
+ $print = date_i18n('D M jS, Y', $original);
750
  break;
751
  case '7':
752
+ $print = date_i18n('l F jS, Y', $original);
753
  break;
754
  case '8':
755
+ $print = date_i18n('l F jS, Y - g:i a', $original);
756
  break;
757
  case '9':
758
+ $print = date_i18n("l M jS, 'y", $original);
759
  break;
760
  case '10':
761
+ $print = date_i18n('m.d.y', $original);
762
  break;
763
  case '11':
764
+ $print = date_i18n('m/d/y', $original);
765
  break;
766
  case '12':
767
+ $print = date_i18n('d.m.y', $original);
768
  break;
769
  case '13':
770
+ $print = date_i18n('d/m/y', $original);
771
  break;
772
  default:
773
 
797
 
798
  }
799
  if ( !empty($custom_date) ){
800
+ $print = date_i18n($custom_date, $original);
801
  }
802
  return $print;
803
  }
805
  switch ($date_format) {
806
 
807
  case '2':
808
+ $print = date_i18n('F jS, g:ia', $original);
809
  break;
810
  case '3':
811
+ $print = date_i18n('g:ia - F jS', $original);
812
  break;
813
  case '4':
814
+ $print = date_i18n('g:ia, F jS', $original);
815
  break;
816
  case '5':
817
+ $print = date_i18n('l F jS - g:ia', $original);
818
  break;
819
  case '6':
820
+ $print = date_i18n('D M jS, Y, g:iA', $original);
821
  break;
822
  case '7':
823
+ $print = date_i18n('l F jS, Y, g:iA', $original);
824
  break;
825
  case '8':
826
+ $print = date_i18n('l F jS, Y - g:ia', $original);
827
  break;
828
  case '9':
829
+ $print = date_i18n("l M jS, 'y", $original);
830
  break;
831
  case '10':
832
+ $print = date_i18n('m.d.y - g:iA', $original);
833
  break;
834
  case '11':
835
+ $print = date_i18n('m/d/y, g:ia', $original);
836
  break;
837
  case '12':
838
+ $print = date_i18n('d.m.y - g:iA', $original);
839
  break;
840
  case '13':
841
+ $print = date_i18n('d/m/y, g:ia', $original);
842
  break;
843
  default:
844
+ $print = date_i18n('F j, Y, g:ia', $original);
845
  break;
846
  }
847
  if ( !empty($custom_date) ){
848
+ $print = date_i18n($custom_date, $original);
849
  }
850
  return $print;
851
  }