So I did this, replacing the slugs with my slugs and the files with mine. The place markers just all disappear. What am I missing?
function setBGMPDefaultIconByCategory( $iconURL, $placemarkID )
{
$placemarkCategories = wp_get_object_terms( $placemarkID, ‘bgmp-category’ );
foreach( $placemarkCategories as $pc )
{
switch( $pc->slug )
{
case ‘fob’:
$iconURL = get_bloginfo( ‘stylesheet_directory’ ) . ‘/images/marker-icons/fob.png’;
break;
case ‘home-base’:
$iconURL = get_bloginfo( ‘stylesheet_directory’ ) . ‘/images/marker-icons/hb.png’;
break;
default:
$iconURL = get_bloginfo( ‘stylesheet_directory’ ) . ‘/images/marker-icons/pin.png’;
break;
}
}
return $iconURL;
}
add_filter( ‘bgmp_default-icon’, ‘setBGMPDefaultIconByCategory’, 10, 2 );