response.php 451 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. ** A base module for [response]
  4. **/
  5. /* form_tag handler */
  6. add_action( 'wpcf7_init', 'wpcf7_add_form_tag_response', 10, 0 );
  7. function wpcf7_add_form_tag_response() {
  8. wpcf7_add_form_tag( 'response', 'wpcf7_response_form_tag_handler',
  9. array( 'display-block' => true ) );
  10. }
  11. function wpcf7_response_form_tag_handler( $tag ) {
  12. if ( $contact_form = wpcf7_get_current_contact_form() ) {
  13. return $contact_form->form_response_output();
  14. }
  15. }