Skip to content

Commit d3d38f3

Browse files
committed
WPCS: Use strict comparison for array compair for sr-only class
1 parent 5ab1c4c commit d3d38f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

class-wp-bootstrap-navwalker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
264264
*/
265265
if ( in_array( 'sr-only', $linkmod_classes, true ) ) {
266266
$title = self::wrap_for_screen_reader( $title );
267-
$keys_to_unset = array_keys( $linkmod_classes, 'sr-only' );
267+
$keys_to_unset = array_keys( $linkmod_classes, 'sr-only', true );
268268
foreach ( $keys_to_unset as $k ) {
269269
unset( $linkmod_classes[ $k ] );
270270
}

0 commit comments

Comments
 (0)