Пример #1
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function material_design_par_amauri_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__('Posted on %s', 'material-design-par-amauri'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html__('by %s', 'material-design-par-amauri'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span>');
     if (is_singular()) {
         echo '<img width="36" height="36" src="' . esc_url(get_template_directory_uri() . '/image/icon/_' . get_post_format() . '.png') . '" alt="' . get_post_format() . '" /> ';
     }
     echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span> ';
     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__(', ', 'material-design-par-amauri'));
         if ($categories_list && material_design_par_amauri_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('in %1$s', 'material-design-par-amauri') . '</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__(', ', 'material-design-par-amauri'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__(', tagged: %1$s', 'material-design-par-amauri') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
 }
Пример #2
0
				<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?', 'material-design-par-amauri');
?>
</p>

					<?php 
get_search_form();
?>

					<?php 
the_widget('WP_Widget_Recent_Posts');
?>

					<?php 
if (material_design_par_amauri_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', 'material-design-par-amauri');
    ?>
</h2>
						<ul>
						<?php 
    wp_list_categories(array('orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10));
    ?>
						</ul>
					</div><!-- .widget -->
					<?php 
}