| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! class_exists( 'ET_Builder_Element' ) ) { |
| 4 |
return; |
| 5 |
} |
| 6 |
|
| 7 |
$module_files = glob( __DIR__ . '/modules/*/*.php' ); |
| 8 |
|
| 9 |
// Load custom Divi Builder modules |
| 10 |
foreach ( (array) $module_files as $module_file ) { |
| 11 |
if ( $module_file && preg_match( "/\/modules\/\b([^\/]+)\/\\1\.php$/", $module_file ) ) { |
| 12 |
if ( str_ends_with( $module_file, '/user-listing/user-listing.php' ) ){ |
| 13 |
if( defined( 'WPPB_PAID_PLUGIN_URL' ) && wppb_check_if_add_on_is_active( 'wppb_userListing' ) && file_exists( WPPB_PAID_PLUGIN_DIR . '/add-ons/user-listing/assets/misc/gutenberg-blocks/user-listing/user-listing.php' ) ) |
| 14 |
require_once $module_file; |
| 15 |
} else { |
| 16 |
require_once $module_file; |
| 17 |
} |
| 18 |
} |
| 19 |
} |
| 20 |
|