Description
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 pageThis function is not called if the oik-contact status is already "double"
Usage
oiksp_validate_double( $post, $confirm, $atts );Parameters
- $post
- ( mixed ) required –
- $confirm
- ( mixed ) required –
- $atts
- ( mixed ) required –
Returns
voidSource
File name: oik-squeeze/shortcodes/oik-squeeze.phpLines:
1 to 23 of 23
function oiksp_validate_double( $post, $confirm, &$atts ) { $result = bw_array_get( $atts, 'confirm_key_required', false ); if ( $result ) { $double = oiksp_get_double( $atts['oiksp_id'] ); if ( $double ) { $result = oiksp_check_confirm( $post->ID, $confirm, $atts ); if ( $result ) { $result = oiksp_update_status( $post->ID, "double" ); oiksp_confirmed_contact( $post, $atts ); $atts['confirm_key_required'] = false; } else { p( "Please enter a valid confirmation key." ); //$atts['confirm_key_required'] = true; } } else { $result = true; } } else { $result = true; } bw_trace2(); return( $result ); }View on GitHub
Called by
1 to 1 of 1
Invoked by
Calls
1 to 7 of 7
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_trace2() – Trace $value to the trace log file if tracing is active
- oiksp_check_confirm() – Check the confirm value against the one registered
- oiksp_confirmed_contact() – Let the 3rd party email system know about the contact
- oiksp_get_double() – Retrieve the double opt-in requirement of the opted-in page
- oiksp_update_status() – Update the Contact’s status
- p() – Output a paragraph of translatable text
