Skip to content
Snippets Groups Projects
Commit 6e978d9e authored by lucha's avatar lucha
Browse files

[auto] theme: twentythirteen 2.4

parent a18dc2c3
No related branches found
No related tags found
No related merge requests found
Showing
with 494 additions and 313 deletions
......@@ -24,7 +24,8 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="archive-header">
<h1 class="archive-title"><?php
<h1 class="archive-title">
<?php
if ( is_day() ) :
printf( __( 'Daily Archives: %s', 'twentythirteen' ), get_the_date() );
elseif ( is_month() ) :
......@@ -34,11 +35,15 @@ get_header(); ?>
else :
_e( 'Archives', 'twentythirteen' );
endif;
?></h1>
?>
</h1>
</header><!-- .archive-header -->
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
......
......@@ -45,7 +45,10 @@ get_header(); ?>
<?php endif; ?>
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
......
......@@ -24,7 +24,10 @@ get_header(); ?>
</header><!-- .archive-header -->
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
......
......@@ -13,8 +13,9 @@
* If the current post is protected by a password and the visitor has not yet
* entered the password we will return early without loading the comments.
*/
if ( post_password_required() )
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
......@@ -22,18 +23,22 @@ if ( post_password_required() )
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'twentythirteen' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
printf(
_nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'twentythirteen' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>'
);
?>
</h2>
<ol class="comment-list">
<?php
wp_list_comments( array(
wp_list_comments(
array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 74,
) );
)
);
?>
</ol><!-- .comment-list -->
......
......@@ -12,12 +12,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
......
......@@ -23,12 +23,21 @@
<div class="audio-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .audio-content -->
</div><!-- .entry-content -->
......
......@@ -22,12 +22,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
......
......@@ -23,12 +23,21 @@
<?php if ( is_single() || ! get_post_gallery() ) : ?>
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
<?php else : ?>
<?php echo get_post_gallery(); ?>
......
......@@ -22,12 +22,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
......
......@@ -23,12 +23,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
......
......@@ -12,12 +12,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
......
......@@ -12,12 +12,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
......
......@@ -22,12 +22,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
......
......@@ -40,12 +40,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
the_content(
sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
)
);
wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>
......
......@@ -16,7 +16,14 @@
<div class="site-info">
<?php do_action( 'twentythirteen_credits' ); ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentythirteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentythirteen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?>
</a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
......
......@@ -28,8 +28,9 @@
*
* @see twentythirteen_content_width() for template-specific adjustments.
*/
if ( ! isset( $content_width ) )
if ( ! isset( $content_width ) ) {
$content_width = 604;
}
/**
* Add support for a custom header image.
......@@ -39,8 +40,9 @@ require get_template_directory() . '/inc/custom-header.php';
/**
* Twenty Thirteen only works in WordPress 3.6 or later.
*/
if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) )
if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) {
require get_template_directory() . '/inc/back-compat.php';
}
/**
* Twenty Thirteen setup.
......@@ -81,17 +83,33 @@ function twentythirteen_setup() {
* Switches default core markup for search form, comment form,
* and comments to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
) );
add_theme_support(
'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
)
);
/*
* This theme supports all available post formats by default.
* See https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video'
) );
add_theme_support(
'post-formats', array(
'aside',
'audio',
'chat',
'gallery',
'image',
'link',
'quote',
'status',
'video',
)
);
// This theme uses wp_nav_menu() in one location.
register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) );
......@@ -139,11 +157,13 @@ function twentythirteen_fonts_url() {
if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) {
$font_families = array();
if ( 'off' !== $source_sans_pro )
if ( 'off' !== $source_sans_pro ) {
$font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic';
}
if ( 'off' !== $bitter )
if ( 'off' !== $bitter ) {
$font_families[] = 'Bitter:400,700';
}
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
......@@ -165,12 +185,14 @@ function twentythirteen_scripts_styles() {
* Adds JavaScript to pages with the comment form to support
* sites with threaded comments (when in use).
*/
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
// Adds Masonry to handle vertical alignment of footer widgets.
if ( is_active_sidebar( 'sidebar-1' ) )
if ( is_active_sidebar( 'sidebar-1' ) ) {
wp_enqueue_script( 'jquery-masonry' );
}
// Loads JavaScript file with functionality specific to Twenty Thirteen.
wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true );
......@@ -230,20 +252,23 @@ add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 );
function twentythirteen_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() )
if ( is_feed() ) {
return $title;
}
// Add the site name.
$title .= get_bloginfo( 'name', 'display' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description";
}
// Add a page number if necessary.
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
}
return $title;
}
......@@ -255,7 +280,8 @@ add_filter( 'wp_title', 'twentythirteen_wp_title', 10, 2 );
* @since Twenty Thirteen 1.0
*/
function twentythirteen_widgets_init() {
register_sidebar( array(
register_sidebar(
array(
'name' => __( 'Main Widget Area', 'twentythirteen' ),
'id' => 'sidebar-1',
'description' => __( 'Appears in the footer section of the site.', 'twentythirteen' ),
......@@ -263,9 +289,11 @@ function twentythirteen_widgets_init() {
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
)
);
register_sidebar( array(
register_sidebar(
array(
'name' => __( 'Secondary Widget Area', 'twentythirteen' ),
'id' => 'sidebar-2',
'description' => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ),
......@@ -273,7 +301,8 @@ function twentythirteen_widgets_init() {
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
)
);
}
add_action( 'widgets_init', 'twentythirteen_widgets_init' );
......@@ -287,8 +316,9 @@ function twentythirteen_paging_nav() {
global $wp_query;
// Don't print empty markup if there's only one page.
if ( $wp_query->max_num_pages < 2 )
if ( $wp_query->max_num_pages < 2 ) {
return;
}
?>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>
......@@ -321,8 +351,9 @@ function twentythirteen_post_nav() {
$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous )
if ( ! $next && ! $previous ) {
return;
}
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>
......@@ -346,11 +377,13 @@ if ( ! function_exists( 'twentythirteen_entry_meta' ) ) :
* @since Twenty Thirteen 1.0
*/
function twentythirteen_entry_meta() {
if ( is_sticky() && is_home() && ! is_paged() )
if ( is_sticky() && is_home() && ! is_paged() ) {
echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>';
}
if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) {
twentythirteen_entry_date();
}
// Translators: used between list items, there is a space after the comma.
$categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) );
......@@ -366,7 +399,8 @@ function twentythirteen_entry_meta() {
// Post author
if ( 'post' == get_post_type() ) {
printf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
printf(
'<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' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'twentythirteen' ), get_the_author() ) ),
get_the_author()
......@@ -387,20 +421,23 @@ if ( ! function_exists( 'twentythirteen_entry_date' ) ) :
* @return string The HTML-formatted post date.
*/
function twentythirteen_entry_date( $echo = true ) {
if ( has_post_format( array( 'chat', 'status' ) ) )
if ( has_post_format( array( 'chat', 'status' ) ) ) {
$format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' );
else
} else {
$format_prefix = '%2$s';
}
$date = sprintf( '<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>',
$date = sprintf(
'<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>',
esc_url( get_permalink() ),
esc_attr( sprintf( __( 'Permalink to %s', 'twentythirteen' ), the_title_attribute( 'echo=0' ) ) ),
esc_attr( get_the_date( 'c' ) ),
esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) )
);
if ( $echo )
if ( $echo ) {
echo $date;
}
return $date;
}
......@@ -433,7 +470,8 @@ function twentythirteen_the_attached_image() {
* looking at the last image in a gallery), or, in a gallery of one, just the
* link to that image file.
*/
$attachment_ids = get_posts( array(
$attachment_ids = get_posts(
array(
'post_parent' => $post->post_parent,
'fields' => 'ids',
'numberposts' => -1,
......@@ -442,7 +480,8 @@ function twentythirteen_the_attached_image() {
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID',
) );
)
);
// If there is more than 1 attachment in a gallery...
if ( count( $attachment_ids ) > 1 ) {
......@@ -454,15 +493,16 @@ function twentythirteen_the_attached_image() {
}
// get the URL of the next image attachment...
if ( $next_id )
if ( $next_id ) {
$next_attachment_url = get_attachment_link( $next_id );
// or get the URL of the first image attachment.
else
} // or get the URL of the first image attachment.
else {
$next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
}
}
printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',
printf(
'<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',
esc_url( $next_attachment_url ),
the_title_attribute( array( 'echo' => false ) ),
wp_get_attachment_image( $post->ID, $attachment_size )
......@@ -500,7 +540,8 @@ if ( ! function_exists( 'twentythirteen_excerpt_more' ) && ! is_admin() ) :
* @return string Filtered Read More excerpt link.
*/
function twentythirteen_excerpt_more( $more ) {
$link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
$link = sprintf(
'<a href="%1$s" class="more-link">%2$s</a>',
esc_url( get_permalink( get_the_ID() ) ),
/* translators: %s: Name of current post */
sprintf( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
......@@ -524,14 +565,17 @@ endif;
* @return array The filtered body class list.
*/
function twentythirteen_body_class( $classes ) {
if ( ! is_multi_author() )
if ( ! is_multi_author() ) {
$classes[] = 'single-author';
}
if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() )
if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) {
$classes[] = 'sidebar';
}
if ( ! get_option( 'show_avatars' ) )
if ( ! get_option( 'show_avatars' ) ) {
$classes[] = 'no-avatars';
}
return $classes;
}
......@@ -545,11 +589,12 @@ add_filter( 'body_class', 'twentythirteen_body_class' );
function twentythirteen_content_width() {
global $content_width;
if ( is_attachment() )
if ( is_attachment() ) {
$content_width = 724;
elseif ( has_post_format( 'audio' ) )
} elseif ( has_post_format( 'audio' ) ) {
$content_width = 484;
}
}
add_action( 'template_redirect', 'twentythirteen_content_width' );
/**
......@@ -565,16 +610,20 @@ function twentythirteen_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial( 'blogname', array(
$wp_customize->selective_refresh->add_partial(
'blogname', array(
'selector' => '.site-title',
'container_inclusive' => false,
'render_callback' => 'twentythirteen_customize_partial_blogname',
) );
$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
)
);
$wp_customize->selective_refresh->add_partial(
'blogdescription', array(
'selector' => '.site-description',
'container_inclusive' => false,
'render_callback' => 'twentythirteen_customize_partial_blogdescription',
) );
)
);
}
}
add_action( 'customize_register', 'twentythirteen_customize_register' );
......
......@@ -42,7 +42,15 @@
<nav id="site-navigation" class="navigation main-navigation" role="navigation">
<button class="menu-toggle"><?php _e( 'Menu', 'twentythirteen' ); ?></button>
<a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?>
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_class' => 'nav-menu',
'menu_id' => 'primary-menu',
)
);
?>
<?php get_search_form(); ?>
</nav><!-- #site-navigation -->
</div><!-- #navbar -->
......
......@@ -16,7 +16,8 @@ get_header(); ?>
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>>
......@@ -27,10 +28,12 @@ get_header(); ?>
<?php
$published_text = __( '<span class="attachment-meta">Published on <time class="entry-date" datetime="%1$s">%2$s</time> in <a href="%3$s" title="Return to %4$s" rel="gallery">%5$s</a></span>', 'twentythirteen' );
$post_title = get_the_title( $post->post_parent );
if ( empty( $post_title ) || 0 == $post->post_parent )
if ( empty( $post_title ) || 0 == $post->post_parent ) {
$published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>';
}
printf( $published_text,
printf(
$published_text,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_permalink( $post->post_parent ) ),
......@@ -39,7 +42,8 @@ get_header(); ?>
);
$metadata = wp_get_attachment_metadata();
printf( '<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s &times; %5$s)</a></span>',
printf(
'<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s &times; %5$s)</a></span>',
esc_url( wp_get_attachment_url() ),
esc_attr__( 'Link to full-size image', 'twentythirteen' ),
__( 'Full resolution', 'twentythirteen' ),
......@@ -73,7 +77,14 @@ get_header(); ?>
<?php if ( ! empty( $post->post_content ) ) : ?>
<div class="entry-description">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentythirteen' ), 'after' => '</div>' ) ); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentythirteen' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-description -->
<?php endif; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment