Repository navigation
Expand file tree
/
Copy pathfunctions.php
More file actions
94 lines (85 loc) · 2.33 KB
/
Copy pathfunctions.php
File metadata and controls
94 lines (85 loc) · 2.33 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
if ( ! defined( 'AVISTA_VERSION' ) ) {
// Replace the version number of the theme on each release.
define( 'AVISTA_VERSION', '0.1.1' );
}
/**
* Enqueue scripts and styles.
*/
function avista_scripts() {
wp_enqueue_style( 'avista-style', trailingslashit( get_template_directory_uri() ) . 'assets/css/style.css', array(), AVISTA_VERSION );
}
add_action( 'wp_enqueue_scripts', 'avista_scripts' );
/**
* Enqueue Editor styles.
*/
function avista_enqueue_editor_block_styles() {
// Disable Core Block Patterns.
remove_theme_support( 'core-block-patterns' );
// Enqueue editor styles.
add_editor_style( trailingslashit( get_template_directory_uri() ) . 'assets/css/editor-style.css' );
}
add_action( 'after_setup_theme', 'avista_enqueue_editor_block_styles' );
/**
* Pattern categories.
*/
function avista_register_block_pattern_category() {
register_block_pattern_category(
'pricing',
array(
'label' => esc_html__( 'Pricing', 'avista' ),
)
);
}
add_action( 'init', 'avista_register_block_pattern_category' );
/**
* Register block styles.
*/
if ( ! function_exists( 'avista_register_block_styles' ) ) :
/**
* Register custom block styles
*
* @since Avista 1.0
* @return void
*/
function avista_register_block_styles() {
if ( function_exists( 'register_block_style' ) ) :
register_block_style(
'core/list',
array(
'name' => 'checkmark-list',
'label' => __( 'Checkmark', 'avista' ),
/*
* 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', 'avista' ),
/*
* 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', 'avista_register_block_styles' );