-
Notifications
You must be signed in to change notification settings - Fork 9
/
functions.php
65 lines (56 loc) · 2.06 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Note: Do not add any custom code here. Please use a child theme or custom functionality plugin so that your customizations are not lost during updates.
* http://codex.wordpress.org/Child_Themes
*/
/**
* Themedd only works with WordPress 4.7 or later.
*/
if ( version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) {
require get_template_directory() . '/includes/back-compat.php';
return;
}
/**
* Constants
*
* @since 1.0.0
*/
if ( ! defined( 'THEMEDD_VERSION' ) ) {
define( 'THEMEDD_VERSION', '1.0.8' );
}
if ( ! defined( 'THEMEDD_AUTHOR' ) ) {
define( 'THEMEDD_AUTHOR', 'Easy Digital Downloads' );
}
if ( ! defined( 'THEMEDD_NAME' ) ) {
define( 'THEMEDD_NAME', 'Themedd' );
}
if ( ! defined( 'THEMEDD_INCLUDES_DIR' ) ) {
define( 'THEMEDD_INCLUDES_DIR', trailingslashit( get_template_directory() ) . 'includes' );
}
if ( ! defined( 'THEMEDD_THEME_URL' ) ) {
define( 'THEMEDD_THEME_URL', trailingslashit( get_template_directory_uri() ) );
}
/**
* Includes
*
* @since 1.0.0
*/
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'setup.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'class-themedd.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'functions.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'scripts.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'template-tags.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'header.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'footer.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'actions.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'filters.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'customizer.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'compatibility.php' );
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . 'class-search.php' );
/**
* Admin page
*/
function themedd_updater() {
require_once( trailingslashit( THEMEDD_INCLUDES_DIR ) . '/updater/theme-updater.php' );
}
add_action( 'after_setup_theme', 'themedd_updater' );