-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
134 lines (113 loc) · 3.26 KB
/
functions.php
File metadata and controls
134 lines (113 loc) · 3.26 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
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
<?php
/**
* Theme functions and definitions
*
* @package Siggen
* @since Siggen 1.0
*/
if ( ! function_exists( 'siggen_setup' ) ) {
/**
* Set up theme defaults and registers support for various WordPress features
*/
function siggen_setup() {
/**
* Support for translation files
* https://codex.wordpress.org/Function_Reference/load_theme_textdomain
*/
load_theme_textdomain( 'siggen', get_template_directory() . '/languages' );
/**
* Main content width
* https://codex.wordpress.org/Content_Width
*/
if ( ! isset( $content_width ) ) {
$content_width = 960;
}
/**
* Register support for various WordPress features
*/
/* https://codex.wordpress.org/Automatic_Feed_Links */
add_theme_support( 'automatic-feed-links' );
/* https://codex.wordpress.org/Title_Tag */
add_theme_support( 'title-tag' );
/* https://codex.wordpress.org/Theme_Logo */
add_theme_support( 'custom-logo' );
/* https://codex.wordpress.org/Post_Thumbnails */
add_theme_support( 'post-thumbnails' );
add_theme_support( 'align-wide' );
/* https://codex.wordpress.org/Custom_Backgrounds */
add_theme_support(
'custom-background',
array(
'default-color' => '0a0909',
'default-repeat' => 'repeat',
'default-attachment' => 'scroll',
)
);
/* https://codex.wordpress.org/Theme_Markup */
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
)
);
/* https://codex.wordpress.org/Post_Formats */
add_theme_support(
'post-formats',
array(
'aside',
'gallery',
'link',
'image',
'quote',
'status',
'video',
'audio',
'chat',
)
);
/* https://codex.wordpress.org/Custom_Headers */
add_theme_support(
'custom-header',
array(
'default-image' => '%s/assets/images/piano.jpg',
'random-default' => false,
'width' => 1440,
'height' => 500,
'flex-height' => true,
'flex-width' => true,
'header-text' => false,
'uploads' => true,
)
);
/* https://wordpress.org/gutenberg/handbook/designers-developers/developers/themes/theme-support/#responsive-embedded-content */
add_theme_support( 'responsive-embeds' );
/* https://codex.wordpress.org/Function_Reference/register_default_headers */
register_default_headers(
array(
'piano' => array(
'url' => '%s/assets/images/piano.jpg',
'thumbnail_url' => '%s/assets/images/piano_thumbnail.jpg',
'description' => __( 'piano', 'siggen' ),
),
)
);
/* Navigation */
register_nav_menus(
array(
'header' => __( 'Header', 'siggen' ),
'footer' => __( 'Footer', 'siggen' ),
)
);
}
add_action( 'after_setup_theme', 'siggen_setup' );
}
// Actions.
require_once get_template_directory() . '/inc/actions.php';
// Filters.
require_once get_template_directory() . '/inc/filters.php';
// Theme specific functions.
require_once get_template_directory() . '/inc/theme-functions.php';