Skip to main content

Settings

PropertyValue
descriptionSettings modules, storage model, and navigation for MAC Core.
tagsindex, doc, mac-core, setting
rating

Overview

MAC Core currently exposes two settings modules:

  • Core Policies
  • Media Policies

These are rendered in the MAC Core -> Settings tab and saved under a single WordPress option:

  • mac_core_settings

How the Settings Screen Is Organized

At runtime, the settings page:

  • loads sections from SettingsSchema
  • groups fields by their configured group
  • renders them inside the Settings tab
  • normalizes and sanitizes values through the settings repository before saving

This keeps the admin UI, defaults, and stored values aligned with the schema rather than with ad hoc form behavior.

Current Modules

ModulePurpose
coreShared site-wide behavior for branding, admin, comments, updates, content, and uninstall cleanup.
mediaShared image-size, upload, and compression behavior.

Value Normalization

The settings repository applies the field type defined in the schema:

  • checkbox -> boolean
  • text -> sanitized text
  • key -> sanitized role or capability style key
  • url -> sanitized URL
  • integer -> clamped integer
  • csv_int -> unique positive integer list
  • csv_string -> unique normalized token list

This matters most for the list-based media settings, because builders can use either comma-separated or line-separated input in the admin UI.

Pages in This Section