id, $plugin_screens)) { remove_all_actions('admin_notices'); } add_action('admin_notices', [$this, 'feedback_notice']); } public function admin_footer_text($footer_text) { $screen = get_current_screen(); $feedback_url = Utils::get_default_global_variables()['plugin_review_url']; $plugin_screens = Utils::get_screens(); if (in_array($screen->id, $plugin_screens)) { $footer_text = sprintf( 'Enjoyed %s Please leave us a %s rating. We really appreciate your support. Thank you!', __(Utils::get_plugin_name(), Utils::get_text_domain()), $feedback_url, '★★★★★', ); } return $footer_text; } public function feedback_notice() { $screen = get_current_screen(); $feedback_url = Utils::get_default_global_variables()['plugin_support_url']; $plugin_screens = Utils::get_screens(); if (isset($_GET['page']) && $_GET['page'] === 'admin-posts-manager') { if (isset($_GET['apm_dismiss_feedback']) && $_GET['apm_dismiss_feedback'] == '1') { $wpnonce = $_GET['_wpnonce']; if (wp_verify_nonce($wpnonce, 'apm_dismiss_feedback')) { update_option('apm_dismiss_feedback', '1'); } } if (isset($_GET['apm_maybe_later_feedback']) && $_GET['apm_maybe_later_feedback'] == '1') { $wpnonce = $_GET['_wpnonce']; if (wp_verify_nonce($wpnonce, 'apm_dismiss_feedback')) { set_transient('apm_maybe_later_feedback', '1', WEEK_IN_SECONDS); } } } $is_notice_dismissed = get_option('apm_dismiss_feedback'); $is_maybe = get_transient('apm_maybe_later_feedback'); $is_plugin_just_activated = get_transient('apm_plugin_activated'); if (in_array($screen->id, $plugin_screens) && $is_notice_dismissed != '1' && $is_maybe != '1' && is_admin() && !$is_plugin_just_activated) { ?>

Are you enjoying ? Please give us feedback to help us improve. I would love to hear your thoughts.
~ The Concept Team

Give Feedback Maybe later No Thanks.

loading...'; } }