You appear to be a bot. Output may be restricted
Description
Check the confirm value against the one registered
Usage
$bool = oiksp_check_confirm( $post_id, $confirm, $atts );
Parameters
- $post_id
- ( ID ) required – the post ID for the oik-contact
- $confirm
- ( string ) required – the confirmation key entered – it may be blank
- $atts
- ( array ) required – seems unnecessary
Returns
bool whether or not the confirm key matches the value stored Note: if the current status is "single" then we need to set it to "unconfirmed" and create a new confirmation key, send the email and return FALSE So we need to know the $atts['status'] (IT should not already be "double" )Source
File name: oik-squeeze/shortcodes/oik-squeeze.phpLines:
1 to 16 of 16
function oiksp_check_confirm( $post_id, $confirm, $atts ) { bw_trace2(); if ( $atts['status'] == "unconfirmed" ) { if ( $confirm ) { $oiksp_confirm = get_post_meta( $post_id, "_oiksp_confirm", true ); $valid = ( $oiksp_confirm == $confirm ); } else { $valid = false; } } else { /* "single", "invalid" or "unsubscribed" */ oiksp_require_confirmation( $post_id, $atts ); $valid = false; } return( $valid ); }