= $limit ) { return false; } // Increment; the TTL rolls forward on each hit, so a caller must pause for a // full window to clear the counter (a sliding window — fine for abuse guarding). set_transient( $key, $count + 1, $window ); return true; } /** * A generic "too many requests" message. * * @return string */ public static function message() { return __( 'Too many requests in a short time. Please wait a minute and try again.', 'ai-siteark' ); } }