fixing some more
This commit is contained in:
parent
a9aecfb68f
commit
3545003b14
|
@ -13,12 +13,6 @@
|
|||
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
||||
</rule>
|
||||
|
||||
<rule ref="WordPress.XSS.EscapeOutput">
|
||||
<properties>
|
||||
<property name="customAutoEscapedFunctions" value="$html" type="array" />
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Include sniffs for PHP cross-version compatibility. -->
|
||||
<config name="testVersion" value="5.2-99.0"/>
|
||||
<rule ref="PHPCompatibility"/>
|
||||
|
|
|
@ -47,12 +47,14 @@ function understrap_pagination() {
|
|||
$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",
|
||||
$class, esc_url( get_pagenum_link( 1 ) ), '1' );
|
||||
$class, // WPCS: XSS OK.
|
||||
esc_url( get_pagenum_link( 1 ) ), '1' );
|
||||
|
||||
/** Previous Post Link */
|
||||
if ( get_previous_posts_link() ) {
|
||||
printf( '<li class="page-item"><span class="page-link">%1$s</span></li> ' . "\n",
|
||||
get_previous_posts_link( '<span aria-hidden="true">«</span><span class="sr-only">Previous page</span>' ) );
|
||||
get_previous_posts_link( // WPCS: XSS OK.
|
||||
'<span aria-hidden="true">«</span><span class="sr-only">Previous page</span>' ) );
|
||||
}
|
||||
|
||||
if ( ! in_array( 2, $links ) ) {
|
||||
|
@ -64,7 +66,8 @@ function understrap_pagination() {
|
|||
sort( $links );
|
||||
foreach ( (array) $links as $link ) {
|
||||
$class = $paged == $link ? ' class="active page-item"' : ' class="page-item"';
|
||||
printf( '<li %s><a href="%s" class="page-link">%s</a></li>' . "\n", $class,
|
||||
printf( '<li %s><a href="%s" class="page-link">%s</a></li>' . "\n",
|
||||
$class, // WPCS: XSS OK.
|
||||
esc_url( get_pagenum_link( $link ) ), $link );
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue