Content class: Social Media

Primary responsibility

Renders a row of social-media buttons (Facebook, Instagram, Twitter/X, YouTube, TikTok, LinkedIn, etc.). Each enabled channel links to a configured URL.


Settings

Setting Type Environment Purpose
enabled_channels multi-select per-button Which channels to render
<channel>_url text per-button Per-channel URL (one per enabled channel)
icon_only yes-no global / per-button If on, render icons only (no labels)
style_* various per-button Icon colors

Hooks involved

Hook Type Role
mam_main_content_element_social_media Filter Reusable social-media section builder (used by other content classes)
mam_gd_social_icons_only Filter (mam-geodirectory) Force icon-only rendering for a listing’s social row

Reuse pattern

The Social Media class is also used as a reusable section by other content classes (WP Post Content, Listing Detail, etc.) via the mam_main_content_element_social_media filter. See Content class elements reference.


Gotchas

  • Each enabled channel needs a URL. An enabled channel with an empty URL renders a broken-looking icon.
  • Deep linking (e.g., instagram://user?username=...) works on devices with the app installed; falls back to the web URL otherwise.

  • Content classes overview
  • Content class elements reference
  • Hook: mam_gd_social_icons_only (mam-geodirectory)

Metadata

Field Value
Article type Screen Reference
Plugin slug mam-main
Applies to plugin version 2.1.11+
Category App Settings Reference
Audience WordPress admin / PHP developer
Class name local_app_social_media_button (frozen)
Source file includes/content-classes/local-app-social-media-class.php
Last verified 2026-05-02
Contents

    Need Support?

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