filebird-dashboard-cross-sell
3 months ago
filebird-notification-cross-sell
3 months ago
filebird-sidebar-popup-cross-sell
3 months ago
.source
3 months ago
loader.php
3 months ago
registry.php
3 months ago
loader.php
24 lines
| 1 | <?php |
| 2 | /** |
| 3 | * YayCrossSell consumer loader. |
| 4 | * |
| 5 | * Required by each consumer plugin's main file: |
| 6 | * require_once __DIR__ . '/cross-sell/loader.php'; |
| 7 | * |
| 8 | * Probes both layouts so the same file works in: |
| 9 | * - source repo: modules/<name>/register.php |
| 10 | * - synced consumer dir: <name>/register.php (modules/ wrapper flattened) |
| 11 | */ |
| 12 | |
| 13 | defined('ABSPATH') || exit; |
| 14 | |
| 15 | require_once __DIR__ . '/registry.php'; |
| 16 | |
| 17 | $globs = glob(__DIR__ . '/*/register.php') |
| 18 | ?: glob(__DIR__ . '/modules/*/register.php') |
| 19 | ?: []; |
| 20 | |
| 21 | foreach ($globs as $register) { |
| 22 | require_once $register; |
| 23 | } |
| 24 |