/** * Prints HTML with meta information for the categories, tags. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } if (in_array(get_post_type(), array('post', 'attachment'))) { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('D')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date()); printf('<li class="icon fa-calendar posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></li>', _x('', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), get_the_date('d/M')); } if ('post' == get_post_type()) { if (is_singular() || is_multi_author()) { // printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', // _x( 'Author', 'Used before post author name.', 'twentyfifteen' ), // esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), // get_the_author() // ); } $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<li class="cat-links icon fa fa-clone"><span class="screen-reader-text">%1$s </span>%2$s</li>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($tags_list) { printf('<li class="tags-links icon fa-tags"><span class="screen-reader-text">%1$s </span>%2$s</li>', _x('', 'Used before tag names.', 'twentyfifteen'), $tags_list); } } if (is_attachment() && wp_attachment_is_image()) { // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'twentyfifteen'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']); } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<li class="icon fa-comment">'; /* translators: %s: post title */ echo get_comments_number(); echo '</li>'; /* translators: %s: post title */ // $categories = get_categories(); // foreach ($categories as $key => $category) { // echo '<li class="icon fa-clone">'; // echo $category->name; // echo '</li>'; // } } }
function twentyfifteen_entry_meta() { $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'twentyfifteen'), $tags_list); } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'twentyfifteen'), __('1 Comment', 'twentyfifteen'), __('% Comments', 'twentyfifteen')); echo '</span>'; } }
/** * Prints HTML with meta information for the categories, tags. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } if (in_array(get_post_type(), array('post', 'attachment'))) { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date()); printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), $time_string); } if ('post' == get_post_type()) { if (is_singular() || is_multi_author()) { printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'twentyfifteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'twentyfifteen'), $tags_list); } } if (is_attachment() && wp_attachment_is_image()) { // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'twentyfifteen'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']); } $_number_roman = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); $_number_tibet = array('༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩'); $_number = get_comments_number(); $new_number = str_replace($_number_roman, $_number_tibet, $_number); //echo $new_number; if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'twentyfifteen'), __('1 Comment', 'twentyfifteen'), __('% Comments', 'twentyfifteen')); echo '</span>'; } }
function twentyfifteen_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen')); } //投稿を先頭に固定 //投稿日|更新日|投稿者|カテゴリー|タグ|画像サイズ(横 x 縦)表示|コメントをどうぞ|コメント数(順同) if (in_array(get_post_type(), array('post', 'attachment'))) { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date()); printf('<span class="posted-on"><span class="screen-reader-text">%1$s</span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), $time_string); echo '<span class="humantime">('; echo human_time_diff(get_the_time('U'), current_time('timestamp')); echo '前)</span>'; } if ('post' == get_post_type()) { if (is_singular() && is_multi_author()) { printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s</span><a class="url fn n" href="%2$s">%3$s</a></span></span><br />', _x('Author', 'Used before post author name.', 'twentyfifteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } $categories_list = get_the_category_list(_x(',', 'Used between list items,there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s</span>%2$s</span>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list); } $tags_list = get_the_tag_list('', _x(',', 'Used between list items,there is a space after the comma.', 'twentyfifteen')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s</span>%2$s</span>', _x('Tags', 'Used before tag names.', 'twentyfifteen'), $tags_list); } } if (is_attachment() && wp_attachment_is_image()) { $metadata = wp_get_attachment_metadata(); printf('<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s ×%4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'twentyfifteen'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']); } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'twentyfifteen'), __('1 Comment', 'twentyfifteen'), __('% Comments', 'twentyfifteen')); echo '</span>'; } }
/** * Prints HTML with meta information for the categories, tags. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } if (in_array(get_post_type(), array('post'))) { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date()); printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), $time_string); } if ('post' == get_post_type()) { if (is_singular() || is_multi_author()) { printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'twentyfifteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'twentyfifteen'), $tags_list); } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'twentyfifteen'), __('1 Comment', 'twentyfifteen'), __('% Comments', 'twentyfifteen')); echo '</span>'; } }
<p class="project-date light no-margin"> <?php the_date(); ?> </p> <?php } ?> </div> </div> <div class="row"> <div class="col-sm-12"> <p class="light margin-bottom project-description"> <?php echo the_excerpt_max_charlength(120); ?> </p> </div> <div class="col-sm-5 text-right no-padding-left hidden-xs small hidden"> <?php $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { echo $categories_list; } ?> </div> </div> </div>
/** ENTRY META * Prints HTML with meta information for the categories, tags. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } $okArray = array('attachment', "post"); $webcomicsPostType = get_webcomic_collections(); foreach ($webcomicsPostType as $webcomic) { array_push($okArray, $webcomic); } if (in_array(get_post_type(), $okArray)) { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date()); printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), $time_string); } if ('post' == get_post_type()) { if (is_singular() || is_multi_author()) { printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'twentyfifteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'twentyfifteen'), $tags_list); } } if (is_attachment() && wp_attachment_is_image()) { // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'twentyfifteen'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']); } if (in_array(get_post_type(), $webcomicsPostType)) { if (is_singular() || is_multi_author()) { printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'twentyfifteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } $collection_list = WebcomicTag::get_the_webcomic_collection_list(0, "", __(', ', 'twentytwelve')); $id = get_the_ID(); $storylineObj = wp_get_object_terms($id, get_post_type() . "_storyline"); $isChild = false; $parentStory; foreach ($storylineObj as $storyline) { if ($storyline->parent != 0) { $isChild = true; $parentStory = get_term_by("id", $storyline->parent, get_post_type() . "_storyline"); } } //var_dump($collection_list, $storylineObj, $isChild,$parentStory); if ($isChild) { $parentName = $parentStory->name; $storyline_list = WebcomicTag::get_the_webcomic_term_list(0, 'storyline', "<a href='" . get_term_link($parentStory) . "'>" . $parentName . "</a> > ", __(', ', 'twentytwelve')); } else { $storyline_list = WebcomicTag::get_the_webcomic_term_list(0, 'storyline', "", __(', ', 'twentytwelve')); } if ($collection_list && $storyline_list) { printf('<br><span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s > %3$s</span><br>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $collection_list, $storyline_list); } $character_list = WebcomicTag::get_the_webcomic_term_list(0, 'character', '', __(', ', 'twentytwelve')); if ($character_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span><br>', _x('Tags', 'Used before tag names.', 'twentyfifteen'), $character_list); } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'twentyfifteen'), __('1 Comment', 'twentyfifteen'), __('% Comments', 'twentyfifteen')); echo '</span>'; } }
/** * Prints HTML with meta information for the categories, tags. * * @since Twenty Fifteen UoY 1.0 */ function twentyfifteen_uoy_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } if ('post' == get_post_type()) { $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<span class="cat-links">%1$s %2$s</span>', _x('Posted in', 'Used before category names.', 'twentyfifteen'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen')); if ($tags_list) { printf('<span class="tags-links">%1$s %2$s</span>', _x('Tagged with', 'Used before tag names.', 'twentyfifteen'), $tags_list); } } if (is_attachment() && wp_attachment_is_image()) { // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'twentyfifteen'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']); } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; /* translators: %s: post title */ comments_popup_link(sprintf(__('Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentyfifteen'), get_the_title())); echo '</span>'; } }
function twentyfifteen_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'diductio')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'diductio')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } if ('post' == get_post_type()) { $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'diductio')); if ($categories_list && twentyfifteen_categorized_blog()) { printf('<span class="cat-links 2"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'diductio'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'diductio')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'diductio'), $tags_list); } } if (is_attachment() && wp_attachment_is_image()) { // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'diductio'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']); } }