= $next_at; } /** * Build a nonce-protected notice action URL. * * @param string $choice Notice choice. * @return string */ private static function get_action_url($choice) { return wp_nonce_url( add_query_arg( array( 'action' => 'skyinpo_review_notice', 'choice' => sanitize_key($choice), ), admin_url('admin-post.php') ), self::NONCE_ACTION ); } /** * Allow safe redirect to the WordPress.org review page after Rate now. * * @param string[] $hosts Allowed redirect hosts. * @return string[] */ public static function allow_review_redirect_host($hosts) { $hosts[] = 'wordpress.org'; return array_unique($hosts); } }