wpcf7_contact_form_shortcode

The contact-form-7 wpcf7 contact form shortcode hook.

Published Date - July 22, 2023

Description

return apply_filters( 'wpcf7_contact_form_shortcode',
			$shortcode, $args, $this
		);

Parameters

  1. $shortcode

  2. $args

  3. $instance


Usage

The following example is for adding a hook callback.

// define the wpcf7_contact_form_shortcode callback 
function custom_wpcf7_contact_form_shortcode( $shortcode, $args, $instance ){ 
   //custom code here
    return $shortcode
} 

//add the action 
add_filter('wpcf7_contact_form_shortcode', 'custom_wpcf7_contact_form_shortcode', 10, 3)

Defined

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

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

return apply_filters( 'wpcf7_contact_form_shortcode',
			$shortcode, $args, $this
		);