wpcf7_messages

The contact-form-7 wpcf7 messages hook.

Published Date - July 22, 2023

Description

return apply_filters( 'wpcf7_messages', $messages );

Parameters

  1. $messages


Usage

The following example is for adding a hook callback.

// define the wpcf7_messages callback 
function custom_wpcf7_messages( $messages ){ 
   //custom code here
    return $messages
} 

//add the action 
add_filter('wpcf7_messages', 'custom_wpcf7_messages', 10, 1)

Defined

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

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

return apply_filters( 'wpcf7_messages', $messages );