• Hi,

    The filter block_enhancements_get_breakpoints shown 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 use add_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)
  • Plugin Author Phi Phan

    (@mr2p)

    Hi Yan @yankiara,

    Thanks for reporting this. Yes, I’m currently using the default WordPress breakpoints for the Editor. I agree it makes sense to respect the breakpoint settings instead, and I’ll update this in the next version.

    Thanks again for pointing it out!

    Best, Phi.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.