-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwapuus-api.php
41 lines (36 loc) · 1.06 KB
/
wapuus-api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Plugin Name: Wapuus API
* Plugin URI: https://api.wapuus.org/
* Description: A simple plugin that implements the API used by the wapuus.org project.
* Version: 1.0.0
* Author: Glauber Silva
* Author URI: https://glaubersilva.me/
* License: GPLv2 or later
* Text Domain: wapuus-api
* Domain Path: /languages
*
* @package Wapuus_API
* @author Glauber Silva <[email protected]>
* @link https://glaubersilva.me/
*/
defined( 'ABSPATH' ) || exit;
/**
* Constants
*/
define( 'WAPUUS_API_DIR', dirname( __FILE__ ) );
/**
* Initial Setup
*/
require_once WAPUUS_API_DIR . '/autoload.php';
require_once WAPUUS_API_DIR . '/src/helpers.php';
\Wapuus_API\Src\Classes\General_Tweaks::get_instance();
\Wapuus_API\Src\Classes\Wapuus_Custom_Post_Type::get_instance();
/**
* API V1 files - Legacy Code was left in the project just to demonstrate how to extend the WP API without using classes.
*/
require_once WAPUUS_API_DIR . '/legacy/load-endpoints-v1.php';
/**
* API V2 classes are loaded by this class.
*/
new \Wapuus_API\Src\Classes\Load_Endpoints_V2();