The contact-form-7 wpcf7 contact form shortcode hook.
Published Date - July 22, 2023
return apply_filters( 'wpcf7_contact_form_shortcode',
$shortcode, $args, $this
);
$shortcode
$args
$instance
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)
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
);