-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta-boxes.php
More file actions
79 lines (63 loc) · 1.59 KB
/
Copy pathmeta-boxes.php
File metadata and controls
79 lines (63 loc) · 1.59 KB
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
<?php
/**
* Registering meta boxes
*
* All the definitions of meta boxes are listed below with comments.
* Please read them CAREFULLY.
*
* You also should read the changelog to know what has been changed before updating.
*
* For more information, please visit:
* @link http://www.deluxeblogtips.com/meta-box/
*/
add_filter( 'rwmb_meta_boxes', 'YOUR_PREFIX_register_meta_boxes' );
/**
* Register meta boxes
*
* @return void
*/
function YOUR_PREFIX_register_meta_boxes( $meta_boxes )
{
/**
* Prefix of meta keys (optional)
* Use underscore (_) at the beginning to make keys hidden
* Alt.: You also can make prefix empty to disable it
*/
// Better has an underscore as last sign
$prefix = 'ght_';
// 1st meta box
// 2nd meta box
/*
$meta_boxes[] = array(
'title' => __( 'Detalles de Evento', 'rwmb' ),
'fields' => array(
array(
'name' => __( 'Fecha del Evento', 'rwmb' ),
'id' => "{$prefix}date_event",
'type' => 'date',
// jQuery date picker options. See here http://api.jqueryui.com/datepicker
'js_options' => array(
'appendText' => __( ' (yyyy-mm-dd)', 'rwmb' ),
'dateFormat' => __( 'yy-mm-dd', 'rwmb' ),
'changeMonth' => true,
'changeYear' => true,
'showButtonPanel' => true,
),
)
)
);*/
$meta_boxes[] = array(
'id' => 'page_meta',
'title' => 'Page Options',
'context' => 'side',
'pages' => array( 'page' ),
'fields' => array(
array(
'name' => __( 'Landing Page', 'rwmb' ),
'id' => "{$prefix}page_landing_check",
'type' => 'checkbox',
),
)
);
return $meta_boxes;
}