Пример #1
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function wedlock_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', 'wedlock'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     /* translators: used between list items, there is a space after the comma */
     $categories_list = get_the_category_list(esc_html__(', ', 'wedlock'));
     echo '<span class="posted-on">' . $posted_on . '</span> - ';
     // WPCS: XSS OK.
     if ($categories_list && wedlock_categorized_blog()) {
         printf('<span class="cat-links">' . esc_html__('%1$s', 'wedlock') . '</span>', $categories_list);
         // WPCS: XSS OK.
     }
 }
Пример #2
0
esc_html_e('Oops! That page can&rsquo;t be found.', 'wedlock');
?>
</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?', 'wedlock');
?>
</p>

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

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

					<?php