-
Notifications
You must be signed in to change notification settings - Fork 4
/
wp-term-families.php
51 lines (42 loc) · 1.23 KB
/
wp-term-families.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
<?php
/**
* Plugin Name: WP Term Families
* Plugin URI: https://wordpress.org/plugins/wp-term-families/
* Author: John James Jacoby
* Author URI: https://profiles.wordpress.org/johnjamesjacoby/
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Description: Families for taxonomy terms
* Version: 2.0.0
* Text Domain: wp-term-families
* Domain Path: /assets/lang/
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
/**
* Instantiate the main WordPress Term Family class
*
* @since 0.1.0
*/
function _wp_term_families() {
// Setup the main file
$plugin_path = plugin_dir_path( __FILE__ );
// Classes
require_once $plugin_path . '/includes/class-wp-term-meta-ui.php';
require_once $plugin_path . '/includes/class-wp-term-family.php';
// Functions
require_once $plugin_path . '/includes/functions.php';
}
add_action( 'plugins_loaded', '_wp_term_families' );
/**
* Initialize the main WordPress Term Family class
*
* @since 0.1.0
*/
function _wp_term_families_init() {
// Allow term families to be registered
do_action( 'wp_register_term_families' );
// Activate term family
new WP_Term_Family( __FILE__ );
}
add_action( 'init', '_wp_term_families_init', 75 );