Form options filter

Widgets Bundle > Advanced Concepts > Filters> Form options filter

The form filter is an incredibly useful filter for changing the fields of an existing widget form. You can use this to enhance the widgets currently in Widgets Bundle, or you can enhance widgets you've added. Maybe you want to add enhanced functionality in a premium version of your plugin.

This filter allows you to edit existing fields or add new ones. See the form modification doc for more details.

function mytheme_filter_widget_form($form_options, $widget){
    if( !empty($form_options['design']['fields']['theme']['options']) ) {
        $form_options['design']['fields']['theme']['options']['test'] = __('Test Style', 'mytheme');
    return $form_options;
add_filter('siteorigin_widgets_form_options_sow-button', 'mytheme_filter_widget_form', 10, 2)