Skip to content

Commit

Permalink
Import Codesniffer fixes from _s
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdc committed May 31, 2015
1 parent 3df10fe commit 9a77fb8
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 23 deletions.
17 changes: 10 additions & 7 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@
<?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', 'daniela' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
printf(
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'daniela' ) ),
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 ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'daniela' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', 'daniela' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'daniela' ) ); ?></div>
</nav><!-- #comment-nav-above -->
<?php endif; // check for comment navigation ?>
<?php endif; // Check for comment navigation. ?>

<ol class="comment-list">
<?php
Expand All @@ -47,15 +50,15 @@
?>
</ol><!-- .comment-list -->

<?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="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'daniela' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', 'daniela' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'daniela' ) ); ?></div>
</nav><!-- #comment-nav-below -->
<?php endif; // check for comment navigation ?>
<?php endif; // Check for comment navigation. ?>

<?php endif; // have_comments() ?>
<?php endif; // Check for have_comments(). ?>

<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
Expand Down
1 change: 1 addition & 0 deletions content-none.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @package Daniela
*/

?>

<section class="no-results not-found">
Expand Down
1 change: 1 addition & 0 deletions content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* @package Daniela
*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Expand Down
1 change: 1 addition & 0 deletions content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @package Daniela
*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Expand Down
1 change: 1 addition & 0 deletions content-testimonial.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* @package Daniela
*/

?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php daniela_post_thumbnail(); ?>
Expand Down
5 changes: 4 additions & 1 deletion content.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?php
/**
* Template part for displaying posts.
*
* @package Daniela
*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Expand Down Expand Up @@ -42,4 +45,4 @@
<footer class="entry-footer">
<?php daniela_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
</article><!-- #post-## -->
13 changes: 11 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,24 @@ function daniela_setup() {
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );

/*
* Enable support for Post Formats.
* See http://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery'
'aside',
'image',
'video',
'quote',
'link',
'gallery'
) );

// Set up the WordPress core custom background feature.
Expand Down
1 change: 1 addition & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @package Daniela
*/

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
Expand Down
9 changes: 4 additions & 5 deletions inc/custom-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
* http://codex.wordpress.org/Custom_Headers
*
* You can add an optional custom header image to header.php like so ...
*
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="">
</a>
<?php endif; // End header image check. ?>
*
* @package Daniela
*/
Expand Down Expand Up @@ -46,7 +45,7 @@ function daniela_custom_header_setup() {
function daniela_header_style() {
$header_text_color = get_header_textcolor();
// If no custom options for text are set, let's bail
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value.
if ( HEADER_TEXTCOLOR == $header_text_color ) {
return;
}
Expand All @@ -63,7 +62,7 @@ function daniela_header_style() {
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// If the user has set a custom color for the text use that
// If the user has set a custom color for the text use that.
else :
?>
.site-title a {
Expand Down Expand Up @@ -121,4 +120,4 @@ function daniela_admin_header_image() {
</div>
<?php
}
endif; // daniela_admin_header_image
endif; // daniela_admin_header_image
4 changes: 2 additions & 2 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function daniela_wp_title( $title, $sep ) {

global $page, $paged;

// Add the blog name
// Add the blog name.
$title .= get_bloginfo( 'name', 'display' );

// Add the blog description for the home/front page.
Expand All @@ -56,7 +56,7 @@ function daniela_wp_title( $title, $sep ) {
$title .= " $sep $site_description";
}

// Add a page number if necessary:
// Add a page number if necessary.
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title .= " $sep " . sprintf( __( 'Page %s', 'daniela' ), max( $paged, $page ) );
}
Expand Down
2 changes: 1 addition & 1 deletion inc/jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function daniela_jetpack_setup() {
add_action( 'after_setup_theme', 'daniela_jetpack_setup' );

/**
* Define the code that is used to render the posts added by Infinite Scroll.
* Custom render function for Infinite Scroll.
*/
function daniela_infinite_scroll_render() {
while ( have_posts() ) {
Expand Down
2 changes: 1 addition & 1 deletion inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function daniela_entry_footer() {
$categories_list = get_the_category_list( __( ', ', 'daniela' ) );
if ( $categories_list && daniela_categorized_blog() ) {
printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span> ',
_x( 'Categories: ', 'Indicates a list of post categories.' 'daniela' ),
_x( 'Categories: ', 'Indicates a list of post categories.', 'daniela' ),
$categories_list
);
}
Expand Down
4 changes: 2 additions & 2 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<?php get_template_part( 'content', 'page' ); ?>

<?php
// If comments are open or we have at least one comment, load up the comment template
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>

<?php endwhile; // end of the loop. ?>
<?php endwhile; // End of the loop. ?>

</main><!-- #main -->
</div><!-- #primary -->
Expand Down
4 changes: 2 additions & 2 deletions single-jetpack-portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
) ); ?>

<?php
// If comments are open or we have at least one comment, load up the comment template
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>

<?php endwhile; // end of the loop. ?>
<?php endwhile; // End of the loop. ?>

</main><!-- #main -->
</div><!-- #primary -->
Expand Down

0 comments on commit 9a77fb8

Please sign in to comment.