Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Created January 12, 2021 14:46
Show Gist options
  • Save mgibbs189/160e55d1037fde0611cfc1291c392c9a to your computer and use it in GitHub Desktop.
Save mgibbs189/160e55d1037fde0611cfc1291c392c9a to your computer and use it in GitHub Desktop.
Map Facet - change MarkerClusterer text color
<?php
// Add to your (child) theme's functions.php
add_filter( 'facetwp_map_init_args', function( $settings ) {
for ( $i = 1; $i <= 5; $i++ ) {
$settings['config']['cluster']['styles'][] = [
'url' => FACETWP_MAP_URL . '/assets/img/m' . $i . '.png',
'width' => 53,
'height' => 53,
'textColor' => '#fff'
];
}
return $settings;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment