Keep saved preferences editable
manage-flex-theme gate. Preferences belong to
the native panel ID. Changing a draft does not persist until Save.
Hide the entire settings page
ThemeSettingsPage::canAccess().
Fully configure the theme in PHP
settings() is a full code-owned configuration. Omitted keys use package
defaults, not the database. A named preset contributes Accent/Base first;
explicit values override that preset. Unknown and invalid keys fail validation.
Saved data remains untouched and becomes available again if you remove the
full PHP configuration.
This mode hides the page even if you also call settingsPage(true). Do not
manually re-register ThemeSettingsPage to expose an editor that cannot take
effect. Numeric radii are derived from the two scale values.
Lock only selected preferences
settingsOverrides() accepts portable preference keys from Appearance, Colors,
Layout, Details, Search, Keyboard and custom_fonts. It does not accept brand
identity, branding paths or independent derived radius numbers. Use settings()
or native branding PHP when the whole theme should be application-owned.
Precedence
- Start with full
settings()plus package defaults, or saved panel preferences. - Apply general
settingsOverrides(). - Apply dedicated sticky-topbar, Search settings and shortcut/transition overrides.
- Preserve native per-page content width and native authorization restrictions.
inherit or null values, and leave navigation
override disabled. Do not assume every native Panel setter automatically locks
an otherwise editable theme preference.
Hide individual feature tabs
SearchConfiguration::authorize();
see Search permissions.
Appearance, Colors, Brand, Layout and Details currently have no public individual
tab-visibility setter. Use permissions or settingsPage(false) to restrict the
whole page, or locks to restrict particular preferences. Do not use an invented
tabs() or hiddenTabs() API.
Export and import
Export settings downloads validated preferences from the current draft, including custom Google Font metadata. It excludesbrand, all uploaded asset
paths and derived radius numbers. The format is:
Other plugin switches
Storage, cache and deployment
Saved preferences are stored inflex_theme_settings, keyed by panel ID. Read the
effective snapshot with ThemeSettings::get('admin'). Ordinary read paths use a
request-scoped snapshot and a separate shared cache. Publish optional config:
flex-theme.settings_cache.store defaults to file and can be overridden with
FLEX_THEME_SETTINGS_CACHE_STORE=redis. The store must support atomic locks.
flex-theme.settings_cache.ttl defaults to 3600 seconds. Normal saves invalidate
after commit; full PHP configuration bypasses stored preference reads.
If an authorized application process writes the settings row outside the normal
save API, invalidate that panel after the change:
ThemeSettings::save()
must authorize its caller itself; the native page supplies that gate check.
Translations
lang/vendor/flex-theme/{locale}/settings.php,
keyboard.php, search.php and the other published language files. Settings
labels follow Laravel’s current locale; stored keys and values do not change.
Locale selection remains your application’s responsibility.