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_script on methodGlobalData.breakpoints.
  • Used by method_get_block_responsive_styles() to wrap CSS in media queries.
  • Used by MethodStyleTag.jsx on the client side.

Changelog

File: lib/helper-functions.php

VersionDescription
2.0.0Introduced.