<?php
add_filter( 'fl_builder_ui_js_config', function( $config ) {
/**
* Remove the WordPress Widgets content panel view
*/
unset( $config['panelData']['tabs']['modules']['views'][2] );
/**
* Add WordPress Widgets to the Standard modules group
*/
if ( isset( $config['contentItems']['module'] ) ) {
foreach( $config['contentItems']['module'] as $module ) {
if ( $module->isWidget ) {
$module->group = array('standard'); /* Put widgets into standard group */
}
}
}
/**
* Remove Revisions Item from the tools menu
*/
if ( isset( $config['mainMenu']['main']['items'] ) ) {
/* Remove the revisions item */
unset( $config['mainMenu']['main']['items'][35] );
}
/**
* Be sure to return the $config object or all of Beaver Builder will break :)
*/
return $config;
});