<?php
|
namespace JVBase\registrar\fields;
|
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
|
class TagListField extends RepeaterField {
|
protected string $tag_format = 'first_field';
|
protected string $add_label = 'Add';
|
|
public function setTag_format(string $tag_format):void
|
{
|
if (str_contains($tag_format, '{{')) {
|
if (!$this->checkFieldVariables($tag_format)) {
|
return;
|
}
|
$this->tag_format = $tag_format;
|
return;
|
}
|
|
if (!in_array($tag_format, ['first_field', 'all_fields'])) {
|
error_log('[TagListField]Could not validate tag format: '.$tag_format);
|
return;
|
}
|
$this->tag_format = $tag_format;
|
}
|
public function getTag_format():string
|
{
|
return $this->tag_format;
|
}
|
}
|