for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* LSX functions and definitions - Bootstrap Navigation Walker.
*
* @package lsx
* @subpackage navigation
* @category bootstrap-navigation-walker
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'lsx_wpml_nav_language_switcher_fix' ) ) :
* Add in our custom classes to the menus.
function lsx_wpml_nav_language_switcher_fix( $items, $args ) {
$args
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
function lsx_wpml_nav_language_switcher_fix( $items, /** @scrutinizer ignore-unused */ $args ) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$items = str_replace( 'menu-item-language-current', 'menu-item-language-current dropdown', $items );
$items = str_replace( 'submenu-languages', 'submenu-languages dropdown-menu', $items );
return $items;
endif;
add_filter( 'wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2 );