wpcf7_contact_form_default_pack

The contact-form-7 wpcf7 contact form default pack hook.

Published Date - July 22, 2023

Description

self::$current = apply_filters( 'wpcf7_contact_form_default_pack',
			$contact_form, $args
		);

Parameters

  1. $contact_form

  2. $args


Usage

The following example is for adding a hook callback.

// define the wpcf7_contact_form_default_pack callback 
function custom_wpcf7_contact_form_default_pack( $contact_form, $args ){ 
   //custom code here
    return $contact_form
} 

//add the action 
add_filter('wpcf7_contact_form_default_pack', 'custom_wpcf7_contact_form_default_pack', 10, 2)

Defined

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

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

self::$current = apply_filters( 'wpcf7_contact_form_default_pack',
			$contact_form, $args
		);