PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.4
Elementor Website Builder – more than just a page builder v3.31.4
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
← All changes | modules/home/classes/transformations-manager.php +13 -8 4.0.73.31.4 View file →
@@ -2,9 +2,10 @@
2 2 namespace Elementor\Modules\Home\Classes;
3 3
4 4 use Elementor\Core\Isolation\Wordpress_Adapter;
5 5 use Elementor\Core\Isolation\Plugin_Status_Adapter;
6 -use Elementor\Includes\EditorAssetsAPI;
6 +use Elementor\Core\Isolation\Wordpress_Adapter_Interface;
7 +use Elementor\Plugin;
7 8
8 9 if ( ! defined( 'ABSPATH' ) ) {
9 10 exit; // Exit if accessed directly.
10 11 }
@@ -14,11 +15,12 @@
14 15 private static $cached_data = [];
15 16
16 17 private const TRANSFORMATIONS = [
17 18 'Create_New_Page_Url',
18 - 'Create_Edit_Website_Url',
19 + 'Filter_Plugins',
19 20 'Filter_Get_Started_By_License',
20 21 'Filter_Sidebar_Promotion_By_License',
22 + 'Filter_Condition_Introduction_Meta',
21 23 'Create_Site_Settings_Url',
22 24 'Filter_Top_Section_By_License',
23 25 ];
24 26
@@ -23,9 +25,9 @@
23 25 ];
24 26
25 27 protected array $home_screen_data;
26 28
27 - protected Wordpress_Adapter $wordpress_adapter;
29 + protected Wordpress_Adapter_Interface $wordpress_adapter;
28 30
29 31 protected Plugin_Status_Adapter $plugin_status_adapter;
30 32
31 33 protected array $transformation_classes = [];
@@ -30,19 +32,22 @@
30 32
31 33 protected array $transformation_classes = [];
32 34
33 35 public function __construct( $home_screen_data ) {
36 + $container = Plugin::$instance->elementor_container();
37 +
38 + if ( $container->has( Wordpress_Adapter::class ) ) {
39 + $this->wordpress_adapter = $container->get( Wordpress_Adapter::class );
40 + } else {
41 + $this->wordpress_adapter = new Wordpress_Adapter();
42 + }
43 +
34 44 $this->home_screen_data = $home_screen_data;
35 - $this->wordpress_adapter = new Wordpress_Adapter();
36 45 $this->plugin_status_adapter = new Plugin_Status_Adapter( $this->wordpress_adapter );
37 46 $this->transformation_classes = $this->get_transformation_classes();
38 47 }
39 48
40 49 public function run_transformations(): array {
41 - if ( ! EditorAssetsAPI::is_valid_data( $this->home_screen_data ) ) {
42 - return [];
43 - }
44 -
45 50 if ( ! empty( self::$cached_data ) ) {
46 51 return self::$cached_data;
47 52 }
48 53