PluginProbe
Elementor Website Builder – more than just a page builder / 3.32.1
Elementor Website Builder – more than just a page builder v3.32.1
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 / modules / home / transformations / base / transformations-abstract.php

transformations-abstract.php in Elementor Website Builder – more than just a page builder 3.32.1, at modules/home/transformations/base/transformations-abstract.php

42 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\Home\Transformations\Base;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly.
6 }
7
8 use Elementor\Core\Isolation\Elementor_Adapter;
9 use Elementor\Core\Isolation\Elementor_Adapter_Interface;
10 use Elementor\Core\Isolation\Plugin_Status_Adapter;
11 use Elementor\Core\Isolation\Plugin_Status_Adapter_Interface;
12 use Elementor\Core\Isolation\Wordpress_Adapter;
13 use Elementor\Core\Isolation\Wordpress_Adapter_Interface;
14
15 abstract class Transformations_Abstract {
16
17 protected Wordpress_Adapter_Interface $wordpress_adapter;
18 protected Plugin_Status_Adapter_Interface $plugin_status_adapter;
19 protected Elementor_Adapter_Interface $elementor_adapter;
20
21 /**
22 * @param $args ?array{
23 * wordpress_adapter: Wordpress_Adapter_Interface,
24 * plugin_status_adapter: Plugin_Status_Adapter_Interface,
25 * elementor_adapter: Elementor_Adapter_Interface,
26 * } the adapters to use in the transformations
27 */
28 public function __construct( array $args = [] ) {
29 $this->wordpress_adapter = $args['wordpress_adapter'] ?? new Wordpress_Adapter();
30 $this->plugin_status_adapter = $args['plugin_status_adapter'] ?? new Plugin_Status_Adapter( $this->wordpress_adapter );
31 $this->elementor_adapter = $args['elementor_adapter'] ?? new Elementor_Adapter();
32 }
33
34 protected function get_tier() {
35 $tier = $this->elementor_adapter->get_tier();
36
37 return apply_filters( 'elementor/admin/homescreen_promotion_tier', $tier ) ?? $tier;
38 }
39
40 abstract public function transform( array $home_screen_data ): array;
41 }
42