Responsive breakpoints filter doesn’t work in editor
-
Hi,
The filter
block_enhancements_get_breakpointsshown in the plugin description page doesn’t work inside the editor. The default breakpoints seem to be forced no matter what I try.Or maybe I’m missing something in the filter call to get it applied?
(I simply call it inside functions.php, but maybe I should useadd_action()to call it elsewhere?)On frontend it is OK, though 😉
On a side note, the snippet given in example looks… weird! It should look more like this:
add_filter( 'block_enhancements_get_breakpoints', function( $breakpoints ) {
// use default $breakpoints arg if you need
return [
'sm' => [
'breakpoint' => '370px',
'mediaQuery' => '',
],
'md' => [
'breakpoint' => '600px',
'mediaQuery' => '@media (min-width: 600px){##CONTENT##}',
],
'lg' => [
'breakpoint' => '782px',
'mediaQuery' => '@media (min-width: 782px){##CONTENT##}',
],
];
} );Thanks again for your great and so useful work!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.