Jake Vanderwerf
2026-08-28 a9654f00c8fbc9934289d761843ddd071025013f
inc/registrar/fields/RepeaterField.php
@@ -2,6 +2,8 @@
namespace JVBase\registrar\fields;
use ReflectionClass;
if (!defined('ABSPATH')) {
   exit;
}
@@ -11,11 +13,11 @@
   protected string $add_label = 'Add Row';
   protected string $row_label = 'New Item';
   public function setAdd_label(string $label):void
   public function setAddLabel(string $label):void
   {
      $this->add_label = $label;
   }
   public function getAdd_label():string
   public function getAddLabel():string
   {
      return $this->add_label;
   }
@@ -27,13 +29,13 @@
      $fields = array_filter(array_map(function($field) { return str_replace('}}','',$field);}, explode('{{',$variables)));
      foreach ($fields as $field) {
         if (!array_key_exists($field, $this->fields)) {
            error_log('['.(new \ReflectionClass($this))->getShortName().']Invalid field attempted: '.$field);
            error_log('['.(new ReflectionClass($this))->getShortName().']Invalid field attempted: '.$field);
            return false;
         }
      }
      return true;
   }
   public function setRow_label(string $label):void
   public function setRowLabel(string $label):void
   {
      if (str_contains($label, '{{')) {
         if (!$this->checkFieldVariables($label)) {
@@ -43,7 +45,7 @@
      $this->row_label = $label;
   }
   public function getRow_label():string
   public function getRowLabel():string
   {
      return $this->row_label;
   }