Removes the delay for opening sub-menus on generatepress. This goes into the wp_head-Hook in Generate Press Hooks
<script>
jQuery( window ).load( function() {
jQuery( '.sf-menu .menu-item-has-children' ).GenerateDropdownMenu.destroy();
jQuery( '.sf-menu .menu-item-has-children' ).GenerateDropdownMenu({
transition_speed: 0,
open_delay: 0,
close_delay: 0
});
});
</script>
<?php
/*
Plugin Name: Boomerang Custom Shape for Beaver Builder
Description: Adds a boomerang shape to the list of custom shapes in Beaver Builder
Author: <insert name of plugin author here>
Version: 1.0
*/
function bb_register_custom_shapes() {
FLBuilder::register_shape(array(
'label' => __( 'Boomerang', 'bb-custom-shapes-boomerang' ),
'name' => 'boomerang',
/* Optional x and y origin values, from SVG viewBox
ex: viewBox="x y width height" */
// 'x' => 0,
// 'y' => 0,
/* Required width and height values from SVG definition */
'width' => 347,
'height' => 85,
/* Optional aspect ratio setting, from the SVG element - see svg spec */
// 'preserve_aspect_ratio' => 'none'
/* Include the path to your artwork */
'render' => dirname(__FILE__) . '/shapes/boomerang.svg.php',
));
}
add_action('init', 'bb_register_custom_shapes');