Utils
Overview
The Utils layer is the reusable helper surface of MAC Core.
These utilities exist for behavior that is:
- shared across multiple builds
- simple enough to expose to builders
- worth testing and documenting once
Project-specific output rules should still live in a child theme or site plugin unless they clearly belong in shared MAC Core.
Current Utility Groups
| Group | Primary APIs |
|---|---|
| Datetime formatting | mac_format_datetime() |
| Post type labels | mac_get_post_type_label(), mac_get_post_type_singular(), mac_get_post_type_plural() |
| Taxonomy labels | mac_get_taxonomy_label(), mac_get_taxonomy_singular(), mac_get_taxonomy_plural() |
| Post terms | mac_get_post_terms(), mac_get_post_terms_html(), mac_get_post_terms_plain() |
| Array counting | mac_count_array_items() |
| Plugin status | MacCore\Utils\GetPluginStatus::* |
| Theme status | MacCore\Utils\GetThemeStatus::* |
Wrapper Conventions
Most builder-friendly helpers expose global mac_* wrapper functions.
Exception:
- plugin status helpers are class-based
- theme status helpers are class-based
Those two utility families currently do not expose global wrapper functions.