22/**
33 * REST API and admin-ajax endpoints for token minting.
44 *
5- * @since TBD
5+ * @since 1.7.0
66 */
77
88if ( ! defined ( 'WPINC ' ) ) {
@@ -14,7 +14,7 @@ class GF_Zero_Spam_Token_Endpoint {
1414 /**
1515 * Maximum token requests per IP per minute.
1616 *
17- * @since TBD
17+ * @since 1.7.0
1818 *
1919 * @var int
2020 */
@@ -23,7 +23,7 @@ class GF_Zero_Spam_Token_Endpoint {
2323 /**
2424 * REST API namespace.
2525 *
26- * @since TBD
26+ * @since 1.7.0
2727 *
2828 * @var string
2929 */
@@ -32,7 +32,7 @@ class GF_Zero_Spam_Token_Endpoint {
3232 /**
3333 * Registers hooks for both REST and admin-ajax endpoints.
3434 *
35- * @since TBD
35+ * @since 1.7.0
3636 */
3737 public function __construct () {
3838 add_action ( 'rest_api_init ' , [ $ this , 'register_rest_route ' ] );
@@ -43,7 +43,7 @@ public function __construct() {
4343 /**
4444 * Registers the REST API route for token minting.
4545 *
46- * @since TBD
46+ * @since 1.7.0
4747 *
4848 * @return void
4949 */
@@ -69,7 +69,7 @@ public function register_rest_route() {
6969 /**
7070 * Handles the REST API token request.
7171 *
72- * @since TBD
72+ * @since 1.7.0
7373 *
7474 * @param WP_REST_Request $request The REST request.
7575 *
@@ -84,7 +84,7 @@ public function handle_rest( $request ) {
8484 /**
8585 * Handles the admin-ajax token request.
8686 *
87- * @since TBD
87+ * @since 1.7.0
8888 *
8989 * @return void
9090 */
@@ -108,7 +108,7 @@ public function handle_ajax() {
108108 /**
109109 * Shared handler that validates the request and mints a token.
110110 *
111- * @since TBD
111+ * @since 1.7.0
112112 *
113113 * @param int $form_id The form ID to mint a token for.
114114 *
@@ -157,7 +157,7 @@ private function handle_token_request( int $form_id ) {
157157 /**
158158 * Checks per-IP rate limit using transients.
159159 *
160- * @since TBD
160+ * @since 1.7.0
161161 *
162162 * @return true|WP_Error True if within limits, WP_Error if exceeded.
163163 */
@@ -171,7 +171,7 @@ private function check_rate_limit() {
171171 * Useful for sites behind Cloudflare, load balancers, or reverse proxies
172172 * where REMOTE_ADDR is the proxy IP, not the visitor's IP.
173173 *
174- * @since TBD
174+ * @since 1.7.0
175175 *
176176 * @param string $ip The client IP address. Default: $_SERVER['REMOTE_ADDR'].
177177 */
@@ -187,7 +187,7 @@ private function check_rate_limit() {
187187 *
188188 * Increase for sites behind corporate NAT or shared IP environments.
189189 *
190- * @since TBD
190+ * @since 1.7.0
191191 *
192192 * @param int $limit The maximum request count per minute. Default: 30.
193193 */
0 commit comments