Description
Show/process a contact form using oik
Usage
bw_display_contact_form( $atts, $user, $content );Parameters
- $atts
- ( array ) required –
- $user
- ( string ) optional –
- $content
- ( string ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-contact-form.phpLines:
1 to 21 of 21
function bw_display_contact_form( $atts, $user=null, $content=null ) { oik_require( 'shortcodes/oik-contact-field.php'); $contact_form_id = bw_contact_form_id( true ); bw_contact_form_register_fields( $atts, $content ); $contact = bw_array_get( $_REQUEST, $contact_form_id, null ); if ( $contact ) { oik_require_lib( "bobbforms" ); oik_require_lib( "oik-honeypot" ); do_action( "oik_check_honeypot", "Human check failed." ); $contact = bw_verify_nonce( "_oik_contact_form", "_oik_contact_nonce" ); //if ( $content ) { //} if ( $contact ) { $contact = _bw_process_contact_form_oik( $atts['email'] ); } } if ( !$contact ) { _bw_show_contact_form_oik( $atts, $user, $content ); } }View on GitHub View on Trac
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_contact_form_id() – Return a unique contact form ID
- bw_verify_nonce() – Verify the nonce field
- oik_require() – Invoke require_once on an oik include file or other file
- oik_require_lib() – Require a library
- _bw_process_contact_form_oik() – Process a contact form submission
- _bw_show_contact_form_oik() – Show the "oik" contact form
