<div class="cm-settings-collapse-toggle">Toggle all</div>
<?php
$labelsByCategories = CMA_Labels::getLabelsByCategories();
foreach ($labelsByCategories as $category => $labels) {
	$cls = '';
	if($category == 'Private question' || $category == 'Following' || $category == 'Spam reporting' || $category == 'Categories' || $category == '	Difficulty levels' || $category == 'Newsletter' || $category == 'BuddyPress' || $category == 'Notification: answer in thread.' || $category == 'Difficulty levels') {
		$cls = 'onlyinpro';
	}
	?>
	<div class="cma-settings-section settings_labels_<?php echo $category; ?> <?php echo $cls; ?>">
		<h3 class="cm-settings-collapse-btn">
			<span class="dashicons dashicons-arrow-down"></span>
			<strong><?php echo (empty($category) ? CMA_Settings::__('Other') : $category); ?></strong>
		</h3>
		<div class="cm-settings-collapse-container cm-settings-collapse-open">
			<?php
			foreach ($labels as $key) {
				$default = CMA_Labels::getDefaultLabel($key);
				$available = CMA_Labels::isAvailable($key)
				?>
				<div class="cm-settings-row">
					<div class="cm-settings-option-name">"<?php echo esc_html($key) ?>" label:</div>
					<div class="cm-settings-control"><input type="text" size="60" name="label_<?php echo esc_attr($key); ?>" value="<?php echo esc_attr(CMA_Labels::getLabel($key)); ?>" placeholder="<?php echo esc_attr($default) ?>" <?php echo $available ? '' : 'disabled'; ?>/></div>
					<div class="cm-settings-option-desc"><?php echo $available ? CMA_Labels::getDescription($key) : CMA_SettingsView::renderOnlyin('Pro'); ?></div>
				</div>
				<?php
			}
			?>
		</div>
	</div>
	<?php
}
?>
<div class="onlyinpro_empty" style="display:none;"><p style="margin:20px 0px 0px 0px;font-weight:normal;">Pro options are hidden. Click the button <span style="font-weight:bold;color:#00cd00;">"Show/hide Pro options"</span> to see them.</p></div>
<?php echo apply_filters('cma-settings-category', '', 'labels'); ?>