( get_option( 'bill_installed' ) + 60*60*24*3 ); if ( in_array( $vote, array( 'yes', 'no', 'tweet' ) ) || !$timeout ) return; add_action( 'in_admin_footer', array( __CLASS__, 'message' ) ); add_action( 'admin_head', array( __CLASS__, 'register' ) ); add_action( 'admin_footer', array( __CLASS__, 'enqueue' ) ); } public static function register() { wp_enqueue_style( 'bill-vote' , BOATDEALERURL.'/css/feedback.css'); wp_register_script( 'bill-vote',BOATDEALERURL.'/js/feedback.js' , array( 'jquery' ), BOATDEALERVERSION, true ); } public static function enqueue() { wp_enqueue_style( 'bill-vote' ); wp_enqueue_script( 'bill-vote' ); } public static function vote() { $vote = sanitize_key( $_GET['vote'] ); if ( !is_user_logged_in() || !in_array( $vote, array( 'yes', 'no', 'later' ) ) ) die( 'error' ); update_option( 'bill_vote', $vote ); if ( $vote === 'later' ) update_option( 'bill_installed', time() ); die( 'OK: ' . $vote ); } public static function message() { ?>