PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0
Elementor Website Builder – more than just a page builder v4.2.0
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 / pro-install / connect.php

connect.php in Elementor Website Builder – more than just a page builder 4.2.0, at modules/pro-install/connect.php

44 lines 885 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\ProInstall;
3
4 use Elementor\Core\Common\Modules\Connect\Apps\Library;
5 use Elementor\Utils as ElementorUtils;
6 use Elementor\Plugin;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 class Connect extends Library {
13
14 const API_URL = 'https://my.elementor.com/api/v2/artifacts/PLUGIN/';
15
16 public function get_title() {
17 return esc_html__( 'pro-install', 'elementor' );
18 }
19
20 protected function get_api_url() {
21 return static::API_URL . '/';
22 }
23
24 public function get_download_link() {
25 $response = $this->http_request(
26 'GET',
27 'latest/download-link',
28 [],
29 [
30 'return_type' => static::HTTP_RETURN_TYPE_ARRAY,
31 'with_error_data' => true,
32 ]
33 );
34
35 if ( is_wp_error( $response ) || empty( $response['downloadLink'] ) ) {
36 return false;
37 }
38
39 return $response['downloadLink'];
40 }
41
42 protected function init() {}
43 }
44