PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0-beta1
Elementor Website Builder – more than just a page builder v4.2.0-beta1
4.3.0-beta3 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 All 452 releases
elementor / app / modules / site-builder / connect / app.php

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

45 lines 983 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\App\Modules\SiteBuilder\Connect;
3
4 use Elementor\Core\Common\Modules\Connect\Apps\Library;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly.
8 }
9
10 class App extends Library {
11 const API_URL = 'https://my.elementor.com/api/v2/builder/';
12
13 public function get_title() {
14 return esc_html__( 'Site Builder', 'elementor' );
15 }
16
17 protected function get_slug() {
18 return 'site-builder';
19 }
20
21 protected function get_api_url() {
22 if ( defined( 'ELEMENTOR_SITE_BUILDER_API_ORIGIN' ) ) {
23 return ELEMENTOR_SITE_BUILDER_API_ORIGIN . '/api/v2/builder/';
24 }
25
26 return static::API_URL;
27 }
28
29 public function get_home_screen() {
30 return $this->http_request(
31 'GET',
32 'website-planner/session/home-screen',
33 [
34 'headers' => [
35 'x-host-site-title' => (string) get_bloginfo( 'name' ),
36 'x-host-site-context' => (string) get_bloginfo( 'description' ),
37 ],
38 ],
39 [
40 'return_type' => static::HTTP_RETURN_TYPE_ARRAY,
41 ]
42 );
43 }
44 }
45