forked from mirror/_s
Fix remaining PHPCS errors:
* Add ignoring in template-tags.php and comments.php. * Escape header text color in custom-header.php.
This commit is contained in:
parent
89602b2c3a
commit
2aef92e5a3
|
@ -25,7 +25,7 @@ if ( post_password_required() ) {
|
||||||
<?php if ( have_comments() ) : ?>
|
<?php if ( have_comments() ) : ?>
|
||||||
<h2 class="comments-title">
|
<h2 class="comments-title">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf( // WPCS: XSS OK
|
||||||
esc_html( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', '_s' ) ),
|
esc_html( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', '_s' ) ),
|
||||||
number_format_i18n( get_comments_number() ),
|
number_format_i18n( get_comments_number() ),
|
||||||
'<span>' . get_the_title() . '</span>'
|
'<span>' . get_the_title() . '</span>'
|
||||||
|
|
|
@ -112,11 +112,12 @@ if ( ! function_exists( '_s_admin_header_image' ) ) :
|
||||||
* @see _s_custom_header_setup().
|
* @see _s_custom_header_setup().
|
||||||
*/
|
*/
|
||||||
function _s_admin_header_image() {
|
function _s_admin_header_image() {
|
||||||
$style = sprintf( ' style="color:#%s;"', get_header_textcolor() );
|
|
||||||
?>
|
?>
|
||||||
<div id="headimg">
|
<div id="headimg">
|
||||||
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
|
<h1 class="displaying-header-text">
|
||||||
<div class="displaying-header-text" id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
|
<a id="name" style="<?php echo esc_attr( 'color: #' . get_header_textcolor() ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
|
||||||
|
</h1>
|
||||||
|
<div class="displaying-header-text" id="desc" style="<?php echo esc_attr( 'color: #' . get_header_textcolor() ); ?>"><?php bloginfo( 'description' ); ?></div>
|
||||||
<?php if ( get_header_image() ) : ?>
|
<?php if ( get_header_image() ) : ?>
|
||||||
<img src="<?php header_image(); ?>" alt="">
|
<img src="<?php header_image(); ?>" alt="">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -92,7 +92,7 @@ function _s_posted_on() {
|
||||||
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
|
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
|
||||||
);
|
);
|
||||||
|
|
||||||
echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
|
echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK
|
||||||
|
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
@ -107,13 +107,13 @@ function _s_entry_footer() {
|
||||||
/* 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( esc_html__( ', ', '_s' ) );
|
$categories_list = get_the_category_list( esc_html__( ', ', '_s' ) );
|
||||||
if ( $categories_list && _s_categorized_blog() ) {
|
if ( $categories_list && _s_categorized_blog() ) {
|
||||||
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', '_s' ) . '</span>', $categories_list );
|
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', '_s' ) . '</span>', $categories_list ); // WPCS: XSS OK
|
||||||
}
|
}
|
||||||
|
|
||||||
/* translators: used between list items, there is a space after the comma */
|
/* translators: used between list items, there is a space after the comma */
|
||||||
$tags_list = get_the_tag_list( '', esc_html__( ', ', '_s' ) );
|
$tags_list = get_the_tag_list( '', esc_html__( ', ', '_s' ) );
|
||||||
if ( $tags_list ) {
|
if ( $tags_list ) {
|
||||||
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', '_s' ) . '</span>', $tags_list );
|
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', '_s' ) . '</span>', $tags_list ); // WPCS: XSS OK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ function the_archive_title( $before = '', $after = '' ) {
|
||||||
$title = apply_filters( 'get_the_archive_title', $title );
|
$title = apply_filters( 'get_the_archive_title', $title );
|
||||||
|
|
||||||
if ( ! empty( $title ) ) {
|
if ( ! empty( $title ) ) {
|
||||||
echo $before . $title . $after;
|
echo $before . $title . $after; // WPCS: XSS OK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
@ -216,7 +216,7 @@ function the_archive_description( $before = '', $after = '' ) {
|
||||||
*
|
*
|
||||||
* @param string $description Archive description to be displayed.
|
* @param string $description Archive description to be displayed.
|
||||||
*/
|
*/
|
||||||
echo $before . $description . $after;
|
echo $before . $description . $after; // WPCS: XSS OK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
|
Reference in New Issue