-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
71 lines (59 loc) · 1.39 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
<?php
add_theme_support( 'post-thumbnails' );
function barcelona_scripts() {
wp_register_script('script', get_template_directory_uri() . '/script.js', [], false, true);
wp_enqueue_script('script');
}
add_action('wp_enqueue_scripts', 'barcelona_scripts');
add_action('cmb2_admin_init', 'home_box');
function home_box() {
$cmb = new_cmb2_box([
'id' => 'home_box',
'title' => 'Próxima partida',
'object_types' => ['page'],
'show_on' => [
'key' => 'page-template',
'value' => 'page-home.php',
]
]);
$cmb->add_field([
'name' => 'Adversário',
'id' => 'adversario',
'type' => 'text',
]);
$cmb->add_field([
'name' => 'Data do jogo',
'id' => 'data',
'type' => 'text',
]);
$cmb->add_field([
'name' => 'Horário do jogo',
'id' => 'horario',
'type' => 'text',
]);
$cmb->add_field([
'name' => 'O jogo é dentro ou fora de casa?',
'id' => 'casa',
'type' => 'select',
'options' => [
'dentro' => __( 'Dentro', 'cmb2' ),
'fora' => __( 'Fora', 'cmb2' ),
]
]);
$cmb->add_field([
'name' => 'Nome do estádio',
'id' => 'estadio',
'type' => 'text',
]);
$cmb->add_field([
'name' => 'Nome do campeonato',
'id' => 'campeonato',
'type' => 'text',
]);
$cmb->add_field([
'name' => 'Link para a compra de ingressos',
'id' => 'link',
'type' => 'text_url',
]);
}
?>