' . esc_html(get_the_author()) . ''
);
?>
%2$s';
if (get_the_time('U') !== get_the_modified_time('U')) {
$cat_time_string = '';
}
$cat_time_string = sprintf($cat_time_string,
esc_attr(get_the_date('c')),
esc_html(get_the_date()),
esc_attr(get_the_modified_date('c')),
esc_html(get_the_modified_date())
);
// Display - Post creation date
echo sprintf(
esc_html_x('%s', 'post date', 'airin-blog'),
$cat_time_string
);
?>
%2$s';
if (get_the_modified_time('U') !== get_the_time('U')) {
$time_cat_up = '';
}
$time_cat_up = sprintf($time_cat_up,
esc_attr(get_the_modified_date('c')),
esc_html(get_the_modified_date()),
esc_attr(get_the_date('c')),
esc_html(get_the_date())
);
// Display - Record update date
echo sprintf(
esc_html_x('%s', 'post date', 'airin-blog'),
$time_cat_up
);
?>
, ');
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');
}
}
}
?>
' . esc_html(get_the_author()) . ''
);
?>
%2$s';
if (get_the_time('U') !== get_the_modified_time('U')) {
$post_time_string = '';
}
$post_time_string = sprintf($post_time_string,
esc_attr(get_the_date('c')),
esc_html(get_the_date()),
esc_attr(get_the_modified_date('c')),
esc_html(get_the_modified_date())
);
// Display - Creation date
echo sprintf(
esc_html_x('%s', 'post date', 'airin-blog'),
$post_time_string
);
?>
%2$s';
if (get_the_modified_time('U') !== get_the_time('U')) {
$time_post_up = '';
}
$time_post_up = sprintf($time_post_up,
esc_attr(get_the_modified_date('c')),
esc_html(get_the_modified_date()),
esc_attr(get_the_date('c')),
esc_html(get_the_date())
);
// Display - Record update date
echo sprintf(
esc_html_x('%s', 'post date', 'airin-blog'),
$time_post_up
);
?>
, ');
if ($post_list_cat_top && airinblog_fun_categorized_blog()) {
$post_label_cat_top = '';
if ($label_tax_none != 1) {
$post_label_cat_top = esc_html__('Categories:', 'airin-blog');
}
echo '
' . esc_html($post_label_cat_top) . ' ';
printf('%1$s', $post_list_cat_top);
echo '
';
}
?>
, ');
if ($post_list_tag_top) {
printf('
'. $post_label_tag_top . ' ' . '%1$s', $post_list_tag_top . '
');
}
?>
';
$post_list_cat_bottom = get_the_category_list(', ');
if ($post_list_cat_bottom && airinblog_fun_categorized_blog()) {
$post_label_cat_bottom = '';
if ($label_tax_none != 1) {
$post_label_cat_bottom = esc_html__('Categories:', 'airin-blog');
}
echo '' . esc_html($post_label_cat_bottom) . ' ';
printf('%1$s', $post_list_cat_bottom);
echo '
';
}
echo '';
}
// Meta Tags
if (!empty(get_the_tag_list())) {
$activ_tag = esc_attr(get_theme_mod('airinblog_cus_post_meta_tag', 1));
if ($activ_tag == 1) {
$layout_tag = esc_attr(get_theme_mod('airinblog_cus_post_meta_layout_tag', 'bottom'));
if ($layout_tag == 'bottom') {
echo '';
$post_label_tag_bottom = '';
if ($label_tax_none != 1) {
$post_label_tag_bottom = esc_html__('Tags:', 'airin-blog');
}
$post_list_tag_bottom = get_the_tag_list('', '
, ');
if ($post_list_tag_bottom) {
printf('
'. $post_label_tag_bottom . ' ' . '%1$s', $post_list_tag_bottom . '
');
}
echo '
';
}
}
}
}
}
// 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');