-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
59 lines (47 loc) · 1.29 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
58
59
<?php
/**
* autoload vendors
*/
require_once __DIR__ . '/vendor/autoload.php';
/**
* REST API endpoints
*/
require_once __DIR__ . '/includes/api.php';
/**
* react prepare date functions
*/
require_once __DIR__ . '/includes/react.php';
/**
* setup default redux state
*/
require_once __DIR__ . '/includes/state.php';
/**
* theme setups
*/
add_theme_support( 'post-thumbnails' );
add_theme_support( 'title-tag' );
add_image_size( 'react-thumbnail', 1600, 900, true );
add_image_size( 'react-thumbnail-mob', 800, 450, true );
add_filter( 'show_admin_bar', '__return_false' );
/**
* enqueue theme scripts
*/
add_action( 'wp_enqueue_scripts', 'react_enqueue_scripts' );
function react_enqueue_scripts() {
wp_enqueue_script( 'app', get_template_directory_uri() . '/app/built/app.js', [], '0.0.1', true );
}
/**
* enqueue theme styles
*/
add_action( 'wp_print_styles', 'react_print_styles' );
function react_print_styles() {
wp_enqueue_style( 'pure' , get_template_directory_uri() . '/css/pure-min.css' );
wp_enqueue_style( 'responsive' , get_template_directory_uri() . '/css/grids-responsive-min.css' );
wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css' );
}
/**
* unset standard wp search
*/
if ( ! is_admin() && isset( $_GET['s'] ) ) {
unset( $_GET['s'] );
}