bricks_get_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
When to Use
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
When NOT to Use
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
sectionsarrayoptional["all"] Values: performance, seo, scripts, builder, query, maintenance, security, allCode 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.
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.
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
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
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.