Custom Facebook Feed - Version 4.0.5

Version Description

  • Fix: Fixed an issue that was causing the "All Feeds" page to be inaccessible to some users.
Download this release

Release Info

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

Code changes from version 4.0.4 to 4.0.5

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.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -262,6 +262,9 @@ 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.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.
4
  Requires at least: 4.1
5
  Requires PHP: 5.6
6
  Tested up to: 5.8
7
+ Stable tag: 4.0.5
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.5 =
266
+ * Fix: Fixed an issue that was causing the "All Feeds" page to be inaccessible to some users.
267
+
268
  = 4.0.4 =
269
  * Fix: The call-to-action in the Like Box widget would not display properly at certain window widths in some browsers.
270
  * Fix: If a feed name contained an apostrophe then additional slashes were being added each time settings were saved.
admin/admin-functions.php CHANGED
@@ -5452,6 +5452,13 @@ function cff_custom_cssjs_notice() {
5452
  if ( ! $custom_js_not_empty && ! $custom_css_not_empty ) {
5453
  return;
5454
  }
 
 
 
 
 
 
 
5455
  $close_href = add_query_arg( array( 'cff_dismiss_notice' => 'customjscss' ) );
5456
 
5457
  ?>
@@ -5587,4 +5594,4 @@ function cff_check_custom_css() {
5587
 
5588
  cff_transfer_css( $custom_css );
5589
  }
5590
- add_action( 'init', 'cff_check_custom_css' );
5452
  if ( ! $custom_js_not_empty && ! $custom_css_not_empty ) {
5453
  return;
5454
  }
5455
+
5456
+ $cff_notifications = new \CustomFacebookFeed\Admin\CFF_Notifications();
5457
+ $notifications = $cff_notifications->get();
5458
+
5459
+ if ( ! empty( $notifications ) && ( ! empty( $_GET['page'] ) && strpos( $_GET['page'], 'cff-' ) !== false ) ) {
5460
+ return;
5461
+ }
5462
  $close_href = add_query_arg( array( 'cff_dismiss_notice' => 'customjscss' ) );
5463
 
5464
  ?>
5594
 
5595
  cff_transfer_css( $custom_css );
5596
  }
5597
+ add_action( 'init', 'cff_check_custom_css' );
admin/builder/templates/screens/welcome.php CHANGED
@@ -2,10 +2,10 @@
2
  <?php
3
  /**
4
  * CFF Admin Notices
5
- *
6
  * @since 4.0
7
  */
8
- do_action('cff_admin_notices');
9
  ?>
10
 
11
  <div class="cff-fb-wlcm-header cff-fb-fs">
2
  <?php
3
  /**
4
  * CFF Admin Notices
5
+ *
6
  * @since 4.0
7
  */
8
+ do_action('cff_admin_notices');
9
  ?>
10
 
11
  <div class="cff-fb-wlcm-header cff-fb-fs">
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.4
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.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
 
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.5
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.5');
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
 
inc/Admin/CFF_Admin.php CHANGED
@@ -59,7 +59,7 @@ class CFF_Admin{
59
  }
60
 
61
  add_menu_page(
62
- '',
63
  'Facebook Feed'. $notice . $notice_bubble,
64
  $cap,
65
  'cff-top',
59
  }
60
 
