forked from ArRolin/codestar-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cs-framework.php
executable file
·83 lines (76 loc) · 3.64 KB
/
cs-framework.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
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
/**
*
* ------------------------------------------------------------------------------------------------
*
* Codestar Framework
* A Lightweight and easy-to-use WordPress Options Framework
*
* Plugin Name: Codestar Framework
* Plugin URI: http://codestarframework.com/
* Author: Codestar
* Author URI: http://codestarthemes.com/
* Version: 1.0.2
* Description: A Lightweight and easy-to-use WordPress Options Framework
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: cs-framework
*
* ------------------------------------------------------------------------------------------------
*
* Copyright 2015 Codestar <info@codestarthemes.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* ------------------------------------------------------------------------------------------------
*
*/
// ------------------------------------------------------------------------------------------------
require_once plugin_dir_path( __FILE__ ) .'/cs-framework-path.php';
// ------------------------------------------------------------------------------------------------
if( ! function_exists( 'cs_framework_init' ) && ! class_exists( 'CSFramework' ) ) {
function cs_framework_init() {
// active modules
defined( 'CS_ACTIVE_FRAMEWORK' ) or define( 'CS_ACTIVE_FRAMEWORK', true );
defined( 'CS_ACTIVE_METABOX' ) or define( 'CS_ACTIVE_METABOX', true );
defined( 'CS_ACTIVE_TAXONOMY' ) or define( 'CS_ACTIVE_TAXONOMY', true );
defined( 'CS_ACTIVE_SHORTCODE' ) or define( 'CS_ACTIVE_SHORTCODE', true );
defined( 'CS_ACTIVE_CUSTOMIZE' ) or define( 'CS_ACTIVE_CUSTOMIZE', true );
defined( 'CS_ACTIVE_LIGHT_THEME' ) or define( 'CS_ACTIVE_LIGHT_THEME', false );
// helpers
cs_locate_template( 'functions/deprecated.php' );
cs_locate_template( 'functions/fallback.php' );
cs_locate_template( 'functions/helpers.php' );
cs_locate_template( 'functions/actions.php' );
cs_locate_template( 'functions/enqueue.php' );
cs_locate_template( 'functions/sanitize.php' );
cs_locate_template( 'functions/validate.php' );
// classes
cs_locate_template( 'classes/abstract.class.php' );
cs_locate_template( 'classes/options.class.php' );
cs_locate_template( 'classes/framework.class.php' );
cs_locate_template( 'classes/metabox.class.php' );
cs_locate_template( 'classes/taxonomy.class.php' );
cs_locate_template( 'classes/shortcode.class.php' );
cs_locate_template( 'classes/customize.class.php' );
// configs
cs_locate_template( 'config/framework.config.php' );
cs_locate_template( 'config/metabox.config.php' );
cs_locate_template( 'config/taxonomy.config.php' );
cs_locate_template( 'config/shortcode.config.php' );
cs_locate_template( 'config/customize.config.php' );
}
add_action( 'init', 'cs_framework_init', 10 );
}