-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloader.php
68 lines (56 loc) · 1.93 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/*
Plugin Name: DiRT Directory Client
Version: 1.2.0
Description: Interface with the DiRT Directory API http://dirt.projectbamboo.org
Author: Boone Gorges
Author URI: http://boone.gorg.es
Text Domain: dirt-directory-client
Domain Path: /languages
== Copyright ==
Copyright 2015 Boone Gorges (email: [email protected])
This program is distributed dually under the GNU General Public License,
version 3, and the Educational Community License, version 2.0.
See license-gpl-3.txt and license-ecl-2.txt for more information.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
License for more details.
*/
define( 'DDC_VERSION', '1.2.0' );
define( 'DDC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'DDC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
// Don't change these constants unless you know what you're doing.
if ( ! defined( 'DDC_ENDPOINT_BASE' ) ) {
define( 'DDC_ENDPOINT_BASE', 'http://dirtdirectory.org/' );
}
if ( ! defined( 'DDC_ENDPOINT_URL' ) ) {
define( 'DDC_ENDPOINT_URL', DDC_ENDPOINT_BASE . 'services/' );
}
if ( ! defined( 'DDC_IMAGE_BASE' ) ) {
define( 'DDC_IMAGE_BASE', DDC_ENDPOINT_BASE . 'sites/dirtdirectory.org/files/' );
}
require DDC_PLUGIN_DIR . 'includes/template.php';
require DDC_PLUGIN_DIR . 'includes/functions.php';
if ( is_admin() ) {
require DDC_PLUGIN_DIR . 'includes/admin.php';
}
/**
* Load plugin files.
*
* @since 1.0.0
*/
function ddc_include() {
require DDC_PLUGIN_DIR . 'includes/dirt-directory-client.php';
require DDC_PLUGIN_DIR . 'includes/bp-integration.php';
}
add_action( 'bp_include', 'ddc_include' );
/**
* Load plugin translations.
*
* @since 1.0.2
*/
function ddc_load_textdomain() {
load_plugin_textdomain( 'dirt-directory-client', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
add_action( 'plugins_loaded', 'ddc_load_textdomain' );