-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
95 lines (83 loc) · 2.05 KB
/
Copy pathfunctions.php
File metadata and controls
95 lines (83 loc) · 2.05 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
<?php
/**
* Meridian functions and definitions.
*
* @package meridian
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'MRDN_VERSION', '1.0.0' );
/**
* Sets up theme defaults and registers support for WordPress features.
*/
function mrdn_setup() {
load_theme_textdomain( 'meridian', get_template_directory() . '/languages' );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'responsive-embeds' );
add_theme_support( 'editor-styles' );
add_theme_support( 'wp-block-styles' );
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'style',
'script',
)
);
add_editor_style( 'assets/css/editor.css' );
}
add_action( 'after_setup_theme', 'mrdn_setup' );
/**
* Enqueue theme styles.
* Fonts are declared in theme.json fontFace entries — no separate PHP enqueue needed.
*/
function mrdn_enqueue_assets() {
wp_enqueue_style(
'meridian-style',
get_stylesheet_uri(),
array(),
MRDN_VERSION
);
wp_enqueue_style(
'meridian-global',
get_template_directory_uri() . '/assets/css/global.css',
array( 'meridian-style' ),
MRDN_VERSION
);
}
add_action( 'wp_enqueue_scripts', 'mrdn_enqueue_assets' );
/**
* Register block patterns categories.
*/
function mrdn_register_pattern_categories() {
if ( ! function_exists( 'register_block_pattern_category' ) ) {
return;
}
register_block_pattern_category(
'mrdn-patterns',
array( 'label' => esc_html__( 'Meridian', 'meridian' ) )
);
register_block_pattern_category(
'mrdn-hero',
array( 'label' => esc_html__( 'Meridian: Hero & Bio', 'meridian' ) )
);
register_block_pattern_category(
'mrdn-content',
array( 'label' => esc_html__( 'Meridian: Content', 'meridian' ) )
);
}
add_action( 'init', 'mrdn_register_pattern_categories' );
/**
* Set the content width.
*/
function mrdn_content_width() {
$GLOBALS['content_width'] = apply_filters( 'mrdn_content_width', 760 );
}
add_action( 'after_setup_theme', 'mrdn_content_width', 0 );