Support » Plugin: WordPress Page Builder - Beaver Builder » Feature Suggestion: Add filter to remove widget

  • Resolved David Chandra Purnama

    (@turtlepod)


    Hi Beaver Builder team,

    I would be great if you can add filter to FLBuilderModel::get_wp_widgets()
    You excluded wp audio, video, etc

    
    		$exclude = array(
    			'WP_Widget_Media_Audio',
    			'WP_Widget_Media_Image',
    			'WP_Widget_Media_Video',
    			'WP_Widget_Text',
    		);
    

    But how can we remove our custom widget if it didn’t work properly, or we already have custom module created for the same functionality ?

    Thank you for this awesome builder.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ben Carlo

    (@hinampaksh)

    Hey @turtlepod,

    Apologies for the delayed response!

    We already have the fl_get_wp_widgets_exclude filter since 1.10.8 which allows you to do this. Sample code below.

    function bb_child_exclude_widgets( $excluded_widgets ) {
        $excluded_widgets[] = 'WP_Widget_Search';
        $excluded_widgets[] = 'WP_Widget_Tag_Cloud';
        
        return $excluded_widgets;
    }
    add_filter( 'fl_get_wp_widgets_exclude', 'bb_child_exclude_widgets', 10 );

    It’s a fairly new filter so it isn’t documented yet. Sorry about that! 🙂

    Ben

    • This reply was modified 9 months, 3 weeks ago by  Ben Carlo.
Viewing 1 replies (of 1 total)
  • The topic ‘Feature Suggestion: Add filter to remove widget’ is closed to new replies.