Primary responsibility
mam-geodirectory registers fourteen tab bar action buttons against listing detail screens. The full set is declared in mam_geodirectory_content::tab_bar_manager_buttons(); per-button behavior (icon, action, source) is built by mam_gd_tab_bar_buttons and mam_gd_claim_listing_manager. Each button corresponds to a mam_main_add_tab_bar_item_* filter (owned by mam-main); this plugin subscribes to those filters and decides whether the button should appear for the current user/listing combination.
This article documents what each button does, when it appears, and which option/permission gates it.
The fourteen buttons
| Button id | Default title | When it appears | Action |
|---|---|---|---|
favorites |
Favorites | All non-staff viewers (hidden for owner/manager/staff/admin). | Toggles favorite via mam_favorites AJAX. |
phone |
Call | All non-staff viewers, when phone is populated. |
Dials the listing’s phone number. |
website |
Website | All non-staff viewers, when website is populated. |
Opens the website in an in-app browser. |
map |
Map | All non-staff viewers. | Opens device maps to the listing’s coordinates. |
email |
All non-staff viewers, when email is populated. |
Composes an email to the listing. | |
share |
Share | All non-staff viewers. | Opens the system share sheet with the listing’s permalink. |
chat |
Chat | When mam_chat_manager is active and the listing has at least one staff/manager (or a non-admin owner). For staff viewing their own listing, also visible if the listing has other staff/managers. |
Opens the listing’s chat group. |
edit_listing |
Edit Listing | For owner/manager/admin when the global option gd-author-can-edit-on-app is 'yes' and a per-post-type Add/Edit Listing form is configured. |
Opens the Add/Edit Listing form pre-populated with the listing’s data. |
edit_staff |
Edit Staff | For owner/manager/admin when an Add Users form is configured and the listing’s accepted staff count is below the package’s no_of_staff_members cap. |
Opens an array of staff sub-forms (one per existing staff member, plus one Add Staff form). |
edit_events |
Edit Events | For owner/manager/admin on the home content type or on listings (covered in Form: Add/Edit Listing — events use the same form pipeline keyed on gd_event). |
Opens the events form. |
send_notifications |
Send Notification | For owner/manager/admin when the Send Notification form is configured and the listing has not exceeded its monthly PN quota (pn_per_month from the package, default 10). |
Opens the Send Notification form pre-populated with the listing ID. |
claim_listing |
Claim Listing / Request to Claim / Claim Pending | For non-author signed-in users when the listing supports claiming and is not already claimed. Title varies with state (see below). | Either opens the claim purchase screen, opens a claim-request form, or shows pending. |
approve_listing |
Approve Listing | For admins viewing a pending or draft listing when an Approve Listing form is configured. |
Opens the Approve Listing form pre-populated with the listing ID. |
edit_deals |
Edit Deals | Owned by mam-special-offers. This plugin only contributes the mam_special_offers_deals_allowed cap and the mam_special_offers_hard_skip_tab_bar_button “hide for non-staff” rule. |
See Integration: Special Offers. |
Visibility logic in detail
mam_main_skip_tab_bar_button — the role-aware skip filter
When the current viewer is the owner / manager / admin / staff of the listing, the buttons listed in $exclude are skipped:
$exclude = ['website', 'email', 'phone', 'favorites', 'map', 'share', 'chat'];
This is intentional — owners and staff get owner-style action buttons (Edit Listing, Edit Staff, Send Notification, etc.) instead of consumer-style ones. The chat button is re-allowed for admins specifically, but only when the listing has at least one non-admin staff or manager (to avoid an empty chat group).
For non-staff users, the chat button is suppressed if the listing has no staff/managers at all (get_manager_or_staff_for_location($id, 'all') returns empty).
claim_listing — three-state title
The Claim Listing button renders one of three forms based on the user’s current claim state:
- “Claim Pending” — when
GeoDir_Claim_Post::is_claim_pending($post_id)returns true. Action is empty (the button just informs). - “Request to Claim” — when
mam_gd_claim_requires_approvalis'yes'and the user has no approval flag (_mam_claim_approved_{post_id}user meta). Action isclaim_request. - “Claim Listing” — when ready for purchase. Action is
open_claim_purchase; payload includes the configured packages, the checkout mode, the CTA text, and the features list.
The button is hidden entirely when the listing is already claimed, when the GeoDir Claim Manager plugin is not active, when the listing’s post type does not support claiming, or when the current user is the listing’s author.
send_notifications — quota gate
The button checks pn_sent_{YYYY_MM} post meta on the listing against the package’s pn_per_month. When the count meets or exceeds the cap, the button is suppressed for the rest of the calendar month. Counts reset implicitly on the first of the next month.
edit_staff — pre-fill array
The button’s source is an array of sub-forms — one per existing staff member, pre-filled with their first/last name, user ID, email, and current role; plus one “Add Staff Member” form when below the staff cap. The app renders this as a list view inside a modal. Each sub-form points at the same Add Users Gravity Form ID; the app sends back which one was edited.
For each sub-form, the plugin can also exclude specific fields by ID — used to hide the Reinvite User, Delete User Check, and Delete User fields on the “Add” sub-form (those only make sense when editing an existing staff member).
Allow-admin-to-do-stuff toggle
mam_gd_tab_bar_buttons only treats an admin as elevated when the request includes ?pid=.... Without pid, an admin sees consumer-style buttons. This isolates admin-only buttons (Edit Listing, Approve Listing) to admin-mode views — a normal browse of the directory by an admin doesn’t show them.
The PLUGIN_AUDIT.md previously called out the gd-admin-can-edit-all-listings option as the intended gate, but the runtime currently reads ?pid instead. If you need true admin-everywhere editing, set the request parameter or override via Hook: mam_geodirectory_explcit_listings in custom flows.
Gotchas
- The
sharebutton uses the in-app share sheet. It does not respect any custom URL filtering. chatrequiresmam-chat-manager. Without it, no chat button is registered (seetab_bar_manager_buttons()).- Quota and staff caps are silent. When the
send_notificationsoredit_staffcap is hit, the button simply disappears with no on-screen explanation. Document the limit in your in-app onboarding to avoid support tickets. edit_listingrequires both the post-type form ANDgd-author-can-edit-on-app. Either gate alone hides the button.approve_listingrequires admin AND status pending/draft. Admins viewing a published listing do not see this button.
Verification
This article was last verified against:
- Plugin:
mam-geodirectoryv2.1.5 - Source:
includes/mam_gd_tab_bar_buttons.php - Source:
includes/mam_gd_claim_listing_manager.php - Source:
content-classes/local-app-geodirectory-v2-class.php—tab_bar_manager_buttons()
Re-verify whenever a button is added or removed, the $exclude list in mam_app_settings_tab_bar_button_skip changes, the package-meta keys (pn_per_month, no_of_staff_members) are renamed, or the claim-button state machine in mam_gd_claim_listing_manager::tab_bar_button changes.
Related articles
- Plugin: mam-geodirectory
- Listing detail content sections
- 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
- Recipe: Pricing package fields
- Integration: Chat Manager
- Integration: Special Offers
Metadata
| Field | Value |
|---|---|
| Article type | Screen Reference |
| Plugin slug | mam-geodirectory |
| Applies to plugin version | 2.1.5+ |
| Category | App Settings Reference |
| Audience | WordPress admin |
| Last verified | 2026-05-01 |
