Skip to content

Commit 223a6e8

Browse files
committedMay 10, 2013
Initial commit from code.svn (no _s external yet)
0 parents  commit 223a6e8

40 files changed

+3739
-0
lines changed
 

‎404.php

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
/**
3+
* The template for displaying 404 pages (Not Found).
4+
*
5+
* @package Underscores.me
6+
* @since Underscores.me 1.0
7+
*/
8+
9+
get_header(); ?>
10+
11+
<div id="primary" class="site-content">
12+
<div id="content" role="main">
13+
14+
<article id="post-0" class="post error404 not-found">
15+
<header class="entry-header">
16+
<h1 class="entry-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'underscoresme' ); ?></h1>
17+
</header><!-- .entry-header -->
18+
19+
<div class="entry-content">
20+
<p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'underscoresme' ); ?></p>
21+
22+
<?php get_search_form(); ?>
23+
24+
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
25+
26+
<div class="widget">
27+
<h2 class="widgettitle"><?php _e( 'Most Used Categories', 'underscoresme' ); ?></h2>
28+
<ul>
29+
<?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
30+
</ul>
31+
</div><!-- .widget -->
32+
33+
<?php
34+
/* translators: %1$s: smilie */
35+
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'underscoresme' ), convert_smilies( ':)' ) ) . '</p>';
36+
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
37+
?>
38+
39+
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
40+
41+
</div><!-- .entry-content -->
42+
</article><!-- #post-0 .post .error404 .not-found -->
43+
44+
</div><!-- #content -->
45+
</div><!-- #primary .site-content -->
46+
47+
<?php get_footer(); ?>

‎archive.php

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?php
2+
/**
3+
* The template for displaying Archive pages.
4+
*
5+
* Learn more: http://codex.wordpress.org/Template_Hierarchy
6+
*
7+
* @package Underscores.me
8+
* @since Underscores.me 1.0
9+
*/
10+
11+
get_header(); ?>
12+
13+
<section id="primary" class="site-content">
14+
<div id="content" role="main">
15+
16+
<?php if ( have_posts() ) : ?>
17+
18+
<header class="page-header">
19+
<h1 class="page-title">
20+
<?php
21+
if ( is_category() ) {
22+
printf( __( 'Category Archives: %s', 'underscoresme' ), '<span>' . single_cat_title( '', false ) . '</span>' );
23+
24+
} elseif ( is_tag() ) {
25+
printf( __( 'Tag Archives: %s', 'underscoresme' ), '<span>' . single_tag_title( '', false ) . '</span>' );
26+
27+
} elseif ( is_author() ) {
28+
/* Queue the first post, that way we know
29+
* what author we're dealing with (if that is the case).
30+
*/
31+
the_post();
32+
printf( __( 'Author Archives: %s', 'underscoresme' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
33+
/* Since we called the_post() above, we need to
34+
* rewind the loop back to the beginning that way
35+
* we can run the loop properly, in full.
36+
*/
37+
rewind_posts();
38+
39+
} elseif ( is_day() ) {
40+
printf( __( 'Daily Archives: %s', 'underscoresme' ), '<span>' . get_the_date() . '</span>' );
41+
42+
} elseif ( is_month() ) {
43+
printf( __( 'Monthly Archives: %s', 'underscoresme' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
44+
45+
} elseif ( is_year() ) {
46+
printf( __( 'Yearly Archives: %s', 'underscoresme' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
47+
48+
} else {
49+
_e( 'Archives', 'underscoresme' );
50+
51+
}
52+
?>
53+
</h1>
54+
<?php
55+
if ( is_category() ) {
56+
// show an optional category description
57+
$category_description = category_description();
58+
if ( ! empty( $category_description ) )
59+
echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
60+
61+
} elseif ( is_tag() ) {
62+
// show an optional tag description
63+
$tag_description = tag_description();
64+
if ( ! empty( $tag_description ) )
65+
echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
66+
}
67+
?>
68+
</header><!-- .page-header -->
69+
70+
<?php rewind_posts(); ?>
71+
72+
<?php underscoresme_content_nav( 'nav-above' ); ?>
73+
74+
<?php /* Start the Loop */ ?>
75+
<?php while ( have_posts() ) : the_post(); ?>
76+
77+
<?php
78+
/* Include the Post-Format-specific template for the content.
79+
* If you want to overload this in a child theme then include a file
80+
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
81+
*/
82+
get_template_part( 'content', get_post_format() );
83+
?>
84+
85+
<?php endwhile; ?>
86+
87+
<?php underscoresme_content_nav( 'nav-below' ); ?>
88+
89+
<?php else : ?>
90+
91+
<?php get_template_part( 'no-results', 'archive' ); ?>
92+
93+
<?php endif; ?>
94+
95+
</div><!-- #content -->
96+
</section><!-- #primary .site-content -->
97+
98+
<?php get_sidebar(); ?>
99+
<?php get_footer(); ?>

‎comments.php

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/**
3+
* The template for displaying Comments.
4+
*
5+
* The area of the page that contains both current comments
6+
* and the comment form. The actual display of comments is
7+
* handled by a callback to underscoresme_comment() which is
8+
* located in the functions.php file.
9+
*
10+
* @package Underscores.me
11+
* @since Underscores.me 1.0
12+
*/
13+
?>
14+
15+
<?php
16+
/*
17+
* If the current post is protected by a password and
18+
* the visitor has not yet entered the password we will
19+
* return early without loading the comments.
20+
*/
21+
if ( post_password_required() )
22+
return;
23+
?>
24+
25+
<div id="comments" class="comments-area">
26+
27+
<?php // You can start editing here -- including this comment! ?>
28+
29+
<?php if ( have_comments() ) : ?>
30+
<h2 class="comments-title">
31+
<?php
32+
printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'underscoresme' ),
33+
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
34+
?>
35+
</h2>
36+
37+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
38+
<nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation">
39+
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'underscoresme' ); ?></h1>
40+
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'underscoresme' ) ); ?></div>
41+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'underscoresme' ) ); ?></div>
42+
</nav><!-- #comment-nav-before .site-navigation .comment-navigation -->
43+
<?php endif; // check for comment navigation ?>
44+
45+
<ol class="commentlist">
46+
<?php
47+
/* Loop through and list the comments. Tell wp_list_comments()
48+
* to use underscoresme_comment() to format the comments.
49+
* If you want to overload this in a child theme then you can
50+
* define underscoresme_comment() and that will be used instead.
51+
* See underscoresme_comment() in inc/template-tags.php for more.
52+
*/
53+
wp_list_comments( array( 'callback' => 'underscoresme_comment' ) );
54+
?>
55+
</ol><!-- .commentlist -->
56+
57+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
58+
<nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation">
59+
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'underscoresme' ); ?></h1>
60+
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'underscoresme' ) ); ?></div>
61+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'underscoresme' ) ); ?></div>
62+
</nav><!-- #comment-nav-below .site-navigation .comment-navigation -->
63+
<?php endif; // check for comment navigation ?>
64+
65+
<?php endif; // have_comments() ?>
66+
67+
<?php
68+
// If comments are closed and there are comments, let's leave a little note, shall we?
69+
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
70+
?>
71+
<p class="nocomments"><?php _e( 'Comments are closed.', 'underscoresme' ); ?></p>
72+
<?php endif; ?>
73+
74+
<?php comment_form(); ?>
75+
76+
</div><!-- #comments .comments-area -->

‎content-page.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* The template used for displaying page content in page.php
4+
*
5+
* @package Underscores.me
6+
* @since Underscores.me 1.0
7+
*/
8+
?>
9+
10+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
11+
<header class="entry-header">
12+
<h1 class="entry-title"><?php the_title(); ?></h1>
13+
</header><!-- .entry-header -->
14+
15+
<div class="entry-content">
16+
<?php the_content(); ?>
17+
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'underscoresme' ), 'after' => '</div>' ) ); ?>
18+
<?php edit_post_link( __( 'Edit', 'underscoresme' ), '<span class="edit-link">', '</span>' ); ?>
19+
</div><!-- .entry-content -->
20+
</article><!-- #post-<?php the_ID(); ?> -->

