Jake Vanderwerf
2026-03-08 c19264ac916707096fe294d996a1b7fb85206b34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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;
    }
}