-
Notifications
You must be signed in to change notification settings - Fork 0
/
loader.php
38 lines (31 loc) · 885 Bytes
/
loader.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
<?php
/**
* Plugin Name: TAPoR Client
* Description: Integration with the Text Analysis Portal for Research (TAPoR 3).
* Plugin URI: https://commons.gc.cuny.edu
* Author: The CUNY Academic Commons
* Author URI: https://commons.gc.cuny.edu
* Version: 1.0.0
* License: GPL2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'TAPOR_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'TAPOR_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'TAPOR_URL', 'http://tapor.ca/' );
define( 'TAPOR_ENDPOINT_URL', TAPOR_URL . 'api/' );
require __DIR__ . '/autoload.php';
/**
* Shorthand function to fetch our TAPoR plugin instance.
*
* @since 0.1.0
*/
function tapor_app() {
return \CAC\TAPoR\App::get_instance();
}
add_action( 'plugins_loaded', function() {
tapor_app()->init();
} );