-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
61 lines (52 loc) · 1.5 KB
/
functions.php
File metadata and controls
61 lines (52 loc) · 1.5 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
<?php
/**
* LightSpeed Theme functions and definitions.
*
* @package ls-theme
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** Loads effect file */
require get_template_directory() . '/inc/animations.php';
/** Loads GSAP integration file */
require get_template_directory() . '/inc/gsap.php';
/**
* Sets up theme supports.
*/
function ls_theme_setup() {
// Make theme available for translation.
load_theme_textdomain( 'ls-theme', get_template_directory() . '/languages' );
// Add support for block styles.
add_theme_support( 'wp-block-styles' );
// Add support for editor styles.
add_theme_support( 'editor-styles' );
// Enqueue editor styles.
add_editor_style( 'style.css' );
}
add_action( 'after_setup_theme', 'ls_theme_setup' );
/**
* Enqueues front-end assets.
*
* Add CSS and JS files to assets/css/ and assets/js/ and uncomment
* the relevant lines below once those files exist.
*/
function ls_theme_enqueue_assets() {
// Main stylesheet (the theme header stylesheet is loaded automatically).
// Uncomment when assets/css/main.css exists:
// wp_enqueue_style(
// 'ls-theme-main',
// get_template_directory_uri() . '/assets/css/main.css',
// array(),
// wp_get_theme()->get( 'Version' )
// );
// Main JavaScript. Uncomment when assets/js/main.js exists:
// wp_enqueue_script(
// 'ls-theme-main',
// get_template_directory_uri() . '/assets/js/main.js',
// array(),
// wp_get_theme()->get( 'Version' ),
// true
// );
}
add_action( 'wp_enqueue_scripts', 'ls_theme_enqueue_assets' );