-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
51 lines (39 loc) · 1008 Bytes
/
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
51
<?php
/**
* **************************************************
*
* File Name: functions.php
* Description: This file contains the whole logic of this theme, sets some constants and includes various important files
*
* @since 1.0.0
*
* **************************************************
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) )
exit;
/**
*
* Define Codex theme constants
*
* @since 1.0.0
* @return void
*
*/
add_action( 'after_setup_theme', 'codex_constants' );
function codex_constants() {
if ( ! defined( 'THEME_NAME' ) )
define( 'THEME_NAME', 'Codex' );
if ( ! defined( 'THEME_VERSION' ) )
define( 'THEME_VERSION', '1.0.0' );
if ( ! defined( 'THEME_TEMPLATE_DIR' ) )
define( 'THEME_TEMPLATE_DIR', get_template_directory() );
if ( ! defined( 'THEME_TEMPLATE_URL' ) )
define( 'THEME_TEMPLATE_URL', get_template_directory_uri() );
}
/**
* Load all the additional files and features
*
* @since 1.0.0
*/
require 'includes/class-codex.php';