From 246cfb4a26ef0c659bb70660e3bf6a62ea51d976 Mon Sep 17 00:00:00 2001 From: koenemann Date: Thu, 2 Feb 2017 12:30:26 +0100 Subject: [PATCH] adding some code standard exceptions --- global-templates/pagination.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/global-templates/pagination.php b/global-templates/pagination.php index 6fb8f65..e45049a 100644 --- a/global-templates/pagination.php +++ b/global-templates/pagination.php @@ -48,12 +48,13 @@ function understrap_pagination() { printf( // WPCS: XSS OK. '
  • ' . "\n", - $class, + $class, esc_url( get_pagenum_link( 1 ) ), '1' ); /** Previous Post Link */ if ( get_previous_posts_link() ) { - printf( '
  • %1$s
  • ' . "\n", + printf( // WPCS: XSS OK. + '
  • %1$s
  • ' . "\n", get_previous_posts_link( // WPCS: XSS OK. 'Previous page' ) ); } @@ -68,14 +69,15 @@ function understrap_pagination() { foreach ( (array) $links as $link ) { $class = $paged == $link ? ' class="active page-item"' : ' class="page-item"'; printf( // WPCS: XSS OK. - '
  • %s
  • ' . "\n", - $class, + '
  • %s
  • ' . "\n", + $class, esc_url( get_pagenum_link( $link ) ), $link ); } // Next Post Link. if ( get_next_posts_link() ) { - printf( '
  • %s
  • ' . "\n", + printf( // WPCS: XSS OK. + '
  • %s
  • ' . "\n", get_next_posts_link( 'Next page' ) ); } @@ -86,7 +88,8 @@ function understrap_pagination() { } $class = $paged == $max ? ' class="active "' : ' class="page-item"'; - printf( '
  • %s
  • ' . "\n", + printf( // WPCS: XSS OK. + '
  • %s
  • ' . "\n", $class . ' page-item 9', esc_url( get_pagenum_link( esc_html( $max ) ) ), esc_html( $max ) ); }