-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
78 lines (68 loc) · 1.84 KB
/
functions.php
File metadata and controls
78 lines (68 loc) · 1.84 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
74
75
76
77
78
<?php
if (!defined('NEXARA_VERSION')) {
// Replace the version number of the theme on each release.
define('NEXARA_VERSION', '0.1.0');
}
/*-----------------------------------------------------------
Enqueue Styles
------------------------------------------------------------*/
if (!function_exists('nexara_styles')) :
function nexara_styles()
{
// Register Stylesheet
wp_enqueue_style('nexara-style', trailingslashit(get_template_directory_uri()) . 'assets/css/style.css', array(), NEXARA_VERSION);
}
endif;
add_action('wp_enqueue_scripts', 'nexara_styles');
require get_template_directory() . '/includes/setup.php';
/**
* Register block styles.
*/
if ( ! function_exists( 'nexara_register_block_styles' ) ) :
/**
* Register custom block styles
*
* @since Nexara 1.0
* @return void
*/
function nexara_register_block_styles() {
if ( function_exists( 'register_block_style' ) ) :
register_block_style(
'core/list',
array(
'name' => 'checkmark-list',
'label' => __( 'Checkmark', 'nexara' ),
/*
* Styles for the custom checkmark list block style
*/
'inline_style' => '
ul.is-style-checkmark-list {
list-style-type: "\2714";
}
ul.is-style-checkmark-list li {
padding-inline-start: 1ch;
}',
)
);
register_block_style(
'core/navigation-link',
array(
'name' => 'arrow-link',
'label' => __( 'With arrow', 'nexara' ),
/*
* Styles for the custom arrow nav link block style
*/
'inline_style' => '
.is-style-arrow-link .wp-block-navigation-item__label:after {
content: "\2197";
padding-inline-start: 0.25rem;
vertical-align: middle;
text-decoration: none;
display: inline-block;
}',
)
);
endif;
}
endif;
add_action( 'init', 'nexara_register_block_styles' );