Passed
Push — master ( e51c9a...41921a )
by Chris
04:16
created

includes/nav-bootstrap-navwalker.php (9 issues)

1
<?php
2
/**
3
 * LSX functions and definitions - Bootstrap Navigation Walker.
4
 *
5
 * @package    lsx
6
 * @subpackage navigation
7
 * @category   bootstrap-navigation-walker
8
 */
9
10
if ( ! defined( 'ABSPATH' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
11
	exit;
12
}
13
14
if ( ! function_exists( 'lsx_wpml_nav_language_switcher_fix' ) ) :
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
15
16
	/**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$items" missing
Loading history...
Coding Style Documentation introduced by
Doc comment for parameter "$args" missing
Loading history...
17
	 * Add in our custom classes to the menus.
18
	 *
19
	 * @package    lsx
20
	 * @subpackage navigation
21
	 * @category   bootstrap-navigation-walker
22
	 */
23
	function lsx_wpml_nav_language_switcher_fix( $items, $args ) {
0 ignored issues
show
Expected 2 blank lines before function; 1 found
Loading history...
24
		$items = str_replace( 'menu-item-language-current', 'menu-item-language-current dropdown', $items );
25
		$items = str_replace( 'submenu-languages', 'submenu-languages dropdown-menu', $items );
26
		return $items;
27
	}
0 ignored issues
show
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected 2 blank lines after function; 1 found
Loading history...
28
29
endif;
30
31
add_filter( 'wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2 );
32