-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
71 lines (56 loc) · 2.21 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
66
67
68
69
70
71
<?php
/**
* Hello! Pro 3
*
* This file adds functions to the Hello Pro 3 Theme.
*
* @package Hello Pro
* @author brandiD
* @license GPL-2.0+
* @link http://my.studiopress.com/themes/hello/
*/
// Start Genesis.
require_once get_template_directory() . '/lib/init.php';
// Load constants - use constants in code instead of functions to improve performance. Hat Tip to Tonya at Knowthecode.io.
$child_theme = wp_get_theme( get_stylesheet_directory() );
// Child theme variables (do not remove).
define( 'CHILD_THEME_HANDLE', sanitize_title_with_dashes( wp_get_theme()->get( 'Name' ) ) );
define( 'CHILD_THEME_VERSION', wp_get_theme()->get( 'Version' ) );
// Set up the Theme.
require_once get_stylesheet_directory() . '/lib/theme-defaults.php';
// Set Localization (do not remove).
add_action( 'after_setup_theme', 'hello_pro_localization_setup' );
/**
* Loads text Domain
*
* @since 3.0.1
*/
function hello_pro_localization_setup() {
load_child_theme_textdomain( 'hello-pro', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'hello-pro' ) );
}
// Add Theme setup functions.
require_once get_stylesheet_directory() . '/lib/theme-setup.php';
// Add the onboarding functions.
require_once get_stylesheet_directory() . '/lib/onboarding-functions.php';
// Add the custom meta boxes.
require_once get_stylesheet_directory() . '/lib/metaboxes.php';
// Import Customizer custom toggle control.
require_once get_stylesheet_directory() . '/lib/class-hello-pro-toggle-control.php';
// Add Customizer settings.
require_once get_stylesheet_directory() . '/lib/customize.php';
// Includes Customizer CSS.
require_once get_stylesheet_directory() . '/lib/output.php';
// Add Gutenberg functions.
add_action( 'after_setup_theme', 'genesis_child_gutenberg_support' );
/**
* Enqueues the block editor stylesheet.
*/
function genesis_child_gutenberg_support() {
require_once get_stylesheet_directory() . '/lib/gutenberg/init.php';
}
// Add helper functions.
require_once get_stylesheet_directory() . '/lib/helper-functions.php';
// Add scripts and styles.
require_once get_stylesheet_directory() . '/lib/load-scripts.php';
// Add the blog functions.
require_once get_stylesheet_directory() . '/lib/blog-functions.php';