Stores the custom CSS and, for callers allowed to post unfiltered HTML, the custom JavaScript injected into the portal.
CSS is sanitised before storage. Custom JavaScript is only written when the caller holds the WordPress unfiltered_html capability; otherwise the previously stored script is silently retained, so the save appears to succeed while the JS field is ignored.
Endpoint
Method:
POSTPath:
/settings/snippets-settingsEdition: PRO
Controller:
ProAdminController@updateSnippetsSettingsRoute source:
fluent-community-pro/app/Http/Routes/api.php:34Controller source:
fluent-community-pro/app/Http/Controllers/ProAdminController.phpRequires the FluentCommunity community-admin permission (or a WordPress super admin).
Requires FluentCommunity Pro; the stored snippets run on every portal page.
Live sample
The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.
POST Save Snippets Settings
Stores the custom CSS and, for callers allowed to post unfiltered HTML, the custom JavaScript injected into the portal.
Controller: ProAdminController@updateSnippetsSettings
Route source: fluent-community-pro/app/Http/Routes/api.php:34
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Request Body
Responses
Successful response