adding some code standard exceptions

This commit is contained in:
koenemann 2017-02-02 12:30:26 +01:00
parent 9717e451cf
commit 246cfb4a26
1 changed files with 9 additions and 6 deletions

View File

@ -53,7 +53,8 @@ function understrap_pagination() {
/** Previous Post Link */
if ( get_previous_posts_link() ) {
printf( '<li class="page-item"><span class="page-link">%1$s</span></li> ' . "\n",
printf( // WPCS: XSS OK.
'<li class="page-item"><span class="page-link">%1$s</span></li> ' . "\n",
get_previous_posts_link( // WPCS: XSS OK.
'<span aria-hidden="true">&laquo;</span><span class="sr-only">Previous page</span>' ) );
}
@ -75,7 +76,8 @@ function understrap_pagination() {
// Next Post Link.
if ( get_next_posts_link() ) {
printf( '<li class="page-item"><span class="page-link">%s</span></li>' . "\n",
printf( // WPCS: XSS OK.
'<li class="page-item"><span class="page-link">%s</span></li>' . "\n",
get_next_posts_link( '<span aria-hidden="true">&raquo;</span><span class="sr-only">Next page</span>' ) );
}
@ -86,7 +88,8 @@ function understrap_pagination() {
}
$class = $paged == $max ? ' class="active "' : ' class="page-item"';
printf( '<li %s><a class="page-link" href="%s" aria-label="Next"><span aria-hidden="true"><i class="fa fa-step-forward" aria-hidden="true"></i></span><span class="sr-only">%s</span></a></li>' . "\n",
printf( // WPCS: XSS OK.
'<li %s><a class="page-link" href="%s" aria-label="Next"><span aria-hidden="true"><i class="fa fa-step-forward" aria-hidden="true"></i></span><span class="sr-only">%s</span></a></li>' . "\n",
$class . ' page-item 9', esc_url( get_pagenum_link( esc_html( $max ) ) ), esc_html( $max ) );
}