-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctions.php
58 lines (38 loc) · 1.59 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
<?php
/**
* constant
**/
define('PATH', get_stylesheet_directory());
define('FUNCTIONS_PATH', PATH . '/lib/');
require_once (FUNCTIONS_PATH . 'theme_support.php');
require_once (FUNCTIONS_PATH . 'login.php');
require_once (FUNCTIONS_PATH . 'admin.php');
require_once (FUNCTIONS_PATH . 'widget.php');
require_once (FUNCTIONS_PATH . 'nav_walker.php');
if ( ! current_user_can( 'manage_options' ) ) {
show_admin_bar( false );
}
add_action('after_setup_theme', 'base_remove_admin_bar');
function base_remove_admin_bar() {
if ( ! current_user_can('administrator') && !is_admin() ) {
show_admin_bar(false);
}
}
add_action('wp_enqueue_scripts', 'base_register_scripts');
function base_register_scripts() {
wp_enqueue_script( 'jquery' );
wp_register_script('base_functions', get_stylesheet_directory_uri() . '/js/main.min.js', array(), filemtime( get_stylesheet_directory().'/js/main.min.js'), true );
wp_enqueue_script('base_functions');
wp_register_style('base_google', 'https://fonts.googleapis.com/css?family=Teko:600&display=swap', '', '', 'all');
wp_enqueue_style('base_google');
wp_register_style('base_styles', get_stylesheet_uri(), '', filemtime( get_stylesheet_directory().'/style.css'), 'all');
wp_enqueue_style('base_styles');
}
if ( function_exists('acf_add_options_page') ) {
acf_add_options_page();
}
function jtd_include_field_types_gravity_forms( $version ) {
include_once( FUNCTIONS_PATH . 'acfgfv5.php');
}
add_action('acf/include_field_types', 'jtd_include_field_types_gravity_forms');
// add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' );