forked from ixkaito/bathe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
90 lines (79 loc) · 2.31 KB
/
Copy pathfunctions.php
File metadata and controls
90 lines (79 loc) · 2.31 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
<?php
/**
* Set up theme defaults and registers support for various WordPress feaures.
*/
add_action( 'after_setup_theme', function() {
load_theme_textdomain( 'bathe', get_theme_file_uri( 'languages' ) );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );
add_theme_support( 'post-formats', array(
'aside',
'image',
'video',
'quote',
'link',
) );
add_theme_support( 'custom-background', apply_filters( 'bathe_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Add support for core custom logo.
*
* @link https://codex.wordpress.org/Theme_Logo
*/
add_theme_support( 'custom-logo', array(
'height' => 200,
'width' => 50,
'flex-width' => true,
'flex-height' => true,
) );
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'bathe' ),
) );
} );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
add_action( 'after_setup_theme', function() {
$GLOBALS['content_width'] = apply_filters( 'bathe_content_width', 960 );
}, 0 );
/**
* Register widget area.
*/
add_action( 'widgets_init', function() {
register_sidebar( array(
'name' => __( 'Sidebar', 'bathe' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
} );
/**
* Enqueue scripts and styles.
*/
add_action( 'wp_enqueue_scripts', function() {
wp_enqueue_style( 'bathe-main', get_theme_file_uri( 'assets/css/main.css' ) );
wp_enqueue_style( 'tailwind', get_theme_file_uri( 'assets/css/tailwind.css' ) );
wp_enqueue_script( 'bathe-bundle', get_theme_file_uri( 'assets/js/main.js' ), array(), null, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
} );