ID);
if ($darknews_post_categories) {
$darknews_output = '
';
$category_count = 0;
foreach ($darknews_post_categories as $post_category) {
$darknews_t_id = $post_category->term_id;
$darknews_color_id = "category_color_" . $darknews_t_id;
// retrieve the existing value(s) for this meta field. This returns an array
$darknews_term_meta = get_option($darknews_color_id);
$darknews_color_class = ($darknews_term_meta) ? $darknews_term_meta['color_class_term_meta'] : 'category-color-1';
$darknews_output .= '-
' . $post_category->name . '
';
if ($darknews_is_single == false) {
if (++$category_count == $show_category_number) break;
}
}
$darknews_output .= '
';
echo wp_kses_post($darknews_output);
}
}
}
endif;
if (!function_exists('darknews_get_category_color_class')) :
function darknews_get_category_color_class($term_id)
{
$darknews_color_id = "category_color_" . $term_id;
// retrieve the existing value(s) for this meta field. This returns an array
$darknews_term_meta = get_option($darknews_color_id);
$darknews_color_class = ($darknews_term_meta) ? $darknews_term_meta['color_class_term_meta'] : '';
return $darknews_color_class;
}
endif;
if (!function_exists('darknews_post_item_meta')) :
function darknews_post_item_meta($darknews_post_display = 'spotlight-post')
{
global $post;
if ('post' == get_post_type($post->ID)):
$darknews_author_id = $post->post_author;
$darknews_date_display_setting = darknews_get_option('global_date_display_setting');
$darknews_author_icon_gravatar_display_setting = darknews_get_option('global_author_icon_gravatar_display_setting');
if($darknews_post_display == 'list-post'){
$darknews_post_meta = darknews_get_option('list_post_date_author_setting');
}elseif($darknews_post_display == 'grid-post'){
$darknews_post_meta = darknews_get_option('small_grid_post_date_author_setting');
}else{
$darknews_post_meta = darknews_get_option('global_post_date_author_setting');
}
if ($darknews_post_meta == 'show-date-only') {
$darknews_display_author = false;
$darknews_display_date = true;
} elseif ($darknews_post_meta == 'show-author-only') {
$darknews_display_author = true;
$darknews_display_date = false;
} elseif (($darknews_post_meta == 'show-date-author')) {
$darknews_display_author = true;
$darknews_display_date = true;
} else {
$darknews_display_author = false;
$darknews_display_date = false;
}
?>
' . esc_html('Tags: %1$s') . '', $tags_list);
}
}
if (is_single()) {
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__('Edit %s', 'darknews'),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'',
''
);
}
}
endif;