Created
April 10, 2020 22:11
-
-
Save carmoreira/8b3a90e29098d5d9869744fc1d9c2d42 to your computer and use it in GitHub Desktop.
Interactive Geo Maps WordPress Plugin Addon - Add custom icon to list of available icons - Pro Version only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Interactive Geo Maps - Custom Icon | |
* Description: Adds custom icons to Interactive Geo Maps plugin | |
* Version: 1.0 | |
* Requires PHP: 7.0 | |
* Author: Carlos Moreira | |
* Author URI: https://cmoreira.net/ | |
*/ | |
add_filter( 'igm_available_icons', 'igm_custom_marker_icon' ); | |
function igm_custom_marker_icon( $list ) { | |
$list['custom_marker'] = [ | |
'title' => 'Custom Marker', | |
'path' => 'm10,0.40566c-3.97385,0 -7.19575,3.2219 -7.19575,7.19575s5.99646,11.99292 7.19575,11.99292s7.19575,-8.01907 7.19575,-11.99292s-3.2219,-7.19575 -7.19575,-7.19575zm0,11.99292c-2.64564,0 -4.79717,-2.15273 -4.79717,-4.79717s2.15153,-4.79717 4.79717,-4.79717s4.79717,2.15273 4.79717,4.79717s-2.15153,4.79717 -4.79717,4.79717z', | |
]; | |
return $list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment