getTimestamp(); } if ( empty( $get_display_interval ) || current_time( 'timestamp' ) > $adds_interval_timestamp ) { add_action( 'admin_notices', array( $this, 'show_gs_adds' ) ); } } public function set_adds_interval() { // check nonce check_ajax_referer( 'gs_adds_ajax_nonce', 'security' ); $time_interval = date( 'Y-m-d', strtotime( '+30 day' ) ); update_option( 'gs_display_add_interval', $time_interval ); wp_send_json_success(); } public function close_adds_interval() { // check nonce check_ajax_referer( 'gs_adds_ajax_nonce', 'security' ); update_option( 'gs_close_add_interval', 'off' ); wp_send_json_success(); } public function show_gs_adds() { $ajax_nonce = wp_create_nonce( "gs_adds_ajax_nonce" ); $review_text = '
'; $review_text .= 'Upgrade to CF7 GSheetConnector PRO with automated sheets to setup within few clicks. Grab the deal with discounted price.'; $review_text .= ''; $review_text .= '
'; $rating_block = Gs_Connector_Utility::instance()->admin_notice( array( 'type' => 'review', 'message' => $review_text ) ); echo $rating_block; } } // construct an instance so that the actions get loaded $gs_connector_adds = new GS_Connector_Adds();