wsf_translate_wpml_purge_on_disable

Description

The wsf_translate_wpml_purge_on_disable filter hook is used to determine whether the WS Form WPML translation package is deleted when the translation is disabled for a form. When a WPML package is deleted, the associated translations are also deleted.

This filter hook returns true by default.

 

Usage

add_filter( 'wsf_translate_wpml_purge_on_disable', 'my_hook_function', 10, 2 );

Parameters

  1. $purge Boolean
    If true, translations are deleted when translation is disabled on a form.
    Default value: true
  2. $form_id Integer
    Can be used to filter translation purging by form ID.

Example

// Callback function for the wsf_translate_wpml_purge_on_disable filter hook
function my_hook_function( $purge, $form_id ) {
	
	// Your code here ...

	// Return value
	return $purge;
}

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

Source File

This hook can be found in: <plugin root>/includes/third-party/wpml/class-ws-form-wpml.php