| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * Displays languages in a dropdown 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 | $value = $args['value']; |
| 27 | 24 | $output .= sprintf( |
| 28 | 25 | "\t" . '<option value="%1$s"%2$s%3$s>%4$s</option>' . "\n", |
| 29 | 26 | esc_attr( $element->$value ), |
| @@ -44,9 +41,9 @@ | ||
| 44 | 41 | * @param int $depth Depth of current element. |
| 45 | 42 | * @param array $args An array of arguments. |
| 46 | 43 | * @param string $output Passed by reference. Used to append additional content. |
| 47 | 44 | */ |
| 48 | - public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { | |
| 45 | + public function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) { | |
| 49 | 46 | $element = (object) $element; // Make sure we have an object |
| 50 | 47 | $element->parent = $element->id = 0; // Don't care about this |
| 51 | 48 | parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
| 52 | 49 | } |