Created
June 13, 2017 05:27
-
-
Save pro-beaver/46c2d56fa5efc2d4e10184b5434eb1a2 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* Disable and Hide Animations in Beaver Builder modules | |
* | |
* @author Chinmoy K Paul | |
* @link http://probeaver.com/?p=1697 | |
* | |
*/ | |
//* Remove Animation option from Beaver Modules | |
add_filter( 'fl_builder_register_settings_form', function ( $form, $slug ) { | |
if( $slug == 'module_advanced' ) { | |
unset($form['sections']['animation']); | |
} | |
return $form; | |
}, 1099, 2); | |
//* Removing existing animation of Beaver Modules | |
add_filter( 'fl_builder_module_attributes', function ( $attrs, $module ) { | |
if ( ! empty( $module->settings->animation ) ) { | |
$class = join( ' ', $attrs['class'] ); | |
$class = str_replace('fl-animation', '', $class ); | |
$attrs['class'] = explode(' ', $class ); | |
} | |
unset( $attrs['data-animation-delay'] ); | |
return $attrs; | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment