/**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function skelton_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'skelton'));
         if ($categories_list && categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'skelton') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', 'skelton'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'skelton') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         /* translators: %s: post title */
         comments_popup_link(sprintf(wp_kses(__('Leave a Comment<span class="screen-reader-text"> on %s</span>', 'skelton'), array('span' => array('class' => array()))), get_the_title()));
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'skelton'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
Пример #2
0
/**
 * Prints HTML with meta information for the categories, tags.
 */
function entry_meta()
{
    if (is_sticky() && is_home() && !is_paged()) {
        printf('<span class="sticky-post">%s</span>', esc_attr__('Featured', 'bourboneat'));
    }
    $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>', esc_html_x('Format', 'Used before post format.', 'bourboneat')), esc_url(get_post_format_link($format)), esc_html(get_post_format_string($format)));
    }
    if (in_array(get_post_type(), array('post', 'attachment'))) {
        $allowed_time_html = array('time' => array('class' => array(), 'datetime' => array()));
        $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>', esc_html_x('Posted on', 'Used before publish date.', 'bourboneat'), esc_url(get_permalink()), $time_string = wp_kses($time_string, $allowed_time_html));
    }
    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>', esc_html_x('Author', 'Used before post author name.', 'bourboneat'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
        }
        $categories_list = get_the_category_list(esc_html_x(', ', 'Used between list items, there is a space after the comma.', 'bourboneat'));
        if ($categories_list && categorized_blog()) {
            printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', esc_html_x('Categories', 'Used before category names.', 'bourboneat'), $categories_list);
        }
        $tags_list = get_the_tag_list('', esc_html_x(', ', 'Used between list items, there is a space after the comma.', 'bourboneat'));
        if ($tags_list) {
            printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', esc_html_x('Tags', 'Used before tag names.', 'bourboneat'), $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 &times; %4$s</a></span>', esc_html_x('Full size', 'Used before full size attachment link.', 'bourboneat'), esc_url(wp_get_attachment_url()), esc_html($metadata['width'], $metadata['height']));
    }
    if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
        echo '<span class="comments-link">';
        comments_popup_link(esc_attr__('Leave a comment', 'bourboneat'), esc_attr__('1 Comment', 'bourboneat'), esc_attr__('% Comments', 'bourboneat'));
        echo '</span>';
    }
}
Пример #3
0
esc_html_e('Oops! That page can&rsquo;t be found.', 'wp-theme-dev-starter');
?>
</h1>
				</header><!-- .page-header -->

				<div class="page-content">
					<p><?php 
esc_html_e('It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'wp-theme-dev-starter');
?>
</p>

					<?php 
get_search_form();
the_widget('WP_Widget_Recent_Posts');
// Only show the widget if site has multiple categories.
if (categorized_blog()) {
    ?>

					<div class="widget widget_categories">
						<h2 class="widget-title"><?php 
    esc_html_e('Most Used Categories', 'wp-theme-dev-starter');
    ?>
</h2>
						<ul>
						<?php 
    wp_list_categories(array('orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10));
    ?>
						</ul>
					</div><!-- .widget -->

					<?php 
Пример #4
0
/**
 * Prints HTML with meta information for the categories, tags and comments.
 */
function entry_footer()
{
    // Hide category and tag text for pages.
    if ('post' == get_post_type()) {
        /* translators: used between list items, there is a space after the comma */
        $categories_list = get_the_category_list(__(', ', 'the-one'));
        if ($categories_list && categorized_blog()) {
            printf('<span class="cat-links">' . __('Posted in %1$s', 'the-one') . '</span>', $categories_list);
        }
        /* translators: used between list items, there is a space after the comma */
        $tags_list = get_the_tag_list('', __(', ', 'the-one'));
        if ($tags_list) {
            printf('<span class="tags-links">' . __('Tagged %1$s', 'the-one') . '</span>', $tags_list);
        }
        /* translators: used between list items, there is a space after the comma */
        if (taxonomy_exists('series')) {
            $series_list = get_the_term_list(get_the_ID(), 'series', '', __(', ', 'the-one'));
            if ($series_list && !is_wp_error($series_list)) {
                printf('<span class="cat-links">' . __('Series %1$s', 'the-one') . '</span>', $series_list);
            }
        }
    }
    if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
        echo '<span class="comments-link">';
        comments_popup_link(__('Leave a comment', 'the-one'), __('1 Comment', 'the-one'), __('% Comments', 'the-one'));
        echo '</span>';
    }
}
Пример #5
0
	
		<?php 
the_content();
?>
		<?php 
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:'), 'after' => '</div>'));
?>
	</div><!-- .entry-content -->

	<footer class="entry-meta">
		<?php 
/* translators: used between list items, there is a space after the comma */
$category_list = get_the_category_list(__(', '));
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list('', __(', '));
if (!categorized_blog()) {
    // This blog only has 1 category so we just need to worry about tags in the meta text
    if ('' != $tag_list) {
        $meta_text = __('This entry was tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.');
    } else {
        $meta_text = __('Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.');
    }
} else {
    // But this blog has loads of categories so we should probably display them here
    if ('' != $tag_list) {
        $meta_text = __('This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.');
    } else {
        $meta_text = __('This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.');
    }
}
// end check for categories on this blog