-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
45 lines (37 loc) · 1.05 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
<?php
/**
* This file bootstraps your Stem app. Whatever you'd normally do in a functions.php file you can do in the "onSetup"
* callback down at the bottom of the file.
*
* If you are using composer for whatever, make sure you uncomment out the require_once line below too.
*/
/**
* Must include this for trellis deploys.
*/
if (!class_exists(\ILab\Stem\Core\Context::class)) {
return;
}
/**
* If using any composer stuff, be sure to add the autoload
*/
//require_once('vendor/autoload.php');
/**
* Create the context for this theme.
*
*/
$context=\ILab\Stem\Core\Context::initialize(dirname(__FILE__));
/**
* Setup functions
*/
$context->onSetup(function() use ($context) {
// Here we do any setup
add_filter('upload_mimes', function($mimes){
$mimes['svg'] = 'image/svg+xml';
return $mimes;
});
add_action('admin_bar_menu', function($wp_admin_bar){
$wp_admin_bar->remove_menu('customize');
$wp_admin_bar->remove_menu('comments');
$wp_admin_bar->remove_menu('wp-logo');
}, 999);
});