-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfunctions.php
74 lines (71 loc) · 1.73 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
<?php
/**
* _s functions and definitions.
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package wds_block_based_theme
*/
/**
* Enqueue theme styles.
*/
function wds_block_based_theme_scripts() {
wp_enqueue_style(
'wdsbbt-theme-style',
get_stylesheet_directory_uri() . '/style.css',
array(),
filemtime( dirname( __FILE__ ) . '/style.css' )
);
}
add_action( 'wp_enqueue_scripts', 'wds_block_based_theme_scripts' );
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support post thumbnails.
*/
function wds_block_based_theme_setup() {
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'wp-block-styles' );
add_theme_support( 'align-wide' );
add_theme_support( 'custom-units' );
add_theme_support( 'block-nav-menus' );
add_theme_support(
'editor-color-palette',
array(
array(
'name' => __( 'strong magenta', 'wdsbbt' ),
'slug' => 'strong-magenta',
'color' => '#a156b4',
),
array(
'name' => __( 'very light gray', 'wdsbbt' ),
'slug' => 'very-light-gray',
'color' => '#f1f1f1',
),
)
);
add_theme_support(
'editor-font-sizes',
array(
array(
'name' => __( 'Small', 'wdsbbt' ),
'size' => 12,
'slug' => 'small',
),
array(
'name' => __( 'Regular', 'wdsbbt' ),
'size' => 16,
'slug' => 'regular',
),
array(
'name' => __( 'Large', 'wdsbbt' ),
'size' => 36,
'slug' => 'large',
),
)
);
}
add_action( 'after_setup_theme', 'wds_block_based_theme_setup' );