wpcf7_contact_form_shortcode
The Contact Form 7 wpcf7 contact form shortcode hook.
Description
apply_filters( 'wpcf7_contact_form_shortcode', (unknown) $shortcode, (unknown) $args, (unknown) $instance );
Parameters (3)
- 0. $shortcode (unknown)
- The shortcode.
- 1. $args (unknown)
- The args.
- 2. $instance (unknown)
- The instance.
Usage
- To run the hook, copy the example below.
- $shortcode = apply_filters( 'wpcf7_contact_form_shortcode', $shortcode, $args, $instance );
- if ( !empty( $shortcode ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wpcf7_contact_form_shortcode callback
- function filter_wpcf7_contact_form_shortcode( $shortcode, $args, $instance ) {
- // make filter magic happen here...
- return $shortcode;
- };
- // add the filter
- add_filter( 'wpcf7_contact_form_shortcode', 'filter_wpcf7_contact_form_shortcode', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'wpcf7_contact_form_shortcode', 'filter_wpcf7_contact_form_shortcode', 10, 3 );
Defined (1)
The filter is defined in the following location(s).
- /includes/contact-form.php
- return apply_filters( 'wpcf7_contact_form_shortcode', $shortcode, $args, $this );