wsf_submit_block_keywords_message

Description

The wsf_submit_block_keywords_message WordPress filter hook is used in conjunction with the wsf_submit_block_ips filter hook to customize the message shown if a blocked keyword detected.

You can use the WS Form variable #keyword in the message to insert the matching keyword if you wish.

Usage

add_filter( 'wsf_submit_block_keywords_message', 'my_hook_function', 10, 3 );

Parameters

  1. $message String
    The message shown if a blocked keyword is detected.
  2. $form Form Object
    The form object.
  3. $submit Submit Object
    The submit object. Please note that this is a partial submit object because the submit object is still being constructed at the point this filter runs.

Example

// Callback function for the wsf_submit_block_keywords_message filter hook
function my_hook_function( $message, $form, $submit ) {
	
	// Your code here ...

	// Return value
	return $message;
}

// Add a callback function for the wsf_submit_block_keywords_message filter hook
add_filter( 'wsf_submit_block_keywords_message', 'my_hook_function', 10, 3 );

Source File

This hook can be found in: <plugin root>/includes/core/class-ws-form-submit.php