mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Importing Duster theme, first pass at a candidate for twentyeleven theme.
Nice to have, but optional, improvements it'd be nice to have: * Ability to have random rotating headers. (Core improvement to custom header functionality.) * Color and layout options. * More post formats. (Currently supporst Asides, Links, and Galleries.) * CMS-style slider home page option. Welcome, TwentyEleven née Duster. :) Track at #17198. git-svn-id: http://svn.automattic.com/wordpress/trunk@17669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
834279201f
commit
7d581043df
44
wp-content/themes/twentyeleven/404.php
Normal file
44
wp-content/themes/twentyeleven/404.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
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( 'This is somewhat embarrassing, isn’t it?', 'twentyeleven' ); ?></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.', 'twentyeleven' ); ?></p>
|
||||||
|
|
||||||
|
<?php get_search_form(); ?>
|
||||||
|
|
||||||
|
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
|
||||||
|
|
||||||
|
<div class="widget">
|
||||||
|
<h2 class="widgettitle"><?php _e( 'Most Used Categories', 'twentyeleven' ); ?></h2>
|
||||||
|
<ul>
|
||||||
|
<?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), 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(); ?>
|
45
wp-content/themes/twentyeleven/archive.php
Normal file
45
wp-content/themes/twentyeleven/archive.php
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<section id="primary">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php the_post(); ?>
|
||||||
|
|
||||||
|
<header class="page-header">
|
||||||
|
<h1 class="page-title">
|
||||||
|
<?php if ( is_day() ) : ?>
|
||||||
|
<?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?>
|
||||||
|
<?php elseif ( is_month() ) : ?>
|
||||||
|
<?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( 'F Y' ) . '</span>' ); ?>
|
||||||
|
<?php elseif ( is_year() ) : ?>
|
||||||
|
<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); ?>
|
||||||
|
<?php else : ?>
|
||||||
|
<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<?php rewind_posts(); ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||||
|
|
||||||
|
<?php /* Start the Loop */ ?>
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', get_post_format() ); ?>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-below' ); ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</section><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_sidebar(); ?>
|
||||||
|
<?php get_footer(); ?>
|
49
wp-content/themes/twentyeleven/author.php
Normal file
49
wp-content/themes/twentyeleven/author.php
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<section id="primary">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php the_post(); ?>
|
||||||
|
|
||||||
|
<header class="page-header">
|
||||||
|
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<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 rewind_posts(); ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If a user has filled out their description, show a bio on their entries.
|
||||||
|
if ( get_the_author_meta( 'description' ) ) : ?>
|
||||||
|
<div id="author-info">
|
||||||
|
<div id="author-avatar">
|
||||||
|
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?>
|
||||||
|
</div><!-- #author-avatar -->
|
||||||
|
<div id="author-description">
|
||||||
|
<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
|
||||||
|
<?php the_author_meta( 'description' ); ?>
|
||||||
|
</div><!-- #author-description -->
|
||||||
|
</div><!-- #entry-author-info -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php /* Start the Loop */ ?>
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', get_post_format() ); ?>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-below' ); ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</section><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_sidebar(); ?>
|
||||||
|
<?php get_footer(); ?>
|
35
wp-content/themes/twentyeleven/category.php
Normal file
35
wp-content/themes/twentyeleven/category.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<section id="primary">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<header class="page-header">
|
||||||
|
<h1 class="page-title"><?php
|
||||||
|
printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
|
||||||
|
?></h1>
|
||||||
|
|
||||||
|
<?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||||
|
|
||||||
|
<?php /* Start the Loop */ ?>
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', get_post_format() ); ?>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-below' ); ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</section><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_sidebar(); ?>
|
||||||
|
<?php get_footer(); ?>
|
67
wp-content/themes/twentyeleven/comments.php
Normal file
67
wp-content/themes/twentyeleven/comments.php
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div id="comments">
|
||||||
|
<?php if ( post_password_required() ) : ?>
|
||||||
|
<div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></div>
|
||||||
|
</div><!-- .comments -->
|
||||||
|
<?php 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(), 'twentyeleven' ),
|
||||||
|
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="section-heading"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
|
||||||
|
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyeleven' ) ); ?></div>
|
||||||
|
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyeleven' ) ); ?></div>
|
||||||
|
</nav>
|
||||||
|
<?php endif; // check for comment navigation ?>
|
||||||
|
|
||||||
|
<ol class="commentlist">
|
||||||
|
<?php wp_list_comments( array( 'callback' => 'twentyeleven_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="section-heading"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
|
||||||
|
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyeleven' ) ); ?></div>
|
||||||
|
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyeleven' ) ); ?></div>
|
||||||
|
</nav>
|
||||||
|
<?php endif; // check for comment navigation ?>
|
||||||
|
|
||||||
|
<?php else : // this is displayed if there are no comments so far ?>
|
||||||
|
|
||||||
|
<?php if ( comments_open() ) : // If comments are open, but there are no comments ?>
|
||||||
|
|
||||||
|
<?php else : // or, if we don't have comments:
|
||||||
|
|
||||||
|
/* If there are no comments and comments are closed,
|
||||||
|
* let's leave a little note, shall we?
|
||||||
|
* But only on posts! We don't want the note on pages.
|
||||||
|
*/
|
||||||
|
if ( ! comments_open() && ! is_page() ) :
|
||||||
|
?>
|
||||||
|
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyeleven' ); ?></p>
|
||||||
|
<?php endif; // end ! comments_open() && ! is_page() ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php comment_form(); ?>
|
||||||
|
|
||||||
|
</div><!-- #comments -->
|
50
wp-content/themes/twentyeleven/content-aside.php
Normal file
50
wp-content/themes/twentyeleven/content-aside.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||||
|
|
||||||
|
<?php if ( 'post' == $post->post_type ) : ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( comments_open() ) : ?>
|
||||||
|
<div class="comments-link">
|
||||||
|
<?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||||
|
<div class="entry-summary">
|
||||||
|
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
</div><!-- .entry-summary -->
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="entry-content">
|
||||||
|
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<footer class="entry-meta">
|
||||||
|
<?php
|
||||||
|
printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
|
||||||
|
get_permalink(),
|
||||||
|
get_the_date( 'c' ),
|
||||||
|
get_the_date(),
|
||||||
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
|
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
||||||
|
get_the_author()
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?php if ( comments_open() ) : ?>
|
||||||
|
<span class="sep"> | </span>
|
||||||
|
<span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
</footer><!-- #entry-meta -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
51
wp-content/themes/twentyeleven/content-featured.php
Normal file
51
wp-content/themes/twentyeleven/content-featured.php
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
global $feature_class;
|
||||||
|
?>
|
||||||
|
<article id="post-<?php the_ID(); ?>" <?php post_class( $feature_class ); ?>>
|
||||||
|
<header class="entry-header">
|
||||||
|
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||||
|
|
||||||
|
<div class="entry-meta">
|
||||||
|
<?php
|
||||||
|
printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
|
||||||
|
get_permalink(),
|
||||||
|
get_the_date( 'c' ),
|
||||||
|
get_the_date(),
|
||||||
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
|
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
||||||
|
get_the_author()
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div><!-- .entry-meta -->
|
||||||
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
<div class="entry-summary">
|
||||||
|
<?php the_excerpt(); ?>
|
||||||
|
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
|
<footer class="entry-meta">
|
||||||
|
<?php
|
||||||
|
$tag_list = get_the_tag_list( '', ', ' );
|
||||||
|
if ( '' != $tag_list ) {
|
||||||
|
$utility_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>.', 'twentyeleven' );
|
||||||
|
} else {
|
||||||
|
$utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
|
||||||
|
}
|
||||||
|
printf(
|
||||||
|
$utility_text,
|
||||||
|
get_the_category_list( ', ' ),
|
||||||
|
$tag_list,
|
||||||
|
get_permalink(),
|
||||||
|
the_title_attribute( 'echo=0' )
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
</footer><!-- .entry-meta -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
66
wp-content/themes/twentyeleven/content-gallery.php
Normal file
66
wp-content/themes/twentyeleven/content-gallery.php
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||||
|
|
||||||
|
<div class="entry-meta">
|
||||||
|
<?php
|
||||||
|
printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
|
||||||
|
get_permalink(),
|
||||||
|
get_the_date( 'c' ),
|
||||||
|
get_the_date(),
|
||||||
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
|
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
||||||
|
get_the_author()
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div><!-- .entry-meta -->
|
||||||
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
|
||||||
|
<div class="entry-summary">
|
||||||
|
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
</div><!-- .entry-summary -->
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="entry-content">
|
||||||
|
<?php if ( post_password_required() ) : ?>
|
||||||
|
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
|
||||||
|
<?php else : ?>
|
||||||
|
<?php
|
||||||
|
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
|
||||||
|
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, 'twentyeleven' ),
|
||||||
|
'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), 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:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<footer class="entry-meta">
|
||||||
|
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyeleven' ); ?></span><?php the_category( ', ' ); ?></span>
|
||||||
|
<span class="sep"> | </span>
|
||||||
|
<?php the_tags( '<span class="tag-links">' . __( 'Tagged ', 'twentyeleven' ) . '</span>', ', ', '<span class="sep"> | </span>' ); ?>
|
||||||
|
<span class="comments-link"><?php comments_popup_link( __( 'Leave a reply', 'twentyeleven' ), __( '1 reply', 'twentyeleven' ), __( '% replies', 'twentyeleven' ) ); ?></span>
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
</footer><!-- #entry-meta -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
18
wp-content/themes/twentyeleven/content-intro.php
Normal file
18
wp-content/themes/twentyeleven/content-intro.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<article id="post-<?php the_ID(); ?>" <?php post_class( 'intro' ); ?>>
|
||||||
|
<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:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
50
wp-content/themes/twentyeleven/content-link.php
Normal file
50
wp-content/themes/twentyeleven/content-link.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||||
|
|
||||||
|
<?php if ( 'post' == $post->post_type ) : ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( comments_open() ) : ?>
|
||||||
|
<div class="comments-link">
|
||||||
|
<?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||||
|
<div class="entry-summary">
|
||||||
|
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
</div><!-- .entry-summary -->
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="entry-content">
|
||||||
|
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<footer class="entry-meta">
|
||||||
|
<?php
|
||||||
|
printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
|
||||||
|
get_permalink(),
|
||||||
|
get_the_date( 'c' ),
|
||||||
|
get_the_date(),
|
||||||
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
|
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
||||||
|
get_the_author()
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?php if ( comments_open() ) : ?>
|
||||||
|
<span class="sep"> | </span>
|
||||||
|
<span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
</footer><!-- #entry-meta -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
18
wp-content/themes/twentyeleven/content-page.php
Normal file
18
wp-content/themes/twentyeleven/content-page.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
68
wp-content/themes/twentyeleven/content-single.php
Normal file
68
wp-content/themes/twentyeleven/content-single.php
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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
|
||||||
|
printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
|
||||||
|
get_permalink(),
|
||||||
|
get_the_date( 'c' ),
|
||||||
|
get_the_date(),
|
||||||
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
|
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
||||||
|
get_the_author()
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div><!-- .entry-meta -->
|
||||||
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
<div class="entry-content">
|
||||||
|
<?php the_content(); ?>
|
||||||
|
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( '<span>Pages:</span>', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
|
<footer class="entry-meta">
|
||||||
|
<?php
|
||||||
|
$tag_list = get_the_tag_list( '', ', ' );
|
||||||
|
if ( '' != $tag_list ) {
|
||||||
|
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
|
||||||
|
} else {
|
||||||
|
$utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
|
||||||
|
}
|
||||||
|
printf(
|
||||||
|
$utility_text,
|
||||||
|
get_the_category_list( ', ' ),
|
||||||
|
$tag_list,
|
||||||
|
get_permalink(),
|
||||||
|
the_title_attribute( 'echo=0' ),
|
||||||
|
get_the_author(),
|
||||||
|
get_author_posts_url( get_the_author_meta( 'ID' ) )
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
|
||||||
|
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
|
||||||
|
<div id="author-info">
|
||||||
|
<div id="author-avatar">
|
||||||
|
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?>
|
||||||
|
</div><!-- #author-avatar -->
|
||||||
|
<div id="author-description">
|
||||||
|
<h2><?php printf( esc_attr__( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
|
||||||
|
<?php the_author_meta( 'description' ); ?>
|
||||||
|
<div id="author-link">
|
||||||
|
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
|
||||||
|
<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentyeleven' ), get_the_author() ); ?>
|
||||||
|
</a>
|
||||||
|
</div><!-- #author-link -->
|
||||||
|
</div><!-- #author-description -->
|
||||||
|
</div><!-- #entry-author-info -->
|
||||||
|
<?php endif; ?>
|
||||||
|
</footer><!-- .entry-meta -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
58
wp-content/themes/twentyeleven/content.php
Normal file
58
wp-content/themes/twentyeleven/content.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||||
|
|
||||||
|
<?php if ( 'post' == $post->post_type ) : ?>
|
||||||
|
<div class="entry-meta">
|
||||||
|
<?php
|
||||||
|
printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
|
||||||
|
get_permalink(),
|
||||||
|
get_the_date( 'c' ),
|
||||||
|
get_the_date(),
|
||||||
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
|
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
||||||
|
get_the_author()
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div><!-- .entry-meta -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( comments_open() ) : ?>
|
||||||
|
<div class="comments-link">
|
||||||
|
<?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||||
|
<div class="entry-summary">
|
||||||
|
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
</div><!-- .entry-summary -->
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="entry-content">
|
||||||
|
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||||
|
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( '<span>Pages:</span>', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<footer class="entry-meta">
|
||||||
|
<?php if ( 'post' == $post->post_type ) : // Hide category and tag text for pages on Search ?>
|
||||||
|
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyeleven' ); ?></span><?php the_category( ', ' ); ?></span>
|
||||||
|
<?php the_tags( '<span class="sep"> | </span><span class="tag-links">' . __( 'Tagged ', 'twentyeleven' ) . '</span>', ', ', '' ); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( comments_open() ) : ?>
|
||||||
|
<span class="sep"> | </span>
|
||||||
|
<span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
|
</footer><!-- #entry-meta -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
43
wp-content/themes/twentyeleven/footer.php
Normal file
43
wp-content/themes/twentyeleven/footer.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div><!-- #main -->
|
||||||
|
|
||||||
|
<footer id="colophon" role="contentinfo">
|
||||||
|
|
||||||
|
<?php if ( is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) || is_active_sidebar( 'sidebar-5' ) ) : ?>
|
||||||
|
<div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>>
|
||||||
|
<?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
|
||||||
|
<div id="first" class="widget-area" role="complementary">
|
||||||
|
<?php dynamic_sidebar( 'sidebar-3' ); ?>
|
||||||
|
</div><!-- #first .widget-area -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>
|
||||||
|
<div id="second" class="widget-area" role="complementary">
|
||||||
|
<?php dynamic_sidebar( 'sidebar-4' ); ?>
|
||||||
|
</div><!-- #second .widget-area -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>
|
||||||
|
<div id="third" class="widget-area" role="complementary">
|
||||||
|
<?php dynamic_sidebar( 'sidebar-5' ); ?>
|
||||||
|
</div><!-- #third .widget-area -->
|
||||||
|
<?php endif; ?>
|
||||||
|
</div><!-- #supplementary -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div id="site-generator">
|
||||||
|
<a href="http://wordpress.org/" rel="generator">Proudly powered by WordPress</a><span class="sep"> | </span><?php printf( __( 'Theme: %1$s.', 'twentyeleven' ), 'Twenty Eleven' ); ?>
|
||||||
|
</div>
|
||||||
|
</footer><!-- #colophon -->
|
||||||
|
</div><!-- #page -->
|
||||||
|
|
||||||
|
<?php wp_footer(); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
454
wp-content/themes/twentyeleven/functions.php
Normal file
454
wp-content/themes/twentyeleven/functions.php
Normal file
@ -0,0 +1,454 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make theme available for translation
|
||||||
|
* Translations can be filed in the /languages/ directory
|
||||||
|
* If you're building a theme based on Twenty Eleven, use a find and replace
|
||||||
|
* to change 'twentyeleven' to the name of your theme in all the template files
|
||||||
|
*/
|
||||||
|
load_theme_textdomain( 'twentyeleven', TEMPLATEPATH . '/languages' );
|
||||||
|
|
||||||
|
$locale = get_locale();
|
||||||
|
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
|
||||||
|
if ( is_readable( $locale_file ) )
|
||||||
|
require_once( $locale_file );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the content width based on the theme's design and stylesheet.
|
||||||
|
*/
|
||||||
|
if ( ! isset( $content_width ) )
|
||||||
|
$content_width = 584;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This theme uses wp_nav_menu() in one location.
|
||||||
|
*/
|
||||||
|
register_nav_menus( array(
|
||||||
|
'primary' => __( 'Primary Menu', 'twentyeleven' ),
|
||||||
|
) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add default posts and comments RSS feed links to head
|
||||||
|
*/
|
||||||
|
add_theme_support( 'automatic-feed-links' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add support for an Aside Post Format
|
||||||
|
*/
|
||||||
|
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery' ) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add support for custom backgrounds
|
||||||
|
*/
|
||||||
|
add_custom_background();
|
||||||
|
|
||||||
|
// This theme uses Feature Images for per-post/per-page Custom Header images
|
||||||
|
add_theme_support( 'post-thumbnails' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add support for Custom Headers
|
||||||
|
*/
|
||||||
|
define( 'HEADER_TEXTCOLOR', '000' );
|
||||||
|
|
||||||
|
// No CSS, just an IMG call. The %s is a placeholder for the theme template directory URI.
|
||||||
|
define( 'HEADER_IMAGE', '%s/images/headers/default.jpg' );
|
||||||
|
|
||||||
|
// The height and width of your custom header. You can hook into the theme's own filters to change these values.
|
||||||
|
// Add a filter to twentyeleven_header_image_width and twentyeleven_header_image_height to change these values.
|
||||||
|
define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 1000 ) );
|
||||||
|
define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 300 ) );
|
||||||
|
|
||||||
|
// We'll be using post thumbnails for custom header images on posts and pages.
|
||||||
|
// We want them to be 940 pixels wide by 198 pixels tall.
|
||||||
|
// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
|
||||||
|
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
|
||||||
|
|
||||||
|
// Add a way for the custom header to be styled in the admin panel that controls
|
||||||
|
// custom headers. See twentyeleven_admin_header_style(), below.
|
||||||
|
add_custom_image_header( 'twentyeleven_header_style', 'twentyeleven_admin_header_style', 'twentyeleven_admin_header_image' );
|
||||||
|
|
||||||
|
// ... and thus ends the changeable header business.
|
||||||
|
|
||||||
|
if ( ! function_exists( 'twentyeleven_header_style' ) ) :
|
||||||
|
/**
|
||||||
|
* Styles the header image and text displayed on the blog
|
||||||
|
*
|
||||||
|
* @since Twenty Eleven 1.0
|
||||||
|
*/
|
||||||
|
function twentyeleven_header_style() {
|
||||||
|
// If no custom options for text are set, let's bail
|
||||||
|
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
|
||||||
|
if ( HEADER_TEXTCOLOR == get_header_textcolor() )
|
||||||
|
return;
|
||||||
|
// If we get this far, we have custom styles. Let's do this.
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
<?php
|
||||||
|
// Has the text been hidden?
|
||||||
|
if ( 'blank' == get_header_textcolor() ) :
|
||||||
|
?>
|
||||||
|
#site-title,
|
||||||
|
#site-description {
|
||||||
|
position: absolute !important;
|
||||||
|
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
|
||||||
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
// If the user has set a custom color for the text use that
|
||||||
|
else :
|
||||||
|
?>
|
||||||
|
#site-title a,
|
||||||
|
#site-description {
|
||||||
|
color: #<?php echo get_header_textcolor(); ?> !important;
|
||||||
|
}
|
||||||
|
<?php endif; ?>
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) :
|
||||||
|
/**
|
||||||
|
* Styles the header image displayed on the Appearance > Header admin panel.
|
||||||
|
*
|
||||||
|
* Referenced via add_custom_image_header() in twentyeleven_setup().
|
||||||
|
*
|
||||||
|
* @since Twenty Eleven 1.0
|
||||||
|
*/
|
||||||
|
function twentyeleven_admin_header_style() {
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
.appearance_page_custom-header #headimg {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
#headimg h1,
|
||||||
|
#desc {
|
||||||
|
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
|
||||||
|
}
|
||||||
|
#headimg h1 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#headimg h1 a {
|
||||||
|
font-size: 32px;
|
||||||
|
line-height: 36px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
#desc {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 23px;
|
||||||
|
padding: 0 0 3em;
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
// If the user has set a custom color for the text use that
|
||||||
|
if ( get_header_textcolor() != HEADER_TEXTCOLOR ) :
|
||||||
|
?>
|
||||||
|
#site-title a,
|
||||||
|
#site-description {
|
||||||
|
color: #<?php echo get_header_textcolor(); ?>;
|
||||||
|
}
|
||||||
|
<?php endif; ?>
|
||||||
|
#headimg img {
|
||||||
|
max-width: 1000px;
|
||||||
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) :
|
||||||
|
/**
|
||||||
|
* Custom header image markup displayed on the Appearance > Header admin panel.
|
||||||
|
*
|
||||||
|
* Referenced via add_custom_image_header() in twentyeleven_setup().
|
||||||
|
*
|
||||||
|
* @since Twenty Eleven 1.0
|
||||||
|
*/
|
||||||
|
function twentyeleven_admin_header_image() { ?>
|
||||||
|
<div id="headimg">
|
||||||
|
<?php
|
||||||
|
if ( 'blank' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) || '' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) )
|
||||||
|
$style = ' style="display:none;"';
|
||||||
|
else
|
||||||
|
$style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"';
|
||||||
|
?>
|
||||||
|
<h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo home_url( '/' ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
|
||||||
|
<div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
|
||||||
|
<img src="<?php esc_url ( header_image() ); ?>" alt="" />
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
endif;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the post excerpt length to 40 characters.
|
||||||
|
*
|
||||||
|
* To override this length in a child theme, remove the filter and add your own
|
||||||
|
* function tied to the excerpt_length filter hook.
|
||||||
|
*/
|
||||||
|
function twentyeleven_excerpt_length( $length ) {
|
||||||
|
return 40;
|
||||||
|
}
|
||||||
|
add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a "Continue Reading" link for excerpts
|
||||||
|
*/
|
||||||
|
function twentyeleven_continue_reading_link() {
|
||||||
|
return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
|
||||||
|
*
|
||||||
|
* To override this in a child theme, remove the filter and add your own
|
||||||
|
* function tied to the excerpt_more filter hook.
|
||||||
|
*/
|
||||||
|
function twentyeleven_auto_excerpt_more( $more ) {
|
||||||
|
return ' …' . twentyeleven_continue_reading_link();
|
||||||
|
}
|
||||||
|
add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a pretty "Continue Reading" link to custom post excerpts.
|
||||||
|
*
|
||||||
|
* To override this link in a child theme, remove the filter and add your own
|
||||||
|
* function tied to the get_the_excerpt filter hook.
|
||||||
|
*/
|
||||||
|
function twentyeleven_custom_excerpt_more( $output ) {
|
||||||
|
if ( has_excerpt() && ! is_attachment() ) {
|
||||||
|
$output .= twentyeleven_continue_reading_link();
|
||||||
|
}
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add Twenty Eleven's custom image sizes
|
||||||
|
*/
|
||||||
|
add_image_size( 'large-feature', HEADER_IMAGE_WIDTH, 500, true ); // Used for large feature images
|
||||||
|
add_image_size( 'small-feature', 500, 500 ); // Used for featured posts if a large-feature doesn't exist
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add custom body classes
|
||||||
|
*/
|
||||||
|
function twentyeleven_body_class($classes) {
|
||||||
|
if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) )
|
||||||
|
$classes[] = 'singular';
|
||||||
|
|
||||||
|
return $classes;
|
||||||
|
}
|
||||||
|
add_filter( 'body_class', 'twentyeleven_body_class' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
|
||||||
|
*/
|
||||||
|
function twentyeleven_page_menu_args( $args ) {
|
||||||
|
$args['show_home'] = true;
|
||||||
|
return $args;
|
||||||
|
}
|
||||||
|
add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register widgetized area and update sidebar with default widgets
|
||||||
|
*/
|
||||||
|
function twentyeleven_widgets_init() {
|
||||||
|
register_sidebar( array(
|
||||||
|
'name' => __( 'Main Sidebar', 'twentyeleven' ),
|
||||||
|
'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' => __( 'Showcase Sidebar', 'twentyeleven' ),
|
||||||
|
'id' => 'sidebar-2',
|
||||||
|
'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ),
|
||||||
|
'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' => __( 'Footer Area One', 'twentyeleven' ),
|
||||||
|
'id' => 'sidebar-3',
|
||||||
|
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
|
||||||
|
'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' => __( 'Footer Area Two', 'twentyeleven' ),
|
||||||
|
'id' => 'sidebar-4',
|
||||||
|
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
|
||||||
|
'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' => __( 'Footer Area Three', 'twentyeleven' ),
|
||||||
|
'id' => 'sidebar-5',
|
||||||
|
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
|
||||||
|
'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', 'twentyeleven_widgets_init' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Grab Twenty Eleven's Custom Widgets
|
||||||
|
*/
|
||||||
|
require( dirname( __FILE__ ) . '/widgets.php' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display navigation to next/previous pages when applicable
|
||||||
|
*/
|
||||||
|
function twentyeleven_content_nav($nav_id) {
|
||||||
|
global $wp_query;
|
||||||
|
|
||||||
|
if ( $wp_query->max_num_pages > 1 ) : ?>
|
||||||
|
<nav id="<?php echo $nav_id; ?>">
|
||||||
|
<h1 class="section-heading"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h1>
|
||||||
|
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyeleven' ) ); ?></div>
|
||||||
|
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></div>
|
||||||
|
</nav><!-- #nav-above -->
|
||||||
|
<?php endif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Grab the first URL from a Link post
|
||||||
|
*/
|
||||||
|
function twentyeleven_url_grabber() {
|
||||||
|
global $post, $posts;
|
||||||
|
|
||||||
|
$first_url = '';
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
$output = preg_match_all('/<a.+href=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
|
||||||
|
|
||||||
|
$first_url = $matches [1] [0];
|
||||||
|
|
||||||
|
if ( empty( $first_url ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return $first_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Count the number of footer sidebars to enable dynamic classes for the footer
|
||||||
|
*/
|
||||||
|
function twentyeleven_footer_sidebar_class() {
|
||||||
|
$count = 0;
|
||||||
|
|
||||||
|
if ( is_active_sidebar( 'sidebar-3' ) )
|
||||||
|
$count++;
|
||||||
|
|
||||||
|
if ( is_active_sidebar( 'sidebar-4' ) )
|
||||||
|
$count++;
|
||||||
|
|
||||||
|
if ( is_active_sidebar( 'sidebar-5' ) )
|
||||||
|
$count++;
|
||||||
|
|
||||||
|
switch ( $count ) {
|
||||||
|
case '1':
|
||||||
|
$class = 'one';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '2':
|
||||||
|
$class = 'two';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '3':
|
||||||
|
$class = 'three';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$class = '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( '' != $class )
|
||||||
|
echo 'class="' . $class . '"';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! function_exists( 'twentyeleven_comment' ) ) :
|
||||||
|
/**
|
||||||
|
* Template for comments and pingbacks.
|
||||||
|
*
|
||||||
|
* To override this walker in a child theme without modifying the comments template
|
||||||
|
* simply create your own twentyeleven_comment(), and that function will be used instead.
|
||||||
|
*
|
||||||
|
* Used as a callback by wp_list_comments() for displaying the comments.
|
||||||
|
*
|
||||||
|
* @since Twenty Eleven 1.0
|
||||||
|
*/
|
||||||
|
function twentyeleven_comment( $comment, $args, $depth ) {
|
||||||
|
$GLOBALS['comment'] = $comment;
|
||||||
|
switch ( $comment->comment_type ) :
|
||||||
|
case '' :
|
||||||
|
?>
|
||||||
|
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
|
||||||
|
<article id="comment-<?php comment_ID(); ?>" class="comment">
|
||||||
|
<footer class="comment-meta">
|
||||||
|
<div class="comment-author vcard">
|
||||||
|
<?php
|
||||||
|
$avatar_size = 68;
|
||||||
|
if ( '0' != $comment->comment_parent )
|
||||||
|
$avatar_size = 39;
|
||||||
|
|
||||||
|
echo get_avatar( $comment, $avatar_size );
|
||||||
|
|
||||||
|
printf( __( '%1$s on %2$s%3$s at %4$s%5$s <span class="says">said:</span>', 'twentyeleven' ),
|
||||||
|
sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ),
|
||||||
|
'<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '"><time pubdate datetime="' . get_comment_time( 'c' ) . '">',
|
||||||
|
get_comment_date(),
|
||||||
|
get_comment_time(),
|
||||||
|
'</time></a>'
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php edit_comment_link( __( '[Edit]', 'twentyeleven' ), ' ' ); ?>
|
||||||
|
</div><!-- .comment-author .vcard -->
|
||||||
|
|
||||||
|
<?php if ( $comment->comment_approved == '0' ) : ?>
|
||||||
|
<em><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>
|
||||||
|
<br />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<div class="comment-content"><?php comment_text(); ?></div>
|
||||||
|
|
||||||
|
<div class="reply">
|
||||||
|
<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply ↓', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||||
|
</div><!-- .reply -->
|
||||||
|
</article><!-- #comment-## -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
break;
|
||||||
|
case 'pingback' :
|
||||||
|
case 'trackback' :
|
||||||
|
?>
|
||||||
|
<li class="post pingback">
|
||||||
|
<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyeleven' ), ' ' ); ?></p>
|
||||||
|
<?php
|
||||||
|
break;
|
||||||
|
endswitch;
|
||||||
|
}
|
||||||
|
endif; // ends check for twentyeleven_comment()
|
98
wp-content/themes/twentyeleven/header.php
Normal file
98
wp-content/themes/twentyeleven/header.php
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?><!DOCTYPE html>
|
||||||
|
<!--[if IE 7]>
|
||||||
|
<html id="ie7" <?php language_attributes(); ?>>
|
||||||
|
<![endif]-->
|
||||||
|
<!--[if !IE 7]><!-->
|
||||||
|
<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', 'twentyeleven' ), 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(); ?>/inc/html5.js" type="text/javascript"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<?php wp_head(); ?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body <?php body_class(); ?>>
|
||||||
|
<div id="page" class="hfeed">
|
||||||
|
<header id="branding" role="banner">
|
||||||
|
<hgroup>
|
||||||
|
<h1 id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
|
||||||
|
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
|
||||||
|
</hgroup>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Check to see if the header image has been removed
|
||||||
|
if ( get_header_image() != '' ) :
|
||||||
|
?>
|
||||||
|
<a href="<?php echo home_url( '/' ); ?>">
|
||||||
|
<?php
|
||||||
|
// The header image
|
||||||
|
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
|
||||||
|
if ( is_singular() &&
|
||||||
|
has_post_thumbnail( $post->ID ) &&
|
||||||
|
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
|
||||||
|
$image[1] >= HEADER_IMAGE_WIDTH ) :
|
||||||
|
// Houston, we have a new header image!
|
||||||
|
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
|
||||||
|
else : ?>
|
||||||
|
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
|
||||||
|
<?php endif; // end check for featured image or standard header ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; // end check for removed header image ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Has the text been hidden?
|
||||||
|
if ( 'blank' == get_header_textcolor() ) :
|
||||||
|
?>
|
||||||
|
<div class="only-search<?php if ( get_header_image() != '' ) : ?> with-image<?php endif; ?>">
|
||||||
|
<?php get_search_form(); ?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
else :
|
||||||
|
?>
|
||||||
|
<?php get_search_form(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<nav id="access" role="navigation">
|
||||||
|
<h1 class="section-heading"><?php _e( 'Main menu', 'twentyeleven' ); ?></h1>
|
||||||
|
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyeleven' ); ?>"><?php _e( 'Skip to content', 'twentyeleven' ); ?></a></div>
|
||||||
|
|
||||||
|
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
|
||||||
|
</nav><!-- #access -->
|
||||||
|
</header><!-- #branding -->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="main">
|
109
wp-content/themes/twentyeleven/image.php
Normal file
109
wp-content/themes/twentyeleven/image.php
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<div id="primary" class="image-attachment">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php the_post(); ?>
|
||||||
|
|
||||||
|
<nav id="nav-single">
|
||||||
|
<span class="nav-previous"><?php previous_image_link( false, __( '← Previous' , 'twentyeleven' ) ); ?></span>
|
||||||
|
<span class="nav-next"><?php next_image_link( false, __( 'Next →' , 'twentyeleven' ) ); ?></span>
|
||||||
|
</nav><!-- #nav-single -->
|
||||||
|
|
||||||
|
<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( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <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>', 'twentyeleven' ),
|
||||||
|
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', 'twentyeleven' ), '<span class="sep">|</span> <span class="edit-link">', '</span>' ); ?>
|
||||||
|
</div><!-- .entry-meta -->
|
||||||
|
|
||||||
|
</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( 'theme_attachment_size', 848 );
|
||||||
|
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
|
||||||
|
?></a>
|
||||||
|
|
||||||
|
<?php if ( ! empty( $post->post_excerpt ) ) : ?>
|
||||||
|
<div class="entry-caption">
|
||||||
|
<?php the_excerpt(); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div><!-- .attachment -->
|
||||||
|
|
||||||
|
</div><!-- .entry-attachment -->
|
||||||
|
|
||||||
|
<div class="entry-description">
|
||||||
|
<?php the_content(); ?>
|
||||||
|
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
|
||||||
|
</div><!-- .entry-description -->
|
||||||
|
|
||||||
|
</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>.', 'twentyeleven' ), 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>.', 'twentyeleven' ), 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>.', 'twentyeleven' ); ?>
|
||||||
|
<?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
|
||||||
|
<?php _e( 'Both comments and trackbacks are currently closed.', 'twentyeleven' ); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), ' <span class="edit-link">', '</span>' ); ?>
|
||||||
|
</footer><!-- .entry-meta -->
|
||||||
|
</article><!-- #post-<?php the_ID(); ?> -->
|
||||||
|
|
||||||
|
<?php comments_template(); ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
Binary file not shown.
After Width: | Height: | Size: 386 B |
Binary file not shown.
BIN
wp-content/themes/twentyeleven/images/comment-arrow.png
Normal file
BIN
wp-content/themes/twentyeleven/images/comment-arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
BIN
wp-content/themes/twentyeleven/images/comment-arrow.psd
Normal file
BIN
wp-content/themes/twentyeleven/images/comment-arrow.psd
Normal file
Binary file not shown.
BIN
wp-content/themes/twentyeleven/images/headers/default.jpg
Normal file
BIN
wp-content/themes/twentyeleven/images/headers/default.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 498 KiB |
BIN
wp-content/themes/twentyeleven/images/search.png
Normal file
BIN
wp-content/themes/twentyeleven/images/search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
27
wp-content/themes/twentyeleven/index.php
Normal file
27
wp-content/themes/twentyeleven/index.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<div id="primary">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||||
|
|
||||||
|
<?php /* Start the Loop */ ?>
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', get_post_format() ); ?>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-below' ); ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_sidebar(); ?>
|
||||||
|
<?php get_footer(); ?>
|
3
wp-content/themes/twentyeleven/js/html5.js
Normal file
3
wp-content/themes/twentyeleven/js/html5.js
Normal file
@ -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)@*/
|
437
wp-content/themes/twentyeleven/languages/twentyeleven.pot
Normal file
437
wp-content/themes/twentyeleven/languages/twentyeleven.pot
Normal file
@ -0,0 +1,437 @@
|
|||||||
|
# Copyright (C) 2010 Twenty Eleven
|
||||||
|
# This file is distributed under the same license as the Twenty Eleven package.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Twenty Eleven 1.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twentyeleven\n"
|
||||||
|
"POT-Creation-Date: 2011-04-20 19:02:02+00:00\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
||||||
|
#: 404.php:14
|
||||||
|
msgid "This is somewhat embarrassing, isn’t it?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: 404.php:18
|
||||||
|
msgid ""
|
||||||
|
"It seems we can’t find what you’re looking for. Perhaps "
|
||||||
|
"searching, or one of the links below, can help."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: 404.php:25
|
||||||
|
msgid "Most Used Categories"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: 404.php:32
|
||||||
|
msgid "Try looking in the monthly archives. %1$s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: archive.php:17
|
||||||
|
msgid "Daily Archives: <span>%s</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: archive.php:19
|
||||||
|
msgid "Monthly Archives: <span>%s</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: archive.php:21
|
||||||
|
msgid "Yearly Archives: <span>%s</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: archive.php:23
|
||||||
|
msgid "Blog Archives"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: author.php:15
|
||||||
|
msgid "Author Archives: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: author.php:30 content-single.php:57
|
||||||
|
msgid "About %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: category.php:14
|
||||||
|
msgid "Category Archives: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:9
|
||||||
|
msgid ""
|
||||||
|
"This post is password protected. Enter the password to view any comments."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:20
|
||||||
|
msgid "One thought on “%2$s”"
|
||||||
|
msgid_plural "%1$s thoughts on “%2$s”"
|
||||||
|
msgstr[0] ""
|
||||||
|
msgstr[1] ""
|
||||||
|
|
||||||
|
#: comments.php:27 comments.php:39
|
||||||
|
msgid "Comment navigation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:28 comments.php:40
|
||||||
|
msgid "← Older Comments"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:29 comments.php:41
|
||||||
|
msgid "Newer Comments →"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:57
|
||||||
|
msgid "Comments are closed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:10 content-featured.php:11 content-gallery.php:10
|
||||||
|
#: content-gallery.php:49 content-link.php:10 content.php:10 showcase.php:68
|
||||||
|
#: showcase.php:70 showcase.php:112 widgets.php:91
|
||||||
|
msgid "Permalink to %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:17 content-link.php:17 content.php:29
|
||||||
|
msgid "<span class=\"leave-reply\">Reply</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:17 content-link.php:17 content.php:29
|
||||||
|
msgid "1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:17 content-link.php:17 content.php:29
|
||||||
|
msgid "%"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:24 content-aside.php:28 content-gallery.php:28
|
||||||
|
#: content-gallery.php:33 content-link.php:24 content-link.php:28
|
||||||
|
#: content.php:36 content.php:40 functions.php:201
|
||||||
|
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:29 content-featured.php:29 content-gallery.php:55
|
||||||
|
#: content-intro.php:15 content-link.php:29 content-page.php:15 image.php:85
|
||||||
|
msgid "Pages:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:35 content-featured.php:15 content-gallery.php:14
|
||||||
|
#: content-link.php:35 content-single.php:14 content.php:15
|
||||||
|
msgid ""
|
||||||
|
"<span class=\"sep\">Posted on </span><a href=\"%1$s\" rel=\"bookmark\"><time "
|
||||||
|
"class=\"entry-date\" datetime=\"%2$s\" pubdate>%3$s</time></a> <span class="
|
||||||
|
"\"sep\"> by </span> <span class=\"author vcard\"><a class=\"url fn n\" href="
|
||||||
|
"\"%4$s\" title=\"%5$s\">%6$s</a></span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:40 content-featured.php:20 content-gallery.php:19
|
||||||
|
#: content-link.php:40 content-single.php:19 content.php:20
|
||||||
|
msgid "View all posts by %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:46 content-link.php:46 content.php:53 showcase.php:114
|
||||||
|
msgid "<span class=\"leave-reply\">Leave a reply</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:46 content-link.php:46 content.php:53 showcase.php:114
|
||||||
|
msgid "<b>1</b> Reply"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:46 content-link.php:46 content.php:53 showcase.php:114
|
||||||
|
msgid "<b>%</b> Replies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-aside.php:48 content-featured.php:49 content-gallery.php:64
|
||||||
|
#: content-intro.php:16 content-link.php:48 content-page.php:16
|
||||||
|
#: content-single.php:49 content.php:56 image.php:36 image.php:100
|
||||||
|
msgid "Edit"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-featured.php:36
|
||||||
|
msgid ""
|
||||||
|
"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>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-featured.php:38
|
||||||
|
msgid ""
|
||||||
|
"This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title="
|
||||||
|
"\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-gallery.php:48
|
||||||
|
msgid "This gallery contains <a %1$s>%2$s photo</a>."
|
||||||
|
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
|
||||||
|
msgstr[0] ""
|
||||||
|
msgstr[1] ""
|
||||||
|
|
||||||
|
#: content-gallery.php:60 content.php:47
|
||||||
|
msgid "Posted in "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-gallery.php:62 content.php:48
|
||||||
|
msgid "Tagged "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-gallery.php:63
|
||||||
|
msgid "Leave a reply"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-gallery.php:63
|
||||||
|
msgid "1 reply"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-gallery.php:63
|
||||||
|
msgid "% replies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-single.php:28 content.php:41
|
||||||
|
msgid "<span>Pages:</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-single.php:35
|
||||||
|
msgid ""
|
||||||
|
"This entry was posted in %1$s and tagged %2$s by <a href=\"%6$s\">%5$s</a>. "
|
||||||
|
"Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark"
|
||||||
|
"\">permalink</a>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-single.php:37
|
||||||
|
msgid ""
|
||||||
|
"This entry was posted in %1$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a "
|
||||||
|
"href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: content-single.php:61
|
||||||
|
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: footer.php:35
|
||||||
|
msgid "Theme: %1$s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:30
|
||||||
|
msgid "Primary Menu"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:261
|
||||||
|
msgid "Main Sidebar"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:270
|
||||||
|
msgid "Showcase Sidebar"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:272
|
||||||
|
msgid "The sidebar for the optional Showcase Template"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:280
|
||||||
|
msgid "Footer Area One"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:282 functions.php:292 functions.php:302
|
||||||
|
msgid "An optional widget area for your site footer"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:290
|
||||||
|
msgid "Footer Area Two"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:300
|
||||||
|
msgid "Footer Area Three"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:325 single.php:15
|
||||||
|
msgid "Post navigation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:326
|
||||||
|
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:327
|
||||||
|
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:417
|
||||||
|
msgid "%1$s on %2$s%3$s at %4$s%5$s <span class=\"says\">said:</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:426
|
||||||
|
msgid "[Edit]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:430
|
||||||
|
msgid "Your comment is awaiting moderation."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:439
|
||||||
|
msgid "Reply ↓"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:449
|
||||||
|
msgid "Pingback:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:449
|
||||||
|
msgid "(Edit)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: header.php:34
|
||||||
|
msgid "Page %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: header.php:90
|
||||||
|
msgid "Main menu"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: header.php:91
|
||||||
|
msgid "Skip to content"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: image.php:15 single.php:16
|
||||||
|
msgid "← Previous"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: image.php:16 single.php:17
|
||||||
|
msgid "Next →"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: image.php:26
|
||||||
|
msgid ""
|
||||||
|
"<span class=\"meta-prep meta-prep-entry-date\">Published </span> <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>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: image.php:92
|
||||||
|
msgid ""
|
||||||
|
"<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>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: image.php:94
|
||||||
|
msgid ""
|
||||||
|
"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>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: image.php:96
|
||||||
|
msgid ""
|
||||||
|
"Trackbacks are closed, but you can <a class=\"comment-link\" href=\"#respond"
|
||||||
|
"\" title=\"Post a comment\">post a comment</a>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: image.php:98
|
||||||
|
msgid "Both comments and trackbacks are currently closed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: search.php:15
|
||||||
|
msgid "Search Results for: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: search.php:33
|
||||||
|
msgid "Nothing Found"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: search.php:37
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but nothing matched your search criteria. Please try again with some "
|
||||||
|
"different keywords."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: searchform.php:8 searchform.php:9
|
||||||
|
msgid "Search"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: showcase.php:63
|
||||||
|
msgid "Featured Post"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: showcase.php:79
|
||||||
|
msgid "Recent Posts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: sidebar.php:11
|
||||||
|
msgid "Archives"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: sidebar.php:18
|
||||||
|
msgid "Meta"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: tag.php:18
|
||||||
|
msgid "Tag Archives: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:15
|
||||||
|
msgid "Use this widget to list your recent Aside and Link posts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:16
|
||||||
|
msgid "Twenty Eleven Ephemera"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:49
|
||||||
|
msgid "Ephemera"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:93 widgets.php:108
|
||||||
|
msgid "0 <span class=\"reply\">comments →</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:93 widgets.php:108
|
||||||
|
msgid "1 <span class=\"reply\">comment →</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:93 widgets.php:108
|
||||||
|
msgid "% <span class=\"reply\">comments →</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:106
|
||||||
|
msgid "Link to %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:158
|
||||||
|
msgid "Title:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: widgets.php:161
|
||||||
|
msgid "Number of posts to show:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Theme Name of the plugin/theme
|
||||||
|
msgid "Twenty Eleven"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Theme URI of the plugin/theme
|
||||||
|
msgid "http://wordpress.org/extend/themes/twentyeleven"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Description of the plugin/theme
|
||||||
|
msgid ""
|
||||||
|
"Twenty Eleven is a sophisticated theme designed and developed by the "
|
||||||
|
"WordPress team, offering a unique page template to turn your blog into a "
|
||||||
|
"showcase of different kinds of posts – Featured with an image, Asides, Link "
|
||||||
|
"posts, and more. It also supports customization options like custom "
|
||||||
|
"backgrounds, headers, menus, and widgets."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Author of the plugin/theme
|
||||||
|
msgid "the WordPress team"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Author URI of the plugin/theme
|
||||||
|
msgid "http://wordpress.org/"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Tags of the plugin/theme
|
||||||
|
msgid ""
|
||||||
|
"light, white, two-columns, left-sidebar, right-sidebar, flexible-width, "
|
||||||
|
"fixed-width, custom-background, custom-header, featured-images, featured-"
|
||||||
|
"image-header, sticky-post, custom-menu, sticky-post, microformats, rtl-"
|
||||||
|
"language-support, translation-ready"
|
||||||
|
msgstr ""
|
281
wp-content/themes/twentyeleven/license.txt
Normal file
281
wp-content/themes/twentyeleven/license.txt
Normal file
@ -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
|
||||||
|
|
21
wp-content/themes/twentyeleven/page.php
Normal file
21
wp-content/themes/twentyeleven/page.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<div id="primary">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', 'page' ); ?>
|
||||||
|
|
||||||
|
<?php comments_template( '', true ); ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
5
wp-content/themes/twentyeleven/readme.txt
Normal file
5
wp-content/themes/twentyeleven/readme.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
= TWENTY ELEVEN =
|
||||||
|
|
||||||
|
* by the WordPress team, http://wordpress.org/
|
||||||
|
|
||||||
|
== ABOUT TWENTY ELEVEN ==
|
44
wp-content/themes/twentyeleven/rtl.css
Normal file
44
wp-content/themes/twentyeleven/rtl.css
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Theme Name: Twenty Eleven
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
#access {
|
||||||
|
float: right;
|
||||||
|
margin: 0 auto 1em;
|
||||||
|
}
|
||||||
|
#access ul {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
#access li {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
#access ul ul {
|
||||||
|
box-shadow: 0 3px 3px rgba(0,0,0,0.2);
|
||||||
|
-moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
|
||||||
|
-webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
|
||||||
|
float: right;
|
||||||
|
right: 0;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
#access ul ul ul {
|
||||||
|
right: 100%;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
#content nav .nav-previous {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
#content nav .nav-next {
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
}
|
BIN
wp-content/themes/twentyeleven/screenshot.png
Normal file
BIN
wp-content/themes/twentyeleven/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 706 B |
48
wp-content/themes/twentyeleven/search.php
Normal file
48
wp-content/themes/twentyeleven/search.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
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', 'twentyeleven' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||||
|
|
||||||
|
<?php /* Start the Loop */ ?>
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', 'search' ); ?>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_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', 'twentyeleven' ); ?></h1>
|
||||||
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
<div class="entry-content">
|
||||||
|
<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyeleven' ); ?></p>
|
||||||
|
<?php get_search_form(); ?>
|
||||||
|
</div><!-- .entry-content -->
|
||||||
|
</article><!-- #post-0 -->
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</section><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_sidebar(); ?>
|
||||||
|
<?php get_footer(); ?>
|
10
wp-content/themes/twentyeleven/searchform.php
Normal file
10
wp-content/themes/twentyeleven/searchform.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<form method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
|
||||||
|
<input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
|
||||||
|
<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
|
||||||
|
</form>
|
138
wp-content/themes/twentyeleven/showcase.php
Normal file
138
wp-content/themes/twentyeleven/showcase.php
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Template Name: Showcase Template
|
||||||
|
* Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<div id="primary" class="showcase">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php the_post(); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If we have content for this page, let's display it.
|
||||||
|
if ( '' != get_the_content() )
|
||||||
|
get_template_part( 'content', 'intro' );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// See if we have any sticky posts and use the latest to create a featured post
|
||||||
|
$sticky = get_option( 'sticky_posts' );
|
||||||
|
$featured_args = array(
|
||||||
|
'posts_per_page' => 1,
|
||||||
|
'post__in' => $sticky,
|
||||||
|
);
|
||||||
|
|
||||||
|
$featured = new WP_Query();
|
||||||
|
$featured->query( $featured_args );
|
||||||
|
|
||||||
|
// Let's roll.
|
||||||
|
if ( $sticky ) :
|
||||||
|
|
||||||
|
$featured->the_post();
|
||||||
|
|
||||||
|
// We're going to add a class to our featured post for featured images
|
||||||
|
// by default it'll have no class though
|
||||||
|
$feature_class = '';
|
||||||
|
|
||||||
|
if ( has_post_thumbnail() ) {
|
||||||
|
// … but if it has a featured image let's add some class
|
||||||
|
$feature_class = 'feature-image small';
|
||||||
|
|
||||||
|
// Hang on. Let's check this here image out.
|
||||||
|
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) );
|
||||||
|
|
||||||
|
// Is it bigger than or equal to our header?
|
||||||
|
if ( $image[1] >= HEADER_IMAGE_WIDTH ) {
|
||||||
|
// Let's add a BIGGER class. It's EXTRA classy now.
|
||||||
|
$feature_class = 'feature-image large';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if ( has_post_thumbnail() ) : ?>
|
||||||
|
<section class="featured-post <?php echo $feature_class; ?>">
|
||||||
|
<?php else : ?>
|
||||||
|
<section class="featured-post">
|
||||||
|
<?php endif; ?>
|
||||||
|
<h1 class="showcase-heading"><?php _e( 'Featured Post', 'twentyeleven' ); ?></h1>
|
||||||
|
<?php
|
||||||
|
// Dynamic thumbnails!
|
||||||
|
if ( has_post_thumbnail() ) {
|
||||||
|
if ( $image[1] >= HEADER_IMAGE_WIDTH ) { ?>
|
||||||
|
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"> <?php the_post_thumbnail( 'large-feature' ); ?></a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail( 'small-feature' ); ?></a>
|
||||||
|
<?php }
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php get_template_part( 'content', 'featured' ); ?>
|
||||||
|
</section>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<section class="recent-posts">
|
||||||
|
<h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Display our recent posts, showing full content for the very latest, ignoring Aside posts
|
||||||
|
$recent_args = array(
|
||||||
|
'order' => 'DESC',
|
||||||
|
'post__not_in' => get_option( 'sticky_posts' ),
|
||||||
|
'tax_query' => array(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'post_format',
|
||||||
|
'terms' => array( 'post-format-aside', 'post-format-link' ),
|
||||||
|
'field' => 'slug',
|
||||||
|
'operator' => 'NOT IN',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
$recent = new WP_Query();
|
||||||
|
$recent->query( $recent_args );
|
||||||
|
$counter = 0;
|
||||||
|
|
||||||
|
while ( $recent->have_posts() ) : $recent->the_post();
|
||||||
|
// set $more to 0 in order to only get the first part of the post
|
||||||
|
global $more;
|
||||||
|
$more = 0;
|
||||||
|
$counter++;
|
||||||
|
|
||||||
|
if ( 1 == $counter ) :
|
||||||
|
get_template_part( 'content', get_post_format() );
|
||||||
|
echo '<ol class="other-recent-posts">';
|
||||||
|
|
||||||
|
else : ?>
|
||||||
|
<li class="entry-title">
|
||||||
|
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
|
||||||
|
<span class="comments-link">
|
||||||
|
<?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php endif;
|
||||||
|
endwhile;
|
||||||
|
?>
|
||||||
|
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="widget-area" role="complementary">
|
||||||
|
<?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
the_widget( 'Twenty_Eleven_Ephemera_Widget', '', 'before_title=<h1 class="widget-title">&after_title=</h1>' );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php endif; // end sidebar widget area ?>
|
||||||
|
</div><!-- .widget-area -->
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
28
wp-content/themes/twentyeleven/sidebar.php
Normal file
28
wp-content/themes/twentyeleven/sidebar.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div id="secondary" class="widget-area" role="complementary">
|
||||||
|
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
|
||||||
|
|
||||||
|
<aside id="archives" class="widget">
|
||||||
|
<h1 class="widget-title"><?php _e( 'Archives', 'twentyeleven' ); ?></h1>
|
||||||
|
<ul>
|
||||||
|
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
|
||||||
|
</ul>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<aside id="meta" class="widget">
|
||||||
|
<h1 class="widget-title"><?php _e( 'Meta', 'twentyeleven' ); ?></h1>
|
||||||
|
<ul>
|
||||||
|
<?php wp_register(); ?>
|
||||||
|
<li><?php wp_loginout(); ?></li>
|
||||||
|
<?php wp_meta(); ?>
|
||||||
|
</ul>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<?php endif; // end sidebar widget area ?>
|
||||||
|
</div><!-- #secondary .widget-area -->
|
||||||
|
|
31
wp-content/themes/twentyeleven/single.php
Normal file
31
wp-content/themes/twentyeleven/single.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<div id="primary">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
|
<nav id="nav-single">
|
||||||
|
<h1 class="section-heading"><?php _e( 'Post navigation', 'toolbox' ); ?></h1>
|
||||||
|
<span class="nav-previous"><?php previous_post_link( '%link', __( '← Previous', 'twentyeleven' ) ); ?></span>
|
||||||
|
<span class="nav-next"><?php next_post_link( '%link', __( 'Next →', 'twentyeleven' ) ); ?></span>
|
||||||
|
</nav><!-- #nav-single -->
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', 'single' ); ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-below' ); ?>
|
||||||
|
|
||||||
|
<?php comments_template( '', true ); ?>
|
||||||
|
|
||||||
|
<?php endwhile; // end of the loop. ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
1933
wp-content/themes/twentyeleven/style.css
Normal file
1933
wp-content/themes/twentyeleven/style.css
Normal file
File diff suppressed because it is too large
Load Diff
39
wp-content/themes/twentyeleven/tag.php
Normal file
39
wp-content/themes/twentyeleven/tag.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template used to display Tag Archive pages
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty Eleven
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<section id="primary">
|
||||||
|
<div id="content" role="main">
|
||||||
|
|
||||||
|
<?php the_post(); ?>
|
||||||
|
|
||||||
|
<header class="page-header">
|
||||||
|
<h1 class="page-title"><?php
|
||||||
|
printf( __( 'Tag Archives: %s', 'twentyeleven' ), '<span>' . single_tag_title( '', false ) . '</span>' );
|
||||||
|
?></h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<?php rewind_posts(); ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||||
|
|
||||||
|
<?php /* Start the Loop */ ?>
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'content', get_post_format() ); ?>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php twentyeleven_content_nav( 'nav-below' ); ?>
|
||||||
|
|
||||||
|
</div><!-- #content -->
|
||||||
|
</section><!-- #primary -->
|
||||||
|
|
||||||
|
<?php get_sidebar(); ?>
|
||||||
|
<?php get_footer(); ?>
|
167
wp-content/themes/twentyeleven/widgets.php
Normal file
167
wp-content/themes/twentyeleven/widgets.php
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* new WordPress Widget format
|
||||||
|
* Wordpress 2.8 and above
|
||||||
|
* @see http://codex.wordpress.org/Widgets_API#Developing_Widgets
|
||||||
|
*/
|
||||||
|
class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
function Twenty_Eleven_Ephemera_Widget() {
|
||||||
|
$widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside and Link posts', 'twentyeleven' ) );
|
||||||
|
$this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
|
||||||
|
$this->alt_option_name = 'widget_twentyeleven_ephemera';
|
||||||
|
|
||||||
|
add_action( 'save_post', array(&$this, 'flush_widget_cache' ) );
|
||||||
|
add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) );
|
||||||
|
add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outputs the HTML for this widget.
|
||||||
|
*
|
||||||
|
* @param array An array of standard parameters for widgets in this theme
|
||||||
|
* @param array An array of settings for this widget instance
|
||||||
|
* @return void Echoes it's output
|
||||||
|
**/
|
||||||
|
function widget( $args, $instance ) {
|
||||||
|
$cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' );
|
||||||
|
|
||||||
|
if ( !is_array($cache) )
|
||||||
|
$cache = array();
|
||||||
|
|
||||||
|
if ( ! isset( $args['widget_id'] ) )
|
||||||
|
$args['widget_id'] = null;
|
||||||
|
|
||||||
|
if ( isset($cache[$args['widget_id']]) ) {
|
||||||
|
echo $cache[$args['widget_id']];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
extract( $args, EXTR_SKIP );
|
||||||
|
|
||||||
|
$title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Ephemera' ) : $instance['title'], $instance, $this->id_base);
|
||||||
|
|
||||||
|
if ( ! isset( $instance['number'] ) )
|
||||||
|
$instance['number'] = '10';
|
||||||
|
|
||||||
|
if ( ! $number = absint( $instance['number'] ) )
|
||||||
|
$number = 10;
|
||||||
|
|
||||||
|
$ephemera_args = array(
|
||||||
|
'order' => 'DESC',
|
||||||
|
'posts_per_page' => $number,
|
||||||
|
'nopaging' => 0,
|
||||||
|
'post_status' => 'publish',
|
||||||
|
'post__not_in' => get_option( 'sticky_posts' ),
|
||||||
|
'tax_query' => array(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'post_format',
|
||||||
|
'terms' => array( 'post-format-aside', 'post-format-link' ),
|
||||||
|
'field' => 'slug',
|
||||||
|
'operator' => 'IN',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
$ephemera = new WP_Query();
|
||||||
|
$ephemera->query( $ephemera_args );
|
||||||
|
|
||||||
|
if ( $ephemera->have_posts() ) :
|
||||||
|
|
||||||
|
echo $before_widget;
|
||||||
|
echo $before_title;
|
||||||
|
echo $title; // Can set this with a widget option, or omit altogether
|
||||||
|
echo $after_title;
|
||||||
|
|
||||||
|
global $post;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<ol>
|
||||||
|
<?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
|
||||||
|
|
||||||
|
<?php if ( 'aside' == get_post_format( $post->ID ) ) : ?>
|
||||||
|
|
||||||
|
<li class="entry-title">
|
||||||
|
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
|
||||||
|
<span class="comments-link">
|
||||||
|
<?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php elseif ( 'link' == get_post_format( $post->ID ) ) : ?>
|
||||||
|
|
||||||
|
<li class="entry-title">
|
||||||
|
<?php
|
||||||
|
$link_url = get_permalink();
|
||||||
|
|
||||||
|
if ( false != twentyeleven_url_grabber() )
|
||||||
|
$link_url = twentyeleven_url_grabber();
|
||||||
|
?>
|
||||||
|
<a href="<?php echo $link_url; ?>" title="<?php printf( esc_attr__( 'Link to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?> <span>→</span></a>
|
||||||
|
<span class="comments-link">
|
||||||
|
<?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
</ol>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo $after_widget;
|
||||||
|
|
||||||
|
// Reset the global $the_post as this query will have stomped on it
|
||||||
|
wp_reset_postdata();
|
||||||
|
|
||||||
|
// end check for ephemeral posts
|
||||||
|
endif;
|
||||||
|
|
||||||
|
$cache[$args['widget_id']] = ob_get_flush();
|
||||||
|
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deals with the settings when they are saved by the admin. Here is
|
||||||
|
* where any validation should be dealt with.
|
||||||
|
**/
|
||||||
|
function update( $new_instance, $old_instance ) {
|
||||||
|
$instance = $old_instance;
|
||||||
|
$instance['title'] = strip_tags($new_instance['title']);
|
||||||
|
$instance['number'] = (int) $new_instance['number'];
|
||||||
|
$this->flush_widget_cache();
|
||||||
|
|
||||||
|
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
||||||
|
if ( isset($alloptions['widget_twentyeleven_ephemera']) )
|
||||||
|
delete_option( 'widget_twentyeleven_ephemera' );
|
||||||
|
|
||||||
|
return $instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
function flush_widget_cache() {
|
||||||
|
wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the form for this widget on the Widgets page of the WP Admin area.
|
||||||
|
**/
|
||||||
|
function form( $instance ) {
|
||||||
|
$title = isset($instance['title']) ? esc_attr($instance['title']) : '';
|
||||||
|
$number = isset($instance['number']) ? absint($instance['number']) : 10;
|
||||||
|
?>
|
||||||
|
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></label>
|
||||||
|
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></p>
|
||||||
|
|
||||||
|
<p><label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:', 'twentyeleven' ); ?></label>
|
||||||
|
<input id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>" size="3" /></p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'widgets_init', create_function( '', "register_widget( 'Twenty_Eleven_Ephemera_Widget' );" ) );
|
Loading…
Reference in New Issue
Block a user