API / Minn\Runtime / ThemeMods

ThemeMods final class

Minn\Runtime\ThemeMods · public/minn/src/Minn/Runtime/ThemeMods.php · 57 lines

The active theme's settings (theme_mods_{stylesheet}) as WordPress keeps them: read through theme_mod_{name}, a default with %s naming the theme's folders, written through pre_set_theme_mod_{name}, and removed one by one or all at once.

Public

staticall(): array#

Every setting of the active theme (get_theme_mods).

@return array<array-key, mixed>
staticget(mixed $name, mixed $default = false): mixed#

One setting (get_theme_mod), else the default (a %s in it names the parent's and the theme's folder addresses).

staticset(mixed $name, mixed $value): bool#

A setting written (set_theme_mod), through pre_set_theme_mod_{name}.

staticremove(mixed $name): void#

A setting removed (remove_theme_mod); the last one takes the option with it.

staticremoveAll(): void#

Every setting removed (remove_theme_mods).