public function display()
{
$this->echoOptionHeader(true);
echo '<fieldset>';
$savedValue = $this->getValue();
if (!empty($this->settings['select_all'])) {
$select_all_label = __('Select All');
if (is_string($this->settings['select_all'])) {
$select_all_label = $this->settings['select_all'];
}
printf('<label style="margin-bottom: 1em !important;"><input class="tf_checkbox_selectall" type="checkbox" /> %s </label><br>', esc_html($select_all_label));
}
foreach ($this->settings['options'] as $value => $label) {
printf('<label for="%s"><input id="%s" type="checkbox" name="%s[]" value="%s" %s/> %s</label><br>', $this->getID() . $value, $this->getID() . $value, $this->getID(), esc_attr($value), checked(in_array($value, $savedValue), true, false), $label);
}
echo '</fieldset>';
$this->echoOptionFooter(false);
}