Description
Check that the contact is valid and matches the name and (when required) confirm field
Usage
oiksp_check_contact( $post, $name, $confirm, $atts );Parameters
- $post
- ( mixed ) required –
- $name
- ( mixed ) required –
- $confirm
- ( mixed ) required –
- $atts
- ( mixed ) required –
Returns
voidSource
File name: oik-squeeze/shortcodes/oik-squeeze.phpLines:
1 to 17 of 17
function oiksp_check_contact( $post, $name, $confirm, &$atts ) { $id = $post->ID; $result = oiksp_check_name( $id, $name ); $status = oiksp_check_status( $id, $atts ); if ( !$status ) { if ( $result ) { $result = oiksp_validate_double( $post, $confirm, $atts ); } else { bw_trace2( $result, "Invalid name and status" ); } } else { bw_trace2( $result, "Valid status" ); $atts['confirm_key_required'] = false; } bw_trace2( $result ); return( $result ); }View on GitHub
Called by
1 to 1 of 1
Invoked by
Calls
1 to 4 of 4
- bw_trace2() – Trace $value to the trace log file if tracing is active
- oiksp_check_name() – Check the name given against the one registered
- oiksp_check_status() – Check the status of the oik_contact record for the opt-in requirements of the opted-in page
- oiksp_validate_double() – If the opted-in page requires double opt-in then we need to validate the confirm field as well We should only need to do this when we are on the opted-in page
