-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
65 lines (58 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
60
61
62
63
64
65
<?php
/**
* Functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Beli
* @since 1.0.0
*/
if ( ! function_exists( 'beli_assets' ) ) {
/**
* Enqueue the style.css file.
*
* @since 1.0.0
*/
function beli_assets() {
wp_enqueue_style(
'beli-style',
get_theme_file_uri( '/assets/css/beli.css' ),
array(),
wp_get_theme()->get( 'Version' )
);
wp_enqueue_style(
'beli-main-style',
get_stylesheet_uri(),
array(),
wp_get_theme()->get( 'Version' )
);
}
}
add_action( 'wp_enqueue_scripts', 'beli_assets' );
if( ! function_exists( 'beli_setup' ) ) {
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since 1.0.0
*/
function beli_setup() {
// Add support for block styles.
add_theme_support( 'wp-block-styles' );
// Enqueue editor styles.
add_editor_style( './assets/css/beli.css' );
}
}
add_action( 'after_setup_theme', 'beli_setup' );
if( ! function_exists( 'beli_register_block_pattern_category' ) ) {
/**
* Register category for block pattern
*
* @return void
*/
function beli_register_block_pattern_category() {
register_block_pattern_category( 'beli', array(
'label' => __( 'Beli', 'beli' )
) );
}
}
add_action( 'init', 'beli_register_block_pattern_category' );