Last active
October 2, 2019 12:35
-
-
Save gregrickaby/fb9ea1795c0ced71fa70c5f4b087a44a to your computer and use it in GitHub Desktop.
Disable Beaver Builder global padding and margin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set Beaver Builder defaults | |
* | |
* @param {object} $defaults The default settings. | |
* @param {object} $form)_type The module settings. | |
* @return $defaults | |
*/ | |
function grd_set_bb_defaults( $defaults, $form_type ) { | |
if ( 'global' == $form_type ) { | |
$defaults->row_padding = '0'; | |
$defaults->row_width_default = 'full'; | |
$defaults->row_content_width_default = 'full'; | |
$defaults->module_margins = '0'; | |
} | |
return $defaults; | |
} | |
add_filter( 'fl_builder_settings_form_defaults', grd_set_bb_defaults, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment