-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
136 lines (123 loc) · 2.64 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
/**
* GeneratePress child theme functions and definitions.
*
* @package tabernawp/functions.php
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
};
/**
* Load Theme translations.
*
* @return void
*/
function cl_twp_theme_load_textdomain() {
load_theme_textdomain( 'tabernawp', get_theme_file_path() . '/languages' );
}
add_action( 'after_setup_theme', 'cl_twp_theme_load_textdomain' );
/**
* Load Gutemberg and Theme defaults.
*
* @return void
*/
/*
add_action(
'after_setup_theme',
function() {
// Disables custom colors in block color palette.
add_theme_support( 'disable-custom-colors' );
// Adds support for editor color palette.
add_theme_support(
'editor-color-palette',
array(
array(
'name' => __( 'Orange WP', 'tabernawp' ),
'slug' => 'orange-wp',
'color' => '#d0491c',
),
array(
'name' => __( 'Blue WP', 'tabernawp' ),
'slug' => 'blue-wp',
'color' => '#21759b',
),
array(
'name' => __( 'Light gray', 'tabernawp' ),
'slug' => 'light-gray',
'color' => '#f0f0f0',
),
array(
'name' => __( 'Pure White', 'tabernawp' ),
'slug' => 'pure-white',
'color' => '#fff',
),
array(
'name' => __( 'Pure Black', 'tabernawp' ),
'slug' => 'pure-black',
'color' => '#000',
),
)
);
}
);
*/
// Register fonts in GeneratePress Theme.
add_filter(
'generate_typography_default_fonts',
function( $fonts ) {
$fonts[] = 'Raleway';
$fonts[] = 'Grenze Gotisch';
return $fonts;
}
);
// Don't load Google Fonts or any other external fonts.
add_action(
'wp_enqueue_scripts',
function() {
wp_dequeue_style( 'generate-fonts' );
}
);
// Remove Google Fonts from the customizer.
add_action(
'admin_init',
function() {
add_filter( 'generate_google_fonts_array', '__return_empty_array' );
}
);
/**
* Change GeneratePress default color palettes.
*
* @param array $palettes GeneratePress array palettes, until 8 colors.
*
* @return array
*/
/*
function cl_gp_custom_color_palettes( $palettes ) {
// Could be 8 colors.
$palettes = array(
'#d0491c',
'#21759b',
'#f0f0f0',
'#ffffff',
'#000000',
);
return $palettes;
}
add_filter( 'generate_default_color_palettes', 'cl_gp_custom_color_palettes' );
*/
/**
* Change several comment form defaults like heading
*
* @param array $defaults Default params.
*
* @return array
*/
/*
function cl_custom_reply_title( $defaults ) {
$defaults['title_reply_before'] = '<h2 id="reply-title" class="comment-reply-title">';
$defaults['title_reply_after'] = '</h2>';
return $defaults;
}
add_filter( 'comment_form_defaults', 'cl_custom_reply_title' );
*/