26 lines
1.4 KiB
PHP
26 lines
1.4 KiB
PHP
<?php
|
|
$tutor_custom_feature_group = get_post_meta(get_the_ID(), 'tutor_custom_feature_group', true);
|
|
if ($tutor_custom_feature_group) {
|
|
foreach ((array) $tutor_custom_feature_group as $key => $entry) {
|
|
|
|
$icon = !empty($entry['tutor_custom_feature_group_icon']) ? $entry['tutor_custom_feature_group_icon'] : 'dt-icon-play-button';
|
|
$label = !empty($entry['tutor_custom_feature_group_label']) ? $entry['tutor_custom_feature_group_label'] : '';
|
|
$value = !empty($entry['tutor_custom_feature_group_value']) ? $entry['tutor_custom_feature_group_value'] : '';
|
|
$unit = !empty($entry['tutor_custom_feature_group_unit']) ? $entry['tutor_custom_feature_group_unit'] : '';
|
|
|
|
// Icon classes
|
|
$if_has_dashicons = (strpos($icon, 'dashicons') !== false) ? 'dashicons' : '';
|
|
$if_has_fontawesome = (strpos($icon, 'fa-') !== false) ? 'fa' : '';
|
|
|
|
echo '<li>';
|
|
echo '<span class="label"><i class="meta-icon ' . esc_attr($if_has_fontawesome . ' ' . $if_has_dashicons . ' ' . $icon) . '"></i> ' . esc_html($label) . '</span>';
|
|
echo '<span class="value">';
|
|
echo '<span class="tutor-meta-level">' . esc_html($value) . '</span>';
|
|
if ($unit) {
|
|
echo '<span class="tutor-meta-value tutor-color-secondary tutor-mr-4">' . esc_html($unit) . '</span>';
|
|
}
|
|
echo '</span>';
|
|
echo '</li>';
|
|
}
|
|
}
|