-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·73 lines (60 loc) · 1.7 KB
/
functions.php
File metadata and controls
executable file
·73 lines (60 loc) · 1.7 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
<?php
/**
* Functions and definitions
*
* @package MC
*/
use MC\App\Core\Init;
use MC\App\Scripts;
use MC\App\Media;
use MC\App\Setup;
use MC\App\Shortcodes;
use MC\App\Fields\ACF;
use MC\App\Fields\Modules;
use MC\App\Fields\Options;
use MC\App\Fields\FieldGroups\PageBuilderFieldGroup;
use MC\App\Fields\FieldGroups\SiteOptionsFieldGroup;
// use MC\App\Blocks\RegisterBlocks;
/**
* Define Theme Version
* Define Theme directories
*/
define('THEME_VERSION', '3.2.2');
define('MC_THEME_DIR', trailingslashit(get_template_directory()));
define('MC_THEME_PATH_URL', trailingslashit(get_template_directory_uri()));
require __DIR__ . '/constants.php';
// Require Autoloader
require_once MC_THEME_DIR . 'vendor/autoload.php';
/**
* Theme Setup
*/
add_action('after_setup_theme', function () {
(new Init())
->add(new Setup())
->add(new Scripts())
->add(new Media())
->add(new Shortcodes())
->add(new ACF())
->add(new Options())
->add(new Modules())
->add(new SiteOptionsFieldGroup())
->add(new PageBuilderFieldGroup())
// ->add(new RegisterBlocks())
->initialize();
// Translation setup
load_theme_textdomain('mc-starter', MC_THEME_DIR . '/languages');
// Let WordPress manage the document title.
add_theme_support('title-tag');
// Add automatic feed links in header
add_theme_support('automatic-feed-links');
// Add Post Thumbnail Image sizes and support
add_theme_support('post-thumbnails');
// Switch default core markup to output valid HTML5.
add_theme_support('html5', [
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption'
]);
});