PluginProbe
Polylang / 2.7.3
Polylang v2.7.3
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/walker-dropdown.php +2 -5 2.92.7.3 View file →
@@ -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 }