-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
73 lines (57 loc) · 2.42 KB
/
functions.php
File metadata and controls
73 lines (57 loc) · 2.42 KB
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
<?php
/**
* Elementify functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Elementify
*/
$theme_version = wp_get_theme()->get( 'Version' );
if ( ! defined( 'ELEMENTIFY_VERSION' ) ) {
// Replace the version number of the theme on each release.
define( 'ELEMENTIFY_VERSION', $theme_version );
}
if ( ! defined( 'ELEMENTIFY_DIR_PATH' ) ) {
define( 'ELEMENTIFY_DIR_PATH', untrailingslashit( get_template_directory() ) );
}
if ( ! defined( 'ELEMENTIFY_DIR_URI' ) ) {
define( 'ELEMENTIFY_DIR_URI', untrailingslashit( get_template_directory_uri() ) );
}
if ( ! defined( 'ELEMENTIFY_BUILD_URI' ) ) {
define( 'ELEMENTIFY_BUILD_URI', untrailingslashit( get_template_directory_uri() ) . '/build' );
}
if ( ! defined( 'ELEMENTIFY_BUILD_PATH' ) ) {
define( 'ELEMENTIFY_BUILD_PATH', untrailingslashit( get_template_directory() ) . '/build' );
}
if ( ! defined( 'ELEMENTIFY_BUILD_JS_URI' ) ) {
define( 'ELEMENTIFY_BUILD_JS_URI', untrailingslashit( get_template_directory_uri() ) . '/build/js' );
}
if ( ! defined( 'ELEMENTIFY_BUILD_JS_DIR_PATH' ) ) {
define( 'ELEMENTIFY_BUILD_JS_DIR_PATH', untrailingslashit( get_template_directory() ) . '/build/js' );
}
if ( ! defined( 'ELEMENTIFY_IMG_URI' ) ) {
define( 'ELEMENTIFY_IMG_URI', untrailingslashit( get_template_directory_uri() ) . '/build/images' );
}
if ( ! defined( 'ELEMENTIFY_BUILD_CSS_URI' ) ) {
define( 'ELEMENTIFY_BUILD_CSS_URI', untrailingslashit( get_template_directory_uri() ) . '/build/css' );
}
if ( ! defined( 'ELEMENTIFY_BUILD_CSS_DIR_PATH' ) ) {
define( 'ELEMENTIFY_BUILD_CSS_DIR_PATH', untrailingslashit( get_template_directory() ) . '/build/css' );
}
if ( ! defined( 'ELEMENTIFY_BUILD_LIB_URI' ) ) {
define( 'ELEMENTIFY_BUILD_LIB_URI', untrailingslashit( get_template_directory_uri() ) . '/build/library' );
}
if ( ! defined( 'ELEMENTIFY_ARCHIVE_POST_PER_PAGE' ) ) {
define( 'ELEMENTIFY_ARCHIVE_POST_PER_PAGE', 9 );
}
if ( ! defined( 'ELEMENTIFY_SEARCH_RESULTS_POST_PER_PAGE' ) ) {
define( 'ELEMENTIFY_SEARCH_RESULTS_POST_PER_PAGE', 9 );
}
require_once ELEMENTIFY_DIR_PATH . '/inc/helpers/autoloader.php';
require_once ELEMENTIFY_DIR_PATH . '/inc/helpers/template-functions.php';
require_once ELEMENTIFY_DIR_PATH . '/inc/helpers/template-tags.php';
require_once ELEMENTIFY_DIR_PATH . '/inc/helpers/functions.php';
function elementify_get_theme_instance() {
new \Elementify\Inc\Elementify();
}
elementify_get_theme_instance();