modern-events-calendar-lite/app/addons/divi/includes/loader.php

15 lines
349 B
PHP
Raw Normal View History

2024-10-15 12:04:03 +02:00
<?php
if ( ! class_exists( 'ET_Builder_Element' ) ) {
return;
}
$module_files = glob( __DIR__ . '/modules/*/*.php' );
// Load custom Divi Builder modules
foreach ( (array) $module_files as $module_file ) {
if ( $module_file && preg_match( "/\/modules\/\b([^\/]+)\/\\1\.php$/", $module_file ) ) {
require_once $module_file;
}
}