header = $header; } public function addRow($row) { $this->rows[] = $row; } public function getHtml() { if(!$this->header) { return ''; } $table = ''; foreach ($this->header as $key => $heading) { $table .= ''; } $table .= ''; foreach ($this->rows as $row) { $table .= ''; foreach ($this->header as $key => $heading) { $table .= ''; } $table .= ''; } $table .= '
'.wp_kses_post($heading).'
'.Arr::get($row, $key).'
'; return $table; } public function printHtml() { echo $this->getHtml(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } public function reset() { $this->header = []; $this->rows = []; $this->tableClass = 'fc_horizontal_table'; } }