Fixing comments.php build errors

FIXING

FILE: /home/travis/build/holger1411/understrap/comments.php

----------------------------------------------------------------------

FOUND 3 ERRORS AFFECTING 2 LINES

----------------------------------------------------------------------

 28 | ERROR | Expected next thing to be an escaping function (see Codex

    |       | for 'Data Validation'), not '_nx'

    |       | (WordPress.XSS.EscapeOutput.OutputNotEscaped)

 28 | ERROR | Missing singular placeholder, needed for some languages.

    |       | See

    |       |
https://codex.wordpress.org/I18n_for_WordPress_Developers#Plurals

    |       | (WordPress.WP.I18n.MissingSingularPlaceholder)

 30 | ERROR | Expected next thing to be an escaping function (see Codex

    |       | for 'Data Validation'), not 'number_format_i18n'

    |       | (WordPress.XSS.EscapeOutput.OutputNotEscaped)

----------------------------------------------------------------------
This commit is contained in:
koenemann 2017-01-27 13:08:05 +01:00
parent b0fcba1829
commit 1576a0e3e2
2 changed files with 8 additions and 4 deletions

View File

@ -25,11 +25,13 @@ 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', 'understrap' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', '_s' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?>
</h2>
</h2><!-- .comments-title -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?>
<nav class="comment-navigation" id="comment-nav-above">

View File

@ -1,6 +1,8 @@
<?php
/**
* Check and setup theme's default settings
*
* @package understrap
*/
function setup_theme_default_settings() {