Filter: um_tidy_config

apply_filters( 'um_tidy_config', $tidy_config, $field_data ) → {array}

Filters PHP tidy extension config. Get more info here https://www.php.net/manual/en/tidy.parsestring.php

Parameters:
Name Type Description
$tidy_config array

Config.

$field_data array

UM Form Field Data.

Since:
  • 2.8.9
Source:
Returns:

Config.

Type
array
Example

Customize tidy config based on field data.

function my_um_tidy_config( $tidy_config, $field_data ) {
    // your code here
    if ( 'custom_metakey' === $field_data['metakey'] ) {
        $tidy_config['clean'] = false;
    }
    return $tidy_config;
}
add_filter( 'um_tidy_config', 'my_um_tidy_config', 10, 2 );