You appear to be a bot. Output may be restricted
Description
Perform field validation/sanitization based on #field_type and $field name
Usage
bw_field_validation( $field, $validated );
Parameters
- $field
- ( string ) required – field name of the custom post type's field
- $validated
- ( array ) required – array of validated fields $data contains the definition of the field e.g. <code> [#field_type] => rating [#title] => Rating [#args] => </code>
Returns
voidSource
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 20 of 20
function bw_field_validation( $field, &$validated ) { global $bw_fields; $data = $bw_fields[$field]; bw_trace2( $data, "data", true, BW_TRACE_DEBUG ); $field_type = $data['#field_type']; $valid = bw_obtain_field( $field, $validated ); $valid = _bw_field_validation_required( $valid, $field, $data ); $value = $validated[$field]; $value = apply_filters( "bw_field_validation_{$field_type}", $value, $field, $data ); $value = apply_filters( "bw_field_validation_{$field}", $value, $field, $data ); $validated[$field] = $value; /** How do we determine if it's valid or not? by comparing $validated[$field] with $value OR by checking for messages? */ return( $valid ); }View on GitHub