PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.2
Elementor Website Builder – more than just a page builder v4.0.2
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 / kit-library / data / kits / endpoints / download-link.php

download-link.php in Elementor Website Builder – more than just a page builder 4.0.2, at app/modules/kit-library/data/kits/endpoints/download-link.php

41 lines 859 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\KitLibrary\Data\Kits\Endpoints;
3
4 use Elementor\Data\V2\Base\Endpoint;
5 use Elementor\App\Modules\KitLibrary\Data\Kits\Controller;
6
7 if ( ! defined( 'ABSPATH' ) ) {
8 exit; // Exit if accessed directly.
9 }
10
11 /**
12 * @property Controller $controller
13 */
14 class Download_Link extends Endpoint {
15 public function get_name() {
16 return 'download-link';
17 }
18
19 public function get_format() {
20 return 'kits/download-link/{id}';
21 }
22
23 protected function register() {
24 $this->register_item_route( \WP_REST_Server::READABLE, [
25 'id_arg_type_regex' => '[\w]+',
26 ] );
27 }
28
29 public function get_item( $id, $request ) {
30 $repository = $this->controller->get_repository();
31 $data = $repository->get_download_link( $id );
32
33 return [
34 'data' => $data,
35 'meta' => [
36 'nonce' => wp_create_nonce( 'kit-library-import' ),
37 ],
38 ];
39 }
40 }
41