Version Description
- Fix: The call-to-action in the Like Box widget would not display properly at certain window widths in some browsers.
- Fix: If a feed name contained an apostrophe then additional slashes were being added each time settings were saved.
- Tweak: An alert bubble is added to the Facebook Feed menu item when there are new notifications available.
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 4.0.4 |
Comparing to | |
See all releases |
Code changes from version 4.0.3 to 4.0.4
- README.txt +7 -2
- admin/assets/css/admin-notifications.css +21 -4
- admin/assets/css/cff-admin-style.css +19 -1
- admin/builder/assets/css/global.css +0 -1
- custom-facebook-feed.php +3 -3
- inc/Admin/CFF_Admin.php +11 -3
- inc/Admin/CFF_Global_Settings.php +13 -1
- inc/Builder/CFF_Feed_Saver_Manager.php +4 -4
- inc/CFF_Blocks.php +1 -3
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: Facebook, Facebook feed, Facebook posts, Facebook group, Facebook page
|
|
4 |
Requires at least: 4.1
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 4.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -262,6 +262,11 @@ The most common reason for this is that an add-on or extension you have installe
|
|
262 |
9. It's super easy to display your Facebook feed in any page or post
|
263 |
|
264 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
265 |
= 4.0.3 =
|
266 |
* Fix: Added additional plugin hardening.
|
267 |
|
@@ -977,4 +982,4 @@ The most common reason for this is that an add-on or extension you have installe
|
|
977 |
* New: Added the ability to define a maximum length for both the Facebook post text and description
|
978 |
|
979 |
= 1.0 =
|
980 |
-
* Launch!
|
4 |
Requires at least: 4.1
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 4.0.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
262 |
9. It's super easy to display your Facebook feed in any page or post
|
263 |
|
264 |
== Changelog ==
|
265 |
+
= 4.0.4 =
|
266 |
+
* Fix: The call-to-action in the Like Box widget would not display properly at certain window widths in some browsers.
|
267 |
+
* Fix: If a feed name contained an apostrophe then additional slashes were being added each time settings were saved.
|
268 |
+
* Tweak: An alert bubble is added to the Facebook Feed menu item when there are new notifications available.
|
269 |
+
|
270 |
= 4.0.3 =
|
271 |
* Fix: Added additional plugin hardening.
|
272 |
|
982 |
* New: Added the ability to define a maximum length for both the Facebook post text and description
|
983 |
|
984 |
= 1.0 =
|
985 |
+
* Launch!
|
admin/assets/css/admin-notifications.css
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
margin: 0 0 14px 0;
|
10 |
box-sizing: border-box;
|
11 |
}
|
12 |
-
#cff-notifications.cff_review_notice,
|
13 |
#cff-notifications.cff_discount_notice {
|
14 |
padding: 16px 70px 16px 82px
|
15 |
}
|
@@ -26,7 +26,7 @@
|
|
26 |
height: 42px;
|
27 |
}
|
28 |
|
29 |
-
#cff-notifications .rn_step_2 .bell,
|
30 |
#cff-notifications .rn_step_2 .thumb,
|
31 |
.cff_discount_notice .bell,
|
32 |
.cff_discount_notice .cff_thumb {
|
@@ -236,7 +236,7 @@
|
|
236 |
#cff-notifications .messages .message .buttons {
|
237 |
margin: -10px 0 0;
|
238 |
}
|
239 |
-
|
240 |
#cff-notifications .messages .message .buttons .button-secondary {
|
241 |
margin-top: 6px;
|
242 |
}
|
@@ -247,4 +247,21 @@
|
|
247 |
padding: 16px 30px 16px 82px;
|
248 |
}
|
249 |
}
|
250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
margin: 0 0 14px 0;
|
10 |
box-sizing: border-box;
|
11 |
}
|
12 |
+
#cff-notifications.cff_review_notice,
|
13 |
#cff-notifications.cff_discount_notice {
|
14 |
padding: 16px 70px 16px 82px
|
15 |
}
|
26 |
height: 42px;
|
27 |
}
|
28 |
|
29 |
+
#cff-notifications .rn_step_2 .bell,
|
30 |
#cff-notifications .rn_step_2 .thumb,
|
31 |
.cff_discount_notice .bell,
|
32 |
.cff_discount_notice .cff_thumb {
|
236 |
#cff-notifications .messages .message .buttons {
|
237 |
margin: -10px 0 0;
|
238 |
}
|
239 |
+
|
240 |
#cff-notifications .messages .message .buttons .button-secondary {
|
241 |
margin-top: 6px;
|
242 |
}
|
247 |
padding: 16px 30px 16px 82px;
|
248 |
}
|
249 |
}
|
250 |
+
.cff-notice-alert {
|
251 |
+
display: inline-block;
|
252 |
+
position: absolute;
|
253 |
+
vertical-align: top;
|
254 |
+
box-sizing: border-box;
|
255 |
+
margin: 1px 0 0 4px;
|
256 |
+
padding: 0 5px;
|
257 |
+
min-width: 18px;
|
258 |
+
height: 18px;
|
259 |
+
border-radius: 9px;
|
260 |
+
background-color: #d63638;
|
261 |
+
color: #fff;
|
262 |
+
font-size: 11px;
|
263 |
+
line-height: 1.6;
|
264 |
+
text-align: center;
|
265 |
+
z-index: 26;
|
266 |
+
}
|
267 |
+
|
admin/assets/css/cff-admin-style.css
CHANGED
@@ -3587,4 +3587,22 @@ body .cff_review_step1_notice .cff-btn-link:not(:last-child) {
|
|
3587 |
.cff-install-plugin-btn .cff-btn-spinner {
|
3588 |
height: 20px;
|
3589 |
margin-right: 8px;
|
3590 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3587 |
.cff-install-plugin-btn .cff-btn-spinner {
|
3588 |
height: 20px;
|
3589 |
margin-right: 8px;
|
3590 |
+
}
|
3591 |
+
|
3592 |
+
.cff-notice-alert {
|
3593 |
+
display: inline-block;
|
3594 |
+
position: absolute;
|
3595 |
+
vertical-align: top;
|
3596 |
+
box-sizing: border-box;
|
3597 |
+
margin: 1px 0 0 4px;
|
3598 |
+
padding: 0 5px;
|
3599 |
+
min-width: 18px;
|
3600 |
+
height: 18px;
|
3601 |
+
border-radius: 9px;
|
3602 |
+
background-color: #d63638;
|
3603 |
+
color: #fff;
|
3604 |
+
font-size: 11px;
|
3605 |
+
line-height: 1.6;
|
3606 |
+
text-align: center;
|
3607 |
+
z-index: 26;
|
3608 |
+
}
|
admin/builder/assets/css/global.css
CHANGED
@@ -23,7 +23,6 @@
|
|
23 |
opacity: 1;
|
24 |
}
|
25 |
|
26 |
-
|
27 |
#cff-builder-app {
|
28 |
-webkit-font-smoothing: antialiased;
|
29 |
}
|
23 |
opacity: 1;
|
24 |
}
|
25 |
|
|
|
26 |
#cff-builder-app {
|
27 |
-webkit-font-smoothing: antialiased;
|
28 |
}
|
custom-facebook-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Smash Balloon Custom Facebook Feed
|
4 |
Plugin URI: https://smashballoon.com/custom-facebook-feed
|
5 |
Description: Add completely customizable Facebook feeds to your WordPress site
|
6 |
-
Version: 4.0.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
25 |
*/
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
27 |
|
28 |
-
define('CFFVER', '4.0.
|
29 |
define( 'WPW_SL_STORE_URL', 'https://smashballoon.com/' );
|
30 |
define( 'WPW_SL_ITEM_NAME', 'Custom Facebook Feed WordPress Plugin Personal' ); //*!*Update Plugin Name at top of file*!*
|
31 |
|
@@ -132,4 +132,4 @@ if ( function_exists('cff_main_pro') ){
|
|
132 |
function cff_main() {
|
133 |
return CustomFacebookFeed\Custom_Facebook_Feed::instance();
|
134 |
}
|
135 |
-
cff_main();
|
3 |
Plugin Name: Smash Balloon Custom Facebook Feed
|
4 |
Plugin URI: https://smashballoon.com/custom-facebook-feed
|
5 |
Description: Add completely customizable Facebook feeds to your WordPress site
|
6 |
+
Version: 4.0.4
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
25 |
*/
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
27 |
|
28 |
+
define('CFFVER', '4.0.4');
|
29 |
define( 'WPW_SL_STORE_URL', 'https://smashballoon.com/' );
|
30 |
define( 'WPW_SL_ITEM_NAME', 'Custom Facebook Feed WordPress Plugin Personal' ); //*!*Update Plugin Name at top of file*!*
|
31 |
|
132 |
function cff_main() {
|
133 |
return CustomFacebookFeed\Custom_Facebook_Feed::instance();
|
134 |
}
|
135 |
+
cff_main();
|
inc/Admin/CFF_Admin.php
CHANGED
@@ -44,15 +44,23 @@ class CFF_Admin{
|
|
44 |
public function register_dashboard_menus(){
|
45 |
$notice = '';
|
46 |
if ( \cff_main()->cff_error_reporter->are_critical_errors() ) {
|
47 |
-
$notice = ' <span class="
|
48 |
}
|
49 |
|
50 |
$cap = current_user_can( 'manage_custom_facebook_feed_options' ) ? 'manage_custom_facebook_feed_options' : 'manage_options';
|
51 |
$cap = apply_filters( 'cff_settings_pages_capability', $cap );
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
add_menu_page(
|
54 |
'',
|
55 |
-
'Facebook Feed'. $notice,
|
56 |
$cap,
|
57 |
'cff-top',
|
58 |
'cff_settings_page'
|
@@ -207,4 +215,4 @@ class CFF_Admin{
|
|
207 |
|
208 |
|
209 |
|
210 |
-
}
|
44 |
public function register_dashboard_menus(){
|
45 |
$notice = '';
|
46 |
if ( \cff_main()->cff_error_reporter->are_critical_errors() ) {
|
47 |
+
$notice = ' <span class="cff-notice-alert"><span>!</span></span>';
|
48 |
}
|
49 |
|
50 |
$cap = current_user_can( 'manage_custom_facebook_feed_options' ) ? 'manage_custom_facebook_feed_options' : 'manage_options';
|
51 |
$cap = apply_filters( 'cff_settings_pages_capability', $cap );
|
52 |
|
53 |
+
$sbi_notifications = new CFF_Notifications();
|
54 |
+
$notifications = $sbi_notifications->get();
|
55 |
+
|
56 |
+
$notice_bubble = '';
|
57 |
+
if ( empty( $notice ) && ! empty( $notifications ) && is_array( $notifications ) ) {
|
58 |
+
$notice_bubble = ' <span class="cff-notice-alert"><span>'.count( $notifications ).'</span></span>';
|
59 |
+
}
|
60 |
+
|
61 |
add_menu_page(
|
62 |
'',
|
63 |
+
'Facebook Feed'. $notice . $notice_bubble,
|
64 |
$cap,
|
65 |
'cff-top',
|
66 |
'cff_settings_page'
|
215 |
|
216 |
|
217 |
|
218 |
+
}
|
inc/Admin/CFF_Global_Settings.php
CHANGED
@@ -1444,6 +1444,18 @@ class CFF_Global_Settings {
|
|
1444 |
$cff_cache_time_unit = get_option( 'cff_cache_time_unit', 'hours' );
|
1445 |
$custom_js_text = ! empty( $cff_style_settings['cff_custom_js'] ) && trim( wp_unslash( $cff_style_settings['cff_custom_js'] ) ) !== '' ? wp_unslash( $cff_style_settings['cff_custom_js'] ) : '';
|
1446 |
if ( ! empty( $custom_js_text ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1447 |
$js_html = esc_html( '<!-- Custom Facebook Feed JS -->' ) . "\n";
|
1448 |
$js_html .= esc_html( '<script type="text/javascript">' ) . "\n";
|
1449 |
$js_html .= esc_html( 'function cff_custom_js($){' ) . "\n";
|
@@ -1657,4 +1669,4 @@ class CFF_Global_Settings {
|
|
1657 |
return CFF_View::render( 'settings.index' );
|
1658 |
}
|
1659 |
|
1660 |
-
}
|
1444 |
$cff_cache_time_unit = get_option( 'cff_cache_time_unit', 'hours' );
|
1445 |
$custom_js_text = ! empty( $cff_style_settings['cff_custom_js'] ) && trim( wp_unslash( $cff_style_settings['cff_custom_js'] ) ) !== '' ? wp_unslash( $cff_style_settings['cff_custom_js'] ) : '';
|
1446 |
if ( ! empty( $custom_js_text ) ) {
|
1447 |
+
$js_wrapper_array = [
|
1448 |
+
esc_html('<!-- Custom Facebook Feed JS -->' ) . "\n",
|
1449 |
+
esc_html('<script type="text/javascript">' ) . "\n",
|
1450 |
+
esc_html('function cff_custom_js($){' ) . "\n",
|
1451 |
+
esc_html(' var $ = jQuery;' ) . "\n",
|
1452 |
+
esc_html('}cff_custom_js($);' ) . "\n",
|
1453 |
+
esc_html('</script>' ) . "\n"
|
1454 |
+
];
|
1455 |
+
foreach ($js_wrapper_array as $single_wrapper) {
|
1456 |
+
$custom_js_text = str_replace($single_wrapper, '', $custom_js_text);
|
1457 |
+
}
|
1458 |
+
|
1459 |
$js_html = esc_html( '<!-- Custom Facebook Feed JS -->' ) . "\n";
|
1460 |
$js_html .= esc_html( '<script type="text/javascript">' ) . "\n";
|
1461 |
$js_html .= esc_html( 'function cff_custom_js($){' ) . "\n";
|
1669 |
return CFF_View::render( 'settings.index' );
|
1670 |
}
|
1671 |
|
1672 |
+
}
|
inc/Builder/CFF_Feed_Saver_Manager.php
CHANGED
@@ -79,7 +79,7 @@ class CFF_Feed_Saver_Manager {
|
|
79 |
$feed_name = '';
|
80 |
if ( isset( $settings_data['update_feed'] ) && $settings_data['update_feed'] == 'true') {
|
81 |
$settings_data['settings']['sources'] = $_POST['sources'];
|
82 |
-
$feed_name = $settings_data['feed_name'];
|
83 |
$settings_data = $settings_data['settings'];
|
84 |
}
|
85 |
if ( isset( $settings_data['album'] ) ) {
|
@@ -719,14 +719,14 @@ class CFF_Feed_Saver_Manager {
|
|
719 |
*/
|
720 |
public static function sanitize( $type, $value ) {
|
721 |
switch ( $type ) {
|
722 |
-
case 'int'
|
723 |
$return = intval( $value );
|
724 |
break;
|
725 |
default:
|
726 |
-
$return = sanitize_text_field( $value );
|
727 |
break;
|
728 |
}
|
729 |
|
730 |
return $return;
|
731 |
}
|
732 |
-
}
|
79 |
$feed_name = '';
|
80 |
if ( isset( $settings_data['update_feed'] ) && $settings_data['update_feed'] == 'true') {
|
81 |
$settings_data['settings']['sources'] = $_POST['sources'];
|
82 |
+
$feed_name = sanitize_text_field( wp_unslash( $settings_data['feed_name'] ) );
|
83 |
$settings_data = $settings_data['settings'];
|
84 |
}
|
85 |
if ( isset( $settings_data['album'] ) ) {
|
719 |
*/
|
720 |
public static function sanitize( $type, $value ) {
|
721 |
switch ( $type ) {
|
722 |
+
case 'int':
|
723 |
$return = intval( $value );
|
724 |
break;
|
725 |
default:
|
726 |
+
$return = sanitize_text_field( wp_unslash( $value ) );
|
727 |
break;
|
728 |
}
|
729 |
|
730 |
return $return;
|
731 |
}
|
732 |
+
}
|
inc/CFF_Blocks.php
CHANGED
@@ -80,7 +80,7 @@ class CFF_Blocks {
|
|
80 |
*/
|
81 |
public function enqueue_block_editor_assets() {
|
82 |
$access_token = get_option('cff_access_token');
|
83 |
-
|
84 |
\cff_main()->enqueue_styles_assets();
|
85 |
\cff_main()->enqueue_scripts_assets();
|
86 |
|
@@ -162,8 +162,6 @@ class CFF_Blocks {
|
|
162 |
* @return bool True if is Gutenberg REST API call.
|
163 |
*/
|
164 |
public static function is_gb_editor() {
|
165 |
-
|
166 |
-
// TODO: Find a better way to check if is GB editor API call.
|
167 |
return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
|
168 |
}
|
169 |
|
80 |
*/
|
81 |
public function enqueue_block_editor_assets() {
|
82 |
$access_token = get_option('cff_access_token');
|
83 |
+
|
84 |
\cff_main()->enqueue_styles_assets();
|
85 |
\cff_main()->enqueue_scripts_assets();
|
86 |
|
162 |
* @return bool True if is Gutenberg REST API call.
|
163 |
*/
|
164 |
public static function is_gb_editor() {
|
|
|
|
|
165 |
return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
|
166 |
}
|
167 |
|