61
  add_menu_page(
62
+ 'Facebook Feed',
63
  'Facebook Feed'. $notice . $notice_bubble,
64
  $cap,
65
  'cff-top',
inc/Admin/CFF_Notifications.php CHANGED
@@ -86,16 +86,16 @@ class CFF_Notifications {
86
 
87
  // on cron. Once a week?
88
  add_action( 'cff_notification_update', array( $this, 'update' ) );
89
-
90
  add_action( 'wp_ajax_cff_dashboard_notification_dismiss', array( $this, 'dismiss' ) );
91
-
92
  add_action( 'cff_header_notices', array( $this, 'header_notices' ) );
93
  add_action( 'wp_ajax_cff_dismiss_upgrade_notice', array( $this, 'dismiss_upgrade_notice' ) );
94
  }
95
 
96
  /**
97
  * Header Notices
98
- *
99
  * @since 4.0
100
  */
101
  public function header_notices() {
@@ -128,9 +128,9 @@ class CFF_Notifications {
128
 
129
  /**
130
  * Dismiss Upgrade Notice
131
- *
132
  * @since 4.0
133
- *
134
  * @return CFF_Response
135
  */
136
  public function dismiss_upgrade_notice() {
@@ -573,7 +573,7 @@ class CFF_Notifications {
573
  $image_html .= '</svg>';
574
  } else if ( $notification['id'] === 'review' || $notification['id'] === 'discount' ) {
575
  $image_html = sprintf(
576
- '<div class="bell"><img src="%s" alt="notice">',
577
  CFF_PLUGIN_URL . 'admin/assets/img/' . sanitize_text_field( $notification['image'] )
578
  );
579
  } else {
@@ -682,8 +682,8 @@ class CFF_Notifications {
682
  ?>
683
 
684
  <div id="cff-notifications" class="<?php echo ($type == 'review' || $type == 'discount') ? 'cff_' . $type . '_notice' : ''; ?>">
685
- <a
686
- class="dismiss"
687
  title="<?php echo esc_attr__( 'Dismiss this message', 'custom-facebook-feed' ); ?>"
688
  <?php echo ( $type == 'review' || $type == 'discount' ) ? 'href="'. esc_attr( $close_href ) .'"' : '' ?>
689
  >
86
 
87
  // on cron. Once a week?
88
  add_action( 'cff_notification_update', array( $this, 'update' ) );
89
+
90
  add_action( 'wp_ajax_cff_dashboard_notification_dismiss', array( $this, 'dismiss' ) );
91
+
92
  add_action( 'cff_header_notices', array( $this, 'header_notices' ) );
93
  add_action( 'wp_ajax_cff_dismiss_upgrade_notice', array( $this, 'dismiss_upgrade_notice' ) );
94
  }
95
 
96
  /**
97
  * Header Notices
98
+ *
99
  * @since 4.0
100
  */
101
  public function header_notices() {
128
 
129
  /**
130
  * Dismiss Upgrade Notice
131
+ *
132
  * @since 4.0
133
+ *
134
  * @return CFF_Response
135
  */
136
  public function dismiss_upgrade_notice() {
573
  $image_html .= '</svg>';
574
  } else if ( $notification['id'] === 'review' || $notification['id'] === 'discount' ) {
575
  $image_html = sprintf(
576
+ '<div class="bell"><img src="%s" alt="notice">',
577
  CFF_PLUGIN_URL . 'admin/assets/img/' . sanitize_text_field( $notification['image'] )
578
  );
579
  } else {
682
  ?>
683
 
684
  <div id="cff-notifications" class="<?php echo ($type == 'review' || $type == 'discount') ? 'cff_' . $type . '_notice' : ''; ?>">
685
+ <a
686
+ class="dismiss"
687
  title="<?php echo esc_attr__( 'Dismiss this message', 'custom-facebook-feed' ); ?>"
688
  <?php echo ( $type == 'review' || $type == 'discount' ) ? 'href="'. esc_attr( $close_href ) .'"' : '' ?>
689
  >
inc/Builder/CFF_Feed_Builder.php CHANGED
@@ -191,13 +191,12 @@ class CFF_Feed_Builder {
191
  public function builder_enqueue_admin_scripts(){
192
  if(get_current_screen()):
193
  $screen = get_current_screen();
194
- if ($screen->id == 'facebook-feed_page_cff-feed-builder') :
195
 
196
  $license_key = null;
197
  if ( get_option( 'cff_license_key' ) ) {
198
  $license_key = get_option( 'cff_license_key' );
199
  }
200
-
201
  $upgrade_url = 'https://smashballoondemo.com/?utm_campaign=facebook-free&utm_source=lite-upgrade-bar';
202
 
203
  $newly_retrieved_source_connection_data = CFF_Source::maybe_source_connection_data();
191
  public function builder_enqueue_admin_scripts(){
192
  if(get_current_screen()):
193
  $screen = get_current_screen();
194
+ if ( strpos($screen->id, 'cff-feed-builder') !== false ) :
195
 
196
  $license_key = null;
197
  if ( get_option( 'cff_license_key' ) ) {
198
  $license_key = get_option( 'cff_license_key' );
199
  }
 
200
  $upgrade_url = 'https://smashballoondemo.com/?utm_campaign=facebook-free&utm_source=lite-upgrade-bar';
201
 
202
  $newly_retrieved_source_connection_data = CFF_Source::maybe_source_connection_data();