Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | Recent Facebook Posts |
Version | 2.0.11 |
Comparing to | |
See all releases |
Code changes from version 2.0.10 to 2.0.11
- CHANGELOG.md +7 -0
- includes/class-api.php +3 -3
- includes/functions/global.php +23 -12
- includes/functions/template.php +0 -26
- languages/recent-facebook-posts.pot +2 -2
- readme.txt +10 -3
- recent-facebook-posts.php +9 -8
CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
Changelog
|
2 |
============
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
### 2.0.10 - September 15, 2016
|
5 |
|
6 |
**Improvements**
|
1 |
Changelog
|
2 |
============
|
3 |
|
4 |
+
### 2.0.11 - October 24, 2016
|
5 |
+
|
6 |
+
**Fixes**
|
7 |
+
|
8 |
+
- Fixed "undefined function" errors when using certain cache plugins.
|
9 |
+
|
10 |
+
|
11 |
### 2.0.10 - September 15, 2016
|
12 |
|
13 |
**Improvements**
|
includes/class-api.php
CHANGED
@@ -200,12 +200,12 @@ class RFBP_API {
|
|
200 |
// Add all data to URL
|
201 |
$url = add_query_arg( $data, $url );
|
202 |
|
203 |
-
$response = wp_remote_get($url, array(
|
204 |
'timeout' => 10,
|
205 |
'headers' => array( 'Accept-Encoding' => '' ),
|
206 |
'sslverify' => false
|
207 |
-
)
|
208 |
-
);
|
209 |
|
210 |
// Did the request succeed?
|
211 |
if( is_wp_error( $response ) ) {
|
200 |
// Add all data to URL
|
201 |
$url = add_query_arg( $data, $url );
|
202 |
|
203 |
+
$response = wp_remote_get($url, array(
|
204 |
'timeout' => 10,
|
205 |
'headers' => array( 'Accept-Encoding' => '' ),
|
206 |
'sslverify' => false
|
207 |
+
)
|
208 |
+
);
|
209 |
|
210 |
// Did the request succeed?
|
211 |
if( is_wp_error( $response ) ) {
|
includes/functions/global.php
CHANGED
@@ -4,6 +4,27 @@ if( ! defined( 'RFBP_VERSION' ) ) {
|
|
4 |
exit;
|
5 |
}
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
/**
|
8 |
* Get the plugin settings (merged with defaults)
|
9 |
*
|
@@ -43,17 +64,6 @@ function rfbp_register_widget() {
|
|
43 |
register_widget( "RFBP_Widget" );
|
44 |
}
|
45 |
|
46 |
-
add_action( 'widgets_init', 'rfbp_register_widget' );
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Load plugin translations
|
50 |
-
*/
|
51 |
-
function rfbp_load_textdomain() {
|
52 |
-
load_plugin_textdomain( 'recent-facebook-posts', false, basename( RFBP_PLUGIN_DIR ) . '/languages/' );
|
53 |
-
}
|
54 |
-
|
55 |
-
add_action( 'init', 'rfbp_load_textdomain' );
|
56 |
-
|
57 |
/**
|
58 |
* @return RFBP_API
|
59 |
*/
|
@@ -76,4 +86,5 @@ function rfbp_get_api() {
|
|
76 |
function rfbp_valid_config() {
|
77 |
$opts = rfbp_get_settings();
|
78 |
return ( ! empty( $opts['fb_id'] ) && ! empty( $opts['app_id'] ) && ! empty( $opts['app_secret'] ) );
|
79 |
-
}
|
|
4 |
exit;
|
5 |
}
|
6 |
|
7 |
+
/**
|
8 |
+
* Prints a list of Recent Facebook Posts
|
9 |
+
*
|
10 |
+
* Accepted arguments are the same as the shortcode args
|
11 |
+
*
|
12 |
+
* - number: 5
|
13 |
+
* - likes: true
|
14 |
+
* - comments: true
|
15 |
+
* - excerpt_length: 140
|
16 |
+
* - el: div
|
17 |
+
* - origin: shortcode
|
18 |
+
* - show_page_link: false
|
19 |
+
* - show_link_preview: false
|
20 |
+
*
|
21 |
+
* @param array $args
|
22 |
+
* @return void
|
23 |
+
*/
|
24 |
+
function recent_facebook_posts( $args = array() ) {
|
25 |
+
echo RFBP_Public::instance()->output( $args );
|
26 |
+
}
|
27 |
+
|
28 |
/**
|
29 |
* Get the plugin settings (merged with defaults)
|
30 |
*
|
64 |
register_widget( "RFBP_Widget" );
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* @return RFBP_API
|
69 |
*/
|
86 |
function rfbp_valid_config() {
|
87 |
$opts = rfbp_get_settings();
|
88 |
return ( ! empty( $opts['fb_id'] ) && ! empty( $opts['app_id'] ) && ! empty( $opts['app_secret'] ) );
|
89 |
+
}
|
90 |
+
|
includes/functions/template.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if( ! defined( 'RFBP_VERSION' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Prints a list of Recent Facebook Posts
|
9 |
-
*
|
10 |
-
* Accepted arguments are the same as the shortcode args
|
11 |
-
*
|
12 |
-
* - number: 5
|
13 |
-
* - likes: true
|
14 |
-
* - comments: true
|
15 |
-
* - excerpt_length: 140
|
16 |
-
* - el: div
|
17 |
-
* - origin: shortcode
|
18 |
-
* - show_page_link: false
|
19 |
-
* - show_link_preview: false
|
20 |
-
*
|
21 |
-
* @param array $args
|
22 |
-
* @return void
|
23 |
-
*/
|
24 |
-
function recent_facebook_posts( $args = array() ) {
|
25 |
-
echo RFBP_Public::instance()->output( $args );
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/recent-facebook-posts.pot
CHANGED
@@ -5,7 +5,7 @@ msgstr ""
|
|
5 |
"Project-Id-Version: Recent Facebook Posts 2.0.10\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wordpress.org/support/plugin/recent-facebook-posts\n"
|
8 |
-
"POT-Creation-Date: 2016-
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -113,7 +113,7 @@ msgstr ""
|
|
113 |
msgid "Show link previews?"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: includes/functions/global.php:
|
117 |
msgid "Find us on Facebook"
|
118 |
msgstr ""
|
119 |
|
5 |
"Project-Id-Version: Recent Facebook Posts 2.0.10\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wordpress.org/support/plugin/recent-facebook-posts\n"
|
8 |
+
"POT-Creation-Date: 2016-10-24 09:57:11+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
113 |
msgid "Show link previews?"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: includes/functions/global.php:44 includes/views/settings_page.html.php:69
|
117 |
msgid "Find us on Facebook"
|
118 |
msgstr ""
|
119 |
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: DvanKooten
|
3 |
Donate link: https://dannyvankooten.com/donate/
|
4 |
Tags: facebook, posts, fb, widget, facebook widget, facebook posts
|
5 |
-
Requires at least:
|
6 |
Tested up to: 4.6.1
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -47,7 +47,7 @@ If you have [created your own language pack](http://codex.wordpress.org/Translat
|
|
47 |
|
48 |
* [Contribute to the Recent Facebook Posts plugin on GitHub](https://github.com/dannyvankooten/recent-facebook-posts)
|
49 |
* Using MailChimp to send out email newsletters? You should [try MailChimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/).
|
50 |
-
* Want
|
51 |
* Follow [@DannyvanKooten](https://twitter.com/DannyvanKooten) or [@ibericode](https://twitter.com/ibericode) on Twitter.
|
52 |
|
53 |
== Installation ==
|
@@ -158,6 +158,13 @@ add_filter('rfbp_cache_time', 'my_rfbp_cache_time');
|
|
158 |
== Changelog ==
|
159 |
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
### 2.0.10 - September 15, 2016
|
162 |
|
163 |
**Improvements**
|
2 |
Contributors: DvanKooten
|
3 |
Donate link: https://dannyvankooten.com/donate/
|
4 |
Tags: facebook, posts, fb, widget, facebook widget, facebook posts
|
5 |
+
Requires at least: 4.1
|
6 |
Tested up to: 4.6.1
|
7 |
+
Stable tag: 2.0.11
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
47 |
|
48 |
* [Contribute to the Recent Facebook Posts plugin on GitHub](https://github.com/dannyvankooten/recent-facebook-posts)
|
49 |
* Using MailChimp to send out email newsletters? You should [try MailChimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/).
|
50 |
+
* Want to boost your site's conversions? Have a look at the [Boxzilla pop-up plugin](https://wordpress.org/plugins/boxzilla/).
|
51 |
* Follow [@DannyvanKooten](https://twitter.com/DannyvanKooten) or [@ibericode](https://twitter.com/ibericode) on Twitter.
|
52 |
|
53 |
== Installation ==
|
158 |
== Changelog ==
|
159 |
|
160 |
|
161 |
+
### 2.0.11 - October 24, 2016
|
162 |
+
|
163 |
+
**Fixes**
|
164 |
+
|
165 |
+
- Fixed "undefined function" errors when using certain cache plugins.
|
166 |
+
|
167 |
+
|
168 |
### 2.0.10 - September 15, 2016
|
169 |
|
170 |
**Improvements**
|
recent-facebook-posts.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Recent Facebook Posts
|
4 |
Plugin URI: https://dannyvankooten.com/donate/
|
5 |
Description: Lists most recent posts from a public Facebook page.
|
6 |
-
Version: 2.0.
|
7 |
Author: Danny van Kooten
|
8 |
Author URI: https://dannyvankooten.com/
|
9 |
Text Domain: recent-facebook-posts
|
@@ -32,7 +32,7 @@ if( ! defined( 'ABSPATH' ) ) {
|
|
32 |
}
|
33 |
|
34 |
// Plugin Constants
|
35 |
-
define( 'RFBP_VERSION', '2.0.
|
36 |
define( 'RFBP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
|
37 |
|
38 |
/**
|
@@ -43,17 +43,18 @@ define( 'RFBP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
|
|
43 |
function _rfbp_bootstrap() {
|
44 |
|
45 |
// Include Global code
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
$settings = rfbp_get_settings();
|
49 |
|
50 |
if( ! is_admin() ) {
|
51 |
-
|
52 |
// frontend requests
|
53 |
-
|
54 |
-
include_once RFBP_PLUGIN_DIR . 'includes/functions/template.php';
|
55 |
-
require RFBP_PLUGIN_DIR . 'includes/class-public.php';
|
56 |
-
|
57 |
$rfbp_public = RFBP_Public::instance( $settings );
|
58 |
$rfbp_public->add_hooks();
|
59 |
|
3 |
Plugin Name: Recent Facebook Posts
|
4 |
Plugin URI: https://dannyvankooten.com/donate/
|
5 |
Description: Lists most recent posts from a public Facebook page.
|
6 |
+
Version: 2.0.11
|
7 |
Author: Danny van Kooten
|
8 |
Author URI: https://dannyvankooten.com/
|
9 |
Text Domain: recent-facebook-posts
|
32 |
}
|
33 |
|
34 |
// Plugin Constants
|
35 |
+
define( 'RFBP_VERSION', '2.0.11' );
|
36 |
define( 'RFBP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
|
37 |
|
38 |
/**
|
43 |
function _rfbp_bootstrap() {
|
44 |
|
45 |
// Include Global code
|
46 |
+
require_once RFBP_PLUGIN_DIR . 'includes/functions/global.php';
|
47 |
+
require_once RFBP_PLUGIN_DIR . 'includes/functions/helpers.php';
|
48 |
+
|
49 |
+
// init
|
50 |
+
add_action( 'widgets_init', 'rfbp_register_widget' );
|
51 |
+
load_plugin_textdomain( 'recent-facebook-posts', false, basename( RFBP_PLUGIN_DIR ) . '/languages/' );
|
52 |
|
53 |
$settings = rfbp_get_settings();
|
54 |
|
55 |
if( ! is_admin() ) {
|
|
|
56 |
// frontend requests
|
57 |
+
require_once RFBP_PLUGIN_DIR . 'includes/class-public.php';
|
|
|
|
|
|
|
58 |
$rfbp_public = RFBP_Public::instance( $settings );
|
59 |
$rfbp_public->add_hooks();
|
60 |
|