bricks_delete_theme_style
Overview
Permanently deletes a theme style from Bricks Builder. The style and all its settings (typography, colors, element defaults, conditions) are irrecoverably removed.
After deletion, pages that were using this style will fall back to the next matching theme style based on condition specificity, or to Bricks’ built-in defaults if no other theme style matches.
Key Features
When to Use
Cleaning up duplicate theme styles after a site migration
Replacing one theme style with another that has been properly configured
Ideally another theme style should exist to provide fallback styling
Confirm no critical pages depend exclusively on the style being deleted
When NOT to Use
When deleting the only theme style — this will leave the site with no custom typography settings
When you are unsure which style is active on which pages (use bricks_get_theme_styles first to check conditions)
Parameters
style_idstringREQUIREDCode Examples
Delete a test theme style
Remove a theme style that was created for testing purposes.
{
"style_id": "test-style"
}{
"success": true,
"message": "Theme style 'test-style' deleted successfully."
}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
Warning: This action is permanent and cannot be undone. There is no trash or soft-delete for theme styles.
Tip: Before deleting, use bricks_get_theme_styles to export the current settings in case you need to recreate them later.
Tip: If you want to replace a style, create the new one first with bricks_create_theme_style, verify it works correctly, then delete the old one.