PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.2
Elementor Website Builder – more than just a page builder v4.2.2
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 | includes/api.php +5 -5 4.0.74.2.2 View file →
@@ -54,9 +54,9 @@
54 54 private static $api_feedback_url = 'https://my.elementor.com/api/v1/feedback/';
55 55
56 56 private static $api_library_info_url = 'https://my.elementor.com/api/v1/templates/info/';
57 57
58 - private static function get_info_data( $force_update = false, $additinal_status = false ) {
58 + private static function get_info_data( $force_update = false, $additional_status = false ) {
59 59 $cache_key = self::TRANSIENT_KEY_PREFIX . ELEMENTOR_VERSION;
60 60
61 61 $info_data = get_transient( $cache_key );
62 62
@@ -74,10 +74,10 @@
74 74 if ( ! empty( $site_key ) ) {
75 75 $body_request['site_key'] = $site_key;
76 76 }
77 77
78 - if ( ! empty( $additinal_status ) ) {
79 - $body_request['status'] = $additinal_status;
78 + if ( ! empty( $additional_status ) ) {
79 + $body_request['status'] = $additional_status;
80 80 $timeout = 3;
81 81 }
82 82
83 83 $response = wp_remote_get( self::$api_info_url, [
@@ -85,9 +85,9 @@
85 85 'body' => $body_request,
86 86 ] );
87 87
88 88 if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
89 - set_transient( $cache_key, [], 2 * HOUR_IN_SECONDS );
89 + set_transient( $cache_key, [ 'last_error' => gmdate( 'c' ) ], 2 * HOUR_IN_SECONDS );
90 90
91 91 return false;
92 92 }
93 93
@@ -93,9 +93,9 @@
93 93
94 94 $info_data = json_decode( wp_remote_retrieve_body( $response ), true );
95 95
96 96 if ( empty( $info_data ) || ! is_array( $info_data ) ) {
97 - set_transient( $cache_key, [], 2 * HOUR_IN_SECONDS );
97 + set_transient( $cache_key, [ 'last_error' => gmdate( 'c' ) ], 2 * HOUR_IN_SECONDS );
98 98
99 99 return false;
100 100 }
101 101