-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
50 lines (42 loc) · 1.83 KB
/
functions.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
<?php
/*
|--------------------------------------------------------------------------
| default theme constants & repeating variables
| * do not change
|--------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------- */
/* Basic Theme Settings
/* ---------------------------------------------------------------------- */
$shortname = get_template();
//WP 3.4+ only
$themeData = wp_get_theme( $shortname );
$themeName = $themeData->Name;
$themeName = str_replace( ' ', '', $themeName );
//Basic constants
define( 'SP_THEME_NAME', strtoupper($themeName) );
define( 'SP_TEXT_DOMAIN', strtolower($themeName) );
define( 'SP_SCRIPTS_VERSION', '20140701' ); // yyyymmdd
define( 'SP_BASE_DIR', get_template_directory() . '/' );
define( 'SP_BASE_URL', get_template_directory_uri() . '/' );
define( 'SP_ASSETS_THEME', get_template_directory_uri() . '/assets/' );
define( 'SP_ASSETS_ADMIN', get_template_directory_uri() . '/library/assets/' );
//Custom post WordPress admin menu position - 30, 33, 39, 42, 45, 48
if ( ! isset( $cp_menu_position ) )
$cp_menu_position = array(
'menu_tv' => 5,
'menu_radio' => 5,
'menu_team' => 5,
'menu_document' => 5,
'menu_gallery' => 5,
);
/* ---------------------------------------------------------------------- */
/* Load some backend functions
/* ---------------------------------------------------------------------- */
/* theme setup */
load_template( SP_BASE_DIR . 'library/functions/theme-setup.php');
load_template( SP_BASE_DIR . 'library/functions/aq_resizer.php');
load_template( SP_BASE_DIR . 'library/functions/theme-functions.php');
load_template( SP_BASE_DIR . 'library/functions/dynamic-styles.php' );
//Theme Admin
load_template( SP_BASE_DIR . 'library/functions/admin-functions.php' );