Skip to content

Using responsive-values in building your modules

You might find yourself needing the breakpoints for medium and small devices while coding your modules. But how can they stay in line with the values set in Beaver Builder?

No need to manually change the values or guess what they are, you can use the values that are set in the $global_settings object.

Include the following variable in your module-files and you’re good to go!

$global_settings = FLBuilderModel::get_global_settings();

Now you can use it in a custom-field:

            'spacemedium' => array(
                'type'          => 'text',
                'label'         => __( 'Medium Size', 'textdomain' ),
                'default'       => $global_settings->medium_breakpoint,
                'maxlength'     => '4',
                'size'          => '5',
                'placeholder'   => __( 'px', 'textdomain' ),
            ),
Posted in

Beaverplugins

Web ninja with PHP/CSS/JS and Wordpress skills. Also stand-in server administrator, father of four kids and husband to a beautiful wife. Always spends too much time figuring out ways to do simple things even quicker. So that you can benefit.

Leave a Comment