forked from mirkoschubert/divi-child
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
59 lines (42 loc) · 1.31 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
<?php
if (!defined('ABSPATH')) die();
define('DIVI_CHILD_VERSION', '2.0.6');
// INFO: Setup
/**
* STATIC: Load all scripts and styles
*/
function divi_child_enqueue_scripts() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style('divi-fonts', get_stylesheet_directory_uri() . '/assets/css/fonts.css');
wp_enqueue_script( 'divi-scripts', get_stylesheet_directory_uri() . '/assets/js/main.js', array(), null, true);
}
add_action( 'wp_enqueue_scripts', 'divi_child_enqueue_scripts' );
/**
* STATIC: Load all language files
*/
function divi_child_languages() {
load_child_theme_textdomain('divi-child', get_stylesheet_directory() . '/languages');
}
add_action( 'after_setup_theme', 'divi_child_languages');
/**
* STATIC: Custom Body Class for Child Theme
*/
function divi_child_body_class( $classes ) {
$classes[] = 'child';
return $classes;
}
add_action( 'body_class', 'divi_child_body_class' );
// Admin
include_once('admin/admin.php');
// Helpers
include_once('includes/helpers.php');
// GDPR
include_once('includes/child_gdpr.php');
// Bugfixes
include_once('includes/child_bugfixes.php');
// Pagespeed
include_once('includes/child_pagespeed.php');
// Miscellaneous
include_once('includes/child_misc.php');
/** -------- Add your own code after this! -------- **/
?>