Plugin: mam-geodirectory

What it does

mam-geodirectory is the largest of the no-code MAM plugins. It connects the WordPress GeoDirectory plugin (a third-party directory/listing/event CMS) to the MAM mobile app pipeline. Once active it:

  • Turns every registered GeoDirectory post type (typically gd_place plus any custom CPTs the site adds, except gd_event which is treated specially) into a mobile content surface — list, map, calendar, off-directory, and admin-approval views.
  • Builds a per-listing detail screen out of MAM “content sections” (address, business hours, social media, events, post content, favorite/check-in, event details).
  • Adds tab bar action buttons to listing screens — Edit Listing, Edit Staff, Edit Events, Send Notification, Claim Listing, Approve Listing, Share — visible only to the right user role for the current listing (owner, manager, staff, admin, or anonymous viewer).
  • Registers seven Gravity-Forms-backed mobile forms — Add/Edit Listing, Send Notification, Add Users (Staff/Manager invites), Manage Invite, Approve Listing, Claim Listing, Add QR Code — and a per-post-type Add/Edit Listing form.
  • Provides an admin Settings page (per-post-type tabs plus a global tab and a Claim Listings bulk-invite tool) that wires those forms and toggles to per-app behavior.
  • Hooks into other MAM plugins: feeds GeoDirectory cities into mam-geofilters, exposes per-listing coordinates and radius to mam-special-offers, gates In-App Purchase requirements via mam-inapp-purchase-manager, and joins owners/staff/managers to listing chat groups in mam-chat-manager.

Most installations are configuration-first: install GeoDirectory, install this plugin, fill in the Gravity Form IDs on the Settings page, and the listings start appearing in the app. The hooks listed above are the developer extension points for everything that configuration cannot express.


Setup paths

There is one canonical setup path. The plugin will silently no-op if any of these are not satisfied:

  1. The WordPress plugin geodirectory/geodirectory.php is present and active.
  2. mam-main is installed and the entitlement filter mam_plugin_entitlement returns a non-blocked record for the slug mam-geodirectory.
  3. mam-main is at least version 1.9.1 (checked on admin_init).

When all three are true, mam_geodirectory_manager::init() runs on plugins_loaded and registers the full hook set described in this article.


Where it appears in the app

Surface Driver
Directory list, map, calendar, off-directory, admin-approval The five local_app_content content-type registrations in content-classes/local-app-geodirectory-v2-class.php
Listing detail screen mam_content_section_* filters registered in mam_gd_content_blocks
Tab bar action buttons on listing screens mam_main_add_tab_bar_item_* filters in mam_gd_tab_bar_buttons and mam_gd_claim_listing_manager
Home-screen horizontal scroller of categories mam_get_phone_data_before_send injection in mam_geodirectory_phone_data
Pending-invite bootstrap form (auto-displayed on app launch when the user has an unaccepted staff invite) Same phone-data hook, via inject_pending_invite_form()
In-app QR-code field Same phone-data hook
Push notifications (listing approved, staff invitation, claim invitation, booking reminders, new listing/event submission) mam_notification_list filter

See Content type: GeoDirectory list and map and the related screen articles for the per-surface details.


Default fields and behavior

  • GeoDirectory post types are auto-discovered via geodir_get_posttypes(). gd_event is treated as a separate event surface; everything else (gd_place and any custom GD CPTs) is treated as a “listing.”
  • Listing data shape sent to the app is built in mam_geodirectory_content::get_data_for_app() (aliased as local_app_geodirectory). It normalises post_idid, latitude/longitudelat/lon, business_hoursraw_business_hours, etc., then layers on category data, marker icons, images, social platforms, claim status, and (when enabled) a chat tab. See Mobile listing data shape.
  • Search radius defaults to 25 miles (or 100 for the initial query before falling back to default coordinates). The role-scoped setting tsl-setting-geofilter_radius overrides it; ?radius= on the request overrides everything (capped at 3000).
  • Pending and draft listings are visible to the listing’s author and to admins; everyone else only sees published listings. Admin-approval mode (category=999999 for an admin) returns only pending rows.

Mobile JSON contract — flags and feeds

mam-geodirectory writes into the mobile JSON payload via mam_get_phone_data_before_send. The keys it sets are part of the frozen mobile contract — renaming them will break deployed apps.

