-
Notifications
You must be signed in to change notification settings - Fork 9
/
functions.php
57 lines (44 loc) · 1.18 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
<?php
namespace PressWindStarter;
// not defined => development
if (!defined('WP_ENV')) {
define('WP_ENV', 'development');
}
// gutenberg setup, change like you want
require_once dirname(__FILE__) . '/inc/gutenberg.php';
// auto loading acf blocks
require_once dirname(__FILE__) . '/inc/acf_blocks.php';
// auto loading login assets
require_once dirname(__FILE__) . '/inc/login_assets.php';
// pwa icons
if (file_exists(dirname(__FILE__) . '/inc/pwa_head.php')) {
include dirname(__FILE__) . '/inc/pwa_head.php';
}
/**
* Theme setup.
*/
function setup()
{
add_theme_support('automatic-feed-links');
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
// load i18n text
load_theme_textdomain('press-wind-theme', get_template_directory() . '/languages');
}
add_action('after_setup_theme', __NAMESPACE__ . '\setup');
/**
* init assets front
* require presswind plugin to work
*/
if (class_exists('PressWind\PWVite')) {
\PressWind\PWVite::init(port: 3000, path: '');
/**
* init assets admin
*/
\PressWind\PWVite::init(
port: 4444,
path: '/admin',
position: 'editor',
is_ts: false
);
}