bricks_get_site_settings

Phase 1BeginnerRead OnlyComplexity: 2/10
Read global Bricks site settings

Overview

Reads the Bricks global site settings stored in the bricks_global_settings WordPress option. These control performance options, SEO behaviour, custom scripts, builder preferences, query filters, maintenance mode, and security settings.

You can filter by section to retrieve only the settings you need, or request all sections at once. This is useful for auditing the current configuration before making changes with bricks_update_site_settings.

Key Features

Section Filtering
Filter by performance, seo, scripts, builder, query, maintenance, or security sections to get only relevant settings.
Performance Settings
Check CSS loading method (file vs inline), lazy loading, smooth scroll, emoji disabling, and other performance toggles.
Script Inspection
View custom scripts injected in header, body header, and body footer positions. Essential before adding new CDN libraries.
Complete Configuration
Returns all settings when no filter is applied, giving a full picture of the site configuration.

When to Use

To audit the current site configuration before making changes
To check if smooth scroll, lazy loading, or CSS loading method is configured
To verify custom scripts (header/footer) that are already injected
Before enabling features like query filters or maintenance mode
To check SEO and Open Graph settings status
Prerequisites
No prerequisites — read-only tool

When NOT to Use

When you need theme style information (typography, colors) — use bricks_get_theme_styles
When you need element-level defaults — those are in theme styles, not site settings
When you need page-specific settings — use bricks_get_page_settings

Parameters

1 Total Parameters1 Optional
sectionsarrayoptional
Which setting sections to return. Defaults to all sections.
Default: ["all"] Values: performance, seo, scripts, builder, query, maintenance, security, all

Code Examples


Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12

Check Performance Settings

Returns only performance-related settings like CSS loading, lazy loading, and smooth scroll.

JSON
bricks_get_site_settings({ sections: ["performance"] })

Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12

Check All Settings

Returns the complete site settings including all sections.

JSON
bricks_get_site_settings({ sections: ["all"] })

Common Mistakes


Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 2018

Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48

Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Site settings control global behaviour (performance, SEO, scripts). Theme styles control visual defaults (typography, element padding). Use bricks_get_theme_styles for visual configuration.

Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 2018

Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48

Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Always check customScriptsHeader and customScriptsBodyFooter before loading CDN libraries to avoid duplicate script injections.

Tips & Warnings

Tips & Warnings

Custom code storage: Bricks stores custom CSS/JS in the bricks_global_settings option under keys like customCss, customScriptsHeader, customScriptsBodyFooter. Changes here require calling bricks_regenerate_assets to take effect.

Section filtering: Use specific sections to reduce response size. The « scripts » section is especially useful before CDN library loading.

Return Values

FieldTypeDescription
smoothScrollbooleanWhether smooth scroll is enabled
cssLoadingstringCSS loading method: "file" or "inline"
disableLazyLoadbooleanWhether lazy loading is disabled
disableSeobooleanWhether Bricks SEO meta is disabled
enableQueryFiltersbooleanWhether query filter UI elements are enabled
maintenanceModebooleanWhether maintenance mode is active
customScriptsHeaderstringCustom scripts injected in the HTML head
customScriptsBodyFooterstringCustom scripts injected before closing body tag

Related Tools

Technical Details

Tool ID
bricks_get_site_settings
API Endpoint
/site-settings
HTTP Method
GET
Namespace
wordpress-site
Source File
wordpress/site-settings.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release
20250101