| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * Displays a language list |
| 8 | 5 | * |
| @@ -21,9 +18,9 @@ | ||
| 21 | 18 | * @param int $depth Depth of the item. |
| 22 | 19 | * @param array $args An array of additional arguments. |
| 23 | 20 | * @param int $current_object_id ID of the current item. |
| 24 | 21 | */ |
| 25 | - public function start_el( &$output, $element, $depth = 0, $args = array(), $current_object_id = 0 ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable | |
| 22 | + public function start_el( &$output, $element, $depth = 0, $args = array(), $current_object_id = 0 ) { | |
| 26 | 23 | $output .= sprintf( |
| 27 | 24 | '%6$s<li class="%1$s"><a lang="%2$s" hreflang="%2$s" href="%3$s">%4$s%5$s</a></li>%7$s', |
| 28 | 25 | esc_attr( implode( ' ', $element->classes ) ), |
| 29 | 26 | esc_attr( $element->locale ), |
| @@ -46,9 +43,9 @@ | ||
| 46 | 43 | * @param int $depth Depth of current element. |
| 47 | 44 | * @param array $args An array of arguments. |
| 48 | 45 | * @param string $output Passed by reference. Used to append additional content. |
| 49 | 46 | */ |
| 50 | - public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { | |
| 47 | + public function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) { | |
| 51 | 48 | $element = (object) $element; // Make sure we have an object |
| 52 | 49 | $element->parent = $element->id = 0; // Don't care about this |
| 53 | 50 | parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
| 54 | 51 | } |