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

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