wpcf7_form_elements

The contact-form-7 wpcf7 form elements hook.

Published Date - July 22, 2023

Description

return apply_filters( 'wpcf7_form_elements',
			$this->replace_all_form_tags()
		);

Parameters

  1. $replace_all_form_tags


Usage

The following example is for adding a hook callback.

// define the wpcf7_form_elements callback 
function custom_wpcf7_form_elements( $replace_all_form_tags ){ 
   //custom code here
    return $replace_all_form_tags
} 

//add the action 
add_filter('wpcf7_form_elements', 'custom_wpcf7_form_elements', 10, 1)

Defined

The filter is defined in the following location(s).

contact-form-7/includes/contact-form.php

return apply_filters( 'wpcf7_form_elements',
			$this->replace_all_form_tags()
		);