um_field_{$key}_default_value

Hook type

Filter

Description

Change field default value by $key

Parameters

$default

(string) Field Default Value

$data

(array) Field Data

Usage

add_filter( 'um_field_{$key}_default_value', 'function_name', 10, 2 );

Examples

<?php
add_filter( 'um_field_{$key}_default_value', 'my_field_default_value', 10, 2 );
function my_field_default_value( $default, $data ) {
    // your code here
return $default;
}
?>

Change Log

Since: 2.0

Source

um_field_{$key}_default_value is located in includes/core/class-fields.php::line 684