*/ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * The admin review notice. */ class SPS_Review { /** * Initialize the class and set its properties. */ public function __construct() { add_action( 'admin_notices', array( $this, 'display_admin_notice' ) ); add_action( 'wp_ajax_smart-post-show-never-show-review-notice', array( $this, 'dismiss_review_notice' ) ); } /** * Display admin notice. * * @return void */ public function display_admin_notice() { // Show only to Admins. if ( ! current_user_can( 'manage_options' ) ) { return; } // Variable default value. $review = get_option( 'smart_post_show_review_notice_dismiss' ); $time = time(); $load = false; if ( ! $review ) { $review = array( 'time' => $time, 'dismissed' => false, ); add_option( 'smart_post_show_review_notice_dismiss', $review ); } else { // Check if it has been dismissed or not. if ( ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) && ( isset( $review['time'] ) && ( ( $review['time'] + ( DAY_IN_SECONDS * 3 ) ) <= $time ) ) ) { $load = true; } } // If we cannot load, return early. if ( ! $load ) { return; } $plugin_logo_image = SP_PC_URL . 'admin/assets/img/icon-256x256.gif'; ?>
We hope you had a wonderful experience using Smart Post. Please take a moment to leave a review on WordPress.org? Your positive review will help us improve. Thank you! 😊
Ok, you deserve ★★★★★ Nope, maybe later Never show again