apply_filters( 'um_common_js_variables', $variables ) → {array}
Filters data array for localize frontend common scripts.
Parameters:
Name | Type | Description |
---|---|---|
$variables |
array | Data to localize. |
- Since:
- 2.8.0
- Source:
Returns:
Data to localize.
- Type
- array
Example
function um_custom_common_js_variables( $variables ) {
$variables['{my_custom_variable}'] = '{my_custom_variable_value}';
return $variables;
}
add_filter( 'um_common_js_variables', 'um_custom_common_js_variables' );