| @@ -1,54 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Core\Isolation; |
| 4 | 4 | |
| 5 | -use Elementor\Core\Common\Modules\Connect\Module as ConnectModule; | |
| 6 | 5 | use Elementor\Plugin; |
| 7 | 6 | use Elementor\Modules\ElementorCounter\Module as Elementor_Counter_Module; |
| 8 | -use Elementor\TemplateLibrary\Source_Local; | |
| 9 | -use Elementor\Utils; | |
| 10 | 7 | |
| 11 | 8 | class Elementor_Adapter implements Elementor_Adapter_Interface { |
| 12 | - | |
| 13 | - public function get_kit_settings() { | |
| 14 | - return Plugin::$instance->kits_manager->get_kit_for_frontend()->get_settings(); | |
| 15 | - } | |
| 16 | - | |
| 17 | - public function get_main_post() { | |
| 18 | - return Plugin::$instance->kits_manager->get_kit_for_frontend()->get_main_post(); | |
| 19 | - } | |
| 20 | - | |
| 21 | - public function is_active_kit_default(): bool { | |
| 22 | - $kit_id = Plugin::$instance->kits_manager->get_active_id(); | |
| 23 | - | |
| 24 | - if ( false === $kit_id || null === $kit_id ) { | |
| 25 | - return false; | |
| 26 | - } | |
| 27 | - | |
| 28 | - return esc_html__( 'Default Kit', 'elementor' ) === get_post( $kit_id )->post_title; | |
| 29 | - } | |
| 30 | - | |
| 31 | - public function get_count( $key ): ?int { | |
| 32 | - return Elementor_Counter_Module::instance()->get_count( $key ); | |
| 33 | - } | |
| 34 | - | |
| 35 | - public function set_count( $key, $count = 0 ): void { | |
| 36 | - Elementor_Counter_Module::instance()->set_count( $key, $count ); | |
| 37 | - } | |
| 38 | - | |
| 39 | - public function increment( $key ): void { | |
| 40 | - Elementor_Counter_Module::instance()->increment( $key ); | |
| 41 | - } | |
| 42 | - | |
| 43 | - public function is_key_allowed( $key ): bool { | |
| 44 | - return Elementor_Counter_Module::instance()->is_key_allowed( $key ); | |
| 45 | - } | |
| 46 | - | |
| 47 | 9 | public function get_template_type( $template_id ): string { |
| 48 | - return Source_Local::get_template_type( $template_id ); | |
| 49 | - } | |
| 50 | - | |
| 51 | - public function get_tier(): string { | |
| 52 | - return Utils::has_pro() ? ConnectModule::ACCESS_TIER_PRO_LEGACY : ConnectModule::ACCESS_TIER_FREE; | |
| 10 | + return Plugin::$instance->documents->get( $template_id )->get_template_type(); | |
| 53 | 11 | } |
| 54 | 12 | } |