forked from mirror/_s
Merge branch 'pr/366'
This commit is contained in:
commit
0f2db471a7
11
comments.php
11
comments.php
|
@ -42,13 +42,10 @@ if ( post_password_required() ) {
|
||||||
|
|
||||||
<ol class="comment-list">
|
<ol class="comment-list">
|
||||||
<?php
|
<?php
|
||||||
/* Loop through and list the comments. Tell wp_list_comments()
|
wp_list_comments( array(
|
||||||
* to use _s_comment() to format the comments.
|
'style' => 'ol',
|
||||||
* If you want to override this in a child theme, then you can
|
'short_ping' => true,
|
||||||
* define _s_comment() and that will be used instead.
|
) );
|
||||||
* See _s_comment() in inc/template-tags.php for more.
|
|
||||||
*/
|
|
||||||
wp_list_comments( array( 'callback' => '_s_comment' ) );
|
|
||||||
?>
|
?>
|
||||||
</ol><!-- .comment-list -->
|
</ol><!-- .comment-list -->
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,9 @@ function _s_setup() {
|
||||||
'default-color' => 'ffffff',
|
'default-color' => 'ffffff',
|
||||||
'default-image' => '',
|
'default-image' => '',
|
||||||
) ) );
|
) ) );
|
||||||
|
|
||||||
|
// Enable support for HTML5 markup.
|
||||||
|
add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) );
|
||||||
}
|
}
|
||||||
endif; // _s_setup
|
endif; // _s_setup
|
||||||
add_action( 'after_setup_theme', '_s_setup' );
|
add_action( 'after_setup_theme', '_s_setup' );
|
||||||
|
|
|
@ -65,66 +65,6 @@ function _s_post_nav() {
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if ( ! function_exists( '_s_comment' ) ) :
|
|
||||||
/**
|
|
||||||
* Template for comments and pingbacks.
|
|
||||||
*
|
|
||||||
* Used as a callback by wp_list_comments() for displaying the comments.
|
|
||||||
*/
|
|
||||||
function _s_comment( $comment, $args, $depth ) {
|
|
||||||
$GLOBALS['comment'] = $comment;
|
|
||||||
|
|
||||||
if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>
|
|
||||||
|
|
||||||
<li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
|
|
||||||
<div class="comment-body">
|
|
||||||
<?php _e( 'Pingback:', '_s' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php else : ?>
|
|
||||||
|
|
||||||
<li id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
|
|
||||||
<article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
|
|
||||||
<footer class="comment-meta">
|
|
||||||
<div class="comment-author vcard">
|
|
||||||
<?php if ( 0 != $args['avatar_size'] ) { echo get_avatar( $comment, $args['avatar_size'] ); } ?>
|
|
||||||
<?php printf( __( '%s <span class="says">says:</span>', '_s' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
|
|
||||||
</div><!-- .comment-author -->
|
|
||||||
|
|
||||||
<div class="comment-metadata">
|
|
||||||
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
|
|
||||||
<time datetime="<?php comment_time( 'c' ); ?>">
|
|
||||||
<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', '_s' ), get_comment_date(), get_comment_time() ); ?>
|
|
||||||
</time>
|
|
||||||
</a>
|
|
||||||
<?php edit_comment_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
|
||||||
</div><!-- .comment-metadata -->
|
|
||||||
|
|
||||||
<?php if ( '0' == $comment->comment_approved ) : ?>
|
|
||||||
<p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', '_s' ); ?></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
</footer><!-- .comment-meta -->
|
|
||||||
|
|
||||||
<div class="comment-content">
|
|
||||||
<?php comment_text(); ?>
|
|
||||||
</div><!-- .comment-content -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
comment_reply_link( array_merge( $args, array(
|
|
||||||
'add_below' => 'div-comment',
|
|
||||||
'depth' => $depth,
|
|
||||||
'max_depth' => $args['max_depth'],
|
|
||||||
'before' => '<div class="reply">',
|
|
||||||
'after' => '</div>',
|
|
||||||
) ) );
|
|
||||||
?>
|
|
||||||
</article><!-- .comment-body -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
}
|
|
||||||
endif; // ends check for _s_comment()
|
|
||||||
|
|
||||||
if ( ! function_exists( '_s_posted_on' ) ) :
|
if ( ! function_exists( '_s_posted_on' ) ) :
|
||||||
/**
|
/**
|
||||||
* Prints HTML with meta information for the current post-date/time and author.
|
* Prints HTML with meta information for the current post-date/time and author.
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* The template for displaying search forms in _s
|
|
||||||
*
|
|
||||||
* @package _s
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
|
||||||
<label>
|
|
||||||
<span class="screen-reader-text"><?php _ex( 'Search for:', 'label', '_s' ); ?></span>
|
|
||||||
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', '_s' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
|
|
||||||
</label>
|
|
||||||
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', '_s' ); ?>">
|
|
||||||
</form>
|
|
Reference in New Issue