| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\SiteNavigation; |
| 4 |
|
| 5 |
use Elementor\Core\Base\Module as Module_Base; |
| 6 |
use Elementor\Modules\SiteNavigation\Data\Controller; |
| 7 |
use Elementor\Plugin; |
| 8 |
use Elementor\Utils; |
| 9 |
|
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
exit; // Exit if accessed directly |
| 12 |
} |
| 13 |
|
| 14 |
class Module extends Module_Base { |
| 15 |
|
| 16 |
/** |
| 17 |
* Initialize the Container-Converter module. |
| 18 |
* |
| 19 |
* @return void |
| 20 |
*/ |
| 21 |
public function __construct() { |
| 22 |
Plugin::$instance->data_manager_v2->register_controller( new Controller() ); |
| 23 |
|
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* Retrieve the module name. |
| 28 |
* |
| 29 |
* @return string |
| 30 |
*/ |
| 31 |
public function get_name() { |
| 32 |
return 'site-navigation'; |
| 33 |
} |
| 34 |
|
| 35 |
/** |
| 36 |
* Determine whether the module is active. |
| 37 |
* |
| 38 |
* @return bool |
| 39 |
*/ |
| 40 |
public static function is_active() { |
| 41 |
if ( Utils::is_elementor_tests() ) { |
| 42 |
return true; |
| 43 |
} |
| 44 |
|
| 45 |
return Plugin::$instance->experiments->is_feature_active( 'editor_v2' ); |
| 46 |
} |
| 47 |
} |
| 48 |
|