-
Notifications
You must be signed in to change notification settings - Fork 0
/
taro-custom-style.php
53 lines (50 loc) · 1.15 KB
/
taro-custom-style.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
<?php
/*
Plugin Name: Taro Custom Style
Plugin URI: https://wordpress.org/plugin/taro-custom-style
Description: Add custom css to each posts and taxonomies.
Author: TAROSKY INC.
Author URI: https://tarosky.co.jp
Text Domain: tcs
Domain Path: /languages/
License: GPL v3 or later.
Version: nightly
PHP Version: 5.4.0
*/
add_action( 'plugins_loaded', 'taro_custom_style_init' );
/**
* Bootstrap
*
* @package tcs
* @since 1.0.0
* @access private
*/
function taro_custom_style_init() {
// i18n.
load_plugin_textdomain( 'tcs', false, basename( dirname( __FILE__ ) ) . '/languages' );
// Load composer if exists.
require_once __DIR__ . '/vendor/autoload.php';
// Load all components.
foreach ( scandir( dirname( __FILE__ ) . '/includes' ) as $file ) {
if ( preg_match( '#^[^._].*\.php$#u', $file ) ) {
require dirname( __FILE__ ) . '/includes/' . $file;
}
}
}
/**
* Get version number
*
* @package tcs
* @since 1.0.0
* @return string
*/
function taro_custom_style_version() {
static $version = null;
if ( is_null( $version ) ) {
$info = get_file_data( __FILE__, [
'version' => 'Version',
] );
$version = $info['version'];
}
return $version;
}