first commit
48
wp-content/themes/twentyeleven/404.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (Not Found).
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<article id="post-0" class="post error404 not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( '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', array( 'number' => 10 ), array( 'widget_id' => '404' ) ); ?>
|
||||
|
||||
<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
|
||||
/* translators: %1$s: smilie */
|
||||
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>';
|
||||
the_widget( 'WP_Widget_Archives', array('count' => 0 , 'dropdown' => 1 ), array( '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(); ?>
|
||||
72
wp-content/themes/twentyeleven/archive.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Archive pages.
|
||||
*
|
||||
* Used to display archive-type pages if nothing more specific matches a query.
|
||||
* For example, puts together date-based pages if no date.php file exists.
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title">
|
||||
<?php if ( is_day() ) : ?>
|
||||
<?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( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
|
||||
<?php elseif ( is_year() ) : ?>
|
||||
<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
|
||||
<?php else : ?>
|
||||
<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
|
||||
<?php endif; ?>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php 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( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
89
wp-content/themes/twentyeleven/author.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Author Archive pages.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<?php
|
||||
/* Queue the first post, that way we know
|
||||
* what author we're dealing with (if that is the case).
|
||||
*
|
||||
* We reset this later so we can run the loop
|
||||
* properly with a call to rewind_posts().
|
||||
*/
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
/* Since we called the_post() above, we need to
|
||||
* rewind the loop back to the beginning that way
|
||||
* we can run the loop properly, in full.
|
||||
*/
|
||||
rewind_posts();
|
||||
?>
|
||||
|
||||
<?php 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><!-- #author-info -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php 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( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
65
wp-content/themes/twentyeleven/category.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Category Archive pages.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php
|
||||
printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
$category_description = category_description();
|
||||
if ( ! empty( $category_description ) )
|
||||
echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
|
||||
?>
|
||||
</header>
|
||||
|
||||
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php 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( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
623
wp-content/themes/twentyeleven/colors/dark.css
Normal file
@ -0,0 +1,623 @@
|
||||
/*
|
||||
A dark color scheme for Twenty Eleven
|
||||
*/
|
||||
|
||||
/* =Global
|
||||
----------------------------------------------- */
|
||||
|
||||
body {
|
||||
background: #1d1d1d;
|
||||
color: #bbb;
|
||||
}
|
||||
#page {
|
||||
background: #0f0f0f;
|
||||
}
|
||||
|
||||
/* Headings */
|
||||
hr {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
/* Text elements */
|
||||
blockquote cite {
|
||||
color: #999;
|
||||
}
|
||||
pre {
|
||||
background: #0b0b0b;
|
||||
}
|
||||
code, kbd {
|
||||
font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
|
||||
}
|
||||
abbr, acronym, dfn {
|
||||
border-bottom: 1px dotted #999;
|
||||
}
|
||||
ins {
|
||||
background: #00063f;
|
||||
}
|
||||
input[type=text],
|
||||
input[type=password],
|
||||
input[type=email],
|
||||
input[type=url],
|
||||
input[type=number],
|
||||
textarea {
|
||||
border: 1px solid #222;
|
||||
}
|
||||
input#s {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a {
|
||||
}
|
||||
|
||||
|
||||
/* =Header
|
||||
----------------------------------------------- */
|
||||
|
||||
#branding {
|
||||
border-top: 2px solid #0a0a0a;
|
||||
}
|
||||
#site-title a {
|
||||
color: #eee;
|
||||
}
|
||||
#site-title a:hover,
|
||||
#site-title a:focus,
|
||||
#site-title a:active {
|
||||
}
|
||||
#site-description {
|
||||
color: #858585;
|
||||
}
|
||||
#branding #s {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
|
||||
/* =Menu
|
||||
----------------------------------------------- */
|
||||
|
||||
#access {
|
||||
background: #333; /* Show a solid color for older browsers */
|
||||
background: -moz-linear-gradient(#383838, #272727);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#383838), to(#272727)); /* older webkit syntax */
|
||||
background: -webkit-linear-gradient(#383838, #272727);
|
||||
border-bottom: 1px solid #222;
|
||||
}
|
||||
|
||||
/* =Content
|
||||
----------------------------------------------- */
|
||||
|
||||
.page-title {
|
||||
color: #ccc;
|
||||
}
|
||||
.hentry {
|
||||
border-color: #222;
|
||||
}
|
||||
.entry-title {
|
||||
color: #ddd;
|
||||
}
|
||||
.entry-title,
|
||||
.entry-title a {
|
||||
color: #ddd;
|
||||
}
|
||||
.entry-title a:hover,
|
||||
.entry-title a:focus,
|
||||
.entry-title a:active {
|
||||
}
|
||||
.entry-meta {
|
||||
color: #999;
|
||||
}
|
||||
.entry-content h1,
|
||||
.entry-content h2,
|
||||
.comment-content h1,
|
||||
.comment-content h2 {
|
||||
color: #fff;
|
||||
}
|
||||
.entry-content table,
|
||||
.comment-content table {
|
||||
border-color: #222;
|
||||
}
|
||||
.entry-content th,
|
||||
.comment-content th {
|
||||
color: #999;
|
||||
}
|
||||
.entry-content td,
|
||||
.comment-content td {
|
||||
border-color: #222;
|
||||
}
|
||||
.page-link {
|
||||
}
|
||||
.page-link a {
|
||||
background: #242424;
|
||||
color: #bbb;
|
||||
}
|
||||
.page-link a:hover {
|
||||
background: #999;
|
||||
color: #000;
|
||||
}
|
||||
.entry-meta .edit-link a {
|
||||
background: #242424;
|
||||
color: #bbb;
|
||||
}
|
||||
.entry-meta .edit-link a:hover,
|
||||
.entry-meta .edit-link a:focus,
|
||||
.entry-meta .edit-link a:active {
|
||||
background: #999;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* Images */
|
||||
.wp-caption {
|
||||
background: #2c2c2c;
|
||||
}
|
||||
.wp-caption .wp-caption-text {
|
||||
color: #999;
|
||||
}
|
||||
.wp-caption .wp-caption-text:before {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* Image borders */
|
||||
img[class*="wp-image-"],
|
||||
#content .gallery .gallery-icon img {
|
||||
border-color: #2c2c2c;
|
||||
}
|
||||
.wp-caption img {
|
||||
border-color: #2c2c2c;
|
||||
}
|
||||
a:focus img[class*="wp-image-"],
|
||||
a:hover img[class*="wp-image-"],
|
||||
a:active img[class*="wp-image-"] {
|
||||
background: #2c2c2c;
|
||||
border-color: #444;
|
||||
}
|
||||
.wp-caption a:focus img,
|
||||
.wp-caption a:active img,
|
||||
.wp-caption a:hover img {
|
||||
background: #0f0f0f;
|
||||
border-color: #2c2c2c;
|
||||
}
|
||||
|
||||
/* Password Protected Posts */
|
||||
.post-password-required input[type=password] {
|
||||
background: #ddd;
|
||||
}
|
||||
.post-password-required input[type=password]:focus {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Author Info */
|
||||
.singular #author-info {
|
||||
background: #060606;
|
||||
border-color: #222;
|
||||
}
|
||||
.archive #author-info {
|
||||
border-color: #222;
|
||||
}
|
||||
#author-avatar img {
|
||||
background: #000;
|
||||
-webkit-box-shadow: 0 1px 2px #444;
|
||||
-moz-box-shadow: 0 1px 2px #444;
|
||||
box-shadow: 0 1px 2px #444;
|
||||
}
|
||||
#author-description h2 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Comments link */
|
||||
.entry-header .comments-link a {
|
||||
background: #282828 url(../images/comment-bubble-dark.png) no-repeat;
|
||||
border-color: #222;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.rtl .entry-header .comments-link a {
|
||||
background-image: url(../images/comment-bubble-dark-rtl.png);
|
||||
}
|
||||
/* Singular content styles for Posts and Pages */
|
||||
.singular .entry-title {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* =Status
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-status img.avatar {
|
||||
-webkit-box-shadow: 0 1px 2px #333;
|
||||
-moz-box-shadow: 0 1px 2px #333;
|
||||
box-shadow: 0 1px 2px #333;
|
||||
}
|
||||
|
||||
|
||||
/* =Quote
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-quote blockquote {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
|
||||
/* =Image
|
||||
----------------------------------------------- */
|
||||
|
||||
.indexed.format-image .wp-caption {
|
||||
background: #242424;
|
||||
}
|
||||
.indexed.format-image .entry-meta .edit-link a {
|
||||
color: #ddd;
|
||||
}
|
||||
.indexed.format-image .entry-meta .edit-link a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* =error404
|
||||
----------------------------------------------- */
|
||||
.error404 #main #searchform {
|
||||
background: #060606;
|
||||
border-color: #222;
|
||||
}
|
||||
|
||||
|
||||
/* =Showcase
|
||||
----------------------------------------------- */
|
||||
|
||||
h1.showcase-heading {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
/* Intro */
|
||||
article.intro {
|
||||
background: #060606;
|
||||
}
|
||||
article.intro .entry-content {
|
||||
color: #eee;
|
||||
}
|
||||
article.intro .edit-link a {
|
||||
background: #555;
|
||||
color: #000;
|
||||
}
|
||||
article.intro .edit-link a:hover {
|
||||
background: #888;
|
||||
}
|
||||
|
||||
/* Featured post */
|
||||
section.featured-post .hentry {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* Small featured post */
|
||||
section.featured-post .attachment-small-feature {
|
||||
border-color: #444;
|
||||
}
|
||||
section.featured-post .attachment-small-feature:hover {
|
||||
border-color: #777;
|
||||
}
|
||||
article.feature-image.small .entry-summary {
|
||||
color: #aaa;
|
||||
}
|
||||
article.feature-image.small .entry-summary p a {
|
||||
background: #ddd;
|
||||
color: #111;
|
||||
}
|
||||
article.feature-image.small .entry-summary p a:hover {
|
||||
color: #40220c;
|
||||
}
|
||||
|
||||
/* Large featured post */
|
||||
article.feature-image.large .entry-title a {
|
||||
background: #ddd;
|
||||
background: rgba(0,0,0,0.8);
|
||||
color: #fff;
|
||||
}
|
||||
section.feature-image.large:hover .entry-title a,
|
||||
section.feature-image.large .entry-title:hover a {
|
||||
background: #111;
|
||||
background: rgba(255,255,255,0.8);
|
||||
color: #000;
|
||||
}
|
||||
section.feature-image.large img {
|
||||
border-bottom: 1px solid #222;
|
||||
}
|
||||
|
||||
/* Featured Slider */
|
||||
.featured-posts {
|
||||
border-color: #222;
|
||||
}
|
||||
.featured-posts section.featured-post {
|
||||
background: #000;
|
||||
}
|
||||
.featured-post .feature-text:after,
|
||||
.featured-post .feature-image.small:after {
|
||||
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1))); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* IE10+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
|
||||
background: linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C */
|
||||
}
|
||||
.feature-slider a {
|
||||
background: #c3c3c3;
|
||||
background: rgba(60,60,60,0.9);
|
||||
-webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
|
||||
-moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
|
||||
box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
|
||||
}
|
||||
.feature-slider a.active {
|
||||
background: #000;
|
||||
background: rgba(255,255,255,0.8);
|
||||
-webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
|
||||
-moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
|
||||
box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
|
||||
}
|
||||
|
||||
/* Recent Posts */
|
||||
section.recent-posts .other-recent-posts {
|
||||
border-color: #222;
|
||||
}
|
||||
section.recent-posts .other-recent-posts .entry-title {
|
||||
border-color: #222;
|
||||
}
|
||||
section.recent-posts .other-recent-posts a[rel="bookmark"] {
|
||||
color: #ccc;
|
||||
}
|
||||
section.recent-posts .other-recent-posts a[rel="bookmark"]:hover {
|
||||
}
|
||||
section.recent-posts .other-recent-posts .comments-link a,
|
||||
section.recent-posts .other-recent-posts .comments-link > span {
|
||||
border-color: #959595;
|
||||
color: #bbb;
|
||||
}
|
||||
section.recent-posts .other-recent-posts .comments-link > span {
|
||||
border-color: #444;
|
||||
color: #777;
|
||||
}
|
||||
section.recent-posts .other-recent-posts .comments-link a:hover {
|
||||
}
|
||||
|
||||
|
||||
/* =Attachments
|
||||
----------------------------------------------- */
|
||||
|
||||
.image-attachment div.attachment {
|
||||
background: #060606;
|
||||
border-color: #222;
|
||||
}
|
||||
.image-attachment div.attachment a img {
|
||||
border-color: #060606;
|
||||
}
|
||||
.image-attachment div.attachment a:focus img,
|
||||
.image-attachment div.attachment a:hover img,
|
||||
.image-attachment div.attachment a:active img {
|
||||
border-color: #2c2c2c;
|
||||
background: #0f0f0f;
|
||||
}
|
||||
|
||||
|
||||
/* =Widgets
|
||||
----------------------------------------------- */
|
||||
|
||||
.widget-title {
|
||||
color: #ccc;
|
||||
}
|
||||
.widget ul li {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/* Search Widget */
|
||||
.widget_search #searchsubmit {
|
||||
background: #222;
|
||||
border-color: #333;
|
||||
-webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
|
||||
-moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
|
||||
box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
|
||||
color: #777;
|
||||
}
|
||||
.widget_search #searchsubmit:active {
|
||||
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
color: #40220c;
|
||||
}
|
||||
|
||||
/* Calendar Widget */
|
||||
.widget_calendar #wp-calendar {
|
||||
color: #aaa;
|
||||
}
|
||||
.widget_calendar #wp-calendar th {
|
||||
background: #0b0b0b;
|
||||
border-color: #333;
|
||||
}
|
||||
.widget_calendar #wp-calendar tfoot td {
|
||||
background: #0b0b0b;
|
||||
border-color: #333;
|
||||
}
|
||||
|
||||
|
||||
/* =Comments
|
||||
----------------------------------------------- */
|
||||
|
||||
#comments-title {
|
||||
color: #bbb;
|
||||
}
|
||||
.nocomments {
|
||||
color: #555;
|
||||
}
|
||||
.commentlist > li.comment {
|
||||
background: #090909;
|
||||
border-color: #222;
|
||||
}
|
||||
.commentlist .children li.comment {
|
||||
background: #000;
|
||||
border-color: #222;
|
||||
}
|
||||
.rtl .commentlist .children li.comment {
|
||||
border-color: #222;
|
||||
}
|
||||
.comment-meta {
|
||||
color: #999;
|
||||
}
|
||||
.commentlist .avatar {
|
||||
-webkit-box-shadow: 0 1px 2px #222;
|
||||
-moz-box-shadow: 0 1px 2px #222;
|
||||
box-shadow: 0 1px 2px #222;
|
||||
}
|
||||
a.comment-reply-link {
|
||||
background: #242424;
|
||||
color: #bbb;
|
||||
}
|
||||
li.bypostauthor a.comment-reply-link {
|
||||
background: #111;
|
||||
}
|
||||
a.comment-reply-link:hover,
|
||||
a.comment-reply-link:focus,
|
||||
a.comment-reply-link:active,
|
||||
li.bypostauthor a.comment-reply-link:hover,
|
||||
li.bypostauthor a.comment-reply-link:focus,
|
||||
li.bypostauthor a.comment-reply-link:active {
|
||||
background: #999;
|
||||
color: #000;
|
||||
}
|
||||
.commentlist > li:before {
|
||||
content: url(../images/comment-arrow-dark.png);
|
||||
}
|
||||
.rtl .commentlist > li:before {
|
||||
content: url(../images/comment-arrow-dark-rtl.png);
|
||||
}
|
||||
|
||||
/* Post author highlighting */
|
||||
.commentlist > li.bypostauthor {
|
||||
background: #222;
|
||||
border-color: #2c2c2c;
|
||||
}
|
||||
.commentlist > li.bypostauthor:before {
|
||||
content: url(../images/comment-arrow-bypostauthor-dark.png);
|
||||
}
|
||||
.rtl .commentlist > li.bypostauthor:before {
|
||||
content: url(../images/comment-arrow-bypostauthor-dark-rtl.png);
|
||||
}
|
||||
|
||||
/* Post Author threaded comments */
|
||||
.commentlist .children > li.bypostauthor {
|
||||
background: #222;
|
||||
border-color: #2c2c2c;
|
||||
}
|
||||
.commentlist > li.bypostauthor .comment-meta {
|
||||
color: #a8a8a8;
|
||||
}
|
||||
|
||||
/* Comment Form */
|
||||
#respond {
|
||||
background: #222;
|
||||
border-color: #2c2c2c;
|
||||
}
|
||||
#respond input[type="text"],
|
||||
#respond textarea {
|
||||
background: #000;
|
||||
border: 4px solid #111;
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(51,51,51,0.95);
|
||||
-moz-box-shadow: inset 0 1px 3px rgba(51,51,51,0.95);
|
||||
box-shadow: inset 0 1px 3px rgba(51,51,51,0.95);
|
||||
color: #bbb;
|
||||
}
|
||||
#respond .comment-form-author label,
|
||||
#respond .comment-form-email label,
|
||||
#respond .comment-form-url label,
|
||||
#respond .comment-form-comment label {
|
||||
background: #111;
|
||||
-webkit-box-shadow: 1px 2px 2px rgba(51,51,51,0.8);
|
||||
-moz-box-shadow: 1px 2px 2px rgba(51,51,51,0.8);
|
||||
box-shadow: 1px 1px 2px rgba(51,51,51,0.8);
|
||||
color: #aaa;
|
||||
}
|
||||
.rtl #respond .comment-form-author label,
|
||||
.rtl #respond .comment-form-email label,
|
||||
.rtl #respond .comment-form-url label,
|
||||
.rtl #respond .comment-form-comment label {
|
||||
-webkit-box-shadow: -1px 2px 2px rgba(51,51,51,0.8);
|
||||
-moz-box-shadow: -1px 2px 2px rgba(51,51,51,0.8);
|
||||
box-shadow: -1px 1px 2px rgba(51,51,51,0.8);
|
||||
}
|
||||
#respond .comment-form-author .required,
|
||||
#respond .comment-form-email .required {
|
||||
color: #42caff;
|
||||
}
|
||||
#respond input#submit {
|
||||
background: #ddd;
|
||||
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
||||
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
||||
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
||||
color: #111;
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
|
||||
}
|
||||
#respond input#submit:active {
|
||||
color: #40220c;
|
||||
}
|
||||
#respond #cancel-comment-reply-link {
|
||||
color: #999;
|
||||
}
|
||||
#reply-title {
|
||||
color: #ccc;
|
||||
}
|
||||
#cancel-comment-reply-link {
|
||||
color: #777;
|
||||
}
|
||||
#cancel-comment-reply-link:focus,
|
||||
#cancel-comment-reply-link:active,
|
||||
#cancel-comment-reply-link:hover {
|
||||
color: #00b4cc;
|
||||
}
|
||||
|
||||
|
||||
/* =Footer
|
||||
----------------------------------------------- */
|
||||
|
||||
#supplementary {
|
||||
border-color: #222;
|
||||
}
|
||||
|
||||
/* Site Generator Line */
|
||||
#site-generator {
|
||||
background: #060606;
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
|
||||
/* =Print
|
||||
----------------------------------------------- */
|
||||
|
||||
@media print {
|
||||
body {
|
||||
color: #333;
|
||||
background: none !important;
|
||||
}
|
||||
#page {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
/* Comments */
|
||||
.commentlist > li.comment {
|
||||
}
|
||||
|
||||
/* Post author highlighting */
|
||||
.commentlist > li.bypostauthor {
|
||||
color: #333;
|
||||
}
|
||||
.commentlist > li.bypostauthor .comment-meta {
|
||||
color: #959595;
|
||||
}
|
||||
.commentlist > li:before {
|
||||
content: none !important;
|
||||
}
|
||||
|
||||
/* Post Author threaded comments */
|
||||
.commentlist .children > li.bypostauthor {
|
||||
background: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.commentlist .children > li.bypostauthor > article,
|
||||
.commentlist .children > li.bypostauthor > article .comment-meta {
|
||||
color: #959595;
|
||||
}
|
||||
}
|
||||
78
wp-content/themes/twentyeleven/comments.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Comments.
|
||||
*
|
||||
* The area of the page that contains both current comments
|
||||
* and the comment form. The actual display of comments is
|
||||
* handled by a callback to twentyeleven_comment() which is
|
||||
* located in the functions.php file.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
<div id="comments">
|
||||
<?php if ( post_password_required() ) : ?>
|
||||
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p>
|
||||
</div><!-- #comments -->
|
||||
<?php
|
||||
/* Stop the rest of comments.php from being processed,
|
||||
* but don't kill the script entirely -- we still have
|
||||
* to fully load the template.
|
||||
*/
|
||||
return;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php // You can start editing here -- including this comment! ?>
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h2 id="comments-title">
|
||||
<?php
|
||||
printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), '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="assistive-text"><?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
|
||||
/* Loop through and list the comments. Tell wp_list_comments()
|
||||
* to use twentyeleven_comment() to format the comments.
|
||||
* If you want to overload this in a child theme then you can
|
||||
* define twentyeleven_comment() and that will be used instead.
|
||||
* See twentyeleven_comment() in twentyeleven/functions.php for more.
|
||||
*/
|
||||
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="assistive-text"><?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
|
||||
/* If there are no comments and comments are closed, let's leave a little note, shall we?
|
||||
* But we only want the note on posts and pages that had comments in the first place.
|
||||
*/
|
||||
if ( ! comments_open() && get_comments_number() ) : ?>
|
||||
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; // have_comments() ?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
|
||||
</div><!-- #comments -->
|
||||
46
wp-content/themes/twentyeleven/content-aside.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Aside Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<hgroup>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
<h3 class="entry-format"><?php _e( 'Aside', 'twentyeleven' ); ?></h3>
|
||||
</hgroup>
|
||||
|
||||
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
||||
<div class="comments-link">
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<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(); ?> -->
|
||||
47
wp-content/themes/twentyeleven/content-featured.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying content featured in the showcase.php page template
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
global $feature_class;
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( $feature_class ); ?>>
|
||||
<header class="entry-header">
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
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,
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
get_the_category_list( __( ', ', 'twentyeleven' ) ),
|
||||
$tag_list,
|
||||
esc_url( 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(); ?> -->
|
||||
92
wp-content/themes/twentyeleven/content-gallery.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Gallery Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<hgroup>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
<h3 class="entry-format"><?php _e( 'Gallery', 'twentyeleven' ); ?></h3>
|
||||
</hgroup>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php if ( post_password_required() ) : ?>
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', '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="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( '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"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php $show_sep = false; ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ):
|
||||
if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
70
wp-content/themes/twentyeleven/content-image.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Image Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'indexed' ); ?>>
|
||||
<header class="entry-header">
|
||||
<hgroup>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
<h3 class="entry-format"><?php _e( 'Image', 'twentyeleven' ); ?></h3>
|
||||
</hgroup>
|
||||
|
||||
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
||||
<div class="comments-link">
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( "Reply", 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<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:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-meta">
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'twentyeleven' ),
|
||||
esc_url( get_permalink() ),
|
||||
get_the_date( 'c' ),
|
||||
get_the_date(),
|
||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
|
||||
get_the_author()
|
||||
);
|
||||
?>
|
||||
</div><!-- .entry-meta -->
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ): ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
21
wp-content/themes/twentyeleven/content-intro.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying page content in the showcase.php page template
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'intro' ); ?>>
|
||||
<header class="entry-header">
|
||||
<h2 class="entry-title"><?php the_title(); ?></h2>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
46
wp-content/themes/twentyeleven/content-link.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Link Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<hgroup>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
<h3 class="entry-format"><?php _e( 'Link', 'twentyeleven' ); ?></h3>
|
||||
</hgroup>
|
||||
|
||||
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
||||
<div class="comments-link">
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<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(); ?> -->
|
||||
23
wp-content/themes/twentyeleven/content-page.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* The template used for displaying page content in page.php
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<footer class="entry-meta">
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
74
wp-content/themes/twentyeleven/content-quote.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* The default template for displaying content
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<hgroup>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
<h3 class="entry-format"><?php _e( 'Quote', 'twentyeleven' ); ?></h3>
|
||||
</hgroup>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
||||
<div class="comments-link">
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php $show_sep = false; ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ):
|
||||
if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
71
wp-content/themes/twentyeleven/content-single.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying content in the single.php template
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
|
||||
<?php if ( 'post' == get_post_type() ) : ?>
|
||||
<div class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
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' );
|
||||
} elseif ( '' != $categories_list ) {
|
||||
$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' );
|
||||
} else {
|
||||
$utility_text = __( 'This entry was posted 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,
|
||||
$categories_list,
|
||||
$tag_list,
|
||||
esc_url( get_permalink() ),
|
||||
the_title_attribute( 'echo=0' ),
|
||||
get_the_author(),
|
||||
esc_url( 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' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, 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( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
|
||||
<?php the_author_meta( 'description' ); ?>
|
||||
<div id="author-link">
|
||||
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
|
||||
<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentyeleven' ), get_the_author() ); ?>
|
||||
</a>
|
||||
</div><!-- #author-link -->
|
||||
</div><!-- #author-description -->
|
||||
</div><!-- #author-info -->
|
||||
<?php endif; ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
47
wp-content/themes/twentyeleven/content-status.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying posts in the Status Post Format on index and archive pages
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Post_Formats
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<hgroup>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
<h3 class="entry-format"><?php _e( 'Status', 'twentyeleven' ); ?></h3>
|
||||
</hgroup>
|
||||
|
||||
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
||||
<div class="comments-link">
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<div class="avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', '65' ) ); ?></div>
|
||||
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<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(); ?> -->
|
||||
84
wp-content/themes/twentyeleven/content.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* The default template for displaying content
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<?php if ( is_sticky() ) : ?>
|
||||
<hgroup>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
|
||||
</hgroup>
|
||||
<?php else : ?>
|
||||
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( 'post' == get_post_type() ) : ?>
|
||||
<div class="entry-meta">
|
||||
<?php twentyeleven_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
||||
<div class="comments-link">
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-meta">
|
||||
<?php $show_sep = false; ?>
|
||||
<?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
|
||||
if ( $categories_list ):
|
||||
?>
|
||||
<span class="cat-links">
|
||||
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if categories ?>
|
||||
<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
|
||||
<?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
|
||||
<?php
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
|
||||
if ( $tags_list ):
|
||||
if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="tag-links">
|
||||
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
|
||||
$show_sep = true; ?>
|
||||
</span>
|
||||
<?php endif; // End if $tags_list ?>
|
||||
<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php if ( $show_sep ) : ?>
|
||||
<span class="sep"> | </span>
|
||||
<?php endif; // End if $show_sep ?>
|
||||
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
|
||||
<?php endif; // End if comments_open() ?>
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</footer><!-- .entry-meta -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
24
wp-content/themes/twentyeleven/editor-style-rtl.css
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Theme Name: Twenty Eleven
|
||||
*/
|
||||
/*
|
||||
Used to style the TinyMCE editor.
|
||||
*/
|
||||
html .mceContentBody {
|
||||
direction: rtl;
|
||||
unicode-bidi: embed;
|
||||
float: right;
|
||||
width: 584px;
|
||||
}
|
||||
* {
|
||||
font-family: Arial, Tahoma, sans-serif;
|
||||
}
|
||||
ul, ol {
|
||||
margin: 0 2.5em 1.625em 0;
|
||||
}
|
||||
blockquote {
|
||||
font-style: normal;
|
||||
}
|
||||
table {
|
||||
text-align: right;
|
||||
}
|
||||
312
wp-content/themes/twentyeleven/editor-style.css
Normal file
@ -0,0 +1,312 @@
|
||||
/*
|
||||
Theme Name: Twenty Eleven
|
||||
Description: Used to style the TinyMCE editor.
|
||||
*/
|
||||
|
||||
html .mceContentBody {
|
||||
max-width: 584px;
|
||||
}
|
||||
* {
|
||||
color: inherit;
|
||||
font: 15px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-style: inherit;
|
||||
font-weight: inherit;
|
||||
line-height: 1.625;
|
||||
}
|
||||
body {
|
||||
color: #333;
|
||||
font: 15px "Helvetica Neue", Helvetica, Arial, "Nimbus Sans L", sans-serif;
|
||||
font-weight: 300;
|
||||
line-height: 1.625;
|
||||
}
|
||||
|
||||
/* Headings */
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
clear: both;
|
||||
}
|
||||
h1,
|
||||
h2 {
|
||||
color: #000;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
margin: 0 0 .8125em;
|
||||
}
|
||||
h3 {
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.1em;
|
||||
line-height: 2.6em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
h4, h5, h6 {
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
hr {
|
||||
background-color: #ccc;
|
||||
border: 0;
|
||||
height: 1px;
|
||||
margin-bottom: 1.625em;
|
||||
}
|
||||
|
||||
/* Text elements */
|
||||
p, ul, ol, dl {
|
||||
font-weight: 300;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 1.625em;
|
||||
}
|
||||
ul, ol {
|
||||
margin: 0 0 1.625em 2.5em;
|
||||
padding: 0;
|
||||
}
|
||||
ul {
|
||||
list-style: square;
|
||||
}
|
||||
ol {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
ol ol {
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
ol ol ol {
|
||||
list-style: lower-roman;
|
||||
}
|
||||
ol ol ol ol {
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
ul ul, ol ol, ul ol, ol ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
dl {
|
||||
margin: 0 1.625em;
|
||||
}
|
||||
dt {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin: 0 0 1.625em;
|
||||
}
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
cite, em, i {
|
||||
font-style: italic;
|
||||
}
|
||||
cite {
|
||||
border: none;
|
||||
}
|
||||
big {
|
||||
font-size: 131.25%;
|
||||
}
|
||||
.mceContentBody blockquote,
|
||||
.mceContentBody blockquote p {
|
||||
font-family: Georgia, "Bitstream Charter", serif !important;
|
||||
font-style: italic !important;
|
||||
font-weight: normal;
|
||||
margin: 0 3em;
|
||||
}
|
||||
.mceContentBody blockquote em,
|
||||
.mceContentBody blockquote i,
|
||||
.mceContentBody blockquote cite {
|
||||
font-style: normal;
|
||||
}
|
||||
.mceContentBody blockquote cite {
|
||||
color: #666;
|
||||
font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-weight: 300;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
pre {
|
||||
background: #f4f4f4;
|
||||
font: 13px "Courier 10 Pitch", Courier, monospace;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 1.625em;
|
||||
padding: 0.75em 1.625em;
|
||||
}
|
||||
code, kbd, samp, var {
|
||||
font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
|
||||
}
|
||||
abbr, acronym, dfn {
|
||||
border-bottom: 1px dotted #666;
|
||||
cursor: help;
|
||||
}
|
||||
address {
|
||||
display: block;
|
||||
margin: 0 0 1.625em;
|
||||
}
|
||||
del {
|
||||
color: #333;
|
||||
}
|
||||
ins {
|
||||
background: #fff9c0;
|
||||
border: none;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
sup,
|
||||
sub {
|
||||
font-size: 10px;
|
||||
height: 0;
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sup {
|
||||
bottom: 1ex;
|
||||
}
|
||||
sub {
|
||||
top: .5ex;
|
||||
}
|
||||
input[type=text],
|
||||
textarea {
|
||||
background: #fafafa;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
|
||||
border: 1px solid #ddd;
|
||||
color: #888;
|
||||
}
|
||||
input[type=text]:focus,
|
||||
textarea:focus {
|
||||
color: #333;
|
||||
}
|
||||
textarea {
|
||||
padding-left: 3px;
|
||||
width: 98%;
|
||||
}
|
||||
input[type=text] {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a,
|
||||
a em,
|
||||
a strong {
|
||||
color: #1b8be0;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:focus,
|
||||
a:active,
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Alignment */
|
||||
.alignleft {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-right: 1.625em;
|
||||
}
|
||||
.alignright {
|
||||
display: inline;
|
||||
float: right;
|
||||
margin-left: 1.625em;
|
||||
}
|
||||
.aligncenter {
|
||||
clear: both;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
table {
|
||||
border: none !important;
|
||||
border-bottom: 1px solid #ddd !important;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
text-align: left;
|
||||
margin: 0 0 1.625em;
|
||||
width: 100%;
|
||||
}
|
||||
tr th {
|
||||
border: none !important;
|
||||
color: #666;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.1em;
|
||||
line-height: 2.6em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
td {
|
||||
border: none !important;
|
||||
border-top: 1px solid #ddd !important;
|
||||
padding: 6px 10px 6px 0;
|
||||
}
|
||||
|
||||
/* Images */
|
||||
img[class*="wp-image-"] {
|
||||
height: auto;
|
||||
max-width: 97.5%;
|
||||
}
|
||||
img.size-full {
|
||||
width: auto; /* Prevent stretching of full-size images in IE8 */
|
||||
}
|
||||
img.wp-smiley {
|
||||
border: none;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
padding: 0;
|
||||
}
|
||||
p img,
|
||||
.wp-caption {
|
||||
margin-top: 0.4em;
|
||||
}
|
||||
img,
|
||||
.editor-attachment {
|
||||
border: 1px solid #ddd;
|
||||
padding: 6px;
|
||||
}
|
||||
img.alignleft,
|
||||
img.alignright,
|
||||
img.aligncenter {
|
||||
margin-bottom: 1.625em;
|
||||
}
|
||||
.wp-caption {
|
||||
background: #eee;
|
||||
border: none;
|
||||
margin-bottom: 1.625em;
|
||||
max-width: 96%;
|
||||
padding: 9px;
|
||||
}
|
||||
.wp-caption img {
|
||||
display: block;
|
||||
margin: 5px auto 0 !important;
|
||||
max-width: 98%;
|
||||
border-color: #eee;
|
||||
}
|
||||
.wp-caption .wp-caption-text,
|
||||
.wp-caption-dd {
|
||||
color: #666;
|
||||
font-family: Georgia, serif !important;
|
||||
font-size: 12px;
|
||||
margin: 0 0 0.6em 0 !important;
|
||||
padding: 0 0 5px 40px;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
}
|
||||
.wp-caption .wp-caption-text:before {
|
||||
color: #666;
|
||||
content: '\2014';
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 7px;
|
||||
}
|
||||
a:focus img[class*="wp-image-"],
|
||||
a:hover img[class*="wp-image-"],
|
||||
a:active img[class*="wp-image-"] {
|
||||
background: #eee;
|
||||
border-color: #bbb;
|
||||
}
|
||||
.wp-caption a:focus img,
|
||||
.wp-caption a:active img,
|
||||
.wp-caption a:hover img {
|
||||
background: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
35
wp-content/themes/twentyeleven/footer.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the footer.
|
||||
*
|
||||
* Contains the closing of the id=main div and all content after
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
</div><!-- #main -->
|
||||
|
||||
<footer id="colophon" role="contentinfo">
|
||||
|
||||
<?php
|
||||
/* A sidebar in the footer? Yep. You can can customize
|
||||
* your footer with three columns of widgets.
|
||||
*/
|
||||
if ( ! is_404() )
|
||||
get_sidebar( 'footer' );
|
||||
?>
|
||||
|
||||
<div id="site-generator">
|
||||
<?php do_action( 'twentyeleven_credits' ); ?>
|
||||
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyeleven' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a>
|
||||
</div>
|
||||
</footer><!-- #colophon -->
|
||||
</div><!-- #page -->
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
614
wp-content/themes/twentyeleven/functions.php
Normal file
@ -0,0 +1,614 @@
|
||||
<?php
|
||||
/**
|
||||
* Twenty Eleven functions and definitions
|
||||
*
|
||||
* Sets up the theme and provides some helper functions. Some helper functions
|
||||
* are used in the theme as custom template tags. Others are attached to action and
|
||||
* filter hooks in WordPress to change core functionality.
|
||||
*
|
||||
* The first function, twentyeleven_setup(), sets up the theme by registering support
|
||||
* for various features in WordPress, such as post thumbnails, navigation menus, and the like.
|
||||
*
|
||||
* When using a child theme (see http://codex.wordpress.org/Theme_Development and
|
||||
* http://codex.wordpress.org/Child_Themes), you can override certain functions
|
||||
* (those wrapped in a function_exists() call) by defining them first in your child theme's
|
||||
* functions.php file. The child theme's functions.php file is included before the parent
|
||||
* theme's file, so the child theme functions would be used.
|
||||
*
|
||||
* Functions that are not pluggable (not wrapped in function_exists()) are instead attached
|
||||
* to a filter or action hook. The hook can be removed by using remove_action() or
|
||||
* remove_filter() and you can attach your own function to the hook.
|
||||
*
|
||||
* We can remove the parent theme's hook only after it is attached, which means we need to
|
||||
* wait until setting up the child theme:
|
||||
*
|
||||
* <code>
|
||||
* add_action( 'after_setup_theme', 'my_child_theme_setup' );
|
||||
* function my_child_theme_setup() {
|
||||
* // We are providing our own filter for excerpt_length (or using the unfiltered value)
|
||||
* remove_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
|
||||
* ...
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set the content width based on the theme's design and stylesheet.
|
||||
*/
|
||||
if ( ! isset( $content_width ) )
|
||||
$content_width = 584;
|
||||
|
||||
/**
|
||||
* Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run.
|
||||
*/
|
||||
add_action( 'after_setup_theme', 'twentyeleven_setup' );
|
||||
|
||||
if ( ! function_exists( 'twentyeleven_setup' ) ):
|
||||
/**
|
||||
* Sets up theme defaults and registers support for various WordPress features.
|
||||
*
|
||||
* Note that this function is hooked into the after_setup_theme hook, which runs
|
||||
* before the init hook. The init hook is too late for some features, such as indicating
|
||||
* support post thumbnails.
|
||||
*
|
||||
* To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
|
||||
* functions.php file.
|
||||
*
|
||||
* @uses load_theme_textdomain() For translation/localization support.
|
||||
* @uses add_editor_style() To style the visual editor.
|
||||
* @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers
|
||||
* and backgrounds, and post formats.
|
||||
* @uses register_nav_menus() To add support for navigation menus.
|
||||
* @uses register_default_headers() To register the default custom header images provided with the theme.
|
||||
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_setup() {
|
||||
|
||||
/* Make Twenty Eleven available for translation.
|
||||
* Translations can be added to 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', get_template_directory() . '/languages' );
|
||||
|
||||
// This theme styles the visual editor with editor-style.css to match the theme style.
|
||||
add_editor_style();
|
||||
|
||||
// Load up our theme options page and related code.
|
||||
require( get_template_directory() . '/inc/theme-options.php' );
|
||||
|
||||
// Grab Twenty Eleven's Ephemera widget.
|
||||
require( get_template_directory() . '/inc/widgets.php' );
|
||||
|
||||
// Add default posts and comments RSS feed links to <head>.
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
// This theme uses wp_nav_menu() in one location.
|
||||
register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) );
|
||||
|
||||
// Add support for a variety of post formats
|
||||
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) );
|
||||
|
||||
$theme_options = twentyeleven_get_theme_options();
|
||||
if ( 'dark' == $theme_options['color_scheme'] )
|
||||
$default_background_color = '1d1d1d';
|
||||
else
|
||||
$default_background_color = 'e2e2e2';
|
||||
|
||||
// Add support for custom backgrounds.
|
||||
add_theme_support( 'custom-background', array(
|
||||
// Let WordPress know what our default background color is.
|
||||
// This is dependent on our current color scheme.
|
||||
'default-color' => $default_background_color,
|
||||
) );
|
||||
|
||||
// This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
|
||||
// Add support for custom headers.
|
||||
$custom_header_support = array(
|
||||
// The default header text color.
|
||||
'default-text-color' => '000',
|
||||
// The height and width of our custom header.
|
||||
'width' => apply_filters( 'twentyeleven_header_image_width', 1000 ),
|
||||
'height' => apply_filters( 'twentyeleven_header_image_height', 288 ),
|
||||
// Support flexible heights.
|
||||
'flex-height' => true,
|
||||
// Random image rotation by default.
|
||||
'random-default' => true,
|
||||
// Callback for styling the header.
|
||||
'wp-head-callback' => 'twentyeleven_header_style',
|
||||
// Callback for styling the header preview in the admin.
|
||||
'admin-head-callback' => 'twentyeleven_admin_header_style',
|
||||
// Callback used to display the header preview in the admin.
|
||||
'admin-preview-callback' => 'twentyeleven_admin_header_image',
|
||||
);
|
||||
|
||||
add_theme_support( 'custom-header', $custom_header_support );
|
||||
|
||||
if ( ! function_exists( 'get_custom_header' ) ) {
|
||||
// This is all for compatibility with versions of WordPress prior to 3.4.
|
||||
define( 'HEADER_TEXTCOLOR', $custom_header_support['default-text-color'] );
|
||||
define( 'HEADER_IMAGE', '' );
|
||||
define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] );
|
||||
define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] );
|
||||
add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] );
|
||||
add_custom_background();
|
||||
}
|
||||
|
||||
// We'll be using post thumbnails for custom header images on posts and pages.
|
||||
// We want them to be the size of the header image that we just defined
|
||||
// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
|
||||
set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true );
|
||||
|
||||
// Add Twenty Eleven's custom image sizes.
|
||||
// Used for large feature (header) images.
|
||||
add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true );
|
||||
// Used for featured posts if a large-feature doesn't exist.
|
||||
add_image_size( 'small-feature', 500, 300 );
|
||||
|
||||
// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
|
||||
register_default_headers( array(
|
||||
'wheel' => array(
|
||||
'url' => '%s/images/headers/wheel.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Wheel', 'twentyeleven' )
|
||||
),
|
||||
'shore' => array(
|
||||
'url' => '%s/images/headers/shore.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Shore', 'twentyeleven' )
|
||||
),
|
||||
'trolley' => array(
|
||||
'url' => '%s/images/headers/trolley.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Trolley', 'twentyeleven' )
|
||||
),
|
||||
'pine-cone' => array(
|
||||
'url' => '%s/images/headers/pine-cone.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Pine Cone', 'twentyeleven' )
|
||||
),
|
||||
'chessboard' => array(
|
||||
'url' => '%s/images/headers/chessboard.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Chessboard', 'twentyeleven' )
|
||||
),
|
||||
'lanterns' => array(
|
||||
'url' => '%s/images/headers/lanterns.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Lanterns', 'twentyeleven' )
|
||||
),
|
||||
'willow' => array(
|
||||
'url' => '%s/images/headers/willow.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Willow', 'twentyeleven' )
|
||||
),
|
||||
'hanoi' => array(
|
||||
'url' => '%s/images/headers/hanoi.jpg',
|
||||
'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg',
|
||||
/* translators: header image description */
|
||||
'description' => __( 'Hanoi Plant', 'twentyeleven' )
|
||||
)
|
||||
) );
|
||||
}
|
||||
endif; // twentyeleven_setup
|
||||
|
||||
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() {
|
||||
$text_color = get_header_textcolor();
|
||||
|
||||
// If no custom options for text are set, let's bail.
|
||||
if ( $text_color == 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' == $text_color ) :
|
||||
?>
|
||||
#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 $text_color; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
endif; // twentyeleven_header_style
|
||||
|
||||
if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) :
|
||||
/**
|
||||
* Styles the header image displayed on the Appearance > Header admin panel.
|
||||
*
|
||||
* Referenced via add_theme_support('custom-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; // twentyeleven_admin_header_style
|
||||
|
||||
if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) :
|
||||
/**
|
||||
* Custom header image markup displayed on the Appearance > Header admin panel.
|
||||
*
|
||||
* Referenced via add_theme_support('custom-header') in twentyeleven_setup().
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_admin_header_image() { ?>
|
||||
<div id="headimg">
|
||||
<?php
|
||||
$color = get_header_textcolor();
|
||||
$image = get_header_image();
|
||||
if ( $color && $color != 'blank' )
|
||||
$style = ' style="color:#' . $color . '"';
|
||||
else
|
||||
$style = ' style="display:none"';
|
||||
?>
|
||||
<h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
<div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
|
||||
<?php if ( $image ) : ?>
|
||||
<img src="<?php echo esc_url( $image ); ?>" alt="" />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php }
|
||||
endif; // twentyeleven_admin_header_image
|
||||
|
||||
/**
|
||||
* Sets the post excerpt length to 40 words.
|
||||
*
|
||||
* 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' );
|
||||
|
||||
if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) :
|
||||
/**
|
||||
* Returns a "Continue Reading" link for excerpts
|
||||
*/
|
||||
function twentyeleven_continue_reading_link() {
|
||||
return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>';
|
||||
}
|
||||
endif; // twentyeleven_continue_reading_link
|
||||
|
||||
/**
|
||||
* 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' );
|
||||
|
||||
/**
|
||||
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
|
||||
*/
|
||||
function twentyeleven_page_menu_args( $args ) {
|
||||
if ( ! isset( $args['show_home'] ) )
|
||||
$args['show_home'] = true;
|
||||
return $args;
|
||||
}
|
||||
add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' );
|
||||
|
||||
/**
|
||||
* Register our sidebars and widgetized areas. Also register the default Epherma widget.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_widgets_init() {
|
||||
|
||||
register_widget( 'Twenty_Eleven_Ephemera_Widget' );
|
||||
|
||||
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' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
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' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
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' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
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' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
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' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
}
|
||||
add_action( 'widgets_init', 'twentyeleven_widgets_init' );
|
||||
|
||||
if ( ! function_exists( 'twentyeleven_content_nav' ) ) :
|
||||
/**
|
||||
* Display navigation to next/previous pages when applicable
|
||||
*/
|
||||
function twentyeleven_content_nav( $html_id ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( $wp_query->max_num_pages > 1 ) : ?>
|
||||
<nav id="<?php echo esc_attr( $html_id ); ?>">
|
||||
<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
|
||||
<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;
|
||||
}
|
||||
endif; // twentyeleven_content_nav
|
||||
|
||||
/**
|
||||
* Return the URL for the first link found in the post content.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
* @return string|bool URL or false when no link is present.
|
||||
*/
|
||||
function twentyeleven_url_grabber() {
|
||||
if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) )
|
||||
return false;
|
||||
|
||||
return esc_url_raw( $matches[1] );
|
||||
}
|
||||
|
||||
/**
|
||||
* 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++;
|
||||
|
||||
$class = '';
|
||||
|
||||
switch ( $count ) {
|
||||
case '1':
|
||||
$class = 'one';
|
||||
break;
|
||||
case '2':
|
||||
$class = 'two';
|
||||
break;
|
||||
case '3':
|
||||
$class = 'three';
|
||||
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 'pingback' :
|
||||
case 'trackback' :
|
||||
?>
|
||||
<li class="post pingback">
|
||||
<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>
|
||||
<?php
|
||||
break;
|
||||
default :
|
||||
?>
|
||||
<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 );
|
||||
|
||||
/* translators: 1: comment author, 2: date and time */
|
||||
printf( __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ),
|
||||
sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
|
||||
sprintf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
|
||||
esc_url( get_comment_link( $comment->comment_ID ) ),
|
||||
get_comment_time( 'c' ),
|
||||
/* translators: 1: date, 2: time */
|
||||
sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() )
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</div><!-- .comment-author .vcard -->
|
||||
|
||||
<?php if ( $comment->comment_approved == '0' ) : ?>
|
||||
<em class="comment-awaiting-moderation"><?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 <span>↓</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
</div><!-- .reply -->
|
||||
</article><!-- #comment-## -->
|
||||
|
||||
<?php
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
endif; // ends check for twentyeleven_comment()
|
||||
|
||||
if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
|
||||
/**
|
||||
* Prints HTML with meta information for the current post-date/time and author.
|
||||
* Create your own twentyeleven_posted_on to override in a child theme
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_posted_on() {
|
||||
printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
|
||||
esc_url( get_permalink() ),
|
||||
esc_attr( get_the_time() ),
|
||||
esc_attr( get_the_date( 'c' ) ),
|
||||
esc_html( get_the_date() ),
|
||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
|
||||
get_the_author()
|
||||
);
|
||||
}
|
||||
endif;
|
||||
|
||||
/**
|
||||
* Adds two classes to the array of body classes.
|
||||
* The first is if the site has only had one author with published posts.
|
||||
* The second is if a singular post being displayed
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_body_classes( $classes ) {
|
||||
|
||||
if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )
|
||||
$classes[] = 'single-author';
|
||||
|
||||
if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
|
||||
$classes[] = 'singular';
|
||||
|
||||
return $classes;
|
||||
}
|
||||
add_filter( 'body_class', 'twentyeleven_body_classes' );
|
||||
|
||||
139
wp-content/themes/twentyeleven/header.php
Normal file
@ -0,0 +1,139 @@
|
||||
<?php
|
||||
/**
|
||||
* The Header for our theme.
|
||||
*
|
||||
* Displays all of the <head> section and everything up till <div id="main">
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?><!DOCTYPE html>
|
||||
<!--[if IE 6]>
|
||||
<html id="ie6" <?php language_attributes(); ?>>
|
||||
<![endif]-->
|
||||
<!--[if IE 7]>
|
||||
<html id="ie7" <?php language_attributes(); ?>>
|
||||
<![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<html id="ie8" <?php language_attributes(); ?>>
|
||||
<![endif]-->
|
||||
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
|
||||
<html <?php language_attributes(); ?>>
|
||||
<!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title><?php
|
||||
/*
|
||||
* Print the <title> tag based on what is being viewed.
|
||||
*/
|
||||
global $page, $paged;
|
||||
|
||||
wp_title( '|', true, 'right' );
|
||||
|
||||
// Add the blog name.
|
||||
bloginfo( 'name' );
|
||||
|
||||
// Add the blog description for the home/front page.
|
||||
$site_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $site_description && ( is_home() || is_front_page() ) )
|
||||
echo " | $site_description";
|
||||
|
||||
// Add a page number if necessary:
|
||||
if ( $paged >= 2 || $page >= 2 )
|
||||
echo ' | ' . sprintf( __( 'Page %s', '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' ); ?>" />
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<?php
|
||||
/* We add some JavaScript to pages with the comment form
|
||||
* to support sites with threaded comments (when in use).
|
||||
*/
|
||||
if ( is_singular() && get_option( 'thread_comments' ) )
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
|
||||
/* Always have wp_head() just before the closing </head>
|
||||
* tag of your theme, or you will break many plugins, which
|
||||
* generally use this hook to add elements to <head> such
|
||||
* as styles, scripts, and meta tags.
|
||||
*/
|
||||
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 esc_url( 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
|
||||
$header_image = get_header_image();
|
||||
if ( $header_image ) :
|
||||
// Compatibility with versions of WordPress prior to 3.4.
|
||||
if ( function_exists( 'get_custom_header' ) ) {
|
||||
// We need to figure out what the minimum width should be for our featured image.
|
||||
// This result would be the suggested width if the theme were to implement flexible widths.
|
||||
$header_image_width = get_theme_support( 'custom-header', 'width' );
|
||||
} else {
|
||||
$header_image_width = HEADER_IMAGE_WIDTH;
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo esc_url( 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 ), array( $header_image_width, $header_image_width ) ) ) &&
|
||||
$image[1] >= $header_image_width ) :
|
||||
// Houston, we have a new header image!
|
||||
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
|
||||
else :
|
||||
// Compatibility with versions of WordPress prior to 3.4.
|
||||
if ( function_exists( 'get_custom_header' ) ) {
|
||||
$header_image_width = get_custom_header()->width;
|
||||
$header_image_height = get_custom_header()->height;
|
||||
} else {
|
||||
$header_image_width = HEADER_IMAGE_WIDTH;
|
||||
$header_image_height = HEADER_IMAGE_HEIGHT;
|
||||
}
|
||||
?>
|
||||
<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 ( $header_image ) : ?> with-image<?php endif; ?>">
|
||||
<?php get_search_form(); ?>
|
||||
</div>
|
||||
<?php
|
||||
else :
|
||||
?>
|
||||
<?php get_search_form(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<nav id="access" role="navigation">
|
||||
<h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
|
||||
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
|
||||
<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
|
||||
<div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
|
||||
<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?>
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
|
||||
</nav><!-- #access -->
|
||||
</header><!-- #branding -->
|
||||
|
||||
|
||||
<div id="main">
|
||||
104
wp-content/themes/twentyeleven/image.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying image attachments.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary" class="image-attachment">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<nav id="nav-single">
|
||||
<h3 class="assistive-text"><?php _e( 'Image navigation', 'twentyeleven' ); ?></h3>
|
||||
<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">%8$s</a>', 'twentyeleven' ),
|
||||
esc_attr( get_the_time() ),
|
||||
get_the_date(),
|
||||
esc_url( wp_get_attachment_url() ),
|
||||
$metadata['width'],
|
||||
$metadata['height'],
|
||||
esc_url( get_permalink( $post->post_parent ) ),
|
||||
esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
|
||||
get_the_title( $post->post_parent )
|
||||
);
|
||||
?>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<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 esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
|
||||
$attachment_size = apply_filters( 'twentyeleven_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"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-description -->
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php comments_template(); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
|
After Width: | Height: | Size: 255 B |
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 257 B |
|
After Width: | Height: | Size: 239 B |
BIN
wp-content/themes/twentyeleven/images/comment-arrow-dark-rtl.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
wp-content/themes/twentyeleven/images/comment-arrow-dark.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
wp-content/themes/twentyeleven/images/comment-arrow-rtl.png
Normal file
|
After Width: | Height: | Size: 271 B |
BIN
wp-content/themes/twentyeleven/images/comment-arrow.png
Normal file
|
After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 856 B |
BIN
wp-content/themes/twentyeleven/images/comment-bubble-dark.png
Normal file
|
After Width: | Height: | Size: 872 B |
BIN
wp-content/themes/twentyeleven/images/comment-bubble-rtl.png
Normal file
|
After Width: | Height: | Size: 783 B |
BIN
wp-content/themes/twentyeleven/images/comment-bubble.png
Normal file
|
After Width: | Height: | Size: 791 B |
|
After Width: | Height: | Size: 6.3 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/chessboard.jpg
Normal file
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/hanoi.jpg
Normal file
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/lanterns.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/pine-cone.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/shore.jpg
Normal file
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/trolley.jpg
Normal file
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/wheel.jpg
Normal file
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
BIN
wp-content/themes/twentyeleven/images/headers/willow.jpg
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
wp-content/themes/twentyeleven/images/search.png
Normal file
|
After Width: | Height: | Size: 440 B |
BIN
wp-content/themes/twentyeleven/images/wordpress.png
Normal file
|
After Width: | Height: | Size: 794 B |
BIN
wp-content/themes/twentyeleven/inc/images/content-sidebar.png
Normal file
|
After Width: | Height: | Size: 210 B |
BIN
wp-content/themes/twentyeleven/inc/images/content.png
Normal file
|
After Width: | Height: | Size: 185 B |
BIN
wp-content/themes/twentyeleven/inc/images/dark.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
wp-content/themes/twentyeleven/inc/images/light.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
wp-content/themes/twentyeleven/inc/images/sidebar-content.png
Normal file
|
After Width: | Height: | Size: 209 B |
12
wp-content/themes/twentyeleven/inc/theme-customizer.js
Normal file
@ -0,0 +1,12 @@
|
||||
( function( $ ){
|
||||
wp.customize( 'blogname', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '#site-title a' ).html( to );
|
||||
} );
|
||||
} );
|
||||
wp.customize( 'blogdescription', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '#site-description' ).html( to );
|
||||
} );
|
||||
} );
|
||||
} )( jQuery );
|
||||
35
wp-content/themes/twentyeleven/inc/theme-options.css
Normal file
@ -0,0 +1,35 @@
|
||||
#wpcontent select option {
|
||||
padding-right: 5px;
|
||||
}
|
||||
.image-radio-option td {
|
||||
padding-top: 15px;
|
||||
}
|
||||
.image-radio-option label {
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0 30px 20px 2px;
|
||||
position: relative;
|
||||
}
|
||||
.image-radio-option input {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.image-radio-option span {
|
||||
display: block;
|
||||
width: 136px;
|
||||
}
|
||||
.image-radio-option img {
|
||||
margin: 0 0 0 -2px;
|
||||
}
|
||||
#link-color-example {
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dfdfdf;
|
||||
margin: 0 7px 0 3px;
|
||||
padding: 4px 14px;
|
||||
}
|
||||
|
||||
body.rtl .image-radio-option label {
|
||||
float: right;
|
||||
margin: 0 2px 20px 30px;
|
||||
}
|
||||
52
wp-content/themes/twentyeleven/inc/theme-options.js
Normal file
@ -0,0 +1,52 @@
|
||||
var farbtastic;
|
||||
|
||||
(function($){
|
||||
var pickColor = function(a) {
|
||||
farbtastic.setColor(a);
|
||||
$('#link-color').val(a);
|
||||
$('#link-color-example').css('background-color', a);
|
||||
};
|
||||
|
||||
$(document).ready( function() {
|
||||
$('#default-color').wrapInner('<a href="#" />');
|
||||
|
||||
farbtastic = $.farbtastic('#colorPickerDiv', pickColor);
|
||||
|
||||
pickColor( $('#link-color').val() );
|
||||
|
||||
$('.pickcolor').click( function(e) {
|
||||
$('#colorPickerDiv').show();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#link-color').keyup( function() {
|
||||
var a = $('#link-color').val(),
|
||||
b = a;
|
||||
|
||||
a = a.replace(/[^a-fA-F0-9]/, '');
|
||||
if ( '#' + a !== b )
|
||||
$('#link-color').val(a);
|
||||
if ( a.length === 3 || a.length === 6 )
|
||||
pickColor( '#' + a );
|
||||
});
|
||||
|
||||
$(document).mousedown( function() {
|
||||
$('#colorPickerDiv').hide();
|
||||
});
|
||||
|
||||
$('#default-color a').click( function(e) {
|
||||
pickColor( '#' + this.innerHTML.replace(/[^a-fA-F0-9]/, '') );
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('.image-radio-option.color-scheme input:radio').change( function() {
|
||||
var currentDefault = $('#default-color a'),
|
||||
newDefault = $(this).next().val();
|
||||
|
||||
if ( $('#link-color').val() == currentDefault.text() )
|
||||
pickColor( newDefault );
|
||||
|
||||
currentDefault.text( newDefault );
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
531
wp-content/themes/twentyeleven/inc/theme-options.php
Normal file
@ -0,0 +1,531 @@
|
||||
<?php
|
||||
/**
|
||||
* Twenty Eleven Theme Options
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Properly enqueue styles and scripts for our theme options page.
|
||||
*
|
||||
* This function is attached to the admin_enqueue_scripts action hook.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*
|
||||
*/
|
||||
function twentyeleven_admin_enqueue_scripts( $hook_suffix ) {
|
||||
wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' );
|
||||
wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' );
|
||||
wp_enqueue_style( 'farbtastic' );
|
||||
}
|
||||
add_action( 'admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts' );
|
||||
|
||||
/**
|
||||
* Register the form setting for our twentyeleven_options array.
|
||||
*
|
||||
* This function is attached to the admin_init action hook.
|
||||
*
|
||||
* This call to register_setting() registers a validation callback, twentyeleven_theme_options_validate(),
|
||||
* which is used when the option is saved, to ensure that our option values are complete, properly
|
||||
* formatted, and safe.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_theme_options_init() {
|
||||
|
||||
register_setting(
|
||||
'twentyeleven_options', // Options group, see settings_fields() call in twentyeleven_theme_options_render_page()
|
||||
'twentyeleven_theme_options', // Database option, see twentyeleven_get_theme_options()
|
||||
'twentyeleven_theme_options_validate' // The sanitization callback, see twentyeleven_theme_options_validate()
|
||||
);
|
||||
|
||||
// Register our settings field group
|
||||
add_settings_section(
|
||||
'general', // Unique identifier for the settings section
|
||||
'', // Section title (we don't want one)
|
||||
'__return_false', // Section callback (we don't want anything)
|
||||
'theme_options' // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page()
|
||||
);
|
||||
|
||||
// Register our individual settings fields
|
||||
add_settings_field(
|
||||
'color_scheme', // Unique identifier for the field for this section
|
||||
__( 'Color Scheme', 'twentyeleven' ), // Setting field label
|
||||
'twentyeleven_settings_field_color_scheme', // Function that renders the settings field
|
||||
'theme_options', // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page()
|
||||
'general' // Settings section. Same as the first argument in the add_settings_section() above
|
||||
);
|
||||
|
||||
add_settings_field( 'link_color', __( 'Link Color', 'twentyeleven' ), 'twentyeleven_settings_field_link_color', 'theme_options', 'general' );
|
||||
add_settings_field( 'layout', __( 'Default Layout', 'twentyeleven' ), 'twentyeleven_settings_field_layout', 'theme_options', 'general' );
|
||||
}
|
||||
add_action( 'admin_init', 'twentyeleven_theme_options_init' );
|
||||
|
||||
/**
|
||||
* Change the capability required to save the 'twentyeleven_options' options group.
|
||||
*
|
||||
* @see twentyeleven_theme_options_init() First parameter to register_setting() is the name of the options group.
|
||||
* @see twentyeleven_theme_options_add_page() The edit_theme_options capability is used for viewing the page.
|
||||
*
|
||||
* By default, the options groups for all registered settings require the manage_options capability.
|
||||
* This filter is required to change our theme options page to edit_theme_options instead.
|
||||
* By default, only administrators have either of these capabilities, but the desire here is
|
||||
* to allow for finer-grained control for roles and users.
|
||||
*
|
||||
* @param string $capability The capability used for the page, which is manage_options by default.
|
||||
* @return string The capability to actually use.
|
||||
*/
|
||||
function twentyeleven_option_page_capability( $capability ) {
|
||||
return 'edit_theme_options';
|
||||
}
|
||||
add_filter( 'option_page_capability_twentyeleven_options', 'twentyeleven_option_page_capability' );
|
||||
|
||||
/**
|
||||
* Add our theme options page to the admin menu, including some help documentation.
|
||||
*
|
||||
* This function is attached to the admin_menu action hook.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_theme_options_add_page() {
|
||||
$theme_page = add_theme_page(
|
||||
__( 'Theme Options', 'twentyeleven' ), // Name of page
|
||||
__( 'Theme Options', 'twentyeleven' ), // Label in menu
|
||||
'edit_theme_options', // Capability required
|
||||
'theme_options', // Menu slug, used to uniquely identify the page
|
||||
'twentyeleven_theme_options_render_page' // Function that renders the options page
|
||||
);
|
||||
|
||||
if ( ! $theme_page )
|
||||
return;
|
||||
|
||||
add_action( "load-$theme_page", 'twentyeleven_theme_options_help' );
|
||||
}
|
||||
add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
|
||||
|
||||
function twentyeleven_theme_options_help() {
|
||||
|
||||
$help = '<p>' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '</p>' .
|
||||
'<ol>' .
|
||||
'<li>' . __( '<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven' ) . '</li>' .
|
||||
'<li>' . __( '<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven' ) . '</li>' .
|
||||
'<li>' . __( '<strong>Default Layout</strong>: You can choose if you want your site’s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '</li>' .
|
||||
'</ol>' .
|
||||
'<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>';
|
||||
|
||||
$sidebar = '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' .
|
||||
'<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' .
|
||||
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>';
|
||||
|
||||
$screen = get_current_screen();
|
||||
|
||||
if ( method_exists( $screen, 'add_help_tab' ) ) {
|
||||
// WordPress 3.3
|
||||
$screen->add_help_tab( array(
|
||||
'title' => __( 'Overview', 'twentyeleven' ),
|
||||
'id' => 'theme-options-help',
|
||||
'content' => $help,
|
||||
)
|
||||
);
|
||||
|
||||
$screen->set_help_sidebar( $sidebar );
|
||||
} else {
|
||||
// WordPress 3.2
|
||||
add_contextual_help( $screen, $help . $sidebar );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of color schemes registered for Twenty Eleven.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_color_schemes() {
|
||||
$color_scheme_options = array(
|
||||
'light' => array(
|
||||
'value' => 'light',
|
||||
'label' => __( 'Light', 'twentyeleven' ),
|
||||
'thumbnail' => get_template_directory_uri() . '/inc/images/light.png',
|
||||
'default_link_color' => '#1b8be0',
|
||||
),
|
||||
'dark' => array(
|
||||
'value' => 'dark',
|
||||
'label' => __( 'Dark', 'twentyeleven' ),
|
||||
'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png',
|
||||
'default_link_color' => '#e4741f',
|
||||
),
|
||||
);
|
||||
|
||||
return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of layout options registered for Twenty Eleven.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_layouts() {
|
||||
$layout_options = array(
|
||||
'content-sidebar' => array(
|
||||
'value' => 'content-sidebar',
|
||||
'label' => __( 'Content on left', 'twentyeleven' ),
|
||||
'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png',
|
||||
),
|
||||
'sidebar-content' => array(
|
||||
'value' => 'sidebar-content',
|
||||
'label' => __( 'Content on right', 'twentyeleven' ),
|
||||
'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png',
|
||||
),
|
||||
'content' => array(
|
||||
'value' => 'content',
|
||||
'label' => __( 'One-column, no sidebar', 'twentyeleven' ),
|
||||
'thumbnail' => get_template_directory_uri() . '/inc/images/content.png',
|
||||
),
|
||||
);
|
||||
|
||||
return apply_filters( 'twentyeleven_layouts', $layout_options );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default options for Twenty Eleven.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_get_default_theme_options() {
|
||||
$default_theme_options = array(
|
||||
'color_scheme' => 'light',
|
||||
'link_color' => twentyeleven_get_default_link_color( 'light' ),
|
||||
'theme_layout' => 'content-sidebar',
|
||||
);
|
||||
|
||||
if ( is_rtl() )
|
||||
$default_theme_options['theme_layout'] = 'sidebar-content';
|
||||
|
||||
return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default link color for Twenty Eleven, based on color scheme.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*
|
||||
* @param $string $color_scheme Color scheme. Defaults to the active color scheme.
|
||||
* @return $string Color.
|
||||
*/
|
||||
function twentyeleven_get_default_link_color( $color_scheme = null ) {
|
||||
if ( null === $color_scheme ) {
|
||||
$options = twentyeleven_get_theme_options();
|
||||
$color_scheme = $options['color_scheme'];
|
||||
}
|
||||
|
||||
$color_schemes = twentyeleven_color_schemes();
|
||||
if ( ! isset( $color_schemes[ $color_scheme ] ) )
|
||||
return false;
|
||||
|
||||
return $color_schemes[ $color_scheme ]['default_link_color'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the options array for Twenty Eleven.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_get_theme_options() {
|
||||
return get_option( 'twentyeleven_theme_options', twentyeleven_get_default_theme_options() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the Color Scheme setting field.
|
||||
*
|
||||
* @since Twenty Eleven 1.3
|
||||
*/
|
||||
function twentyeleven_settings_field_color_scheme() {
|
||||
$options = twentyeleven_get_theme_options();
|
||||
|
||||
foreach ( twentyeleven_color_schemes() as $scheme ) {
|
||||
?>
|
||||
<div class="layout image-radio-option color-scheme">
|
||||
<label class="description">
|
||||
<input type="radio" name="twentyeleven_theme_options[color_scheme]" value="<?php echo esc_attr( $scheme['value'] ); ?>" <?php checked( $options['color_scheme'], $scheme['value'] ); ?> />
|
||||
<input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" />
|
||||
<span>
|
||||
<img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" />
|
||||
<?php echo $scheme['label']; ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the Link Color setting field.
|
||||
*
|
||||
* @since Twenty Eleven 1.3
|
||||
*/
|
||||
function twentyeleven_settings_field_link_color() {
|
||||
$options = twentyeleven_get_theme_options();
|
||||
?>
|
||||
<input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr( $options['link_color'] ); ?>" />
|
||||
<a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a>
|
||||
<input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>" />
|
||||
<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
|
||||
<br />
|
||||
<span><?php printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' ); ?></span>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the Layout setting field.
|
||||
*
|
||||
* @since Twenty Eleven 1.3
|
||||
*/
|
||||
function twentyeleven_settings_field_layout() {
|
||||
$options = twentyeleven_get_theme_options();
|
||||
foreach ( twentyeleven_layouts() as $layout ) {
|
||||
?>
|
||||
<div class="layout image-radio-option theme-layout">
|
||||
<label class="description">
|
||||
<input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> />
|
||||
<span>
|
||||
<img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" />
|
||||
<?php echo $layout['label']; ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the options array for Twenty Eleven.
|
||||
*
|
||||
* @since Twenty Eleven 1.2
|
||||
*/
|
||||
function twentyeleven_theme_options_render_page() {
|
||||
?>
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>
|
||||
<h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), $theme_name ); ?></h2>
|
||||
<?php settings_errors(); ?>
|
||||
|
||||
<form method="post" action="options.php">
|
||||
<?php
|
||||
settings_fields( 'twentyeleven_options' );
|
||||
do_settings_sections( 'theme_options' );
|
||||
submit_button();
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize and validate form input. Accepts an array, return a sanitized array.
|
||||
*
|
||||
* @see twentyeleven_theme_options_init()
|
||||
* @todo set up Reset Options action
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_theme_options_validate( $input ) {
|
||||
$output = $defaults = twentyeleven_get_default_theme_options();
|
||||
|
||||
// Color scheme must be in our array of color scheme options
|
||||
if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) )
|
||||
$output['color_scheme'] = $input['color_scheme'];
|
||||
|
||||
// Our defaults for the link color may have changed, based on the color scheme.
|
||||
$output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
|
||||
|
||||
// Link color must be 3 or 6 hexadecimal characters
|
||||
if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) )
|
||||
$output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
|
||||
|
||||
// Theme layout must be in our array of theme layout options
|
||||
if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) )
|
||||
$output['theme_layout'] = $input['theme_layout'];
|
||||
|
||||
return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue the styles for the current color scheme.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_enqueue_color_scheme() {
|
||||
$options = twentyeleven_get_theme_options();
|
||||
$color_scheme = $options['color_scheme'];
|
||||
|
||||
if ( 'dark' == $color_scheme )
|
||||
wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );
|
||||
|
||||
do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' );
|
||||
|
||||
/**
|
||||
* Add a style block to the theme for the current link color.
|
||||
*
|
||||
* This function is attached to the wp_head action hook.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_print_link_color_style() {
|
||||
$options = twentyeleven_get_theme_options();
|
||||
$link_color = $options['link_color'];
|
||||
|
||||
$default_options = twentyeleven_get_default_theme_options();
|
||||
|
||||
// Don't do anything if the current link color is the default.
|
||||
if ( $default_options['link_color'] == $link_color )
|
||||
return;
|
||||
?>
|
||||
<style>
|
||||
/* Link color */
|
||||
a,
|
||||
#site-title a:focus,
|
||||
#site-title a:hover,
|
||||
#site-title a:active,
|
||||
.entry-title a:hover,
|
||||
.entry-title a:focus,
|
||||
.entry-title a:active,
|
||||
.widget_twentyeleven_ephemera .comments-link a:hover,
|
||||
section.recent-posts .other-recent-posts a[rel="bookmark"]:hover,
|
||||
section.recent-posts .other-recent-posts .comments-link a:hover,
|
||||
.format-image footer.entry-meta a:hover,
|
||||
#site-generator a:hover {
|
||||
color: <?php echo $link_color; ?>;
|
||||
}
|
||||
section.recent-posts .other-recent-posts .comments-link a:hover {
|
||||
border-color: <?php echo $link_color; ?>;
|
||||
}
|
||||
article.feature-image.small .entry-summary p a:hover,
|
||||
.entry-header .comments-link a:hover,
|
||||
.entry-header .comments-link a:focus,
|
||||
.entry-header .comments-link a:active,
|
||||
.feature-slider a.active {
|
||||
background-color: <?php echo $link_color; ?>;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
add_action( 'wp_head', 'twentyeleven_print_link_color_style' );
|
||||
|
||||
/**
|
||||
* Adds Twenty Eleven layout classes to the array of body classes.
|
||||
*
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
function twentyeleven_layout_classes( $existing_classes ) {
|
||||
$options = twentyeleven_get_theme_options();
|
||||
$current_layout = $options['theme_layout'];
|
||||
|
||||
if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) )
|
||||
$classes = array( 'two-column' );
|
||||
else
|
||||
$classes = array( 'one-column' );
|
||||
|
||||
if ( 'content-sidebar' == $current_layout )
|
||||
$classes[] = 'right-sidebar';
|
||||
elseif ( 'sidebar-content' == $current_layout )
|
||||
$classes[] = 'left-sidebar';
|
||||
else
|
||||
$classes[] = $current_layout;
|
||||
|
||||
$classes = apply_filters( 'twentyeleven_layout_classes', $classes, $current_layout );
|
||||
|
||||
return array_merge( $existing_classes, $classes );
|
||||
}
|
||||
add_filter( 'body_class', 'twentyeleven_layout_classes' );
|
||||
|
||||
/**
|
||||
* Implements Twenty Eleven theme options into Theme Customizer
|
||||
*
|
||||
* @param $wp_customize Theme Customizer object
|
||||
* @return void
|
||||
*
|
||||
* @since Twenty Eleven 1.3
|
||||
*/
|
||||
function twentyeleven_customize_register( $wp_customize ) {
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
||||
|
||||
$options = twentyeleven_get_theme_options();
|
||||
$defaults = twentyeleven_get_default_theme_options();
|
||||
|
||||
$wp_customize->add_setting( 'twentyeleven_theme_options[color_scheme]', array(
|
||||
'default' => $defaults['color_scheme'],
|
||||
'type' => 'option',
|
||||
'capability' => 'edit_theme_options',
|
||||
) );
|
||||
|
||||
$schemes = twentyeleven_color_schemes();
|
||||
$choices = array();
|
||||
foreach ( $schemes as $scheme ) {
|
||||
$choices[ $scheme['value'] ] = $scheme['label'];
|
||||
}
|
||||
|
||||
$wp_customize->add_control( 'twentyeleven_color_scheme', array(
|
||||
'label' => __( 'Color Scheme', 'twentyeleven' ),
|
||||
'section' => 'colors',
|
||||
'settings' => 'twentyeleven_theme_options[color_scheme]',
|
||||
'type' => 'radio',
|
||||
'choices' => $choices,
|
||||
'priority' => 5,
|
||||
) );
|
||||
|
||||
// Link Color (added to Color Scheme section in Theme Customizer)
|
||||
$wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array(
|
||||
'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ),
|
||||
'type' => 'option',
|
||||
'sanitize_callback' => 'sanitize_hex_color',
|
||||
'capability' => 'edit_theme_options',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
|
||||
'label' => __( 'Link Color', 'twentyeleven' ),
|
||||
'section' => 'colors',
|
||||
'settings' => 'twentyeleven_theme_options[link_color]',
|
||||
) ) );
|
||||
|
||||
// Default Layout
|
||||
$wp_customize->add_section( 'twentyeleven_layout', array(
|
||||
'title' => __( 'Layout', 'twentyeleven' ),
|
||||
'priority' => 50,
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'twentyeleven_theme_options[theme_layout]', array(
|
||||
'type' => 'option',
|
||||
'default' => $defaults['theme_layout'],
|
||||
'sanitize_callback' => 'sanitize_key',
|
||||
) );
|
||||
|
||||
$layouts = twentyeleven_layouts();
|
||||
$choices = array();
|
||||
foreach ( $layouts as $layout ) {
|
||||
$choices[$layout['value']] = $layout['label'];
|
||||
}
|
||||
|
||||
$wp_customize->add_control( 'twentyeleven_theme_options[theme_layout]', array(
|
||||
'section' => 'twentyeleven_layout',
|
||||
'type' => 'radio',
|
||||
'choices' => $choices,
|
||||
) );
|
||||
}
|
||||
add_action( 'customize_register', 'twentyeleven_customize_register' );
|
||||
|
||||
/**
|
||||
* Bind JS handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Used with blogname and blogdescription.
|
||||
*
|
||||
* @since Twenty Eleven 1.3
|
||||
*/
|
||||
function twentyeleven_customize_preview_js() {
|
||||
wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20120523', true );
|
||||
}
|
||||
add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' );
|
||||
164
wp-content/themes/twentyeleven/inc/widgets.php
Normal file
@ -0,0 +1,164 @@
|
||||
<?php
|
||||
/**
|
||||
* Makes a custom Widget for displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
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, Status, Quote, 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', 'twentyeleven' ) : $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,
|
||||
'no_found_rows' => true,
|
||||
'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', 'post-format-status', 'post-format-quote' ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'IN',
|
||||
),
|
||||
),
|
||||
);
|
||||
$ephemera = new WP_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;
|
||||
?>
|
||||
<ol>
|
||||
<?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
|
||||
|
||||
<?php if ( 'link' != get_post_format() ) : ?>
|
||||
|
||||
<li class="widget-entry-title">
|
||||
<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo esc_attr( sprintf( __( '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 else : ?>
|
||||
|
||||
<li class="widget-entry-title">
|
||||
<?php
|
||||
// Grab first link from the post content. If none found, use the post permalink as fallback.
|
||||
$link_url = twentyeleven_url_grabber();
|
||||
|
||||
if ( empty( $link_url ) )
|
||||
$link_url = get_permalink();
|
||||
?>
|
||||
<a href="<?php echo esc_url( $link_url ); ?>" title="<?php echo esc_attr( sprintf( __( '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 post globals 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 esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></label>
|
||||
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
|
||||
|
||||
<p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyeleven' ); ?></label>
|
||||
<input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3" /></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
52
wp-content/themes/twentyeleven/index.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* The main template file.
|
||||
*
|
||||
* This is the most generic template file in a WordPress theme
|
||||
* and one of the two required files for a theme (the other being style.css).
|
||||
* It is used to display a page when nothing more specific matches a query.
|
||||
* E.g., it puts together the home page when no home.php file exists.
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_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' ); ?>
|
||||
|
||||
<?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( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
6
wp-content/themes/twentyeleven/js/html5.js
Normal file
@ -0,0 +1,6 @@
|
||||
/*! HTML5 Shiv v3.6 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */
|
||||
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
|
||||
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");
|
||||
var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,
|
||||
b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
||||
17
wp-content/themes/twentyeleven/js/showcase.js
Normal file
@ -0,0 +1,17 @@
|
||||
(function($) {
|
||||
$(document).ready( function() {
|
||||
$('.feature-slider a').click(function(e) {
|
||||
$('.featured-posts section.featured-post').css({
|
||||
opacity: 0,
|
||||
visibility: 'hidden'
|
||||
});
|
||||
$(this.hash).css({
|
||||
opacity: 1,
|
||||
visibility: 'visible'
|
||||
});
|
||||
$('.feature-slider a').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
660
wp-content/themes/twentyeleven/languages/twentyeleven.pot
Normal file
@ -0,0 +1,660 @@
|
||||
# Copyright (C) 2013 the WordPress team
|
||||
# This file is distributed under the GNU General Public License v2 or later.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Twenty Eleven 1.5\n"
|
||||
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyeleven\n"
|
||||
"POT-Creation-Date: 2013-01-01 00:19:40+00:00\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
||||
#: 404.php:17
|
||||
msgid "This is somewhat embarrassing, isn’t it?"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:21
|
||||
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:28
|
||||
msgid "Most Used Categories"
|
||||
msgstr ""
|
||||
|
||||
#. translators: %1$s: smilie
|
||||
#: 404.php:36
|
||||
msgid "Try looking in the monthly archives. %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:25
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:27
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:27
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:29
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:29
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Blog Archives"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:57 author.php:74 category.php:50 index.php:37 search.php:42
|
||||
#: tag.php:50
|
||||
msgid "Nothing Found"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:61 author.php:78 category.php:54 index.php:41 tag.php:54
|
||||
msgid ""
|
||||
"Apologies, but no results were found for the requested archive. Perhaps "
|
||||
"searching will help find a related post."
|
||||
msgstr ""
|
||||
|
||||
#: author.php:28
|
||||
msgid "Author Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: author.php:49 content-single.php:60
|
||||
msgid "About %s"
|
||||
msgstr ""
|
||||
|
||||
#: category.php:19
|
||||
msgid "Category Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:17
|
||||
msgid ""
|
||||
"This post is password protected. Enter the password to view any comments."
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:33
|
||||
msgid "One thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: comments.php:40 comments.php:60
|
||||
msgid "Comment navigation"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:41 comments.php:61
|
||||
msgid "← Older Comments"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:42 comments.php:62
|
||||
msgid "Newer Comments →"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:71
|
||||
msgid "Comments are closed."
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:16 content-featured.php:14 content-gallery.php:16
|
||||
#: content-gallery.php:48 content-image.php:15 content-link.php:16
|
||||
#: content-quote.php:14 content-status.php:15 content.php:15 content.php:19
|
||||
#: inc/widgets.php:89 showcase.php:120 showcase.php:199
|
||||
msgid "Permalink to %s"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:17
|
||||
msgid "Aside"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:22 content-image.php:21 content-link.php:22
|
||||
#: content-quote.php:24 content-status.php:21 content.php:30
|
||||
msgid "Reply"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:22 content-image.php:21 content-link.php:22
|
||||
#: content-quote.php:24 content-status.php:21 content.php:30
|
||||
msgctxt "comments number"
|
||||
msgid "1"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:22 content-image.php:21 content-link.php:22
|
||||
#: content-quote.php:24 content-status.php:21 content.php:30
|
||||
msgctxt "comments number"
|
||||
msgid "%"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:33 content-gallery.php:32 content-image.php:27
|
||||
#: content-link.php:33 content-quote.php:35 content-status.php:34
|
||||
#: content.php:41 functions.php:345
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:34 content-featured.php:23 content-gallery.php:54
|
||||
#: content-image.php:28 content-intro.php:18 content-link.php:34
|
||||
#: content-page.php:18 content-quote.php:36 content-single.php:24
|
||||
#: content-status.php:35 content.php:42 image.php:90
|
||||
msgid "Pages:"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:42 content-gallery.php:87 content-image.php:64
|
||||
#: content-link.php:42 content-quote.php:69 content-status.php:43
|
||||
#: content.php:79 showcase.php:201
|
||||
msgid "Leave a reply"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:42 content-gallery.php:87 content-image.php:64
|
||||
#: content-link.php:42 content-quote.php:69 content-status.php:43
|
||||
#: content.php:79 showcase.php:201
|
||||
msgid "<b>1</b> Reply"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:42 content-gallery.php:87 content-image.php:64
|
||||
#: content-link.php:42 content-quote.php:69 content-status.php:43
|
||||
#: content.php:79 showcase.php:201
|
||||
msgid "<b>%</b> Replies"
|
||||
msgstr ""
|
||||
|
||||
#: content-aside.php:44 content-featured.php:45 content-gallery.php:90
|
||||
#: content-image.php:68 content-intro.php:19 content-link.php:44
|
||||
#: content-page.php:21 content-quote.php:72 content-single.php:52
|
||||
#: content-status.php:45 content.php:82 functions.php:525 functions.php:553
|
||||
#: image.php:41
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#. translators: used between list items, there is a space after the comma
|
||||
#: content-featured.php:29 content-featured.php:38 content-gallery.php:62
|
||||
#: content-gallery.php:72 content-image.php:47 content-image.php:56
|
||||
#: content-quote.php:44 content-quote.php:54 content-single.php:30
|
||||
#: content-single.php:33 content.php:51 content.php:63
|
||||
msgid ", "
|
||||
msgstr ""
|
||||
|
||||
#: content-featured.php:31
|
||||
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:33
|
||||
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:17
|
||||
msgid "Gallery"
|
||||
msgstr ""
|
||||
|
||||
#: content-gallery.php:47
|
||||
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:66 content-image.php:51 content-quote.php:48
|
||||
#: content.php:55
|
||||
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
|
||||
msgstr ""
|
||||
|
||||
#: content-gallery.php:78 content-image.php:59 content-quote.php:60
|
||||
#: content.php:69
|
||||
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
|
||||
msgstr ""
|
||||
|
||||
#: content-image.php:16
|
||||
msgid "Image"
|
||||
msgstr ""
|
||||
|
||||
#: content-image.php:34
|
||||
msgid ""
|
||||
"<a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s"
|
||||
"\">%3$s</time></a><span class=\"by-author\"> <span class=\"sep\"> by </span> "
|
||||
"<span class=\"author vcard\"><a class=\"url fn n\" href=\"%4$s\" title=\"%5$s"
|
||||
"\" rel=\"author\">%6$s</a></span></span>"
|
||||
msgstr ""
|
||||
|
||||
#: content-image.php:39 functions.php:590
|
||||
msgid "View all posts by %s"
|
||||
msgstr ""
|
||||
|
||||
#: content-link.php:17
|
||||
msgid "Link"
|
||||
msgstr ""
|
||||
|
||||
#: content-quote.php:15
|
||||
msgid "Quote"
|
||||
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:39
|
||||
msgid ""
|
||||
"This entry was posted 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:64
|
||||
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr ""
|
||||
|
||||
#: content-status.php:16
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: content.php:16
|
||||
msgid "Featured"
|
||||
msgstr ""
|
||||
|
||||
#. #-#-#-#-# twentyeleven.pot (Twenty Eleven 1.5) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:27
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr ""
|
||||
|
||||
#: footer.php:27
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr ""
|
||||
|
||||
#: footer.php:27
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:95
|
||||
msgid "Primary Menu"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:164
|
||||
msgid "Wheel"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:170
|
||||
msgid "Shore"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:176
|
||||
msgid "Trolley"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:182
|
||||
msgid "Pine Cone"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:188
|
||||
msgid "Chessboard"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:194
|
||||
msgid "Lanterns"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:200
|
||||
msgid "Willow"
|
||||
msgstr ""
|
||||
|
||||
#. translators: header image description
|
||||
#: functions.php:206
|
||||
msgid "Hanoi Plant"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:394
|
||||
msgid "Main Sidebar"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:403
|
||||
msgid "Showcase Sidebar"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:405
|
||||
msgid "The sidebar for the optional Showcase Template"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:413
|
||||
msgid "Footer Area One"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:415 functions.php:425 functions.php:435
|
||||
msgid "An optional widget area for your site footer"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:423
|
||||
msgid "Footer Area Two"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:433
|
||||
msgid "Footer Area Three"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:453 single.php:18
|
||||
msgid "Post navigation"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:454
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:455
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:525
|
||||
msgid "Pingback:"
|
||||
msgstr ""
|
||||
|
||||
#. translators: 1: comment author, 2: date and time
|
||||
#: functions.php:542
|
||||
msgid "%1$s on %2$s <span class=\"says\">said:</span>"
|
||||
msgstr ""
|
||||
|
||||
#. translators: 1: date, 2: time
|
||||
#: functions.php:548
|
||||
msgid "%1$s at %2$s"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:557
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:566
|
||||
msgid "Reply <span>↓</span>"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:584
|
||||
msgid ""
|
||||
"<span class=\"sep\">Posted on </span><a href=\"%1$s\" title=\"%2$s\" rel="
|
||||
"\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></"
|
||||
"a><span class=\"by-author\"> <span class=\"sep\"> by </span> <span class="
|
||||
"\"author vcard\"><a class=\"url fn n\" href=\"%5$s\" title=\"%6$s\" rel="
|
||||
"\"author\">%7$s</a></span></span>"
|
||||
msgstr ""
|
||||
|
||||
#: header.php:45
|
||||
msgid "Page %s"
|
||||
msgstr ""
|
||||
|
||||
#: header.php:129
|
||||
msgid "Main menu"
|
||||
msgstr ""
|
||||
|
||||
#: header.php:131
|
||||
msgid "Skip to primary content"
|
||||
msgstr ""
|
||||
|
||||
#: header.php:132
|
||||
msgid "Skip to secondary content"
|
||||
msgstr ""
|
||||
|
||||
#: image.php:18
|
||||
msgid "Image navigation"
|
||||
msgstr ""
|
||||
|
||||
#: image.php:19
|
||||
msgid "← Previous"
|
||||
msgstr ""
|
||||
|
||||
#: image.php:20
|
||||
msgid "Next →"
|
||||
msgstr ""
|
||||
|
||||
#: image.php:30
|
||||
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\">%8$s</a>"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:55 inc/theme-options.php:474
|
||||
msgid "Color Scheme"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:61 inc/theme-options.php:491
|
||||
msgid "Link Color"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:62
|
||||
msgid "Default Layout"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:94 inc/theme-options.php:95
|
||||
msgid "Theme Options"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:110
|
||||
msgid ""
|
||||
"Some themes provide customization options that are grouped together on a "
|
||||
"Theme Options screen. If you change themes, options may change or disappear, "
|
||||
"as they are theme-specific. Your current theme, Twenty Eleven, provides the "
|
||||
"following Theme Options:"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:112
|
||||
msgid ""
|
||||
"<strong>Color Scheme</strong>: You can choose a color palette of \"Light"
|
||||
"\" (light background with dark text) or \"Dark\" (dark background with light "
|
||||
"text) for your site."
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:113
|
||||
msgid ""
|
||||
"<strong>Link Color</strong>: You can choose the color used for text links on "
|
||||
"your site. You can enter the HTML color or hex code, or you can choose "
|
||||
"visually by clicking the \"Select a Color\" button to pick from a color "
|
||||
"wheel."
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:114
|
||||
msgid ""
|
||||
"<strong>Default Layout</strong>: You can choose if you want your site’"
|
||||
"s default layout to have a sidebar on the left, the right, or not at all."
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:116
|
||||
msgid ""
|
||||
"Remember to click \"Save Changes\" to save any changes you have made to the "
|
||||
"theme options."
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:118
|
||||
msgid "For more information:"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:119
|
||||
msgid ""
|
||||
"<a href=\"http://codex.wordpress.org/Appearance_Theme_Options_Screen\" "
|
||||
"target=\"_blank\">Documentation on Theme Options</a>"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:120
|
||||
msgid ""
|
||||
"<a href=\"http://wordpress.org/support/\" target=\"_blank\">Support Forums</"
|
||||
"a>"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:127
|
||||
msgid "Overview"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:149
|
||||
msgid "Light"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:155
|
||||
msgid "Dark"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:173
|
||||
msgid "Content on left"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:178
|
||||
msgid "Content on right"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:183
|
||||
msgid "One-column, no sidebar"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:273
|
||||
msgid "Select a Color"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:276
|
||||
msgid "Default color: %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:312
|
||||
msgid "%s Theme Options"
|
||||
msgstr ""
|
||||
|
||||
#: inc/theme-options.php:498
|
||||
msgid "Layout"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:19
|
||||
msgid ""
|
||||
"Use this widget to list your recent Aside, Status, Quote, and Link posts"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:20
|
||||
msgid "Twenty Eleven Ephemera"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:52
|
||||
msgid "Ephemera"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:91 inc/widgets.php:107
|
||||
msgid "0 <span class=\"reply\">comments →</span>"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:91 inc/widgets.php:107
|
||||
msgid "1 <span class=\"reply\">comment →</span>"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:91 inc/widgets.php:107
|
||||
msgid "% <span class=\"reply\">comments →</span>"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:105
|
||||
msgid "Link to %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:157
|
||||
msgid "Title:"
|
||||
msgstr ""
|
||||
|
||||
#: inc/widgets.php:160
|
||||
msgid "Number of posts to show:"
|
||||
msgstr ""
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr ""
|
||||
|
||||
#: search.php:46
|
||||
msgid ""
|
||||
"Sorry, but nothing matched your search criteria. Please try again with some "
|
||||
"different keywords."
|
||||
msgstr ""
|
||||
|
||||
#: searchform.php:11 searchform.php:12 searchform.php:13
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: showcase.php:77
|
||||
msgid "Featured Post"
|
||||
msgstr ""
|
||||
|
||||
#: showcase.php:150
|
||||
msgid "Featuring: %s"
|
||||
msgstr ""
|
||||
|
||||
#: showcase.php:160
|
||||
msgid "Recent Posts"
|
||||
msgstr ""
|
||||
|
||||
#: sidebar.php:19
|
||||
msgid "Archives"
|
||||
msgstr ""
|
||||
|
||||
#: sidebar.php:26
|
||||
msgid "Meta"
|
||||
msgstr ""
|
||||
|
||||
#: single.php:19
|
||||
msgid "<span class=\"meta-nav\">←</span> Previous"
|
||||
msgstr ""
|
||||
|
||||
#: single.php:20
|
||||
msgid "Next <span class=\"meta-nav\">→</span>"
|
||||
msgstr ""
|
||||
|
||||
#: tag.php:19
|
||||
msgid "Tag Archives: %s"
|
||||
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 ""
|
||||
"The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. "
|
||||
"Make it yours with a custom menu, header image, and background -- then go "
|
||||
"further with available theme options for light or dark color scheme, custom "
|
||||
"link colors, and three layout choices. Twenty Eleven comes equipped with a "
|
||||
"Showcase page template that transforms your front page into a showcase to "
|
||||
"show off your best content, widget support galore (sidebar, three footer "
|
||||
"areas, and a Showcase page widget area), and a custom \"Ephemera\" widget to "
|
||||
"display your Aside, Link, Quote, or Status posts. Included are styles for "
|
||||
"print and for the admin editor, support for featured images (as custom "
|
||||
"header images on posts and pages and as large images on featured \"sticky\" "
|
||||
"posts), and special styles for six different post formats."
|
||||
msgstr ""
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr ""
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Showcase Template"
|
||||
msgstr ""
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Sidebar Template"
|
||||
msgstr ""
|
||||
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
|
||||
|
||||
31
wp-content/themes/twentyeleven/page.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying all pages.
|
||||
*
|
||||
* This is the template that displays all pages by default.
|
||||
* Please note that this is the WordPress construct of pages
|
||||
* and that other 'pages' on your WordPress site will use a
|
||||
* different template.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'content', 'page' ); ?>
|
||||
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
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 ==
|
||||
583
wp-content/themes/twentyeleven/rtl.css
Normal file
@ -0,0 +1,583 @@
|
||||
/*
|
||||
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
|
||||
|
||||
*/
|
||||
|
||||
/* =Reset reset
|
||||
----------------------------------------------- */
|
||||
|
||||
caption, th, td {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* =Structure
|
||||
----------------------------------------------- */
|
||||
|
||||
body {
|
||||
direction:rtl;
|
||||
unicode-bidi:embed;
|
||||
}
|
||||
|
||||
/* Showcase */
|
||||
.page-template-showcase-php section.recent-posts {
|
||||
float: left;
|
||||
margin: 0 31% 0 0;
|
||||
}
|
||||
.page-template-showcase-php #main .widget-area {
|
||||
float: right;
|
||||
margin: 0 0 0 -22.15%;
|
||||
}
|
||||
|
||||
/* One column */
|
||||
|
||||
.one-column article.feature-image.small .entry-summary a {
|
||||
left: auto;
|
||||
right: -9%;
|
||||
}
|
||||
|
||||
/* Simplify the pullquotes and pull styles */
|
||||
.one-column.singular .entry-meta .edit-link a {
|
||||
right: 0px;
|
||||
left: auto;
|
||||
}
|
||||
/* Make sure we have room for our comment avatars */
|
||||
.one-column .commentlist > li.comment {
|
||||
margin-left: 0;
|
||||
margin-right: 102px;
|
||||
}
|
||||
/* Make sure the logo and search form don't collide */
|
||||
.one-column #branding #searchform {
|
||||
right: auto;
|
||||
left: 40px;
|
||||
}
|
||||
/* Talking avatars take up too much room at this size */
|
||||
.one-column .commentlist > li.comment {
|
||||
margin-right: 0;
|
||||
}
|
||||
.one-column .commentlist > li.comment .comment-meta,
|
||||
.one-column .commentlist > li.comment .comment-content {
|
||||
margin-right: 0;
|
||||
margin-left: 85px;
|
||||
}
|
||||
.one-column .commentlist .avatar {
|
||||
right: auto;
|
||||
left: 1.625em;
|
||||
}
|
||||
.one-column .commentlist .children .avatar {
|
||||
left: auto;
|
||||
right: 2.2em;
|
||||
}
|
||||
|
||||
/* =Global
|
||||
----------------------------------------------- */
|
||||
|
||||
/* Text elements */
|
||||
p {
|
||||
margin-bottom: 1.625em;
|
||||
}
|
||||
ul, ol {
|
||||
margin: 0 2.5em 1.625em 0;
|
||||
}
|
||||
.ltr ul, .ltr ol {
|
||||
margin: 0 0 1.625em 2.5em;
|
||||
}
|
||||
blockquote {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
blockquote em, blockquote i, blockquote cite {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
textarea {
|
||||
padding-left: 0;
|
||||
padding-right: 3px;
|
||||
}
|
||||
input#s {
|
||||
background-position: 97% 6px;
|
||||
padding: 4px 28px 4px 10px;
|
||||
}
|
||||
|
||||
/* Assistive text */
|
||||
#access a.assistive-text:active,
|
||||
#access a.assistive-text:focus {
|
||||
left: auto;
|
||||
right: 7.6%;
|
||||
}
|
||||
|
||||
/* =Header
|
||||
----------------------------------------------- */
|
||||
|
||||
#site-title {
|
||||
margin-right: 0;
|
||||
margin-left: 270px;
|
||||
}
|
||||
|
||||
#site-description {
|
||||
margin: 0 0 3.65625em 270px;
|
||||
}
|
||||
|
||||
/* =Menu
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
#access {
|
||||
float: right;
|
||||
}
|
||||
#access ul {
|
||||
margin: 0 -0.8125em 0 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
#access li {
|
||||
float: right;
|
||||
}
|
||||
#access ul ul {
|
||||
float: right;
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
#access ul ul ul {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
}
|
||||
|
||||
/* Search Form */
|
||||
#branding #searchform {
|
||||
right: auto;
|
||||
left: 7.6%;
|
||||
text-align: left;
|
||||
}
|
||||
#branding #s {
|
||||
float: left;
|
||||
}
|
||||
#branding .only-search + #access div {
|
||||
padding-right: 0;
|
||||
padding-left: 205px;
|
||||
}
|
||||
|
||||
|
||||
/* =Content
|
||||
----------------------------------------------- */
|
||||
.entry-title,
|
||||
.entry-header .entry-meta {
|
||||
padding-right: 0;
|
||||
padding-left: 76px;
|
||||
}
|
||||
.entry-content td,
|
||||
.comment-content td {
|
||||
padding: 6px 0 6px 10px;
|
||||
}
|
||||
.page-link span {
|
||||
margin-right: 0;
|
||||
margin-left: 6px;
|
||||
}
|
||||
.entry-meta .edit-link a {
|
||||
float: left;
|
||||
}
|
||||
/* Images */
|
||||
|
||||
.wp-caption .wp-caption-text,
|
||||
.gallery-caption {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.wp-caption .wp-caption-text {
|
||||
padding: 10px 40px 5px 0px;
|
||||
}
|
||||
.wp-caption .wp-caption-text:before {
|
||||
margin-right: 0;
|
||||
margin-left: 5px;
|
||||
left: auto;
|
||||
right: 10px;
|
||||
}
|
||||
#content .gallery-columns-4 .gallery-item {
|
||||
padding-right:0;
|
||||
padding-left:2%;
|
||||
}
|
||||
|
||||
/* Author Info */
|
||||
.singular #author-info {
|
||||
margin: 2.2em -35.4% 0 -35.6%;
|
||||
}
|
||||
#author-avatar {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
margin-left: -78px;
|
||||
}
|
||||
#author-description {
|
||||
float: right;
|
||||
margin-left: 0;
|
||||
margin-right: 108px;
|
||||
}
|
||||
/* Comments link */
|
||||
.entry-header .comments-link a {
|
||||
background-image: url(images/comment-bubble-rtl.png);
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Post Formats Headings
|
||||
*/
|
||||
.singular .entry-title,
|
||||
.singular .entry-header .entry-meta {
|
||||
padding-left: 0;
|
||||
}
|
||||
.singular .entry-header .entry-meta {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
.singular .entry-meta .edit-link a {
|
||||
left: auto;
|
||||
right: 50px;
|
||||
}
|
||||
|
||||
|
||||
/* =Gallery
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-gallery .gallery-thumb {
|
||||
float: right;
|
||||
margin: .375em 0 0 1.625em;
|
||||
}
|
||||
|
||||
|
||||
/* =Status
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-status img.avatar {
|
||||
float: right;
|
||||
margin: 4px 0 2px 10px;
|
||||
}
|
||||
|
||||
|
||||
/* =Image
|
||||
----------------------------------------------- */
|
||||
|
||||
.indexed.format-image div.entry-meta {
|
||||
float: right;
|
||||
}
|
||||
/* =error404
|
||||
----------------------
|
||||
------------------------- */
|
||||
.error404 #main .widget {
|
||||
float: right;
|
||||
margin-right: auto;
|
||||
margin-left: 3.7%;
|
||||
}
|
||||
.error404 #main .widget_archive {
|
||||
margin-left: 0;
|
||||
}
|
||||
.error404 #main .widget_tag_cloud {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* =Showcase
|
||||
----------------------------------------------- */
|
||||
|
||||
article.intro .edit-link a {
|
||||
right: auto;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
/* Featured post */
|
||||
section.featured-post {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Small featured post */
|
||||
section.featured-post .attachment-small-feature {
|
||||
float: left;
|
||||
margin: 0 0 1.625em -8.9%;
|
||||
right: auto;
|
||||
left: -15px;
|
||||
}
|
||||
article.feature-image.small {
|
||||
float: right;
|
||||
}
|
||||
article.feature-image.small .entry-summary p a {
|
||||
left:auto;
|
||||
right: -23.8%;
|
||||
padding: 9px 85px 9px 26px;
|
||||
}
|
||||
|
||||
/* Large featured post */
|
||||
section.feature-image.large .hentry {
|
||||
left:auto;
|
||||
right: 9%;
|
||||
margin: 1.625em 0 0 9%;
|
||||
}
|
||||
/* Featured Slider */
|
||||
.featured-posts .showcase-heading {
|
||||
padding-left: 0;
|
||||
padding-right: 8.9%;
|
||||
}
|
||||
.featured-posts section.featured-post {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
#content .feature-slider {
|
||||
right: auto;
|
||||
left: 8.9%;
|
||||
}
|
||||
.feature-slider li {
|
||||
float: right;
|
||||
}
|
||||
/* Recent Posts */
|
||||
section.recent-posts .other-recent-posts a[rel="bookmark"] {
|
||||
float: right;
|
||||
}
|
||||
section.recent-posts .other-recent-posts .comments-link a,
|
||||
section.recent-posts .other-recent-posts .comments-link > span {
|
||||
padding: 0.3125em 1em 0.3125em 0;
|
||||
right: auto;
|
||||
left: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* =Attachments
|
||||
----------------------------------------------- */
|
||||
|
||||
/* =Navigation
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
.nav-previous {
|
||||
float: right;
|
||||
}
|
||||
.nav-next {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* Singular navigation */
|
||||
#nav-single {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
#nav-single .nav-next {
|
||||
padding-left: 0;
|
||||
padding-right: .5em;
|
||||
}
|
||||
|
||||
|
||||
/* =Widgets
|
||||
----------------------------------------------- */
|
||||
|
||||
.widget ul ul {
|
||||
margin-left: 0;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
/* Twitter */
|
||||
.widget_twitter .timesince {
|
||||
margin-right: 0;
|
||||
margin-left: -10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* =Comments
|
||||
----------------------------------------------- */
|
||||
|
||||
.commentlist .children li.comment {
|
||||
border-left: none;
|
||||
border-right: 1px solid #ddd;
|
||||
-moz-border-radius: 3px 0 0 3px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
.commentlist .children li.comment .comment-meta {
|
||||
margin-left: 0;
|
||||
margin-right: 50px;
|
||||
}
|
||||
.commentlist .avatar {
|
||||
left: auto;
|
||||
right: -102px;
|
||||
}
|
||||
.commentlist > li:before {
|
||||
content: url(images/comment-arrow-rtl.png);
|
||||
left:auto;
|
||||
right: -21px;
|
||||
}
|
||||
.commentlist > li.pingback:before {
|
||||
content: '';
|
||||
}
|
||||
.commentlist .children .avatar {
|
||||
left: auto;
|
||||
right: 2.2em;
|
||||
}
|
||||
|
||||
/* Post author highlighting */
|
||||
.commentlist > li.bypostauthor:before {
|
||||
content: url(images/comment-arrow-bypostauthor-rtl.png);
|
||||
}
|
||||
|
||||
/* sidebar-page.php comments */
|
||||
/* Make sure we have room for our comment avatars */
|
||||
.page-template-sidebar-page-php .commentlist > li.comment,
|
||||
.page-template-sidebar-page-php.commentlist .pingback {
|
||||
margin-left: 0;
|
||||
margin-right: 102px;
|
||||
}
|
||||
|
||||
/* Comment Form */
|
||||
#respond .comment-form-author label,
|
||||
#respond .comment-form-email label,
|
||||
#respond .comment-form-url label,
|
||||
#respond .comment-form-comment label {
|
||||
left: auto;
|
||||
right: 4px;
|
||||
}
|
||||
#respond .comment-form-author label,
|
||||
#respond .comment-form-email label,
|
||||
#respond .comment-form-url label,
|
||||
#respond .comment-form-comment label {
|
||||
-webkit-box-shadow: -1px 2px 2px rgba(204,204,204,0.8);
|
||||
-moz-box-shadow: -1px 2px 2px rgba(204,204,204,0.8);
|
||||
box-shadow: -1px 2px 2px rgba(204,204,204,0.8);
|
||||
}
|
||||
#respond .comment-form-author .required,
|
||||
#respond .comment-form-email .required {
|
||||
left: auto;
|
||||
right: 75%;
|
||||
}
|
||||
#respond .form-submit {
|
||||
float: left;
|
||||
}
|
||||
#respond input#submit {
|
||||
left: auto;
|
||||
right: 30px;
|
||||
padding: 5px 22px 5px 42px;
|
||||
}
|
||||
#respond #cancel-comment-reply-link {
|
||||
margin-left: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
#cancel-comment-reply-link {
|
||||
right: auto;
|
||||
left: 1.625em;
|
||||
}
|
||||
|
||||
/* =Footer
|
||||
----------------------------------------------- */
|
||||
|
||||
/* Two Footer Widget Areas */
|
||||
#supplementary.two .widget-area {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
margin-left: 3.7%;
|
||||
}
|
||||
#supplementary.two .widget-area + .widget-area {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* Three Footer Widget Areas */
|
||||
#supplementary.three .widget-area {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
margin-left: 3.7%;
|
||||
}
|
||||
#supplementary.three .widget-area + .widget-area + .widget-area {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* Site Generator Line */
|
||||
#site-generator .sep {
|
||||
background-position: right center;
|
||||
}
|
||||
|
||||
|
||||
/* =Responsive Structure
|
||||
----------------------------------------------- */
|
||||
|
||||
@media (max-width: 800px) {
|
||||
/* Simplify the showcase template when small feature */
|
||||
section.featured-post .attachment-small-feature,
|
||||
.one-column section.featured-post .attachment-small-feature {
|
||||
float: right;
|
||||
}
|
||||
article.feature-image.small {
|
||||
float: left;
|
||||
}
|
||||
article.feature-image.small .entry-summary p a {
|
||||
right: 0;
|
||||
}
|
||||
.singular .entry-meta .edit-link a {
|
||||
left: auto;
|
||||
right: 0px;
|
||||
}
|
||||
/* Make sure we have room for our comment avatars */
|
||||
.commentlist > li.comment,
|
||||
.commentlist .pingback {
|
||||
margin-left: 0;
|
||||
margin-right: 102px;
|
||||
}
|
||||
/* No need to float footer widgets at this size */
|
||||
#colophon #supplementary .widget-area {
|
||||
margin-left: 0;
|
||||
}
|
||||
/* No need to float 404 widgets at this size */
|
||||
.error404 #main .widget {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
@media (max-width: 650px) {
|
||||
/* @media (max-width: 650px) Reduce font-sizes for better readability on smaller devices */
|
||||
#site-title,
|
||||
#site-description {
|
||||
margin-left: 0;
|
||||
}
|
||||
/* Talking avatars take up too much room at this size */
|
||||
.commentlist > li.comment,
|
||||
.commentlist > li.pingback {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
.commentlist .children .avatar {
|
||||
left: auto;
|
||||
right: 2.2em;
|
||||
}
|
||||
/* Use the available space in the smaller comment form */
|
||||
#respond .comment-form-author .required,
|
||||
#respond .comment-form-email .required {
|
||||
left: auto;
|
||||
right: 95%;
|
||||
}
|
||||
#content .gallery-columns-3 .gallery-item {
|
||||
padding-right: 0;
|
||||
padding-left:2%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 450px) {
|
||||
#content .gallery-columns-2 .gallery-item {
|
||||
padding-right:0;
|
||||
padding-left:4%;
|
||||
}
|
||||
}
|
||||
|
||||
/* =Print
|
||||
----------------------------------------------- */
|
||||
|
||||
@media print {
|
||||
#primary {
|
||||
float: right;
|
||||
}
|
||||
/* Comments */
|
||||
.commentlist .avatar {
|
||||
left: auto;
|
||||
right: 2.2em;
|
||||
}
|
||||
.commentlist li.comment .comment-meta {
|
||||
margin-left: 0;
|
||||
margin-right: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
/* =IE7
|
||||
----------------------------------------------- */
|
||||
|
||||
#ie7 section.recent-posts {
|
||||
margin-right: 0;
|
||||
margin-left: 7.6%;
|
||||
}
|
||||
BIN
wp-content/themes/twentyeleven/screenshot.png
Normal file
|
After Width: | Height: | Size: 193 KiB |
57
wp-content/themes/twentyeleven/search.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Search Results pages.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', '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
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php 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(); ?>
|
||||
14
wp-content/themes/twentyeleven/searchform.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying search forms in Twenty Eleven
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
|
||||
<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>
|
||||
227
wp-content/themes/twentyeleven/showcase.php
Normal file
@ -0,0 +1,227 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Showcase Template
|
||||
* Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts
|
||||
*
|
||||
* The showcase template in Twenty Eleven consists of a featured posts section using sticky posts,
|
||||
* another recent posts area (with the latest post shown in full and the rest as a list)
|
||||
* and a left sidebar holding aside posts.
|
||||
*
|
||||
* We are creating two queries to fetch the proper posts and a custom widget for the sidebar.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
// Enqueue showcase script for the slider
|
||||
wp_enqueue_script( 'twentyeleven-showcase', get_template_directory_uri() . '/js/showcase.js', array( 'jquery' ), '2011-04-28' );
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary" class="showcase">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* We are using a heading by rendering the_content
|
||||
* If we have content for this page, let's display it.
|
||||
*/
|
||||
if ( '' != get_the_content() )
|
||||
get_template_part( 'content', 'intro' );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Begin the featured posts section.
|
||||
*
|
||||
* See if we have any sticky posts and use them to create our featured posts.
|
||||
* We limit the featured posts at ten.
|
||||
*/
|
||||
$sticky = get_option( 'sticky_posts' );
|
||||
|
||||
// Proceed only if sticky posts exist.
|
||||
if ( ! empty( $sticky ) ) :
|
||||
|
||||
$featured_args = array(
|
||||
'post__in' => $sticky,
|
||||
'post_status' => 'publish',
|
||||
'posts_per_page' => 10,
|
||||
'no_found_rows' => true,
|
||||
);
|
||||
|
||||
// The Featured Posts query.
|
||||
$featured = new WP_Query( $featured_args );
|
||||
|
||||
// Proceed only if published posts exist
|
||||
if ( $featured->have_posts() ) :
|
||||
|
||||
/**
|
||||
* We will need to count featured posts starting from zero
|
||||
* to create the slider navigation.
|
||||
*/
|
||||
$counter_slider = 0;
|
||||
|
||||
// Compatibility with versions of WordPress prior to 3.4.
|
||||
if ( function_exists( 'get_custom_header' ) )
|
||||
$header_image_width = get_theme_support( 'custom-header', 'width' );
|
||||
else
|
||||
$header_image_width = HEADER_IMAGE_WIDTH;
|
||||
?>
|
||||
|
||||
<div class="featured-posts">
|
||||
<h1 class="showcase-heading"><?php _e( 'Featured Post', 'twentyeleven' ); ?></h1>
|
||||
|
||||
<?php
|
||||
// Let's roll.
|
||||
while ( $featured->have_posts() ) : $featured->the_post();
|
||||
|
||||
// Increase the counter.
|
||||
$counter_slider++;
|
||||
|
||||
/**
|
||||
* We're going to add a class to our featured post for featured images
|
||||
* by default it'll have the feature-text class.
|
||||
*/
|
||||
$feature_class = 'feature-text';
|
||||
|
||||
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 ) {
|
||||
// If bigger, let's add a BIGGER class. It's EXTRA classy now.
|
||||
$feature_class = 'feature-image large';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* If the thumbnail is as big as the header image
|
||||
* make it a large featured post, otherwise render it small
|
||||
*/
|
||||
if ( has_post_thumbnail() ) {
|
||||
if ( $image[1] >= $header_image_width )
|
||||
$thumbnail_size = 'large-feature';
|
||||
else
|
||||
$thumbnail_size = 'small-feature';
|
||||
?>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php get_template_part( 'content', 'featured' ); ?>
|
||||
</section>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php
|
||||
// Show slider only if we have more than one featured post.
|
||||
if ( $featured->post_count > 1 ) :
|
||||
?>
|
||||
<nav class="feature-slider">
|
||||
<ul>
|
||||
<?php
|
||||
|
||||
// Reset the counter so that we end up with matching elements
|
||||
$counter_slider = 0;
|
||||
|
||||
// Begin from zero
|
||||
rewind_posts();
|
||||
|
||||
// Let's roll again.
|
||||
while ( $featured->have_posts() ) : $featured->the_post();
|
||||
$counter_slider++;
|
||||
if ( 1 == $counter_slider )
|
||||
$class = 'class="active"';
|
||||
else
|
||||
$class = '';
|
||||
?>
|
||||
<li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" <?php echo $class; ?>></a></li>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; // End check for more than one sticky post. ?>
|
||||
</div><!-- .featured-posts -->
|
||||
<?php endif; // End check for published posts. ?>
|
||||
<?php endif; // End check for sticky posts. ?>
|
||||
|
||||
<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', 'post-format-quote', 'post-format-status' ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'NOT IN',
|
||||
),
|
||||
),
|
||||
'no_found_rows' => true,
|
||||
);
|
||||
|
||||
// Our new query for the Recent Posts section.
|
||||
$recent = new WP_Query( $recent_args );
|
||||
|
||||
// The first Recent post is displayed normally
|
||||
if ( $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;
|
||||
|
||||
get_template_part( 'content', get_post_format() );
|
||||
|
||||
echo '<ol class="other-recent-posts">';
|
||||
|
||||
endif;
|
||||
|
||||
// For all other recent posts, just display the title and comment status.
|
||||
while ( $recent->have_posts() ) : $recent->the_post(); ?>
|
||||
|
||||
<li class="entry-title">
|
||||
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( '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', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
|
||||
// If we had some posts, close the <ol>
|
||||
if ( $recent->post_count > 0 )
|
||||
echo '</ol>';
|
||||
?>
|
||||
</section><!-- .recent-posts -->
|
||||
|
||||
<div class="widget-area" role="complementary">
|
||||
<?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
|
||||
|
||||
<?php
|
||||
the_widget( 'Twenty_Eleven_Ephemera_Widget', '', array( 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) );
|
||||
?>
|
||||
|
||||
<?php endif; // end sidebar widget area ?>
|
||||
</div><!-- .widget-area -->
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
42
wp-content/themes/twentyeleven/sidebar-footer.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The Footer widget areas.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* The footer widget area is triggered if any of the areas
|
||||
* have widgets. So let's check that first.
|
||||
*
|
||||
* If none of the sidebars have widgets, then let's bail early.
|
||||
*/
|
||||
if ( ! is_active_sidebar( 'sidebar-3' )
|
||||
&& ! is_active_sidebar( 'sidebar-4' )
|
||||
&& ! is_active_sidebar( 'sidebar-5' )
|
||||
)
|
||||
return;
|
||||
// If we get this far, we have widgets. Let do this.
|
||||
?>
|
||||
<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 -->
|
||||
28
wp-content/themes/twentyeleven/sidebar-page.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Sidebar Template
|
||||
* Description: A Page Template that adds a sidebar to pages
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'content', 'page' ); ?>
|
||||
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
36
wp-content/themes/twentyeleven/sidebar.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* The Sidebar containing the main widget area.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
$options = twentyeleven_get_theme_options();
|
||||
$current_layout = $options['theme_layout'];
|
||||
|
||||
if ( 'content' != $current_layout ) :
|
||||
?>
|
||||
<div id="secondary" class="widget-area" role="complementary">
|
||||
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
|
||||
|
||||
<aside id="archives" class="widget">
|
||||
<h3 class="widget-title"><?php _e( 'Archives', 'twentyeleven' ); ?></h3>
|
||||
<ul>
|
||||
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<aside id="meta" class="widget">
|
||||
<h3 class="widget-title"><?php _e( 'Meta', 'twentyeleven' ); ?></h3>
|
||||
<ul>
|
||||
<?php wp_register(); ?>
|
||||
<li><?php wp_loginout(); ?></li>
|
||||
<?php wp_meta(); ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<?php endif; // end sidebar widget area ?>
|
||||
</div><!-- #secondary .widget-area -->
|
||||
<?php endif; ?>
|
||||
32
wp-content/themes/twentyeleven/single.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* The Template for displaying all single posts.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<nav id="nav-single">
|
||||
<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
|
||||
<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ) ); ?></span>
|
||||
<span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></span>
|
||||
</nav><!-- #nav-single -->
|
||||
|
||||
<?php get_template_part( 'content-single', get_post_format() ); ?>
|
||||
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
2719
wp-content/themes/twentyeleven/style.css
Normal file
65
wp-content/themes/twentyeleven/tag.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* The template used to display Tag Archive pages
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Eleven
|
||||
* @since Twenty Eleven 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<section id="primary">
|
||||
<div id="content" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php
|
||||
printf( __( 'Tag Archives: %s', 'twentyeleven' ), '<span>' . single_tag_title( '', false ) . '</span>' );
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
$tag_description = tag_description();
|
||||
if ( ! empty( $tag_description ) )
|
||||
echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
|
||||
?>
|
||||
</header>
|
||||
|
||||
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* Include the Post-Format-specific template for the content.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php 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( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||