Filters Associated With Map

Filter: wp_travel_trip_map_use_lat_lng #

Enable search using latitude/longitude. Default is no.

Source

File: /core/helpers/trips.php
Used by: /core/helpers/trips.php

Parameters
$use_lat_lng, $trip_id

Example:

function prefix_wp_travel_trip_map_use_lat_lng( $use_lat_lng, $trip_id ) {
    $use_lat_lng = ’yes’;
    return $use_lat_lng;
}
add_filter( 'wp_travel_trip_map_use_lat_lng', 'prefix_wp_travel_trip_map_use_lat_lng', 12, 2 );

Filter: wp_travel_load_google_maps_api #

Show google map or not.

Source

File: /inc/class-assets.php
Used by: /inc/class-assets.php, /inc/template-functions.php,
                 /inc/admin/views/tabs/tab-contents/itineraries/locations.php

Parameters
$show_google_map

Example:

function prefix_wp_travel_load_google_maps_api() {
    return true;
}
add_filter( 'wp_travel_load_google_maps_api', 'prefix_wp_travel_load_google_maps_api' );

Filter: wp_travel_maps #

WP Travel available maps.

Active Since v1.7.6

Source

File: /inc/helpers.php
Used by: /inc/helpers.php

Parameters
$wp_travel_maps

Example:

function prefix_wp_travel_maps( $wp_travel_maps ) {
    $wp_travel_maps[‘google-map’] = ‘__( 'Google Map',
    'wp-travel' )’;
    return $settings_fields;
}
add_filter( 'wp_travel_maps', 'prefix_wp_travel_maps' );