PluginProbe
Elementor Website Builder – more than just a page builder / 3.26.0-dev4
Elementor Website Builder – more than just a page builder v3.26.0-dev4
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / core / isolation / elementor-adapter.php

elementor-adapter.php in Elementor Website Builder – more than just a page builder 3.26.0-dev4, at core/isolation/elementor-adapter.php

49 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Core\Isolation;
4
5 use Elementor\Plugin;
6 use Elementor\Modules\ElementorCounter\Module as Elementor_Counter_Module;
7 use Elementor\TemplateLibrary\Source_Local;
8
9 class Elementor_Adapter implements Elementor_Adapter_Interface {
10
11 public function get_kit_settings() {
12 return Plugin::$instance->kits_manager->get_kit_for_frontend()->get_settings();
13 }
14
15 public function get_main_post() {
16 return Plugin::$instance->kits_manager->get_kit_for_frontend()->get_main_post();
17 }
18
19 public function is_active_kit_default() : bool {
20 $kit_id = Plugin::$instance->kits_manager->get_active_id();
21
22 if ( false === $kit_id || null === $kit_id ) {
23 return false;
24 }
25
26 return esc_html__( 'Default Kit', 'elementor' ) === get_post( $kit_id )->post_title;
27 }
28
29 public function get_count( $key ): ?int {
30 return Elementor_Counter_Module::instance()->get_count( $key );
31 }
32
33 public function set_count( $key, $count = 0 ): void {
34 Elementor_Counter_Module::instance()->set_count( $key, $count );
35 }
36
37 public function increment( $key ): void {
38 Elementor_Counter_Module::instance()->increment( $key );
39 }
40
41 public function is_key_allowed( $key ): bool {
42 return Elementor_Counter_Module::instance()->is_key_allowed( $key );
43 }
44
45 public function get_template_type( $template_id ): string {
46 return Source_Local::get_template_type( $template_id );
47 }
48 }
49