Clanbite

clanbite_request_post_absint( string $key, int $default = 0 ): int

Read a $_POST field as a non-negative integer.

Use only after the request’s nonce (or other auth gate) has been verified in the same handler (e.g. check_admin_referer, check_ajax_referer, wp_verify_nonce for REST). This helper does not know the form’s nonce action name.

Parameters

$key (string) Required

Field name.

$default (int) Optional

Default when missing or invalid.

Default: 0

Returns

int

Defined in inc/functions-request-input.php