Skip to content
Snippets Groups Projects
Commit 7aa638da authored by agata's avatar agata
Browse files

[auto] theme: twentytwelve 3.1

parent 7f9351d6
Branches
Tags
No related merge requests found
Showing
with 2941 additions and 2876 deletions
......@@ -26,26 +26,30 @@ get_header(); ?>
<header class="archive-header">
<h1 class="archive-title">
<?php
if ( is_day() ) :
if ( is_day() ) {
/* translators: %s: Date. */
printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' );
elseif ( is_month() ) :
} elseif ( is_month() ) {
/* translators: %s: Date. */
printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' );
elseif ( is_year() ) :
} elseif ( is_year() ) {
/* translators: %s: Date. */
printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' );
else :
} else {
_e( 'Archives', 'twentytwelve' );
endif;
}
?>
</h1>
</header><!-- .archive-header -->
<?php
/* Start the Loop */
// Start the Loop.
while ( have_posts() ) :
the_post();
/* Include the post format-specific template for the content. If you want to
* this in a child theme then include a file called content-___.php
/*
* Include the post format-specific template for the content. If you want
* to use this in a child theme then include a file called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
......
......@@ -19,7 +19,8 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<?php
/* Queue the first post, that way we know
/*
* 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
......@@ -29,13 +30,19 @@ get_header(); ?>
?>
<header class="archive-header">
<h1 class="archive-title"><?php printf( __( 'Author Archives: %s', 'twentytwelve' ), '<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>
<h1 class="archive-title">
<?php
/* translators: Author display name. */
printf( __( 'Author Archives: %s', 'twentytwelve' ), '<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><!-- .archive-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.
/*
* 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();
?>
......@@ -61,14 +68,19 @@ get_header(); ?>
?>
</div><!-- .author-avatar -->
<div class="author-description">
<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
<h2>
<?php
/* translators: Author display name. */
printf( __( 'About %s', 'twentytwelve' ), get_the_author() );
?>
</h2>
<p><?php the_author_meta( 'description' ); ?></p>
</div><!-- .author-description -->
</div><!-- .author-info -->
<?php endif; ?>
<?php /* Start the Loop */ ?>
<?php
// Start the Loop.
while ( have_posts() ) :
the_post();
?>
......
......@@ -18,20 +18,26 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="archive-header">
<h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>
<h1 class="archive-title">
<?php
/* translators: %s: Category title. */
printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?>
</h1>
<?php if ( category_description() ) : // Show an optional category description ?>
<?php if ( category_description() ) : // Show an optional category description. ?>
<div class="archive-meta"><?php echo category_description(); ?></div>
<?php endif; ?>
</header><!-- .archive-header -->
<?php
/* Start the Loop */
// Start the Loop.
while ( have_posts() ) :
the_post();
/* Include the post format-specific template for the content. If you want to
* this in a child theme then include a file called content-___.php
/*
* Include the post format-specific template for the content. If you want
* to use this in a child theme then include a file called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
......
......@@ -57,16 +57,17 @@ if ( post_password_required() ) {
?>
</ol><!-- .commentlist -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation" role="navigation">
<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'twentytwelve' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentytwelve' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentytwelve' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php endif; // Check for comment navigation. ?>
<?php
/* If there are no comments and comments are closed, let's leave a note.
/*
* If there are no comments and comments are closed, let's leave a note.
* But we only want the note on posts and pages that had comments in the first place.
*/
if ( ! comments_open() && get_comments_number() ) :
......
......@@ -6,6 +6,9 @@
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
/* translators: %s: Post title. */
$post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
......@@ -17,7 +20,7 @@
</div><!-- .aside -->
<footer class="entry-meta">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $post_title ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
<?php if ( comments_open() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
......
......@@ -6,6 +6,9 @@
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
/* translators: %s: Post title. */
$post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
......@@ -15,7 +18,7 @@
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $post_title ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
<?php if ( comments_open() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
......
......@@ -6,6 +6,9 @@
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
/* translators: %s: Post title. */
$post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
......@@ -14,7 +17,7 @@
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $post_title ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
<?php if ( comments_open() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
......
......@@ -6,13 +6,16 @@
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
/* translators: %s: Post title. */
$post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-header">
<header>
<h1><?php the_author(); ?></h1>
<h2><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a></h2>
<h2><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $post_title ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a></h2>
</header>
<?php
/**
......
......@@ -37,7 +37,7 @@
<?php endif; // comments_open() ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<?php if ( is_search() ) : // Only display excerpts for search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
......@@ -58,7 +58,10 @@
<footer class="entry-meta">
<?php twentytwelve_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
<?php
// If a user has filled out their description and this is a multi-author blog, show a bio on their entries.
if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) :
?>
<div class="author-info">
<div class="author-avatar">
<?php
......@@ -68,11 +71,19 @@
?>
</div><!-- .author-avatar -->
<div class="author-description">
<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
<h2>
<?php
/* translators: %s: Author display name. */
printf( __( 'About %s', 'twentytwelve' ), get_the_author() );
?>
</h2>
<p><?php the_author_meta( 'description' ); ?></p>
<div class="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">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
<?php
/* translators: %s: Author display name. */
printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() );
?>
</a>
</div><!-- .author-link -->
</div><!-- .author-description -->
......
......@@ -19,7 +19,10 @@
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwelve' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>">
<?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?>
<?php
/* translators: %s: WordPress */
printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' );
?>
</a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
......
......@@ -11,13 +11,13 @@
* 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.
*
* @link https://codex.wordpress.org/Theme_Development
* @link https://developer.wordpress.org/themes/basics/theme-functions/
* @link https://developer.wordpress.org/themes/advanced-topics/child-themes/
*
* Functions that are not pluggable (not wrapped in function_exists()) are instead attached
* to a filter or action hook.
*
* For more information on hooks, actions, and filters, @link https://codex.wordpress.org/Plugin_API
* For more information on hooks, actions, and filters, @link https://developer.wordpress.org/plugins/
*
* @package WordPress
* @subpackage Twenty_Twelve
......@@ -120,7 +120,7 @@ function twentytwelve_setup() {
// This theme uses a custom image size for featured images, displayed on "standard" posts.
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop
set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop.
// Indicate widget sidebars can use selective refresh in the Customizer.
add_theme_support( 'customize-selective-refresh-widgets' );
......@@ -130,7 +130,7 @@ add_action( 'after_setup_theme', 'twentytwelve_setup' );
/**
* Add support for a custom header image.
*/
require( get_template_directory() . '/inc/custom-header.php' );
require get_template_directory() . '/inc/custom-header.php';
/**
* Return the Google font stylesheet URL if available.
......@@ -145,13 +145,15 @@ require( get_template_directory() . '/inc/custom-header.php' );
function twentytwelve_get_font_url() {
$font_url = '';
/* translators: If there are characters in your language that are not supported
/*
* translators: If there are characters in your language that are not supported
* by Open Sans, translate this to 'off'. Do not translate into your own language.
*/
if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {
$subsets = 'latin,latin-ext';
/* translators: To add an additional Open Sans character subset specific to your language,
/*
* translators: To add an additional Open Sans character subset specific to your language,
* translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
*/
$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' );
......@@ -165,8 +167,9 @@ function twentytwelve_get_font_url() {
}
$query_args = array(
'family' => 'Open+Sans:400italic,700italic,400,700',
'subset' => $subsets,
'family' => urlencode( 'Open Sans:400italic,700italic,400,700' ),
'subset' => urlencode( $subsets ),
'display' => urlencode( 'fallback' ),
);
$font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
}
......@@ -191,7 +194,7 @@ function twentytwelve_scripts_styles() {
}
// Adds JavaScript for handling the navigation menu hide-and-show behavior.
wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140711', true );
wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20141205', true );
$font_url = twentytwelve_get_font_url();
if ( ! empty( $font_url ) ) {
......@@ -199,13 +202,13 @@ function twentytwelve_scripts_styles() {
}
// Loads our main stylesheet.
wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri(), array(), '20190507' );
// Theme block stylesheet.
wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20181230' );
wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20190406' );
// Loads the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20150214' );
$wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
}
add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );
......@@ -217,7 +220,7 @@ add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );
*/
function twentytwelve_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentytwelve-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
wp_enqueue_style( 'twentytwelve-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20190406' );
// Add custom fonts.
wp_enqueue_style( 'twentytwelve-fonts', twentytwelve_get_font_url(), array(), null );
}
......@@ -307,6 +310,7 @@ function twentytwelve_wp_title( $title, $sep ) {
// Add a page number if necessary.
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
/* translators: %s: Page number. */
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
}
......@@ -436,14 +440,23 @@ if ( ! function_exists( 'twentytwelve_comment' ) ) :
'<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 */
/* translators: 1: Date, 2: Time. */
sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )
);
?>
</header><!-- .comment-meta -->
<?php
$commenter = wp_get_current_commenter();
if ( $commenter['comment_author_email'] ) {
$moderation_note = __( 'Your comment is awaiting moderation.', 'twentytwelve' );
} else {
$moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.', 'twentytwelve' );
}
?>
<?php if ( '0' == $comment->comment_approved ) : ?>
<p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>
<p class="comment-awaiting-moderation"><?php echo $moderation_note; ?></p>
<?php endif; ?>
<section class="comment-content comment">
......@@ -469,7 +482,7 @@ if ( ! function_exists( 'twentytwelve_comment' ) ) :
</article><!-- #comment-## -->
<?php
break;
endswitch; // end comment_type check
endswitch; // End comment_type check.
}
endif;
......@@ -484,10 +497,10 @@ if ( ! function_exists( 'twentytwelve_entry_meta' ) ) :
* @since Twenty Twelve 1.0
*/
function twentytwelve_entry_meta() {
// Translators: used between list items, there is a space after the comma.
/* translators: Used between list items, there is a space after the comma. */
$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
// Translators: used between list items, there is a space after the comma.
/* translators: Used between list items, there is a space after the comma. */
$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
$date = sprintf(
......@@ -501,16 +514,19 @@ if ( ! function_exists( 'twentytwelve_entry_meta' ) ) :
$author = sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
/* translators: %s: Author display name. */
esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),
get_the_author()
);
// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
if ( $tag_list ) {
/* translators: 1: Category name, 2: Tag name, 3: Date, 4: Author display name. */
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
} elseif ( $categories_list ) {
/* translators: 1: Category name, 3: Date, 4: Author display name. */
$utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
} else {
/* translators: 3: Date, 4: Author display name. */
$utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
}
......@@ -690,7 +706,7 @@ if ( ! function_exists( 'wp_body_open' ) ) :
/**
* Fire the wp_body_open action.
*
* Added for backwards compatibility to support pre 5.2.0 WordPress versions.
* Added for backward compatibility to support pre-5.2.0 WordPress versions.
*
* @since Twenty Twelve 3.0
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment