-
Notifications
You must be signed in to change notification settings - Fork 6
/
wcbtn-2018-api.php
45 lines (40 loc) · 1.3 KB
/
wcbtn-2018-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
42
43
44
45
<?php
/**
* WordCamp Brighton 2018 workshop plugin (wcbtn-2018-api).
*
* @package schlessera/wcbtn-2018-api
* @licence MIT
* @link https://schlessera.github.io/wcbtn-2018
*
* @wordpress-plugin
* Plugin Name: wcbtn-2018-api
* Plugin URI: https://schlessera.github.io/wcbtn-2018
* Description: Serverside API for the workshop "Using the REST API for WordPress-driven Apps" at WordCamp Brighton 2018.
* Version: 0.1.0
* Requires PHP: 5.6
* Author: Sean Blakeley & Alain Schlesser
* Text Domain: wcbtn-2018-api
* Domain Path: /languages
* License: MIT
* License URI: https://opensource.org/licenses/MIT
*/
namespace WordCampBrighton\API;
// Make sure this file is only run from within WordPress.
defined( 'ABSPATH' ) or die();
// Load Autoloader class and register plugin namespace.
require_once __DIR__ . '/src/Autoloader.php';
( new Autoloader() )
->add_namespace( __NAMESPACE__, __DIR__ . '/src' )
->register();
// Register activation and deactivation hooks.
register_activation_hook( __FILE__, function () {
PluginFactory::create()
->activate();
} );
register_deactivation_hook( __FILE__, function () {
PluginFactory::create()
->deactivate();
} );
// Hook plugin into WordPress request lifecycle.
PluginFactory::create()
->register();