-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmetaboxes-portfolio.php
79 lines (79 loc) · 2.15 KB
/
metaboxes-portfolio.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
<?php
require_once get_template_directory() . '/inc/class-metabox.php';
$portfolio_metabox = new Odin_Metabox(
'metabrasa_portfolio', // Slug/ID do Metabox (obrigatório)
'Portfolio', // Nome do Metabox (obrigatório)
'jetpack-portfolio', // Slug do Post Type, sendo possível enviar apenas um valor ou um array com vários (opcional)
'normal', // Contexto (opções: normal, advanced, ou side) (opcional)
'high' // Prioridade (opções: high, core, default ou low) (opcional)
);
$portfolio_metabox->set_fields(
array(
array(
'id' => 'metabrasa_url',
'label' => 'URL do projeto',
'type' => 'text',
'description' => ''
)
)
);
$team_metabox = new Odin_Metabox(
'team_metabox', // Slug/ID do Metabox (obrigatório)
'Team', // Nome do Metabox (obrigatório)
'equipe', // Slug do Post Type, sendo possível enviar apenas um valor ou um array com vários (opcional)
'normal', // Contexto (opções: normal, advanced, ou side) (opcional)
'high' // Prioridade (opções: high, core, default ou low) (opcional)
);
$team_metabox->set_fields(
array(
array(
'id' => 'team_position',
'label' => 'Cargo',
'type' => 'text',
'description' => ''
),
array(
'id' => 'team_phone',
'label' => 'Telefone',
'type' => 'text',
'description' => ''
),
array(
'id' => 'team_email',
'label' => 'E-mail',
'type' => 'text',
'description' => ''
),
array(
'id' => 'team_twitter',
'label' => 'Twitter',
'type' => 'text',
'description' => ''
),
array(
'id' => 'team_linkedin',
'label' => 'Linkedin',
'type' => 'text',
'description' => ''
),
array(
'id' => 'team_github',
'label' => 'Github',
'type' => 'text',
'description' => ''
),
array(
'id' => 'team_blog',
'label' => __('Posts no blog','tema-brasa'),
'type' => 'text',
'description' => ''
),
array(
'id' => 'team_wporg',
'label' => __('Conta no WordPress.org','tema-brasa'),
'type' => 'text',
'description' => ''
),
)
);
?>