示例#1
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function glutton_posted_on()
 {
     $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_string = sprintf($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()));
     $posted_on = sprintf(esc_html_x('%s', 'post date', 'glutton'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     echo '<span class="posted-on">' . $posted_on . '</span>';
     // WPCS: XSS OK.
     // 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__(', ', 'glutton'));
         if ($categories_list && glutton_categorized_blog()) {
             printf(' ~ <span class="cat-links">' . esc_html__('%1$s', 'glutton') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
     }
 }
示例#2
0
文件: 404.php 项目: Awothemes/Glutton
esc_html_e('Oops! That page can&rsquo;t be found.', 'glutton');
?>
</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?', 'glutton');
?>
</p>

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

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

					<?php