method_get_block_breakpoints()
method_get_block_breakpoints()
Gets computed breakpoint values with units for use in CSS media queries.
Description
Resolves the named breakpoint keys from METHOD_OPTIONS (or METHOD_CHILD_OPTIONS) into pixel values with units, applying the -1 offset for max‑width breakpoints to avoid overlap.
Parameters
None.
Return
(array) Associative array:
PHP
array(
'mobile_max' => '767px', // md - 1
'tablet_min' => '768px', // md
'tablet_max' => '1199px', // xl - 1
'wide_min' => '1600px', // xxl
)Source
File: lib/helper-functions.php
Notes
- Values are passed to the editor via
wp_localize_scriptonmethodGlobalData.breakpoints. - Used by
method_get_block_responsive_styles()to wrap CSS in media queries. - Used by
MethodStyleTag.jsxon the client side.
Changelog
File: lib/helper-functions.php
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |