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