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

82 lines 1.8 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 /** OAuth redirect route */
27 /** mailchimp route */
28 register_rest_route(
29 $this->namespace,
30 $this->rest_base . '/oauth-redirect/',
31 [
32 [
33 'method' => WP_REST_Server::READABLE,
34 'callback' => [$this->entryController, 'authRedirect'],
35 'permission_callback'=> '__return_true'
36 ]
37 ]
38 );
39
40 /* google sheet route */
41 register_rest_route(
42 $this->namespace,
43 $this->rest_base . '/google/',
44 [
45 [
46 'methods' => WP_REST_Server::READABLE,
47 'callback' => [$this->entryController, 'authRedirect'],
48 'permission_callback' => '__return_true'
49 ]
50
51 ]
52 );
53 // oneDrive rest route
54 register_rest_route(
55 $this->namespace,
56 $this->rest_base . '/oneDrive/',
57 [
58 [
59 'methods' => WP_REST_Server::READABLE,
60 'callback' => [$this->entryController, 'authRedirect'],
61 'permission_callback' => '__return_true'
62 ]
63
64 ]
65 );
66
67 // zoho
68 register_rest_route(
69 $this->namespace,
70 $this->rest_base . '/zoho/',
71 [
72 [
73 'methods' => WP_REST_Server::READABLE,
74 'callback' => [$this->entryController, 'authRedirect'],
75 'permission_callback' => '__return_true'
76 ]
77
78 ]
79 );
80 }
81 }
82