-
Notifications
You must be signed in to change notification settings - Fork 2
/
extend-theme-customizer.php
65 lines (47 loc) · 1.33 KB
/
extend-theme-customizer.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
56
57
58
59
60
61
62
<?php
/*
Plugin Name: Extend Json Theme Customizer
Plugin URI: https://github.com/1shiharaT/extend-theme-customizer
Description: Extend Json Theme Customizer
Version: 1.0
Author: Takashi Ishihara
Author URI: http://web-layman.com/
GitHub Plugin URI: 1shiharaT/extend-theme-customizer
GitHub Branch: master
*/
if ( ! defined( 'WPINC' ) ) {
exit;
}
/**
* defined Base Dir
*/
define( 'ETC_BASE_DIR', dirname( __FILE__ ) );
define( 'ETC_SLUG', dirname( __FILE__ ) );
/**
* Load plugin textdomain.
*
* @since 1.0
*/
add_action( 'plugins_loaded', 'etc_load_textdomain' );
function etc_load_textdomain() {
load_plugin_textdomain( 'extend-theme-customizer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
/**
* Include Class File
* @since 1.0
*/
require_once( dirname( __FILE__ ) . '/inc/class-etc-theme-customizer.php' );
require_once( dirname( __FILE__ ) . '/inc/class-wp-theme-customizer-import-json.php' );
/**
* Action Hook Plugin Loaded
* @since 1.0
*/
add_action( 'plugins_loaded', array( 'ETC_Theme_Customizer', 'get_instance' ) );
/**
* Load Admin Class
* @since 1.0
*/
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'admin/extend-theme-customizer-admin.php' );
add_action( 'plugins_loaded', array( 'ETC_Admin', 'get_instance' ) );
}