Key Shape Notes
track_views 'yes' Always set when this plugin is active
report_favorites 'yes' Enables the favorites-sync UI
hide_remove_all_favorites 'yes' Hides the “remove all” link
data_has_search_index 'yes' Tells the app this content type supports text search
use_category_in_search_results 'yes' Includes category names in search hits
do_not_sort_picker 'yes' Suppresses the app’s alphabetic sort on geofilter pickers
favorites array of post IDs as strings Sourced from the user’s gd_user_favourite_post user meta
geofilter_default_name string City name from GeoIP fallback or ?city_name=
has_initial_form_to_display 'yes' (when present) Forces the pending-invite form on launch
initial_form_to_display int (1-based index into local_app_form_array) The form to show

Per-listing rows additionally carry claim_status and can_claim when the GeoDir Claim Manager plugin is active. See Mobile listing data shape for the full per-listing field map.


Admin surfaces

Surface Driver
MAM Suite → Geodirectory submenu mam_geodirectory_admin_settings::mam_admin_menu_manager()
Per-post-type Settings tabs (one per registered GD CPT) mam_geodirectory_admin_settings::add_page_tabs()
Claim Listing bulk-invite tool gd-claim-listings tab on the same page
Field visibility manager (per post type) add_field_manager()
Staff & Managers meta box on every listing edit screen mam_gd_staff_manager::add_meta_boxes()
Send Claim Invite meta box (admin-only) Same
GD listings table — Views and Favorited Users columns mam_gd_admin_views
GeoDirectory pricing package fields (PNs/month, listings included, deals included, chat, staff slots) mam_gd_package_settings via geodir_pricing_package_settings

Hooks exposed

The hooks below are owned by this plugin. Each has its own dedicated article — see Related articles.

Hook Type Audience Purpose
mam_geodirectory_add_edit_form_fields filter PHP dev Add fields to the Add/Edit Listing form definition.
mam_geodirectory_admin_settings_tabs filter PHP dev Add a tab to the Geodirectory admin settings page.
mam_geodirectory_admin_settings_tab_content_{tab} filter PHP dev Render the body of a custom admin tab.
mam_geodirectory_admin_settings filter PHP dev Append HTML to the global Settings tab.
mam_geodirectory_event_card filter PHP dev Modify a single event card before it goes into a content section.
mam_geodirectory_explcit_listings filter PHP dev Bypass the directory query and supply listings explicitly. Note: the hook name preserves a typo (explcit); it is intentional.
mam_geodirectory_final_listings filter PHP dev Final pass over the full listings array sent to the app.
mam_geodirectory_skip_record filter PHP dev Drop a single listing from the response.
mam_geodirectory_send_notification_users filter PHP dev Override the recipient list for a Send-Notification submission.
mam_gd_date_format filter PHP dev Override the date format used for listing/event labels.
mam_gd_social_icons_only filter PHP dev Force icon-only rendering for a listing’s social-media row.
mam_gd_events_exclude_from_map filter PHP dev Exclude gd_event posts from the map content type.
mam_gd_send_notification_types filter PHP dev Add or modify the choices in the Send Notification form’s recipient-type field.
mam_gd_get_event_schedule filter PHP dev Read upcoming GD event schedules. Producer pattern; consumers call apply_filters to read.
mam_gd_manage_favorites action PHP dev Fires after a favorite has been toggled via the mobile AJAX endpoint.

The plugin also fires mam_notification_send_message (mam-main contract) when sending push notifications, and mam_get_main_qr_code / mam_create_qr_code for the in-app QR feature. Those names belong to mam-main and are documented there.

The plugin subscribes to a large set of mam-main, mam-special-offers, mam-chat-manager, mam-geofilters, mam-inapp-purchase-manager, and GeoDirectory hooks. Those are documented in their owning plugin’s reference, not here. The most important to know about:


