*/ /** * 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; } ?>
Smart Post Show

Enjoying Smart Post Show?

Hope that you had a good experience with the Smart Post Show. Would you please show us a little love by rating us in the WordPress.org? Just a minute to rate it. Thank you!

Rate Smart Post Show Nope, maybe later Never show again