You appear to be a bot. Output may be restricted
Description
Obtain and trim a field
Usage
$bool = bw_obtain_field( $field_name, $validated );
Parameters
- $field_name
- ( string ) required – the name of the field to retrieve
- $validated
- ( array ) required – array of validated fields
Returns
bool true if the field has been set, false if the field is not setSource
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 21 of 21
function bw_obtain_field( $field_name, &$validated ) { $value = bw_array_get( $_REQUEST, $field_name, null ); bw_trace2( $value, "value", true, BW_TRACE_VERBOSE ); //bw_backtrace(); if ( is_array( $value ) ) { // @TODO - Don't bother performing any validation yet foreach( $value as $k => $v ) { $value[$k] = stripslashes( trim( $v )) ; } } else { $value = stripslashes( trim( $value )); } $validated[ $field_name ] = $value; if ( $value ) { $valid = true; } else { $valid = false; } return( $valid ); }View on GitHub