PluginProbe
Elementor Website Builder – more than just a page builder / 3.29.0-dev4
Elementor Website Builder – more than just a page builder v3.29.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
← All changes | modules/apps/admin-apps-page.php +18 -8 4.2.0-dev23.29.0-dev4 View file →
@@ -2,9 +2,9 @@
2 2 namespace Elementor\Modules\Apps;
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\Plugin;
7 7
8 8 if ( ! defined( 'ABSPATH' ) ) {
9 9 exit; // Exit if accessed directly.
10 10 }
@@ -46,9 +46,13 @@
46 46 }
47 47 }
48 48
49 49 private static function get_plugins(): array {
50 - if ( ! self::$wordpress_adapter ) {
50 + $container = Plugin::$instance->elementor_container();
51 +
52 + if ( $container->has( Wordpress_Adapter::class ) ) {
53 + self::$wordpress_adapter = $container->get( Wordpress_Adapter::class );
54 + } else if ( ! self::$wordpress_adapter ) {
51 55 self::$wordpress_adapter = new Wordpress_Adapter();
52 56 }
53 57
54 58 if ( ! self::$plugin_status_adapter ) {
@@ -60,15 +64,21 @@
60 64 return static::filter_apps( $apps );
61 65 }
62 66
63 67 private static function get_remote_apps() {
64 - $editor_assets_api = new EditorAssetsAPI( [
65 - EditorAssetsAPI::ASSETS_DATA_URL => static::APPS_URL,
66 - EditorAssetsAPI::ASSETS_DATA_TRANSIENT_KEY => '_elementor_apps_data',
67 - EditorAssetsAPI::ASSETS_DATA_KEY => 'apps',
68 - ] );
68 + $apps = wp_remote_get( static::APPS_URL );
69 69
70 - return $editor_assets_api->get_assets_data();
70 + if ( is_wp_error( $apps ) ) {
71 + return [];
72 + }
73 +
74 + $apps = json_decode( wp_remote_retrieve_body( $apps ), true );
75 +
76 + if ( empty( $apps['apps'] ) || ! is_array( $apps['apps'] ) ) {
77 + return [];
78 + }
79 +
80 + return $apps['apps'];
71 81 }
72 82
73 83 private static function filter_apps( $apps ) {
74 84 $filtered_apps = [];