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