Commit a96d3707 authored by lucha's avatar lucha

[auto] theme: twentyeleven 3.1

parent 4c90ea03
......@@ -27,14 +27,31 @@ get_header(); ?>
<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 ) ); ?>
<?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 ) );
the_widget(
'WP_Widget_Archives',
array(
'count' => 0,
'dropdown' => 1,
),
array( 'after_title' => '</h2>' . $archive_content )
);
?>
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
......
......@@ -36,7 +36,10 @@ get_header(); ?>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<?php
/* Include the Post-Format-specific template for the content.
......
......@@ -42,7 +42,8 @@ get_header(); ?>
<?php
// If a user has filled out their description, show a bio on their entries.
if ( get_the_author_meta( 'description' ) ) : ?>
if ( get_the_author_meta( 'description' ) ) :
?>
<div id="author-info">
<div id="author-avatar">
<?php
......@@ -64,7 +65,10 @@ get_header(); ?>
<?php endif; ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<?php
/*
......
......@@ -232,9 +232,6 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
border: none;
-moz-border-radius: 3px;
border-radius: 3px;
-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);
......@@ -242,10 +239,18 @@ p.has-drop-cap:not(:focus)::first-letter {
font-size: 15px;
margin: 20px 0;
padding: 5px 22px;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.wp-block-button__link {
.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #222;
text-shadow: none;
}
.wp-block-button__link,
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .is-style-outline .wp-block-button__link:hover {
background: #222;
color: #eee;
}
......
......@@ -15,9 +15,11 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php
<h1 class="page-title">
<?php
printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1>
?>
</h1>
<?php
$category_description = category_description();
......@@ -37,7 +39,10 @@ get_header(); ?>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<?php
/*
......
......@@ -24,15 +24,18 @@
*/
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 &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyeleven' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
printf(
_n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyeleven' ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?>
</h2>
......@@ -70,8 +73,9 @@
* 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>
if ( ! comments_open() && get_comments_number() ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyeleven' ); ?></p>
<?php endif; ?>
<?php endif; // have_comments() ?>
......
......@@ -33,7 +33,14 @@
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>
......
......@@ -20,7 +20,14 @@ global $feature_class;
<div class="entry-summary">
<?php the_excerpt(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-meta">
......
......@@ -32,7 +32,8 @@
<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php else :
<?php
else :
$images = twentyeleven_get_gallery_images();
if ( $images ) :
$total_images = count( $images );
......@@ -42,14 +43,26 @@
<a href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></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' ),
<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>
);
?>
</em></p>
<?php endif; // end twentyeleven_get_gallery_images() check ?>
<?php the_excerpt(); ?>
<?php endif; ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>
......@@ -58,23 +71,28 @@
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
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; ?>
<?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 ) : ?>
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; ?>
<?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 ?>
......
......@@ -27,13 +27,21 @@
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?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' ),
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(),
......@@ -47,7 +55,7 @@
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
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 ); ?>
......@@ -56,7 +64,8 @@
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( $tags_list ): ?>
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>
......
......@@ -15,7 +15,14 @@
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?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(); ?> -->
......@@ -33,7 +33,14 @@
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>
......
......@@ -15,7 +15,14 @@
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?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>' ); ?>
......
......@@ -33,7 +33,14 @@
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>
......@@ -42,23 +49,28 @@
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
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; ?>
<?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 ) : ?>
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; ?>
<?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 ?>
......
......@@ -21,7 +21,14 @@
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-meta">
......
......@@ -46,7 +46,14 @@
</div>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>
......
......@@ -39,7 +39,14 @@
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>
......@@ -49,11 +56,13 @@
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
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; ?>
<?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' ) ?>
......@@ -61,13 +70,16 @@
<?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 ) : ?>
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; ?>
<?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' ) ?>
......
......@@ -371,14 +371,9 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
background: #222;
border: none;
-moz-border-radius: 3px;
border-radius: 3px;
-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: #eee;
cursor: pointer;
font-size: 15px;
line-height: 24px;
......@@ -387,6 +382,19 @@ p.has-drop-cap:not(:focus)::first-letter {
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.wp-block-button__link {
background: #222;
color: #eee;
}
.is-style-outline .wp-block-button__link {
color: #222;
}
.wp-block-button__link.has-text-color {
text-shadow: none;
}
/* Media & Text */
.wp-block-media-text *:last-child {
......
......@@ -19,8 +19,9 @@
* A sidebar in the footer? Yep. You can customize
* your footer with three columns of widgets.
*/
if ( ! is_404() )
if ( ! is_404() ) {
get_sidebar( 'footer' );
}
?>
<div id="site-generator">
......
......@@ -39,16 +39,17 @@
*/
// Set the content width based on the theme's design and stylesheet.
if ( ! isset( $content_width ) )
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' ) ):
/**
if ( ! function_exists( 'twentyeleven_setup' ) ) :
/**
* Set up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
......@@ -68,7 +69,7 @@ if ( ! function_exists( 'twentyeleven_setup' ) ):
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_setup() {
function twentyeleven_setup() {
/*
* Make Twenty Eleven available for translation.
......@@ -92,7 +93,9 @@ function twentyeleven_setup() {
add_theme_support( 'responsive-embeds' );
// Add support for custom color scheme.
add_theme_support( 'editor-color-palette', array(
add_theme_support(
'editor-color-palette',
array(
array(
'name' => __( 'Blue', 'twentyeleven' ),
'slug' => 'blue',
......@@ -122,8 +125,9 @@ function twentyeleven_setup() {
'name' => __( 'White', 'twentyeleven' ),
'slug' => 'white',
'color' => '#fff',
),
)
) );
);
// Load up our theme options page and related code.
require( get_template_directory() . '/inc/theme-options.php' );
......@@ -141,19 +145,23 @@ function twentyeleven_setup() {
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) );
$theme_options = twentyeleven_get_theme_options();
if ( 'dark' == $theme_options['color_scheme'] )
if ( 'dark' == $theme_options['color_scheme'] ) {
$default_background_color = '1d1d1d';
else
} else {
$default_background_color = 'e2e2e2';
}
// Add support for custom backgrounds.
add_theme_support( 'custom-background', array(
add_theme_support(
'custom-background',