Celebrate WordCamp Asia! - 30% OFF with coupon WC30 at checkout - Terms

wsf_action_redirect_url

Description

The wsf_action_redirect_url filter hook can be used to modify the URL the form redirects to if a Redirect action is present.

Usage

add_filter( 'wsf_action_redirect_url', 'my_hook_function', 10, 4 );

Parameters

  1. $url String
    The URL to redirect to.
  2. $form Form Object
    The form object.
  3. $submit Submit Object
    The submit object.
  4. $config Array
    The action configuration.

Example

// Callback function for the wsf_action_redirect_url filter hook
function my_hook_function( $url, $form, $submit, $config ) {
	
	// Your code here ...

	// Return value
	return 'https://my-site.com/my-path/';
}

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

Source File

This hook can be found in: <plugin root>/includes/actions/class-ws-form-action-redirect.php