Control: Textarea - 10quality/wpmvc-addon-metaboxer GitHub Wiki
Control used as a field type to display a HTML <textarea>
.
class Post extends Model
{
// Class properties and methods...
protected function init()
{
$this->metaboxes = [
'metabox_id' => [
'tabs' => [
'tab_id' => [
'fields' => [
'textarea_field' => [
'type' => 'textarea',
'title' => __( 'Textarea' ),
'description' => __( 'Textarea description.' ),
'control' => [
'wide' => true,
'attributes' => [
'placeholder' => __( 'Description', 'my-domain' ),
'rows' => 5,
]
],
],
// Other fields...
],
],
],
],
];
}
}
Control | Data type | Description |
---|---|---|
wide |
bool |
Flag that indicates if the input should display wider or small. |
attributes |
array |
HTML attributes listed as an array. |