PluginProbe
User Frontend – Membership, User Registration, User Profile, User Directory & Content Restriction with Frontend Post Submission / trunk
User Frontend – Membership, User Registration, User Profile, User Directory & Content Restriction with Frontend Post Submission vtrunk
4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.3 4.3.4 4.3.5 4.3.2 trunk 1.1 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.5 2.5.1 2.5.2 2.5.3 2.5.5 2.5.6 2.5.7 2.5.8 All 152 releases
wp-user-frontend / includes / API.php

API.php in User Frontend – Membership, User Registration, User Profile, User Directory & Content Restriction with Frontend Post Submission trunk, at includes/API.php

43 lines 752 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WeDevs\Wpuf;
4
5 use WeDevs\Wpuf\Api\FormList;
6 use WeDevs\Wpuf\Api\Subscription;
7 use WeDevs\WpUtils\ContainerTrait;
8
9 /**
10 * API class.
11 *
12 * Handle API.
13 */
14 class API {
15 use ContainerTrait;
16
17 /**
18 * Class constructor.
19 *
20 * @since 1.0.0
21 */
22 public function __construct() {
23 $this->subscription = new Subscription();
24 $this->form_list = new FormList();
25
26 add_action( 'rest_api_init', [ $this, 'init_api' ] );
27 }
28
29 /**
30 * API initialization
31 *
32 * @since 4.0.11
33 *
34 * @return void
35 */
36 public function init_api() {
37 foreach ( $this->container as $class ) {
38 $object = new $class();
39 $object->register_routes();
40 }
41 }
42 }
43