‎content-single.php

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/**
3+
* @package Underscores.me
4+
* @since Underscores.me 1.0
5+
*/
6+
?>
7+
8+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
9+
<header class="entry-header">
10+
<h1 class="entry-title"><?php the_title(); ?></h1>
11+
12+
<div class="entry-meta">
13+
<?php underscoresme_posted_on(); ?>
14+
</div><!-- .entry-meta -->
15+
</header><!-- .entry-header -->
16+
17+
<div class="entry-content">
18+
<?php the_content(); ?>
19+
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'underscoresme' ), 'after' => '</div>' ) ); ?>
20+
</div><!-- .entry-content -->
21+
22+
<footer class="entry-meta">
23+
<?php
24+
/* translators: used between list items, there is a space after the comma */
25+
$category_list = get_the_category_list( __( ', ', 'underscoresme' ) );
26+
27+
/* translators: used between list items, there is a space after the comma */
28+
$tag_list = get_the_tag_list( '', ', ' );
29+
30+
if ( ! underscoresme_categorized_blog() ) {
31+
// This blog only has 1 category so we just need to worry about tags in the meta text
32+
if ( '' != $tag_list ) {
33+
$meta_text = __( 'This entry was tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'underscoresme' );
34+
} else {
35+
$meta_text = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'underscoresme' );
36+
}
37+
38+
} else {
39+
// But this blog has loads of categories so we should probably display them here
40+
if ( '' != $tag_list ) {
41+
$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>.', 'underscoresme' );
42+
} else {
43+
$meta_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'underscoresme' );
44+
}
45+
46+
} // end check for categories on this blog
47+
48+
printf(
49+
$meta_text,
50+
$category_list,
51+
$tag_list,
52+
get_permalink(),
53+
the_title_attribute( 'echo=0' )
54+
);
55+
?>
56+
57+
<?php edit_post_link( __( 'Edit', 'underscoresme' ), '<span class="edit-link">', '</span>' ); ?>
58+
</footer><!-- .entry-meta -->
59+
</article><!-- #post-<?php the_ID(); ?> -->

‎content.php

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
/**
3+
* @package Underscores.me
4+
* @since Underscores.me 1.0
5+
*/
6+
?>
7+
8+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
9+
<header class="entry-header">
10+
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'underscoresme' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
11+
12+
<?php if ( 'post' == get_post_type() ) : ?>
13+
<div class="entry-meta">
14+
<?php underscoresme_posted_on(); ?>
15+
</div><!-- .entry-meta -->
16+
<?php endif; ?>
17+
</header><!-- .entry-header -->
18+
19+
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
20+
<div class="entry-summary">
21+
<?php the_excerpt(); ?>
22+
</div><!-- .entry-summary -->
23+
<?php else : ?>
24+
<div class="entry-content">
25+
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'underscoresme' ) ); ?>
26+
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'underscoresme' ), 'after' => '</div>' ) ); ?>
27+
</div><!-- .entry-content -->
28+
<?php endif; ?>
29+
30+
<footer class="entry-meta">
31+
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
32+
<?php
33+
/* translators: used between list items, there is a space after the comma */
34+
$categories_list = get_the_category_list( __( ', ', 'underscoresme' ) );
35+
if ( $categories_list && underscoresme_categorized_blog() ) :
36+
?>
37+
<span class="cat-links">
38+
<?php printf( __( 'Posted in %1$s', 'underscoresme' ), $categories_list ); ?>
39+
</span>
40+
<?php endif; // End if categories ?>
41+
42+
<?php
43+
/* translators: used between list items, there is a space after the comma */
44+
$tags_list = get_the_tag_list( '', __( ', ', 'underscoresme' ) );
45+
if ( $tags_list ) :
46+
?>
47+
<span class="sep"> | </span>
48+
<span class="tag-links">
49+
<?php printf( __( 'Tagged %1$s', 'underscoresme' ), $tags_list ); ?>
50+
</span>
51+
<?php endif; // End if $tags_list ?>
52+
<?php endif; // End if 'post' == get_post_type() ?>
53+
54+
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
55+
<span class="sep"> | </span>
56+
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'underscoresme' ), __( '1 Comment', 'underscoresme' ), __( '% Comments', 'underscoresme' ) ); ?></span>
57+
<?php endif; ?>
58+
59+
<?php edit_post_link( __( 'Edit', 'underscoresme' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
60+
</footer><!-- .entry-meta -->
61+
</article><!-- #post-<?php the_ID(); ?> -->

0 commit comments

Comments
 (0)
Please sign in to comment.