forked from mirror/_s
_s: initial fork of Toolbox
This commit is contained in:
commit
edfeccc255
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (Not Found).
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<article id="post-0" class="post error404 not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Well this is somewhat embarrassing, isn’t it?', '_s' ); ?></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help.', '_s' ); ?></p>
|
||||
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
|
||||
|
||||
<div class="widget">
|
||||
<h2 class="widgettitle"><?php _e( 'Most Used Categories', '_s' ); ?></h2>
|
||||
<ul>
|
||||
<?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
/* translators: %1$s: smilie */
|
||||
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', '_s' ), convert_smilies( ':)' ) ) . '</p>';
|
||||
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
|
||||
?>
|
||||
|
||||
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying Archive pages.
|
||||
*
|
||||
* Used to display archive-type pages if nothing more specific matches a query.
|
||||
* For example, puts together date-based pages if no date.php file exists.
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title">
|
||||
<?php
|
||||
if ( is_day() ) :
|
||||
printf( __( 'Daily Archives: %s', '_s' ), '<span>' . get_the_date() . '</span>' );
|
||||
elseif ( is_month() ) :
|
||||
printf( __( 'Monthly Archives: %s', '_s' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
|
||||
elseif ( is_year() ) :
|
||||
printf( __( 'Yearly Archives: %s', '_s' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
|
||||
else :
|
||||
_e( 'Archives', '_s' );
|
||||
endif;
|
||||
?>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<?php rewind_posts(); ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-below' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying Author Archive pages.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<?php
|
||||
/* Queue the first post, that way we know
|
||||
* what author we're dealing with (if that is the case).
|
||||
*
|
||||
* We reset this later so we can run the loop
|
||||
* properly with a call to rewind_posts().
|
||||
*/
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', '_s' ), '<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>' ); ?></h1>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
/* Since we called the_post() above, we need to
|
||||
* rewind the loop back to the beginning that way
|
||||
* we can run the loop properly, in full.
|
||||
*/
|
||||
rewind_posts();
|
||||
?>
|
||||
|
||||
<?php _s_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-below' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying Category Archive pages.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php
|
||||
printf( __( 'Category Archives: %s', '_s' ), '<span>' . single_cat_title( '', false ) . '</span>' );
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
$category_description = category_description();
|
||||
if ( ! empty( $category_description ) )
|
||||
echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
|
||||
?>
|
||||
</header>
|
||||
|
||||
<?php _s_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-below' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying Comments.
|
||||
*
|
||||
* The area of the page that contains both current comments
|
||||
* and the comment form. The actual display of comments is
|
||||
* handled by a callback to _s_comment() which is
|
||||
* located in the functions.php file.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
<div id="comments">
|
||||
<?php if ( post_password_required() ) : ?>
|
||||
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', '_s' ); ?></p>
|
||||
</div><!-- #comments -->
|
||||
<?php
|
||||
/* Stop the rest of comments.php from being processed,
|
||||
* but don't kill the script entirely -- we still have
|
||||
* to fully load the template.
|
||||
*/
|
||||
return;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php // You can start editing here -- including this comment! ?>
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h2 id="comments-title">
|
||||
<?php
|
||||
printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), '_s' ),
|
||||
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||
<nav id="comment-nav-above">
|
||||
<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; // check for comment navigation ?>
|
||||
|
||||
<ol class="commentlist">
|
||||
<?php
|
||||
/* Loop through and list the comments. Tell wp_list_comments()
|
||||
* to use _s_comment() to format the comments.
|
||||
* If you want to overload this in a child theme then you can
|
||||
* define _s_comment() and that will be used instead.
|
||||
* See _s_comment() in _s/functions.php for more.
|
||||
*/
|
||||
wp_list_comments( array( 'callback' => '_s_comment' ) );
|
||||
?>
|
||||
</ol>
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||
<nav id="comment-nav-below">
|
||||
<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; // check for comment navigation ?>
|
||||
|
||||
<?php endif; // have_comments() ?>
|
||||
|
||||
<?php
|
||||
// If comments are closed and there are no comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
<p class="nocomments"><?php _e( 'Comments are closed.', '_s' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
|
||||
</div><!-- #comments -->
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Aside Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', '_s' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', '_s' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php _s_posted_on(); ?>
|
||||
<?php if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', '_s' ), __( '1 Comment', '_s' ), __( '% Comments', '_s' ) ); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- #entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Gallery Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', '_s' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php _s_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php if ( post_password_required() ) : ?>
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', '_s' ) ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php
|
||||
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
|
||||
if ( $images ) :
|
||||
$total_images = count( $images );
|
||||
$image = array_shift( $images );
|
||||
$image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
|
||||
?>
|
||||
|
||||
<figure class="gallery-thumb">
|
||||
<a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
|
||||
</figure><!-- .gallery-thumb -->
|
||||
|
||||
<p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, '_s' ),
|
||||
'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', '_s' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
|
||||
number_format_i18n( $total_images )
|
||||
); ?></em></p>
|
||||
<?php endif; ?>
|
||||
<?php the_excerpt(); ?>
|
||||
<?php endif; ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', '_s' ) );
|
||||
if ( $categories_list && _s_categorized_blog() ) :
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( 'Posted in %1$s', '_s' ), $categories_list ); ?>
|
||||
</span>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if categories ?>
|
||||
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', '_s' ) );
|
||||
if ( $tags_list ) :
|
||||
?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( 'Tagged %1$s', '_s' ), $tags_list ); ?>
|
||||
</span>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
<?php endif; // End if 'post' == get_post_type() ?>
|
||||
|
||||
<?php if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', '_s' ), __( '1 Comment', '_s' ), __( '% Comments', '_s' ) ); ?></span>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- #entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Image Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', '_s' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', '_s' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php _s_posted_on(); ?>
|
||||
<?php if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', '_s' ), __( '1 Comment', '_s' ), __( '% Comments', '_s' ) ); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- #entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* The template used for displaying page content in page.php
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php _s_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$category_list = get_the_category_list( __( ', ', '_s' ) );
|
||||
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tag_list = get_the_tag_list( '', ', ' );
|
||||
|
||||
if ( ! _s_categorized_blog() ) {
|
||||
// This blog only has 1 category so we just need to worry about tags in the meta text
|
||||
if ( '' != $tag_list ) {
|
||||
$meta_text = __( 'This entry was tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', '_s' );
|
||||
} else {
|
||||
$meta_text = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', '_s' );
|
||||
}
|
||||
|
||||
} else {
|
||||
// But this blog has loads of categories so we should probably display them here
|
||||
if ( '' != $tag_list ) {
|
||||
$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>.', '_s' );
|
||||
} else {
|
||||
$meta_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', '_s' );
|
||||
}
|
||||
|
||||
} // end check for categories on this blog
|
||||
|
||||
printf(
|
||||
$meta_text,
|
||||
$category_list,
|
||||
$tag_list,
|
||||
get_permalink(),
|
||||
the_title_attribute( 'echo=0' )
|
||||
);
|
||||
?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/**
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', '_s' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||
|
||||
<?php if ( 'post' == get_post_type() ) : ?>
|
||||
<div class="entry-meta">
|
||||
<?php _s_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', '_s' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', '_s' ) );
|
||||
if ( $categories_list && _s_categorized_blog() ) :
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( 'Posted in %1$s', '_s' ), $categories_list ); ?>
|
||||
</span>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if categories ?>
|
||||
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', '_s' ) );
|
||||
if ( $tags_list ) :
|
||||
?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( 'Tagged %1$s', '_s' ), $tags_list ); ?>
|
||||
</span>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
<?php endif; // End if 'post' == get_post_type() ?>
|
||||
|
||||
<?php if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', '_s' ), __( '1 Comment', '_s' ), __( '% Comments', '_s' ) ); ?></span>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- #entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying the footer.
|
||||
*
|
||||
* Contains the closing of the id=main div and all content after
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
</div><!-- #main -->
|
||||
|
||||
<footer id="colophon" role="contentinfo">
|
||||
<div id="site-generator">
|
||||
<?php do_action( '_s_credits' ); ?>
|
||||
<a href="<?php echo esc_url( __( 'http://wordpress.org/', '_s' ) ); ?>" title="<?php esc_attr_e( 'A Semantic Personal Publishing Platform', '_s' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', '_s' ), 'WordPress' ); ?></a>
|
||||
<span class="sep"> | </span>
|
||||
<?php printf( __( 'Theme: %1$s by %2$s.', '_s' ), '_s', '<a href="http://automattic.com/" rel="designer">Automattic</a>' ); ?>
|
||||
</div>
|
||||
</footer><!-- #colophon -->
|
||||
</div><!-- #page -->
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,306 @@
|
|||
<?php
|
||||
/**
|
||||
* _s functions and definitions
|
||||
*
|
||||
* Sets up the theme and provides some helper functions. Some helper functions
|
||||
* are used in the theme as custom template tags. Others are attached to action and
|
||||
* filter hooks in WordPress to change core functionality.
|
||||
*
|
||||
* When using a child theme (see http://codex.wordpress.org/Theme_Development and
|
||||
* http://codex.wordpress.org/Child_Themes), you can override certain functions
|
||||
* (those wrapped in a function_exists() call) by defining them first in your child theme's
|
||||
* functions.php file. The child theme's functions.php file is included before the parent
|
||||
* theme's file, so the child theme functions would be used.
|
||||
*
|
||||
* Functions that are not pluggable (not wrapped in function_exists()) are instead attached
|
||||
* to a filter or action hook. The hook can be removed by using remove_action() or
|
||||
* remove_filter() and you can attach your own function to the hook.
|
||||
*
|
||||
* For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set the content width based on the theme's design and stylesheet.
|
||||
*/
|
||||
if ( ! isset( $content_width ) )
|
||||
$content_width = 640; /* pixels */
|
||||
|
||||
if ( ! function_exists( '_s_setup' ) ):
|
||||
/**
|
||||
* Sets up theme defaults and registers support for various WordPress features.
|
||||
*
|
||||
* Note that this function is hooked into the after_setup_theme hook, which runs
|
||||
* before the init hook. The init hook is too late for some features, such as indicating
|
||||
* support post thumbnails.
|
||||
*
|
||||
* To override _s_setup() in a child theme, add your own _s_setup to your child theme's
|
||||
* functions.php file.
|
||||
*/
|
||||
function _s_setup() {
|
||||
/**
|
||||
* Make theme available for translation
|
||||
* Translations can be filed in the /languages/ directory
|
||||
* If you're building a theme based on _s, use a find and replace
|
||||
* to change '_s' to the name of your theme in all the template files
|
||||
*/
|
||||
load_theme_textdomain( '_s', get_template_directory() . '/languages' );
|
||||
|
||||
$locale = get_locale();
|
||||
$locale_file = get_template_directory() . "/languages/$locale.php";
|
||||
if ( is_readable( $locale_file ) )
|
||||
require_once( $locale_file );
|
||||
|
||||
/**
|
||||
* Add default posts and comments RSS feed links to head
|
||||
*/
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
/**
|
||||
* This theme uses wp_nav_menu() in one location.
|
||||
*/
|
||||
register_nav_menus( array(
|
||||
'primary' => __( 'Primary Menu', '_s' ),
|
||||
) );
|
||||
|
||||
/**
|
||||
* Add support for the Aside and Gallery Post Formats
|
||||
*/
|
||||
add_theme_support( 'post-formats', array( 'aside', 'image', 'gallery' ) );
|
||||
}
|
||||
endif; // _s_setup
|
||||
|
||||
/**
|
||||
* Tell WordPress to run _s_setup() when the 'after_setup_theme' hook is run.
|
||||
*/
|
||||
add_action( 'after_setup_theme', '_s_setup' );
|
||||
|
||||
/**
|
||||
* Set a default theme color array for WP.com.
|
||||
*/
|
||||
$themecolors = array(
|
||||
'bg' => 'ffffff',
|
||||
'border' => 'eeeeee',
|
||||
'text' => '444444',
|
||||
);
|
||||
|
||||
/**
|
||||
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
|
||||
*/
|
||||
function _s_page_menu_args( $args ) {
|
||||
$args['show_home'] = true;
|
||||
return $args;
|
||||
}
|
||||
add_filter( 'wp_page_menu_args', '_s_page_menu_args' );
|
||||
|
||||
/**
|
||||
* Register widgetized area and update sidebar with default widgets
|
||||
*/
|
||||
function _s_widgets_init() {
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Sidebar 1', '_s' ),
|
||||
'id' => 'sidebar-1',
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => "</aside>",
|
||||
'before_title' => '<h1 class="widget-title">',
|
||||
'after_title' => '</h1>',
|
||||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Sidebar 2', '_s' ),
|
||||
'id' => 'sidebar-2',
|
||||
'description' => __( 'An optional second sidebar area', '_s' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => "</aside>",
|
||||
'before_title' => '<h1 class="widget-title">',
|
||||
'after_title' => '</h1>',
|
||||
) );
|
||||
}
|
||||
add_action( 'init', '_s_widgets_init' );
|
||||
|
||||
if ( ! function_exists( '_s_content_nav' ) ):
|
||||
/**
|
||||
* Display navigation to next/previous pages when applicable
|
||||
*
|
||||
* @since _s 1.0
|
||||
*/
|
||||
function _s_content_nav( $nav_id ) {
|
||||
global $wp_query;
|
||||
|
||||
?>
|
||||
<nav id="<?php echo $nav_id; ?>">
|
||||
<h1 class="assistive-text section-heading"><?php _e( 'Post navigation', '_s' ); ?></h1>
|
||||
|
||||
<?php if ( is_single() ) : // navigation links for single posts ?>
|
||||
|
||||
<?php previous_post_link( '<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x( '←', 'Previous post link', '_s' ) . '</span> %title' ); ?>
|
||||
<?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '→', 'Next post link', '_s' ) . '</span>' ); ?>
|
||||
|
||||
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
|
||||
|
||||
<?php if ( get_next_posts_link() ) : ?>
|
||||
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', '_s' ) ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( get_previous_posts_link() ) : ?>
|
||||
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', '_s' ) ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</nav><!-- #<?php echo $nav_id; ?> -->
|
||||
<?php
|
||||
}
|
||||
endif; // _s_content_nav
|
||||
|
||||
|
||||
if ( ! function_exists( '_s_comment' ) ) :
|
||||
/**
|
||||
* Template for comments and pingbacks.
|
||||
*
|
||||
* To override this walker in a child theme without modifying the comments template
|
||||
* simply create your own _s_comment(), and that function will be used instead.
|
||||
*
|
||||
* Used as a callback by wp_list_comments() for displaying the comments.
|
||||
*
|
||||
* @since _s 1.0
|
||||
*/
|
||||
function _s_comment( $comment, $args, $depth ) {
|
||||
$GLOBALS['comment'] = $comment;
|
||||
switch ( $comment->comment_type ) :
|
||||
case 'pingback' :
|
||||
case 'trackback' :
|
||||
?>
|
||||
<li class="post pingback">
|
||||
<p><?php _e( 'Pingback:', '_s' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', '_s' ), ' ' ); ?></p>
|
||||
<?php
|
||||
break;
|
||||
default :
|
||||
?>
|
||||
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
|
||||
<article id="comment-<?php comment_ID(); ?>" class="comment">
|
||||
<footer>
|
||||
<div class="comment-author vcard">
|
||||
<?php echo get_avatar( $comment, 40 ); ?>
|
||||
<?php printf( __( '%s <span class="says">says:</span>', '_s' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
|
||||
</div><!-- .comment-author .vcard -->
|
||||
<?php if ( $comment->comment_approved == '0' ) : ?>
|
||||
<em><?php _e( 'Your comment is awaiting moderation.', '_s' ); ?></em>
|
||||
<br />
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="comment-meta commentmetadata">
|
||||
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><time pubdate datetime="<?php comment_time( 'c' ); ?>">
|
||||
<?php
|
||||
/* translators: 1: date, 2: time */
|
||||
printf( __( '%1$s at %2$s', '_s' ), get_comment_date(), get_comment_time() ); ?>
|
||||
</time></a>
|
||||
<?php edit_comment_link( __( '(Edit)', '_s' ), ' ' );
|
||||
?>
|
||||
</div><!-- .comment-meta .commentmetadata -->
|
||||
</footer>
|
||||
|
||||
<div class="comment-content"><?php comment_text(); ?></div>
|
||||
|
||||
<div class="reply">
|
||||
<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
</div><!-- .reply -->
|
||||
</article><!-- #comment-## -->
|
||||
|
||||
<?php
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
endif; // ends check for _s_comment()
|
||||
|
||||
if ( ! function_exists( '_s_posted_on' ) ) :
|
||||
/**
|
||||
* Prints HTML with meta information for the current post-date/time and author.
|
||||
* Create your own _s_posted_on to override in a child theme
|
||||
*
|
||||
* @since _s 1.0
|
||||
*/
|
||||
function _s_posted_on() {
|
||||
printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="byline"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', '_s' ),
|
||||
esc_url( get_permalink() ),
|
||||
esc_attr( get_the_time() ),
|
||||
esc_attr( get_the_date( 'c' ) ),
|
||||
esc_html( get_the_date() ),
|
||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||
esc_attr( sprintf( __( 'View all posts by %s', '_s' ), get_the_author() ) ),
|
||||
esc_html( get_the_author() )
|
||||
);
|
||||
}
|
||||
endif;
|
||||
|
||||
/**
|
||||
* Adds custom classes to the array of body classes.
|
||||
*
|
||||
* @since _s 1.0
|
||||
*/
|
||||
function _s_body_classes( $classes ) {
|
||||
// Adds a class of single-author to blogs with only 1 published author
|
||||
if ( ! is_multi_author() ) {
|
||||
$classes[] = 'single-author';
|
||||
}
|
||||
|
||||
return $classes;
|
||||
}
|
||||
add_filter( 'body_class', '_s_body_classes' );
|
||||
|
||||
/**
|
||||
* Returns true if a blog has more than 1 category
|
||||
*
|
||||
* @since _s 1.0
|
||||
*/
|
||||
function _s_categorized_blog() {
|
||||
if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {
|
||||
// Create an array of all the categories that are attached to posts
|
||||
$all_the_cool_cats = get_categories( array(
|
||||
'hide_empty' => 1,
|
||||
) );
|
||||
|
||||
// Count the number of categories that are attached to the posts
|
||||
$all_the_cool_cats = count( $all_the_cool_cats );
|
||||
|
||||
set_transient( 'all_the_cool_cats', $all_the_cool_cats );
|
||||
}
|
||||
|
||||
if ( '1' != $all_the_cool_cats ) {
|
||||
// This blog has more than 1 category so _s_categorized_blog should return true
|
||||
return true;
|
||||
} else {
|
||||
// This blog has only 1 category so _s_categorized_blog should return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush out the transients used in _s_categorized_blog
|
||||
*
|
||||
* @since _s 1.0
|
||||
*/
|
||||
function _s_category_transient_flusher() {
|
||||
// Like, beat it. Dig?
|
||||
delete_transient( 'all_the_cool_cats' );
|
||||
}
|
||||
add_action( 'edit_category', '_s_category_transient_flusher' );
|
||||
add_action( 'save_post', '_s_category_transient_flusher' );
|
||||
|
||||
/**
|
||||
* Filter in a link to a content ID attribute for the next/previous image links on image attachment pages
|
||||
*/
|
||||
function _s_enhanced_image_navigation( $url ) {
|
||||
global $post, $wp_rewrite;
|
||||
|
||||
$id = (int) $post->ID;
|
||||
$object = get_post( $id );
|
||||
if ( wp_attachment_is_image( $post->ID ) && ( $wp_rewrite->using_permalinks() && ( $object->post_parent > 0 ) && ( $object->post_parent != $id ) ) )
|
||||
$url = $url . '#main';
|
||||
|
||||
return $url;
|
||||
}
|
||||
add_filter( 'attachment_link', '_s_enhanced_image_navigation' );
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
/**
|
||||
* The Header for our theme.
|
||||
*
|
||||
* Displays all of the <head> section and everything up till <div id="main">
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?><!DOCTYPE html>
|
||||
<!--[if IE 6]>
|
||||
<html id="ie6" <?php language_attributes(); ?>>
|
||||
<![endif]-->
|
||||
<!--[if IE 7]>
|
||||
<html id="ie7" <?php language_attributes(); ?>>
|
||||
<![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<html id="ie8" <?php language_attributes(); ?>>
|
||||
<![endif]-->
|
||||
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
|
||||
<html <?php language_attributes(); ?>>
|
||||
<!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title><?php
|
||||
/*
|
||||
* Print the <title> tag based on what is being viewed.
|
||||
*/
|
||||
global $page, $paged;
|
||||
|
||||
wp_title( '|', true, 'right' );
|
||||
|
||||
// Add the blog name.
|
||||
bloginfo( 'name' );
|
||||
|
||||
// Add the blog description for the home/front page.
|
||||
$site_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $site_description && ( is_home() || is_front_page() ) )
|
||||
echo " | $site_description";
|
||||
|
||||
// Add a page number if necessary:
|
||||
if ( $paged >= 2 || $page >= 2 )
|
||||
echo ' | ' . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) );
|
||||
|
||||
?></title>
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11" />
|
||||
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
|
||||
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
<div id="page" class="hfeed">
|
||||
<?php do_action( 'before' ); ?>
|
||||
<header id="branding" role="banner">
|
||||
<hgroup>
|
||||
<h1 id="site-title"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
|
||||
</hgroup>
|
||||
|
||||
<nav id="access" role="navigation">
|
||||
<h1 class="assistive-text section-heading"><?php _e( 'Main menu', '_s' ); ?></h1>
|
||||
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', '_s' ); ?>"><?php _e( 'Skip to content', '_s' ); ?></a></div>
|
||||
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
|
||||
</nav><!-- #access -->
|
||||
</header><!-- #branding -->
|
||||
|
||||
<div id="main">
|
|
@ -0,0 +1,110 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying image attachments.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary" class="image-attachment">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
$metadata = wp_get_attachment_metadata();
|
||||
printf( __( 'Published <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', '_s' ),
|
||||
esc_attr( get_the_time() ),
|
||||
get_the_date(),
|
||||
wp_get_attachment_url(),
|
||||
$metadata['width'],
|
||||
$metadata['height'],
|
||||
get_permalink( $post->post_parent ),
|
||||
get_the_title( $post->post_parent )
|
||||
);
|
||||
?>
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="sep">|</span> <span class="edit-link">', '</span>' ); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<nav id="image-navigation">
|
||||
<span class="previous-image"><?php previous_image_link( false, __( '← Previous' , '_s' ) ); ?></span>
|
||||
<span class="next-image"><?php next_image_link( false, __( 'Next →' , '_s' ) ); ?></span>
|
||||
</nav><!-- #image-navigation -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
|
||||
<div class="entry-attachment">
|
||||
<div class="attachment">
|
||||
<?php
|
||||
/**
|
||||
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
|
||||
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
|
||||
*/
|
||||
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
|
||||
foreach ( $attachments as $k => $attachment ) {
|
||||
if ( $attachment->ID == $post->ID )
|
||||
break;
|
||||
}
|
||||
$k++;
|
||||
// If there is more than 1 attachment in a gallery
|
||||
if ( count( $attachments ) > 1 ) {
|
||||
if ( isset( $attachments[ $k ] ) )
|
||||
// get the URL of the next image attachment
|
||||
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
|
||||
else
|
||||
// or get the URL of the first image attachment
|
||||
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
|
||||
} else {
|
||||
// or, if there's only 1 image, get the URL of the image
|
||||
$next_attachment_url = wp_get_attachment_url();
|
||||
}
|
||||
?>
|
||||
|
||||
<a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
|
||||
$attachment_size = apply_filters( '_s_attachment_size', 1200 );
|
||||
echo wp_get_attachment_image( $post->ID, array( $attachment_size, $attachment_size ) ); // filterable image width with, essentially, no limit for image height.
|
||||
?></a>
|
||||
</div><!-- .attachment -->
|
||||
|
||||
<?php if ( ! empty( $post->post_excerpt ) ) : ?>
|
||||
<div class="entry-caption">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div><!-- .entry-attachment -->
|
||||
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>
|
||||
<?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', '_s' ), get_trackback_url() ); ?>
|
||||
<?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?>
|
||||
<?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', '_s' ), get_trackback_url() ); ?>
|
||||
<?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?>
|
||||
<?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', '_s' ); ?>
|
||||
<?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
|
||||
<?php _e( 'Both comments and trackbacks are currently closed.', '_s' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php edit_post_link( __( 'Edit', '_s' ), ' <span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php comments_template(); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/**
|
||||
* The main template file.
|
||||
*
|
||||
* This is the most generic template file in a WordPress theme
|
||||
* and one of the two required files for a theme (the other being style.css).
|
||||
* It is used to display a page when nothing more specific matches a query.
|
||||
* E.g., it puts together the home page when no home.php file exists.
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-below' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,3 @@
|
|||
// html5shiv MIT @rem remysharp.com/html5-enabling-script
|
||||
// iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
|
||||
/*@cc_on(function(a,b){function r(a){var b=-1;while(++b<f)a.createElement(e[b])}if(!(!window.attachEvent||!b.createStyleSheet||!function(){var a=document.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}())){a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=l.firstChild,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){if(a+""===undefined)return"";var d=-1,e=a.length,f,g=[];while(++d<e){f=a[d];if(f.disabled)continue;b=f.media||b,p.test(b)&&g.push(c.getCSS(f.imports,b),f.cssText),b="all"}return g.join("")},c.parseCSS=function(a){var b=[],c;while((c=j.exec(a))!=null)b.push(((i.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(g,"$1.iepp_$2")+c[4]);return b.join("\n")},c.writeHTML=function(){var a=-1;q=q||b.body;while(++a<f){var c=b.getElementsByTagName(e[a]),d=c.length,g=-1;while(++g<d)c[g].className.indexOf("iepp_")<0&&(c[g].className+=" iepp_"+e[a])}k.appendChild(q),l.appendChild(n),n.className=q.className,n.id=q.id,n.innerHTML=q.innerHTML.replace(h,"<$1font")},c._beforePrint=function(){o.styleSheet.cssText=c.parseCSS(c.getCSS(b.styleSheets,"all")),c.writeHTML()},c.restoreHTML=function(){n.innerHTML="",l.removeChild(n),l.appendChild(q)},c._afterPrint=function(){c.restoreHTML(),o.styleSheet.cssText=""},r(b),r(k);if(c.disablePP)return;m.insertBefore(o,m.firstChild),o.media="print",o.className="iepp-printshim",a.attachEvent("onbeforeprint",c._beforePrint),a.attachEvent("onafterprint",c._afterPrint)}})(this,document)@*/
|
|
@ -0,0 +1,281 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying all pages.
|
||||
*
|
||||
* This is the template that displays all pages by default.
|
||||
* Please note that this is the WordPress construct of pages
|
||||
* and that other 'pages' on your WordPress site will use a
|
||||
* different template.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'content', 'page' ); ?>
|
||||
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1 @@
|
|||
== Changelog ==
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
Theme Name: _s
|
||||
|
||||
Adding support for language written in a Right To Left (RTL) direction is easy -
|
||||
it's just a matter of overwriting all the horizontal positioning attributes
|
||||
of your CSS stylesheet in a separate stylesheet file named rtl.css.
|
||||
|
||||
http://codex.wordpress.org/Right_to_Left_Language_Support
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
body {
|
||||
direction: rtl;
|
||||
unicode-bidi: embed;
|
||||
}
|
||||
*/
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying Search Results pages.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', '_s' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
|
||||
</header>
|
||||
|
||||
<?php _s_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'content', 'search' ); ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-below' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* The Sidebar containing the main widget areas.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
<div id="secondary" class="widget-area" role="complementary">
|
||||
<?php do_action( 'before_sidebar' ); ?>
|
||||
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
|
||||
|
||||
<aside id="search" class="widget widget_search">
|
||||
<?php get_search_form(); ?>
|
||||
</aside>
|
||||
|
||||
<aside id="archives" class="widget">
|
||||
<h1 class="widget-title"><?php _e( 'Archives', '_s' ); ?></h1>
|
||||
<ul>
|
||||
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<aside id="meta" class="widget">
|
||||
<h1 class="widget-title"><?php _e( 'Meta', '_s' ); ?></h1>
|
||||
<ul>
|
||||
<?php wp_register(); ?>
|
||||
<aside><?php wp_loginout(); ?></aside>
|
||||
<?php wp_meta(); ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<?php endif; // end sidebar widget area ?>
|
||||
</div><!-- #secondary .widget-area -->
|
||||
|
||||
<?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
|
||||
<div id="tertiary" class="widget-area" role="complementary">
|
||||
<?php dynamic_sidebar( 'sidebar-2' ); ?>
|
||||
</div><!-- #tertiary .widget-area -->
|
||||
<?php endif; ?>
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* The Template for displaying all single posts.
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php get_template_part( 'content', 'single' ); ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-below' ); ?>
|
||||
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template
|
||||
if ( comments_open() || '0' != get_comments_number() )
|
||||
comments_template( '', true );
|
||||
?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
Theme Name: _s
|
||||
Theme URI: http://wpcom-themes.svn.automattic.com/_s
|
||||
Author: Automattic
|
||||
Author URI: http://automattic.com/
|
||||
Description: The Automattic Theme Team starter theme that underscores all our work.
|
||||
Version: 1.0-wpcom
|
||||
License: GNU General Public License
|
||||
License URI: license.txt
|
||||
Tags:
|
||||
*/
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/**
|
||||
* The template used to display Tag Archive pages
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php
|
||||
printf( __( 'Tag Archives: %s', '_s' ), '<span>' . single_tag_title( '', false ) . '</span>' );
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
$tag_description = tag_description();
|
||||
if ( ! empty( $tag_description ) )
|
||||
echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
|
||||
?>
|
||||
</header>
|
||||
|
||||
<?php rewind_posts(); ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_content_nav( 'nav-below' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
Reference in New Issue