text */ protected function eFormFieldSelect($id, $label, $name, $options, $value) { $input = ""; $this->eFormField($id, $label, $input); } /** echo a form text line */ protected function eFormFieldText($id, $label, $name, $value, $placeholder = '', $type = 'text') { $input = ""; $this->eFormField($id, $label, $input); } /** echo a form radio line */ protected function eFormFieldRadio($id, $label, $name, $options, $value) { $input = ''; foreach ($options as $v => $txt) { $selected = $v == $value ? ' checked' : ''; $input .= "$txt"; } $this->eFormField($id, $label, $input); } /** echo a checkbox */ protected function eFormFieldCheckbox($id, $label, $name, $value) { echo sprintf( '

', \esc_attr($id), \esc_attr($name), $value ? ' checked' : '' ); echo "

"; } /** echo a form entry line */ protected function eFormField($id, $label, $input) { echo "

"; echo $input; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo "

"; } }