, '); if ($cat_list_cat && airinblog_fun_categorized_blog()) { $cat_label_cat = ''; if ($cat_label_tax_none == 1) { $cat_label_cat = esc_html__('Categories', 'airin-blog').':'; } echo '
' . esc_html($cat_label_cat) . ' '; printf('%1$s', $cat_list_cat); echo '
'; } ?>
, '); if ($cat_list_tag) { printf('
'. $cat_label_tag . ' ' . '%1$s', $cat_list_tag . '
'); } ?>
post_content; $minutes = round(count(preg_split('/\s/', $content_text)) / $words_per_minutes); if ($minutes == 0) { return esc_html_e('Less 1 min', 'airin-blog'); } else { return $minutes . ' ' . esc_html__('min', 'airin-blog'); } } } ?>
, '); if ($post_list_cat && airinblog_fun_categorized_blog()) { $post_label_cat = ''; if (get_theme_mod('airinblog_cus_post_meta_label_tax', 0) != 1) { $post_label_cat= esc_html__('Categories', 'airin-blog').':'; } echo '
'; echo esc_html($post_label_cat).' '; printf('%1$s', $post_list_cat); echo '
'; } } // Tags (in post) function airinblog_fun_post_meta_tax_tag() { if (!empty(get_the_tag_list())) { $post_list_tag = get_the_tag_list('', ', '); if ($post_list_tag) { $post_label_tag = ''; if (get_theme_mod('airinblog_cus_post_meta_label_tax', 0) != 1) { $post_label_tag = esc_html__('Tags', 'airin-blog').':'; } echo '
'; printf('
' . $post_label_tag . ' ' . '%1$s', $post_list_tag . '
'); echo '
'; } } } function airinblog_fun_post_meta_tax($lay) { if (get_theme_mod('airinblog_cus_post_meta_cat', 1) == 1) { $lay_cat = get_theme_mod('airinblog_cus_post_meta_layout_cat', 'top'); if ($lay == $lay_cat) { airinblog_fun_post_meta_tax_cat(); } } if (get_theme_mod('airinblog_cus_post_meta_tag', 1) == 1) { $lay_tag = get_theme_mod('airinblog_cus_post_meta_layout_tag', 'bottom'); if ($lay == $lay_tag) { airinblog_fun_post_meta_tax_tag(); } } } } // Data processing function airinblog_fun_categorized_blog() { if (false === ($trans_cat = get_transient('airinblog_transient_categories'))) { $trans_cat = get_categories(array( 'fields' => 'ids', 'hide_empty' => 1, 'number' => 2, )); $trans_cat = count($trans_cat); set_transient('airinblog_transient_categories', $trans_cat); } if ($trans_cat > 1) { return true; } else { return false; } } function airinblog_fun_tag_cat_transient() { if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return; } delete_transient('airinblog_transient_categories'); } add_action('edit_category', 'airinblog_fun_tag_cat_transient'); add_action('save_post', 'airinblog_fun_tag_cat_transient');