This commit is contained in:
koenemann 2017-02-02 12:27:45 +01:00
parent 3545003b14
commit 9717e451cf
1 changed files with 6 additions and 4 deletions

View File

@ -46,8 +46,9 @@ function understrap_pagination() {
if ( ! in_array( 1, $links ) ) { if ( ! in_array( 1, $links ) ) {
$class = 1 == $paged ? ' class="active page-item"' : ' class="page-item"'; $class = 1 == $paged ? ' class="active page-item"' : ' class="page-item"';
printf( '<li %s><a class="page-link" href="%s"><i class="fa fa-step-backward" aria-hidden="true"></i></a></li>' . "\n", printf( // WPCS: XSS OK.
$class, // WPCS: XSS OK. '<li %s><a class="page-link" href="%s"><i class="fa fa-step-backward" aria-hidden="true"></i></a></li>' . "\n",
$class,
esc_url( get_pagenum_link( 1 ) ), '1' ); esc_url( get_pagenum_link( 1 ) ), '1' );
/** Previous Post Link */ /** Previous Post Link */
@ -66,8 +67,9 @@ function understrap_pagination() {
sort( $links ); sort( $links );
foreach ( (array) $links as $link ) { foreach ( (array) $links as $link ) {
$class = $paged == $link ? ' class="active page-item"' : ' class="page-item"'; $class = $paged == $link ? ' class="active page-item"' : ' class="page-item"';
printf( '<li %s><a href="%s" class="page-link">%s</a></li>' . "\n", printf( // WPCS: XSS OK.
$class, // WPCS: XSS OK. '<li %s><a href="%s" class="page-link">%s</a></li>' . "\n",
$class,
esc_url( get_pagenum_link( $link ) ), $link ); esc_url( get_pagenum_link( $link ) ), $link );
} }