The Textarea field creates a raw text or code, accepts any type of syntax. It is useful to store ShortCode, HTML JS and CSS code.
Map Usage:
array(
'name' => 'field_id',
'label' => 'Field Label',
'type' => 'textarea', // USAGE TEXTAREA TYPE
'value' => 'DEFAULT-CONTENT', // remove this if you do not need a default content
'description' => 'Field Description',
)
Example:
Register a new shortcode with filed type:
textarea
add_map(
array(
// 1st shortcode element
'my_shortcode' => array(
'name' => 'My Shortcode',
'description' => 'This is my shortcode',
'icon' => 'my-class-icon',
'category' => 'Content',
'params' => array(
//1st field
array(
'name' => 'row_id',
'label' => 'Row ID',
'type' => 'textarea',
'description' => 'The unique identifier of the row',
'admin_label' => true,
),
//2nd field
)
),
// 2nd shortcode element
) // End Arrays
);
} // end my_wp_init()
?>
Read more