-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeloopcustom.php
79 lines (66 loc) · 2.09 KB
/
feloopcustom.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
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* Plugin Name: feloopCustom
* Version: 1.0.0
* Plugin URI: http://www.hughlashbrooke.com/
* Description: This is your starter template for your next WordPress plugin.
* Author: Hugh Lashbrooke
* Author URI: http://www.hughlashbrooke.com/
* Requires at least: 4.0
* Tested up to: 4.0
*
* Text Domain: feloopcustom
* Domain Path: /lang/
*
* @package WordPress
* @author Hugh Lashbrooke
* @since 1.0.0
*/
if (!defined('ABSPATH')) {
exit;
}
if (!defined('FELOOPC_DIR')) {
define('FELOOPC_DIR', plugin_dir_path(__FILE__));
}
if (!defined('FELOOPC_NAME')) {
define('FELOOPC_NAME', plugin_basename(__FILE__));
}
if (!defined('FELOOPC_URL')) {
define('FELOOPC_URL', plugin_dir_url(__FILE__));
}
if (!defined('FELOOPC_PATH')) {
define('FELOOPC_PATH', __FILE__);
}
// Helper Functions
require_once 'includes/helpers.php';
// Load plugin class files.
require_once 'includes/class-feloopcustom.php';
require_once 'includes/class-feloopcustom-settings.php';
// Load plugin libraries.
require_once 'includes/lib/class-feloopcustom-admin-api.php';
require_once 'includes/lib/class-feloopcustom-post-type.php';
require_once 'includes/lib/class-feloopcustom-taxonomy.php';
/**
* Returns the main instance of feloopCustom to prevent the need to use globals.
*
* @since 1.0.0
* @return feloopCustom feloopCustom
*/
function feloopcustom(): feloopCustom
{
$instance = feloopCustom::instance(__FILE__, '1.0.0');
if (is_null($instance->settings)) {
$instance->settings = feloopCustom_Settings::instance($instance);
}
return $instance;
}
// Add Actions
require_once FELOOPC_DIR . 'includes/actions/StylesToDashboard.php';
require_once FELOOPC_DIR . 'includes/actions/ChangePostLabel.php';
// Add Filters
require_once FELOOPC_DIR . 'includes/filters/CustomPostTypes.php';
require_once FELOOPC_DIR . 'includes/filters/CustomTaxonomies.php';
require_once FELOOPC_DIR . 'includes/filters/CustomShortcodeGallery.php';
require_once FELOOPC_DIR . 'includes/filters/CustomAttachmentImage.php';
// Add Shortcodes
require_once FELOOPC_DIR . 'includes/shortcodes/customShortcodes.php';