You appear to be a bot. Output may be restricted
Description
Process a contact form submissionHandle the contact form submission
- Check for required fields
- Perform spam checking
- Send email, copying user if required
- Display "thank you" message
- $email_to
- ( mixed ) required –
Usage
_bw_process_contact_form_oik( $email_to );
Parameters
Returns
voidSource
File name: oik/shortcodes/oik-contact-form.phpLines:
1 to 38 of 38
function _bw_process_contact_form_oik( $email_to ) { $message = bw_get_message(); $valid = bw_validate_contact_fields(); if ( $email_to && $valid ) { oik_require( "includes/oik-contact-form-email.php" ); $fields = array(); $subject = bw_get_subject(); $fields['comment_content'] = $message; $fields['comment_author'] = bw_array_get( $_REQUEST, bw_contact_field_full_name( 'name'), null ); $fields['comment_author_email'] = bw_array_get( $_REQUEST, bw_contact_field_full_name( 'email'), null ); $fields['comment_author_url'] = null; $fields['comment_type'] = 'oik-contact-form'; $send = bw_akismet_check( $fields ); if ( $send ) { // We only need the Message field once. $message = bw_get_contact_fields(); $message .= "<br />\r\n"; $message .= retlink( null, get_permalink() ); $fields['message'] = $message; $fields['contact'] = $fields['comment_author']; $fields['from'] = $fields['comment_author_email']; $sent = bw_send_email( $email_to, $subject, $message, null, $fields ); } else { $sent = true; // Pretend we sent it. } bw_thankyou_message( $fields, $send, $sent ); } else { $sent = false; $text = __( "Invalid. Please correct and retry.", "oik" ); bw_contact_issue_message( null, "bw_field_required", $text ); $displayed = bw_display_messages(); if ( !$displayed ) { p_( $text ); } } return( $sent ); }View on GitHub View on Trac