-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaro-cpt-front.php
55 lines (51 loc) · 1.14 KB
/
taro-cpt-front.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
<?php
/**
Plugin Name: Taro CPT Front
Description: Custom post types can have a front page.
Plugin URI: https://wordpress.org/plugins/taro-cpt-front/
Author: Tarosky INC.
Version: nightly
Author URI: https://tarosky.co.jp/
License: GPL3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: tscptf
Domain Path: /languages
*/
defined( 'ABSPATH' ) or die();
/**
* Initializer.
*/
function ts_cptf_init() {
// Load text domain.
load_plugin_textdomain( 'tscptf', false, basename( __DIR__ ) . '/languages' );
// Initialize.
require_once __DIR__ . '/includes/functions.php';
require_once __DIR__ . '/includes/editor.php';
require_once __DIR__ . '/includes/settings.php';
require_once __DIR__ . '/includes/rewrite.php';
}
add_action( 'plugin_loaded', 'ts_cptf_init' );
/**
* Get plugin version.
*
* @return string
*/
function ts_cptf_version() {
static $version = '';
if ( $version ) {
return $version;
}
$info = get_file_data( __FILE__, array(
'version' => 'Version',
) );
$version = $info['version'];
return $version;
}
/**
* Get plugin root.
*
* @return string
*/
function ts_cptf_root() {
return __DIR__;
}