bricks_get_breakpoints
Overview
Returns the list of all configured Bricks breakpoints with their keys, labels, and maximum-width values in pixels. Bricks uses a desktop-first responsive approach with five default breakpoints: desktop (base, no max-width), tablet_landscape (~1279px), tablet_portrait (~1024px), mobile_landscape (~768px), and mobile_portrait (~478px).
This tool is essential before applying responsive overrides. Understanding the available breakpoints ensures you use the correct key suffixes when setting per-breakpoint element settings via bricks_set_responsive_settings or inline responsive keys.
Key Features
When to Use
Before calling bricks_set_responsive_settings to verify available breakpoint keys
When debugging responsive layout issues to confirm breakpoint max-width values
After custom breakpoints have been configured in Bricks settings
When NOT to Use
To change breakpoint widths — that is done through the Bricks admin settings panel
Parameters
(none)noneoptionalCode 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
Read breakpoints and apply responsive overrides
First retrieve available breakpoints, then use the key values to apply responsive padding and grid column overrides.
// Step 1: Get available breakpoints
bricks_get_breakpoints()
// Returns: { breakpoints: [
// { key: "desktop", label: "Desktop", width: 0 },
// { key: "tablet_landscape", label: "Tablet Landscape", width: 1279 },
// { key: "tablet_portrait", label: "Tablet Portrait", width: 1024 },
// { key: "mobile_landscape", label: "Mobile Landscape", width: 768 },
// { key: "mobile_portrait", label: "Mobile Portrait", width: 478 }
// ] }
// Step 2: Use breakpoint keys for responsive settings
bricks_set_responsive_settings({
page_id: 42,
element_id: "abc123",
breakpoint: "mobile_portrait",
settings: {
_gridTemplateColumns: "1fr",
_padding: { top: "40", bottom: "40" }
}
})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
No parameters needed: This tool takes no arguments. It returns all breakpoints configured for the current Bricks installation.
Responsive key convention: Use the breakpoint key as a suffix on any CSS setting: _padding:mobile_portrait, _gridTemplateColumns:tablet_portrait, _typography:mobile_portrait, etc.