bricks_delete_font
Overview
Deletes a custom font from Bricks Builder. Removes the font family registration and all its variants (weight/style combinations) from the database.
Elements that reference the deleted font in their font-family setting will fall back to the next font in their font stack, or to the browser default. This does not delete the actual font files from the media library — only the Bricks font registration.
Key Features
When to Use
Replacing one custom font with another (upload new first, then delete old)
Cleaning up test fonts that were uploaded during development
Switching from self-hosted fonts to Google Fonts or Adobe Fonts
Ideally update theme styles and classes to use a different font-family before deleting
When NOT to Use
When you want to remove Google Fonts (those are managed through Bricks settings)
When you want to remove Adobe Fonts (use bricks_set_adobe_fonts to reconfigure)
Parameters
font_idstringREQUIREDCode Examples
Delete a custom font
Remove a font by its ID after confirming it is no longer needed.
{
"font_id": "d4e5f6"
}{
"success": true,
"message": "Font 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: Font deletion is permanent. The @font-face registration is removed from the database immediately.
Tip: The actual font files in the media library are not deleted. If you also want to remove the files, delete them separately from the WordPress media library.
Tip: Before deleting, update typographyBody and typographyHeadings in theme styles to use a replacement font.