Skip to content

Instantly share code, notes, and snippets.

@kjtolsma
Last active May 14, 2024 08:45
Show Gist options
  • Save kjtolsma/fe042fd07bb0357728764ae3158fe718 to your computer and use it in GitHub Desktop.
Save kjtolsma/fe042fd07bb0357728764ae3158fe718 to your computer and use it in GitHub Desktop.
function cmplz_pronamic_google_maps_script( $tags ) {
$tags[] = [
'name' => 'google-maps',
'category' => 'marketing',
'placeholder' => 'google-maps',
'urls' => [
'maps.googleapis.com/maps/api/js',
'pronamic-google-maps/js/site.'
],
'enable_placeholder' => '1',
'placeholder' => 'google-maps',
'placeholder_class' => 'pronamic-google-maps-placeholder',
'enable_dependency' => '1',
'dependency' => [
'maps.googleapis.com' => 'pronamic-google-maps/js/site.'
],
];
return $tags;
}
add_filter( 'cmplz_known_script_tags', 'cmplz_pronamic_google_maps_script' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment