PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.13.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.13.1
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
bit-form / includes / API / Route / Routes.php

Routes.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.13.1, at includes/API/Route/Routes.php

68 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BitCode\BitForm\API\Route;
4
5 use BitCode\BitForm\API\Controller\EntryController;
6 use WP_REST_Controller;
7 use WP_REST_Server;
8
9 class Routes extends WP_REST_Controller
10 {
11 private $entryController;
12
13 protected $namespace;
14
15 protected $rest_base;
16
17 public function __construct()
18 {
19 $this->namespace = 'bitform';
20 $this->rest_base = 'v1';
21 $this->entryController = new EntryController();
22 }
23
24 public function register_routes()
25 {
26 /* google sheet route */
27 register_rest_route(
28 $this->namespace,
29 $this->rest_base . '/google/',
30 [
31 [
32 'methods' => WP_REST_Server::READABLE,
33 'callback' => [$this->entryController, 'googleAuth'],
34 'permission_callback' => '__return_true'
35 ]
36
37 ]
38 );
39 // oneDrive rest route
40 register_rest_route(
41 $this->namespace,
42 $this->rest_base . '/oneDrive/',
43 [
44 [
45 'methods' => WP_REST_Server::READABLE,
46 'callback' => [$this->entryController, 'oneDriveAuth'],
47 'permission_callback' => '__return_true'
48 ]
49
50 ]
51 );
52
53 // zoho
54 register_rest_route(
55 $this->namespace,
56 $this->rest_base . '/zoho/',
57 [
58 [
59 'methods' => WP_REST_Server::READABLE,
60 'callback' => [$this->entryController, 'authRedirect'],
61 'permission_callback' => '__return_true'
62 ]
63
64 ]
65 );
66 }
67 }
68