PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.9.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.9.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.9.1, at includes/API/Route/Routes.php

64 lines 1.4 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 public function __construct()
14 {
15 $this->namespace = 'bitform';
16 $this->rest_base = 'v1';
17 $this->entryController = new EntryController();
18 }
19
20 public function register_routes()
21 {
22 /* google sheet route */
23 register_rest_route(
24 $this->namespace,
25 $this->rest_base . '/google/',
26 [
27 [
28 'methods' => WP_REST_Server::READABLE,
29 'callback' => [$this->entryController, 'googleAuth'],
30 'permission_callback' => '__return_true'
31 ]
32
33 ]
34 );
35 // oneDrive rest route
36 register_rest_route(
37 $this->namespace,
38 $this->rest_base . '/oneDrive/',
39 [
40 [
41 'methods' => WP_REST_Server::READABLE,
42 'callback' => [$this->entryController, 'oneDriveAuth'],
43 'permission_callback' => '__return_true'
44 ]
45
46 ]
47 );
48
49 // zoho
50 register_rest_route(
51 $this->namespace,
52 $this->rest_base . '/zoho/',
53 [
54 [
55 'methods' => WP_REST_Server::READABLE,
56 'callback' => [$this->entryController, 'authRedirect'],
57 'permission_callback' => '__return_true'
58 ]
59
60 ]
61 );
62 }
63 }
64