} else {
// Sanitize currently selected value
- $in = filter_input(INPUT_POST, $as, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
+ $in = filter_var($_REQUEST[$as], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
// Is it one of the available values
if (isset($f['required']) && $f['required'] && trim($in) == '') {
$this->inputFieldStatus = true;
- // If a filter has been specified, use that with the php filter_input() function.
+ // If a filter has been specified, use that with the php filter_var() function.
$filter = FILTER_SANITIZE_STRING;
if (isset($f['filter'])) {
if (!is_numeric($f['filter'])) {
$filter_options = $f['filter_options'];
}
- $in = filter_input(INPUT_POST, $as, $filter, $filter_options);
+ $in = filter_var($_REQUEST[$as], $filter, $filter_options);
// Otherwise, if no filter is specified.
} else {
// Kill slashes and use the standard WordPress wp_kses_post() function to do the filtering
$in = '';
- if (isset($_POST[$as])) {
- $in = wp_kses_post(stripslashes($_POST[$as]));
+ if (isset($_REQUEST[$as])) {
+ $in = wp_kses_post(stripslashes($_REQUEST[$as]));
}
}
$filter = FILTER_SANITIZE_STRING;
$filter_options = FILTER_FLAG_NO_ENCODE_QUOTES;
- $in = filter_input(INPUT_POST, $as, $filter, $filter_options);
+ $in = filter_var($_REQUEST[$as], $filter, $filter_options);
if (isset($f['required']) && $f['required'] && trim($in) == '') {
$this->inputFieldStatus = false;
$this->inputErrorReason = 'Required input not provided.';
$this->inputFieldStatus = true;
- $in = filter_input(INPUT_POST, $as, FILTER_VALIDATE_EMAIL);
+ $in = filter_var($_REQUEST[$as], FILTER_VALIDATE_EMAIL);
if (isset($f['required']) && $f['required'] && trim($in) == '') {
$this->inputFieldStatus = false;
$this->inputErrorReason = 'E-Mail address does not appear to be valid.';