Repository navigation
Expand file tree
/
Copy pathfunctions.php
More file actions
63 lines (54 loc) · 1.53 KB
/
Copy pathfunctions.php
File metadata and controls
63 lines (54 loc) · 1.53 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
<?php
/**
* Dark Pastel functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package WordPress
* @subpackage Dark_Pastel
* @since Dark Pastel 0.1
*/
if ( ! function_exists( 'dark_pastel_support' ) ) {
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since Dark Pastel 0.1
* @since Dark Pastel 0.2 Removed 'wp-block-styles' theme support as it conflicts with layout styles.
*
* @return void
*/
function dark_pastel_support() {
// Enqueue editor styles.
add_editor_style( 'style.css' );
// Make theme available for translation.
load_theme_textdomain( 'dark-pastel', get_template_directory() . '/languages' );
}
}
add_action( 'after_setup_theme', 'dark_pastel_support' );
if ( ! function_exists( 'dark_pastel_styles' ) ) {
/**
* Enqueue styles.
*
* @since Dark Pastel 0.1
*
* @return void
*/
function dark_pastel_styles() {
// Register theme stylesheet.
$theme_version = wp_get_theme()->get( 'Version' );
$version_string = is_string( $theme_version ) ? $theme_version : false;
wp_register_style(
'dark-pastel-style',
get_template_directory_uri() . '/style.css',
array(),
$version_string
);
// Enqueue theme stylesheet.
wp_enqueue_style( 'dark-pastel-style' );
}
}
add_action( 'wp_enqueue_scripts', 'dark_pastel_styles' );
// Add block styles.
require_once get_template_directory() . '/inc/block-styles.php';
// Add block patterns.
require_once get_template_directory() . '/inc/block-patterns.php';