comparison
2 years ago
quick-view
3 years ago
swatches
3 years ago
wishlist
3 years ago
manifest.php
3 years ago
manifest.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ShopEngine\Modules; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | use ShopEngine\Core\Register\Module_List; |
| 8 | |
| 9 | class Manifest |
| 10 | { |
| 11 | public function init() { |
| 12 | |
| 13 | add_action('init', [$this, 'manifest_modules'], 0); |
| 14 | } |
| 15 | |
| 16 | public function manifest_modules() { |
| 17 | |
| 18 | foreach(Module_List::instance()->get_list(true, 'active') as $module) { |
| 19 | |
| 20 | if($module['status'] != 'active') { |
| 21 | continue; |
| 22 | } |
| 23 | if($module['package'] === 'pro-disabled') { |
| 24 | continue; |
| 25 | } |
| 26 | |
| 27 | if(isset($module['path'])) { |
| 28 | |
| 29 | $fl = $module['path'] . '/' . $module['slug'] . '.php'; |
| 30 | |
| 31 | if(file_exists($fl)) { |
| 32 | |
| 33 | require_once $fl; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | $module['base_class']::instance()->init(); |
| 38 | |
| 39 | } |
| 40 | |
| 41 | if ( !wp_doing_ajax() && !empty($_SERVER['REQUEST_URI']) && strpos(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])), 'wp-json/') === false ) { |
| 42 | do_action('shopengine/module/comparison-module-pro-support'); |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 |