Use your custom icons


To change the default icons used in the plugin with your custom icons, the plugin provides several hooks to do so.

Each of the following examples is related to one icon used in the plugin. For example, to change the icon that hides & shows the filter, you need to add the code in the example 1 to the file “functions.php” of your child/theme. Note also, that you must change THE_URL_OF_YOUR_CUSTOM_ICON in the code by the URL of your custom icon.

1. Use the hook cspmmf_filter_btn_img to change the icon of the button that allows to show and hide the filter. Here’s an example:

add_filter('cspmmf_filter_btn_img', function($default_icon, $map_id){
   return THE_URL_OF_YOUR_CUSTOM_ICON;
}, 10, 2);

 

2. Use the hook cspmmf_check_icon to change the green check icon that appears when a filter request is applied. Here’s an example:

add_filter('cspmmf_check_icon', function($default_icon, $map_id){
   return THE_URL_OF_YOUR_CUSTOM_ICON;
}, 10, 2);

 

3. Use the hook cspmmf_close_filter_img to change the X icon that allows to hide the filter. Here’s an example:

add_filter('cspmmf_close_filter_img', function($default_icon, $map_id){
   return THE_URL_OF_YOUR_CUSTOM_ICON;
}, 10, 2);

 

4. Use the hook cspmmf_filter_img to change the filter icon of the button that allows to apply a filter request. Here’s an example:

add_filter('cspmmf_filter_img', function($default_icon, $map_id){
   return THE_URL_OF_YOUR_CUSTOM_ICON;
}, 10, 2);

 

5. Use the hook cspmmf_reset_filter_img to change the reset icon of the button that allows to reset the filter. Here’s an example:

add_filter('cspmmf_reset_filter_img', function($default_icon, $map_id){
   return THE_URL_OF_YOUR_CUSTOM_ICON;
}, 10, 2);