forked from scribu/wp-term-management-tools
-
Notifications
You must be signed in to change notification settings - Fork 4
/
term-management-tools.php
45 lines (39 loc) · 1.16 KB
/
term-management-tools.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
<?php
/*
Plugin Name: Term Management Tools
Version: 2.0.1
Description: Allows you to merge terms, move terms between taxonomies, and set term parents, individually or in bulk. The "Change Taxonomy" option supports WPML-translated terms.
Author: theMikeD, scribu
Author URI: https://www.codenamemiked.com
Plugin URI: https://www.codenamemiked.com/plugins/term-management-tools/
Text Domain: term-management-tools
Domain Path: /lang
Requires PHP: 7.1
*/
define( 'CNMD_TMT_PLUGIN_URL_RELATIVE', basename( dirname( __FILE__ ) ) );
define( 'CNMD_TMT_URL', plugin_dir_url( __FILE__ ) );
/**
* The class autoloader.
*/
spl_autoload_register(
function( $class ) {
// We only care about CNMD-namespaced classes
if ( ! preg_match( '/^CNMD\\\TMT/', $class ) ) {
return;
}
$filepath = str_replace( '\\', DIRECTORY_SEPARATOR, $class ) . '.php';
$filename = plugin_dir_path( __FILE__ ) . '/classes/class-' . basename( $filepath );
if ( file_exists( $filename ) ) {
include_once $filename;
return;
}
}
);
/**
* Initialize the plugin.
*/
function init_term_management_tools() {
$tmt = new \CNMD\TMT\TermManagementTools();
$tmt->init();
}
init_term_management_tools();