/
simple-course-creator-customizer.php
86 lines (72 loc) · 2.41 KB
/
simple-course-creator-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
* Plugin Name: Simple Course Creator - Customizer
* Plugin URI: https://github.com/SDavisMedia/simple-course-creator-customizer
* Description: Customizer the Simple Course Creator output with the WordPress theme customizer
* Version: 1.0.5
* Author: Sean Davis
* Author URI: https://github.com/SDavisMedia/
* License: GPL2
* Requires at least: 3.8
* Tested up to: 5.3
* Text Domain: scc_customizer
* Domain Path: /languages/
*
* This plugin is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This plugin is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see http://www.gnu.org/licenses/.
*
* @package Simple Course Creator
* @category Customizer
* @author Sean Davis
* @license GNU GENERAL PUBLIC LICENSE Version 2 - /license.txt
*/
if ( ! defined( 'ABSPATH' ) ) exit; // No accessing this file directly
/**
* primary class for Simple Course Creator Customizer
*
* @since 1.0.0
*/
class Simple_Course_Creator_Customizer {
/**
* constructor for Simple_Course_Creator_Customizer class
*
* Set up the basic plugin environment and with definitions,
* plugin information, and required plugin files.
*/
public function __construct() {
// define plugin name
define( 'SCCC_NAME', 'Simple Course Creator Customizer' );
// define plugin version
define( 'SCCC_VERSION', '1.0.5' );
// define plugin directory
define( 'SCCC_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
// define plugin root file
define( 'SCCC_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
// load text domain
add_action( 'init', array( $this, 'load_textdomain' ) );
// require additional plugin files
$this->includes();
}
/**
* load SCC Customizer textdomain
*/
public function load_textdomain() {
load_plugin_textdomain( 'scc_customizer', false, SCCC_DIR . 'languages/' );
}
/**
* require additional plugin files
*/
private function includes() {
require_once( SCCC_DIR . 'includes/admin/class-scc-customizer.php' ); // customizer class
}
}
new Simple_Course_Creator_Customizer();