-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore-functionality.php
More file actions
71 lines (53 loc) · 1.76 KB
/
core-functionality.php
File metadata and controls
71 lines (53 loc) · 1.76 KB
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
<?php
/**
* Plugin Name: Core Functionality
* Description: This plugin manages theme independent functionality, and should <strong>NOT BE DELETED</strong> unless you know what you are doing.
* Author: Secret Stache Media
* Author URI: http://www.secretstache.com
* Version: 1.0
*/
class CoreFunctionality{
function __construct(){
/** Define plugin constants */
add_action( 'plugins_loaded', array( &$this,'constants'), 1 );
/** Include plugin files */
add_action( 'plugins_loaded', array( &$this,'includes' ), 2 );
/** Register custom post types */
//add_action( 'init', array( &$this,'register_post_types' ), 3 );
/** Register taxonomies */
//add_action( 'init', array( &$this,'register_taxonomies' ), 4 );
}
/**
*
*/
function constants(){
/* Set constant path to the core functionality plugin directory. */
define( 'CORE_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
/* Set constant path to the members plugin URL. */
define( 'CORE_PLUGIN_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
}
/**
*
*/
function includes(){
/** Load custom post types */
require_once CORE_PLUGIN_DIR . 'includes/post-types.php';
/** Load custom taxonomies */
require_once CORE_PLUGIN_DIR . 'includes/taxonomies.php';
}
/**
*
*/
function register_post_types(){
/** Register the custom psot types */
add_action( 'init', 'register_cpt_REPLACE_ME' );
add_action( 'init', 'register_cpt_REPLACE_ME' );
}
/**
*
*/
function register_taxonomies(){
add_action( 'init', 'register_tax_REPLACE_ME' );
}
}
new CoreFunctionality();