$loc, 'label' => ABPET_Location[ $loc ]['label'] ?? $loc, 'address' => $map_data['address'] ?? ABPET_Location[ $loc ]['description'] ?? '', 'lat' => $map_data['lat'], 'lng' => $map_data['lng'], 'place' => $map_data['place'] ?? '', ]; } } } if ( empty( $map_locations ) ) { return; } if ( $map_mode === 'js' && ! wp_script_is( 'abpet_gmaps', 'enqueued' ) ) { // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion -- External Google Maps API script; version is managed by Google. wp_enqueue_script( 'abpet_gmaps', 'https://maps.googleapis.com/maps/api/js?key=' . rawurlencode( $google_map_key ) . '&callback=abpet_gmap_frontend_init', array(), null, true ); } $is_js = $map_mode === 'js'; ?>