PluginProbe ʕ •ᴥ•ʔ
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress / 4.9.0
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress v4.9.0
4.12.0 4.10.0 4.9.0 4.8.1 trunk 1.0 1.1 1.12.1 1.2.3 1.2.4 1.2.5 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.5 1.5.1 1.5.2 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.4.1 1.6.5 1.6.5.1 1.6.6 1.6.6.1 1.6.6.2 1.6.6.3 1.6.7 1.6.7.1 1.6.8 1.6.8.1 1.6.8.2 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.9.0 1.9.1 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.8.1 1.9.9 1.9.9.1 1.9.9.2 1.9.9.3 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.10 2.11 2.11.1 2.12 2.12.1 2.12.2 2.12.3 2.12.4 2.13 2.14 2.14.1 2.15 2.15.1 2.16 2.16.1 2.17 2.17.1 2.18 2.18.1 2.18.2 2.18.3 2.19 2.19.1 2.19.2 2.19.3 2.2 2.2.1 2.3 2.3.1 2.3.10 2.3.2 2.3.3 2.3.4 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.1.1 2.4.1.2 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5 2.5.1 2.5.2 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.7 2.7.1 2.7.2 2.8 2.9 2.9.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.7.5 4.7.6 4.7.7
custom-facebook-feed / inc / Admin / CFF_Admin_Notices.php
custom-facebook-feed / inc / Admin Last commit date
Blocks 1 month ago Traits 1 month ago CFF_About_Us.php 1 month ago CFF_Admin.php 1 month ago CFF_Admin_Notices.php 1 month ago CFF_Callout.php 1 month ago CFF_Global_Settings.php 1 month ago CFF_Install_Skin.php 1 month ago CFF_New_User.php 1 month ago CFF_Notifications.php 1 month ago CFF_Onboarding_Wizard.php 1 month ago CFF_Support.php 1 month ago CFF_Support_Tool.php 1 month ago CFF_Upgrader.php 1 month ago CFF_oEmbeds.php 1 month ago index.php 1 month ago
CFF_Admin_Notices.php
107 lines
1 <?php
2
3 /**
4 * CFF Admin Notices.
5 *
6 * @since 4.0
7 */
8
9 namespace CustomFacebookFeed\Admin;
10
11 use CustomFacebookFeed\Builder\CFF_Source;
12
13 if (!defined('ABSPATH')) {
14 exit; // Exit if accessed directly
15 }
16
17 class CFF_Admin_Notices
18 {
19 public function __construct()
20 {
21 $this->init();
22 }
23
24 /**
25 * Determining if the user is viewing the our page, if so, party on.
26 *
27 * @since 4.0
28 */
29 public function init()
30 {
31 if (!is_admin()) {
32 return;
33 }
34 add_action('cff_admin_notices', [$this, 'cff_group_deprecation_dismiss_notice']);
35 add_action('admin_notices', [$this, 'cff_group_deprecation_dismiss_notice']);
36 add_action('wp_ajax_cff_review_notice_dismiss', [ $this, 'cff_review_notice_dismiss' ]);
37 }
38
39 /**
40 * Group Deprecation Notice
41 *
42 * @since 4.0.2/4.0.7
43 */
44 public function cff_group_deprecation_dismiss_notice()
45 {
46 $cff_statuses_option = get_option('cff_statuses', array());
47 if (!empty($cff_statuses_option['cff_group_deprecation_dismiss']) && $cff_statuses_option['cff_group_deprecation_dismiss'] !== true) {
48 return;
49 }
50
51 if (!empty($_GET['cff_dismiss_notice']) && $_GET['cff_dismiss_notice'] === 'group_deprecation') {
52 \cff_main()->cff_error_reporter->dismiss_group_deprecation_error();
53 $cff_statuses_option['cff_group_deprecation_dismiss'] = true;
54 update_option('cff_statuses', $cff_statuses_option, false);
55 return;
56 }
57
58 if (!CFF_Source::should_show_group_deprecation()) {
59 return;
60 }
61 $close_href = add_query_arg(array('cff_dismiss_notice' => 'group_deprecation'));
62 $group_doc_url = 'https://smashballoon.com/doc/facebook-api-changes-affecting-groups-april-2024/?utm_campaign=facebook-free&utm_source=settings&utm_medium=docs';
63 ?>
64 <div class="notice notice-error is-dismissible cff-dismissible">
65 <p>
66 <?php
67 echo
68 sprintf(
69 __('Due to changes with the Facebook API, which we use to create feeds, group feeds will no longer update after April of 2024 %sLearn More %s', 'custom-facebook-feed'),
70 '<a href="' . esc_url($group_doc_url) . '">',
71 '</a>'
72 );
73 ?>
74 &nbsp;<a href="<?php echo esc_attr($close_href); ?>">
75 <?php echo __('Dismiss', 'custom-facebook-feed'); ?>
76 </a>
77 </p>
78 </div>
79 <?php
80 }
81 public function cff_review_notice_dismiss()
82 {
83 check_ajax_referer('cff_nonce', 'cff_nonce');
84
85 $cap = current_user_can('manage_custom_facebook_feed_options') ? 'manage_custom_facebook_feed_options' : 'manage_options';
86 $cap = apply_filters('cff_settings_pages_capability', $cap);
87 if (! current_user_can($cap)) {
88 wp_send_json_error(); // This auto-dies.
89 }
90
91 $this->cff_review_notice_dismiss_action();
92 wp_send_json_success();
93 }
94
95 public function cff_review_notice_dismiss_action($action = 1)
96 {
97 if (intval($action) === 1) {
98 update_option('cff_rating_notice', 'dismissed', false);
99 $statuses = get_option('cff_statuses', []);
100 $statuses['rating_notice_dismissed'] = cff_get_current_time();
101 update_option('cff_statuses', $statuses);
102 } elseif (strtolower($action) === 'later') {
103 set_transient('custom_facebook_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS);
104 update_option('cff_rating_notice', 'pending', false);
105 }
106 }
107 }