ap_isset_post_value( string $val, mixed $default_val = '' )
Description #
Check if $_REQUEST var exists and get value. If not return default.
Parameters #
- $valstring (Required) Variable name.
- $default_valmixed (Optional) Default value. Default value: ''
Source #
File: includes/functions.php
function ap_isset_post_value( $val, $default_val = '' ) {
if ( isset( $_REQUEST[ $val ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return wp_unslash( $_REQUEST[ $val ] ); // phpcs:ignore WordPress.Security
}
return $default_val;
}
Expand full source code Collapse full source code View on GitHub: includes/functions.php:1130
Add your comment