예제 #1
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function lounge_act_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 class="updated" datetime="%3$s">%4$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', 'loungeact'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark"><i class="fa fa-calendar posted-on-icon"></i>' . $time_string . '</a>');
     $byline = sprintf(esc_html_x(' %s / ', 'post author', 'loungeact'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . get_avatar(get_the_author_meta('ID'), 16, '', '', array('class' => 'img-circle byline-icon')) . esc_html(get_the_author()) . '</a></span>');
     $categories = "";
     // Hide category 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__(', ', 'loungeact'));
         if ($categories_list && lounge_act_categorized_blog()) {
             $categories = '<span class="cat-links"><i class="fa fa-folder-open categories-icon"></i>' . $categories_list . '</span>';
             // WPCS: XSS OK.
         }
     }
     echo '</span><span class="byline"> ' . $byline . '<span class="posted-on">' . $posted_on . '</span>' . $categories;
     // WPCS: XSS OK.
     edit_post_link(sprintf(esc_html__('Edit %s', 'loungeact'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link"><i class="fa fa-pencil edit-link-icon"></i>', '</span>');
 }
예제 #2
0
					<h1 class="page-title"><?php 
esc_html_e('Oops! That page can&rsquo;t be found.', 'lounge-act');
?>
</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?', 'lounge-act');
?>
</p>

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

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