-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathindex.html
276 lines (258 loc) · 13.9 KB
/
index.html
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CMB2 Metabox Code Generator</title>
<link href='//fonts.googleapis.com/css?family=Source+Code+Pro|Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css"/>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/vendors/prism/prism.css"/>
<link rel="stylesheet" href="assets/css/style.css"/>
</head>
<body>
<a href="https://github.com/hasinhayder/cmb2-metabox-generator"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
<div class="container hero">
<div class="row">
<div class="col-md-12">
<h1 class="maintitle">CMB2 Metabox Code Generator</h1>
<p>Use this generator to create fully functional CMB2 metaboxes easily. Save your time from boring works.</p>
</div>
</div>
</div>
<div class="section-dark section">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>General Properties</h2>
<p>Metabox properties. Use this section to define the scope of metabox, set it's id and other things.</p>
</div>
</div>
<div class="row">
<form action="">
<div class="col-md-6">
<div class="form-group">
<label>Metabox ID</label>
<input type="text" class="form-control" id="mb-id" placeholder="Metabox ID" value="metabox">
</div>
<div class="form-group">
<label>Metabox Title</label>
<input type="text" class="form-control" id="mb-title" placeholder="Title" value="Metabox Title">
</div>
<div class="form-group">
<label>Comma Separated Scope</label>
<input value="page, post" type="text" class="form-control" id="mb-object-types" placeholder="Scope">
<p class="help-block">Where this metabox will be shown? like 'page','post' etc</p>
</div>
<div class="form-group">
<label>Text Domain</label>
<input type="text" class="form-control" id="mb-textdomain" placeholder="Text Domain" value="cmb2">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Metabox Context</label>
<select id="mb-context" class="form-control">
<option value="normal">Normal</option>
<option value="advance">Advance</option>
<option value="side">Side</option>
</select>
</div>
<div class="form-group">
<label>Metabox Priority</label>
<select id="mb-priority" class="form-control">
<option value="default">Default</option>
<option value="high">High</option>
<option value="core">Core</option>
<option value="low">Low</option>low
</select>
</div>
<div class="form-group">
<label>PHP Function Name</label>
<input type="text" class="form-control" id="mb-function" value="cmb2_add_metabox">
<p class="help-block">This function will hook into cmb2_init action</p>
</div>
<div class="form-group">
<label>Prefix</label>
<input type="text" class="form-control" id="mb-prefix" value="_cmb_">
<p class="help-block">Start with an underscore to hide fields from custom fields list</p>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="section section-lite">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>Metabox Fields</h2>
<p>Generate Metabox fields from this section</p>
</div>
</div>
<form action="" id="fields">
</form>
<div class="row">
<div class="col-md-12">
<div class="generate">
<a class="btn btn-success" href="#generate-code" id="code-generator">Generate Code</a>
</div>
</div>
</div>
</div>
</div>
<div class="section-dark section hidden" id="codecontainer">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>Generated Code</h2>
<p>Now you're happy, eh? Just copy-paste from these boxes below and go back to work, pronto!</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="code">
<button type="button" class="btn btn-success btn-sm" id="copy-code">Copy to clipboard</button>
<code class="language-php"></code>
</div>
</div>
</div>
</div>
</div>
<div class="hidden" id="html-elems">
<div class="form-element hide-params">
<div class="row">
<div class="col-md-1 btn-column padding-right-0">
<a class="btn btn-warning btn-move-elem-up disabled" href="#move-up"><i class="fa fa-arrow-up"></i></a>
<a class="btn btn-warning btn-move-elem-down disabled" href="#move-down"><i class="fa fa-arrow-down"></i></a>
</div>
<div class="col-md-2">
<label>Field ID</label>
<input type="text" class="form-control mb-field-id">
</div>
<div class="col-md-2">
<label>Type</label>
<select class="form-control mb-field-type">
<option selected disabled>Select a type</option>
<option value="title">Title</option>
<option value="text">Text</option>
<option value="text_small">Text Small</option>
<option value="text_medium">Text Medium</option>
<option value="text_email">Text Email</option>
<option value="text_url">Text URL</option>
<option value="text_money">Text Money</option>
<option value="textarea">Textarea</option>
<option value="textarea_small">Textarea Small</option>
<option value="textarea_code">Textarea Code</option>
<option value="text_date">Text Date</option>
<option value="text_time">Text Time</option>
<option value="select_timezone">Select Timezone</option>
<option value="text_date_timestamp">Text Date Timestamp</option>
<option value="text_datetime_timestamp">Text Datetime Timestamp</option>
<option value="text_datetime_timestamp_timezone">Serialized DateTime object</option>
<option value="colorpicker">Colorpicker</option>
<option value="radio">Radio</option>
<option value="radio_inline">Radio Inline</option>
<option value="taxonomy_radio">Taxonomy Radio</option>
<option value="taxonomy_radio_inline">Taxonomy Radio Inline</option>
<option value="select">Select</option>
<option value="taxonomy_select">Taxonomy Select</option>
<option value="checkbox">Checkbox</option>
<option value="multicheck">Multi Checkbox</option>
<option value="multicheck_inline">Multi Checkbox Inline</option>
<option value="taxonomy_multicheck">Taxonomy Multicheck</option>
<option value="taxonomy_multicheck_inline">Taxonomy Multicheck Inline</option>
<option value="wysiwyg">WYSIWYG</option>
<option value="file">Image/File Uploader</option>
<option value="file_list">Image/File list upload</option>
<option value="oembed">Converts oembed urls</option>
</select>
</div>
<div class="col-md-3">
<label>Title</label>
<input type="text" class="form-control mb-field-title">
</div>
<div class="col-md-2">
<label>Default value</label>
<input type="text" class="form-control mb-field-default">
</div>
<div class="col-md-2 btn-column text-right">
<a class="btn btn-success btn-add-more-field disabled" href="#add-more"><i class="fa fa-plus"></i></a>
<a class="btn btn-danger btn-remove-field disabled" href="#remove"><i class="fa fa-times"></i></a>
<a class="btn btn-primary btn-hide-params disabled" href="#hide" title="Show/Hide parameter sections"><i class="fa fa-eye-slash"></i></a>
</div>
</div>
</div>
<div class="row-param row-param-primary">
<div class="row">
<div class="col-md-3 text-right"><h4>parameters</h4></div>
<div class="col-md-2 opt-select-container">
<select class="form-control input-sm opt-select opt-add-param">
<option selected disabled>Select a parameter</option>
</select>
</div>
<div class="col-md-5 param-value-container">
<input type="text" class="form-control input-sm opt-option-val" placeholder="value">
</div>
<div class="col-md-2">
<a class="btn btn-success btn-sm btn-add-more disabled" href="#add-more" data-tmplt="param_primary"><i class="fa fa-plus"></i></a>
<a class="btn btn-danger btn-sm btn-remove disabled" href="#remove" data-tmplt="param_primary"><i class="fa fa-times"></i></a>
</div>
</div>
</div>
<div class="row-param row-options">
<div class="row">
<div class="col-md-2 col-md-offset-3 text-right">
<h4>options</h4>
</div>
<div class="col-md-3">
<input type="text" class="form-control input-sm opt-option-key" placeholder="key">
</div>
<div class="col-md-2">
<input type="text" class="form-control input-sm opt-option-val" placeholder="value">
</div>
<div class="col-md-2">
<a class="btn btn-success btn-sm btn-add-more" href="#add-more" data-tmplt="options"><i class="fa fa-plus"></i></a>
<a class="btn btn-danger btn-sm btn-remove" href="#remove" data-tmplt="options"><i class="fa fa-times"></i></a>
</div>
</div>
</div>
<div class="row-param row-options-sortable">
<div class="row">
<div class="col-md-3 text-right"><h4>options</h4></div>
<div class="col-md-2 opt-select-container">
<select class="form-control input-sm opt-select opt-option-type">
<option value="array" selected>Array</option>
<option value="callback">Callback</option>
</select>
</div>
<div class="col-md-1 padding-right-0 opt-option-array">
<a class="btn btn-warning btn-sm btn-move-up disabled" href="#move-up"><i class="fa fa-arrow-up"></i></a>
<a class="btn btn-warning btn-sm btn-move-down disabled" href="#move-down"><i class="fa fa-arrow-down"></i></a>
</div>
<div class="col-md-2 opt-option-array">
<input type="text" class="form-control input-sm opt-option-key" placeholder="key">
</div>
<div class="col-md-2 opt-option-array">
<input type="text" class="form-control input-sm opt-option-val" placeholder="value">
</div>
<div class="col-md-2 opt-option-array">
<a class="btn btn-success btn-sm btn-add-more" href="#add-more" data-tmplt="options_sortable"><i class="fa fa-plus"></i></a>
<a class="btn btn-danger btn-sm btn-remove disabled" href="#remove" data-tmplt="options_sortable"><i class="fa fa-times"></i></a>
</div>
<div class="col-md-7 opt-option-callback hidden">
<input type="text" class="form-control input-sm opt-option-cb-name" placeholder="Callback function name">
</div>
</div>
</div>
</div><!-- html-elems -->
<div class="section footer">
<p>Built with Love by Hasin Hayder & <a href="https://github.com/hasinhayder/cmb2-metabox-generator/graphs/contributors" target="_blank">Other Contributors</a></p>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.2.0/ZeroClipboard.min.js" type="text/javascript"></script>
<script src="assets/vendors/prism/prism.js" type="text/javascript"></script>
<script src="assets/js/script.js" type="text/javascript"></script>
</body>
</html>