- function add_type_attribute($tag, $handle, $src) {
- if ( 'map-init' === $handle ) {
- $tag = '<script type="text/plain" data-usercentrics="Google Maps" src="' . esc_url( $src ) . '"></script>';
- return $tag;
- }
- return $tag;
- }
- add_filter('script_loader_tag', 'add_type_attribute' , 10, 3);
Recent Pastes