Creating Custom Module In Divi

add_action( 'et_builder_ready', 'evr_initialize_divi_modules' );

function evr_initialize_divi_modules() {
    if ( ! class_exists( 'ET_Builder_Module' ) ) { return; }

    class EVR_Builder_Module_Testimonial extends ET_Builder_Module {
        function init() {
            $this->name       = esc_html__( 'Testimonial', 'evr' );
            $this->slug       = 'evr_pb_testimonial';
            $this->fb_support = true;

            // ...

        }
    }
}

Display cleaner excerpts – get rid of all shortcodes in excerpts

If you want to simply get rid of all shortcodes in excerpts, try this:

add_filter('pre_excerpt_content', 'shortcodes_trim');
function shortcodes_trim($content) {
	$content = preg_replace('/\[.*?\]/s', '', $content);
	return $content;
}

For Divi Page Builder, use this:

add_filter('pre_excerpt_content', 'trim_divi_shortcodes');
function trim_divi_shortcodes($content) {
    $content = preg_replace('/\[\/?et_pb.*?\]/', '', $content);
    return $content;
}

For Visual Composer, use this:

add_filter('pre_excerpt_content', 'trim_vc_shortcodes');
function trim_vc_shortcodes($content) {
    $content = preg_replace('/\[\/?vc.*?\]/', '', $content);
    $content = preg_replace('/\[\/?mk.*?\]/', '', $content);
    return $content;
}