You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open tutty-metabox-fields.php in framework folder.
Key
Default
Desc
id
required
Meta box ID
post_type
null
Meta box post type
title
null
Meta box title
priority
low
Meta box priority (low, high)
context
normal
The context within the screen where the boxes should display. Available contexts vary from screen to screen. (normal, side, advanced)
$fields[] = array(
'id' => 'post_settings', // Meta box ID'title' => 'Post Settings', // Meta box title'priority' => 'high', // Meta box priority'fields' => array( // Meta box fieldsarray(
'id' => 'text_field', // Field ID'title' => 'Text Field', // Field Title'type' => 'text', // Field Type
),
),
);
Text Field - #text
Key
Default
Desc
id
required
Field unique ID
title
null
Field title
default
null
Field default value
attr
null
Standart html attributes
desc
null
Description of field
sanitize
true
Sanitize of field
array(
'id' => 'text_field',
'title' => 'Text Field',
'type' => 'text',
'desc' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
'attr' => array(
'placeholder' => 'Placeholder value...',
'maxlength' => 5
),
)
Number Field - #number
Key
Default
Desc
id
required
Field unique ID
title
null
Field title
default
null
Field default value
attr
null
Standart html attributes
desc
null
Description of field
sanitize
true
Sanitize of field
array(
'id' => 'number_field',
'title' => 'Number Field',
'type' => 'number',
'desc' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
'attr' => array(
'placeholder' => 'Placeholder value...',
'min' => 1000,
'max' => 2000,
),
)
Textarea Field - #textarea
Key
Default
Desc
id
required
Field unique ID
title
null
Field title
default
null
Field default value
attr
null
Standart html attributes
desc
null
Description of field
sanitize
true
Sanitize of field
array(
'id' => 'textarea_field',
'title' => 'Textarea Field',
'type' => 'textarea',
'desc' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
)