Common tasks

  • Configure the per-post-type forms and toggles → Recipe: Configure the GeoDirectory settings page
  • Add custom fields to a listing pricing package → Recipe: Pricing package fields
  • Add staff or managers to a listing in WordPress admin → Recipe: Manage staff and managers (admin)
  • Bulk-invite venue owners to claim their listings → Recipe: Bulk-invite venue owners
  • Understand the data the app receives for each listing → Mobile listing data shape
  • Build the listing detail screen → Listing detail content sections
  • Decide which tab bar button shows for whom → Listing tab bar buttons
  • Let users add or edit listings from the app → Form: Add/Edit Listing
  • Let venue owners send push notifications from the app → Form: Send Notification
  • Let venue owners invite staff from the app → Form: Add or remove staff and managers
  • Let users claim a listing → Form and flow: Claim Listing
  • Approve user-submitted listings from the app → Form: Approve Listing
  • Replace the listings array entirely (bypass the GD query) → Hook: mam_geodirectory_explcit_listings

Verification

This article was last verified against:

  • Plugin: mam-geodirectory v2.1.5
  • mam-main (required)
  • GeoDirectory plugin (required)
  • mam-geofilters, mam-special-offers, mam-chat-manager, mam-inapp-purchase-manager, mam-gravity-forms-manager, mam-reviews-manager (optional integrations)

Re-verify whenever a hook is added or removed, the bootstrap class adds or drops a sub-class instantiation in mam_geodirectory_manager::__construct(), the listing-row keys produced by mam_geodirectory_content::get_data_for_app() change, the seven mobile forms are renamed or split, or the admin Settings tab structure changes.


  • Recipe: Configure the GeoDirectory settings page
  • Recipe: Pricing package fields
  • Recipe: Manage staff and managers (admin)
  • Recipe: Bulk-invite venue owners
  • Content type: GeoDirectory list and map
  • Listing detail content sections
  • Listing tab bar buttons
  • Mobile listing data shape
  • Form: Add/Edit Listing
  • Form: Send Notification
  • Form: Add or remove staff and managers
  • Form: Approve Listing
  • Form and flow: Claim Listing
  • Form: Manage staff invitation
  • Form: Add QR Code
  • Integration: GeoFilters
  • Integration: Special Offers
  • Integration: Chat Manager
  • Integration: In-App Purchase Manager
  • Integration: WooCommerce pricing packages
  • GeoDirectory notification types
  • Hook: mam_geodirectory_add_edit_form_fields
  • Hook: mam_geodirectory_admin_settings_tabs
  • Hook: mam_geodirectory_admin_settings_tabcontent{tab}
  • Hook: mam_geodirectory_admin_settings
  • Hook: mam_geodirectory_event_card
  • Hook: mam_geodirectory_explcit_listings
  • Hook: mam_geodirectory_final_listings
  • Hook: mam_geodirectory_skip_record
  • Hook: mam_geodirectory_send_notification_users
  • Hook: mam_gd_date_format
  • Hook: mam_gd_social_icons_only
  • Hook: mam_gd_events_exclude_from_map
  • Hook: mam_gd_send_notification_types
  • Hook: mam_gd_get_event_schedule
  • Hook: mam_gd_manage_favorites

Metadata

Field Value
Article type Plugin Overview
Plugin slug mam-geodirectory
Applies to plugin version 2.1.5+
Category Plugin Reference
Depends on MAM Main, GeoDirectory (third-party WordPress plugin)
Requires (third-party) GeoDirectory 2.x
Works with MAM GeoFilters, MAM Special Offers, MAM Chat Manager, MAM In-App Purchase Manager, MAM Reviews Manager, MAM Gravity Forms Manager, WooCommerce, GeoDir Event Manager, GeoDir Pricing, GeoDir Claim Manager
Hooks exposed mam_geodirectory_add_edit_form_fields, mam_geodirectory_admin_settings_tabs, mam_geodirectory_admin_settings_tab_content_{tab}, mam_geodirectory_admin_settings, mam_geodirectory_event_card, mam_geodirectory_explcit_listings, mam_geodirectory_final_listings, mam_geodirectory_skip_record, mam_geodirectory_send_notification_users, mam_gd_date_format, mam_gd_social_icons_only, mam_gd_events_exclude_from_map, mam_gd_send_notification_types, mam_gd_get_event_schedule, mam_gd_manage_favorites
Last verified 2026-05-01
Contents

    Need Support?

    Can’t find the answer you’re looking for? Don’t worry we’re here to help!