Description
The “pop_localize_script_variables” filter is used to add or remove values from the javascript localization popwid object.
A plugin (or theme) can modify the array with the code:
<?php add_filter( 'pop_localize_script_variables', 'filter_function_name'); ?>
The hook is located in the popular-widget/_inc/functions.php file.
Example
// Apply filter function modify_localize_script_variables( $values ) { $values['custom_value'] = true; return $values; } add_filter('pop_localize_script_variables', 'modify_localize_script_variables');
Note: $values is an associative array.