You appear to be a bot. Output may be restricted
Description
Validate the Add new form to match what's expected
Usage
$bool = bw_validate_form_as_required( $post_type, $validated );
Parameters
- $post_type
- ( string ) required –
- $validated
- ( array ) required –
Returns
bool true if validatedSource
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 14 of 14
function bw_validate_form_as_required( $post_type, &$validated ) { $handle = apply_filters( "oik_add_new_{$post_type}", true ); if ( $handle ) { $format = apply_filters( "oik_add_new_format_{$post_type}", bw_add_new_format_default() , $post_type ); $fields = bw_add_new_fields_defaults( $post_type ); $fields = apply_filters( "oik_add_new_fields_{$post_type}", $fields, $post_type ); $valid = bw_validate_fields( $format, $fields, $validated ); $valid = !bw_query_messages(); } else { p( "Add new not supported for $post_type."); $valid = false; } return( $valid ); }View on GitHub