-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
83 lines (78 loc) · 1.96 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* Sage includes
*
* The $sage_includes array determines the code library included in your theme.
* Add or remove files to the array as needed. Supports child theme overrides.
*
* Please note that missing files will produce a fatal error.
*
* @link https://github.com/roots/sage/pull/1042
*/
$sage_includes = [
'lib/assets.php', // Scripts and stylesheets
'lib/extras.php', // Custom functions
'lib/setup.php', // Theme setup
'lib/titles.php', // Page titles
'lib/wrapper.php', // Theme wrapper class
'lib/customizer.php', // Theme customizer
'lib/wp_bootstrap_navwalker.php'
];
foreach ($sage_includes as $file) {
if (!$filepath = locate_template($file)) {
trigger_error(sprintf(__('Error locating %s for inclusion', 'sage'), $file), E_USER_ERROR);
}
require_once $filepath;
}
unset($file, $filepath);
include_once('advanced-custom-fields/acf.php');
define( 'ACF_LITE', true );
if(function_exists("register_field_group"))
{
register_field_group(array (
'id' => 'acf_page-options',
'title' => 'Page Options',
'fields' => array (
array (
'key' => 'field_570922840974f',
'label' => 'Page Image',
'name' => 'page_image',
'type' => 'image',
'save_format' => 'object',
'preview_size' => 'thumbnail',
'library' => 'all',
),
array (
'key' => 'field_570922af09750',
'label' => 'Dark Mode',
'name' => 'dark_mode',
'type' => 'checkbox',
'instructions' => 'Turn on dark mode. This will invert the colors in the navbar.',
'choices' => array (
'on' => 'On',
),
'default_value' => '',
'layout' => 'vertical',
),
),
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'page',
'order_no' => 0,
'group_no' => 0,
),
),
),
'options' => array (
'position' => 'normal',
'layout' => 'default',
'hide_on_screen' => array (
0 => 'the_content',
),
),
'menu_order' => 0,
));
}