A Link Input Field
Parameter | Type | Value |
---|---|---|
type | required |
Predefined String (textarea) |
title | optional |
String |
placeholder | optional |
String |
desc | optional |
String / Array |
std | optional |
Array |
selector | optional |
String / Array |
tab | optional |
String(style) |
section | optional |
String |
Always return object
'addon_link' => array (
'type' => 'link',
'title' => __('Link Field','your-textdomain'),
'std' => '#', // 'std' => array( 'link' => '', 'window' => 0, 'nofolow' => 0 ),
'placeholder' => 'Link Placeholder'
)
Support 'selector' parameters.
Inside the rander()
method-
echo '<div>'.$data["settings"]["addon_link"].'</div>';
Inside the getTemplate()
method-
<div>{{ data.addon_link.link }}</div>