Filters and Hooks
Force GeoFilters (On or Off)
Filter or Hook ID: mam_directory_force_geofilters
This filter overrides the GeoFilter settings for Directory listings. Return true of false to turn on or off GeoFilters for listings. GeoFilters are used to return listings that are within a given radius of the user’s lat and lon. If the user has selected a location from the GeoFilter feature on the app, then the listings returned will be in a radius of that location.
Turn Off GeoFilters
add_filter( 'mam_directory_force_geofilters', '__return_false' );
Turn On GeoFilters
add_filter( 'mam_directory_force_geofilters', '__return_true' );
Note: This setting is also available in App Settings -> General Settings. This filter is available to override for certain instances where you need to programmatically turn on or off GeoFilters.
mam_directory_special_offer_clear_background
Filter or Hook ID:
mam_directory_special_offer_css
Filter or Hook ID:
mam_directory_special_offer_text_white
Filter or Hook ID:
mam_gd_booking_show_complete
Filter or Hook ID:
mam_gd_complete_booking_check_in
Filter or Hook ID:
mam_gd_my_bookings_after_build_list
Filter or Hook ID:
mam_gd_my_bookings_complete_instruction
Filter or Hook ID:
mam_gd_social_icons_only
Filter or Hook ID:
mam_gd_use_cache
Filter or Hook ID:
mam_geo_directory_add_listing_form_fields
Filter or Hook ID:
mam_geodirectory_add_save_listing_extra_fields
Filter or Hook ID:
mam_geodirectory_admin_settings
Filter or Hook ID:
mam_geodirectory_booking_fetch
Filter or Hook ID:
mam_geodirectory_booking_skip_past
Filter or Hook ID:
mam_geodirectory_manage_edit_listing_fields
Filter or Hook ID:
mam_geodirectory_skip_record
Filter or Hook ID:
mam_get_cache_groups_for_list
Filter or Hook ID:
Manage Favorites: mam_gd_manage_favorites
Filter or Hook ID: mam_gd_manage_favorites
If a user favorites, or unfavorites a listing on the app, then an API call is returned to enable you to do whatever you want with the information.
add_action( 'mam_gd_manage_favorites', 'mam_gd_manage_favorites' );
function mam_gd_manage_favorites()
{
$listing_id = $_REQUEST['id'];
//do something with the favorited listing
}
Request Values Include:
Override GeoDirectory Standard Listings
Filter or Hook ID: mam_geodirectory_explcit_listings
Set Radius for Listings to be displayed
Filter or Hook ID: mam_geodirectory_radius
The `mam_geodirectory_radius` filter is used to modify the radius value for geodirectory searches. This filter allows you to change the default radius to a custom distance in miles.
For example:
add_filter('mam_geodirectory_radius', 'mam_geodirectory_radius');
function mam_geodirectory_radius($radius) {
return 3000; // Set the radius to 3000 miles.
}
This filter is applied in the MAM GeoDirectory plugin when data if fetched for a listings screen.