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