??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/pgtankstorage.sg/wp-content/plugins/polylang/src/walker-dropdown.php
⬅ Kembali
<?php
/**
* @package Polylang
*/
/**
* Displays languages in a dropdown list
*
* @since 1.2
* @since 3.4 Extends `PLL_Walker` now.
*/
class PLL_Walker_Dropdown extends PLL_Walker {
/**
* Database fields to use.
*
* @see https://developer.wordpress.org/reference/classes/walker/#properties Walker::$db_fields.
*
* @var string[]
*/
public $db_fields = array( 'parent' => 'parent', 'id' => 'id' );
/**
* Outputs one element.
*
* @since 1.2
*
* @param string $output Passed by reference. Used to append additional content.
* @param stdClass $element The data object.
* @param int $depth Depth of the item.
* @param array $args An array of additional arguments.
* @param int $current_object_id ID of the current item.
* @return void
*/
public function start_el( &$output, $element, $depth = 0, $args = array(), $current_object_id = 0 ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
$value_type = $args['value'];
// Some data from the language object to be passed as HTML data attributes for fetching in JS.
$data_lang = array(
'id' => $element->id,
'name' => $element->name,
'slug' => $element->slug,
'dir' => $element->is_rtl ?? '',
);
$output .= sprintf(
"\t" . '<option value="%1$s"%2$s%3$s data-lang="%5$s">%4$s</option>' . "\n",
'url' === $value_type ? esc_url( $element->$value_type ) : esc_attr( $element->$value_type ),
! empty( $element->locale ) ? sprintf( ' lang="%s"', esc_attr( $element->locale ) ) : '',
selected( isset( $args['selected'] ) && $args['selected'] === $element->$value_type, true, false ),
esc_html( $element->name ),
esc_html( (string) wp_json_encode( $data_lang ) )
);
}
/**
* Starts the output of the dropdown list
*
* @since 1.2
* @since 2.6.7 Use $max_depth and ...$args parameters to follow the move of WP 5.3
*
* List of parameters accepted in $args:
*
* flag => display the selected language flag in front of the dropdown if set to 1, defaults to 0
* value => the language field to use as value attribute, defaults to 'slug'
* selected => the selected value, mandatory
* name => the select name attribute, defaults to 'lang_choice'
* id => the select id attribute, defaults to $args['name']
* class => the class attribute
* disabled => disables the dropdown if set to 1
*
* @param array $elements An array of `PLL_language` or `stdClass` elements.
* @param int $max_depth The maximum hierarchical depth.
* @param mixed ...$args Additional arguments.
* @return string The hierarchical item output.
*
* @phpstan-param array<PLL_Language|stdClass> $elements
*/
public function walk( $elements, $max_depth, ...$args ) { // // phpcs:ignore WordPressVIPMinimum.Classes.DeclarationCompatibility.DeclarationCompatibility
$output = '';
$this->maybe_fix_walk_args( $max_depth, $args );
$args = wp_parse_args( $args, array( 'value' => 'slug', 'name' => 'lang_choice' ) );
if ( ! empty( $args['flag'] ) ) {
$current = wp_list_filter( $elements, array( $args['value'] => $args['selected'] ) );
$lang = reset( $current );
$output = sprintf(
'<span class="pll-select-flag">%s</span>',
empty( $lang->flag ) ? esc_html( $lang->slug ) : $lang->flag
);
}
$output .= sprintf(
'<select name="%1$s"%2$s%3$s%4$s>' . "\n" . '%5$s' . "\n" . '</select>' . "\n",
esc_attr( $args['name'] ),
isset( $args['id'] ) && ! $args['id'] ? '' : ' id="' . ( empty( $args['id'] ) ? esc_attr( $args['name'] ) : esc_attr( $args['id'] ) ) . '"',
empty( $args['class'] ) ? '' : ' class="' . esc_attr( $args['class'] ) . '"',
disabled( empty( $args['disabled'] ), false, false ),
parent::walk( $elements, $max_depth, $args )
);
return $output;
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 Capabilities
dir
—
2026-06-17 21:10
📁 Model
dir
—
2026-06-17 21:10
📁 Options
dir
—
2026-06-17 21:10
📁 admin
dir
—
2026-06-17 21:10
📁 frontend
dir
—
2026-06-17 21:10
📁 install
dir
—
2026-06-17 21:10
📁 integrations
dir
—
2026-06-17 21:10
📁 modules
dir
—
2026-06-17 21:10
📁 settings
dir
—
2026-06-17 21:10
🐘 api.php
php
21.8 KB
2026-06-17 21:10
🐘 base.php
php
6.1 KB
2026-06-17 21:10
🐘 cache.php
php
2.4 KB
2026-06-17 21:10
🐘 class-polylang.php
php
8.3 KB
2026-06-17 21:10
🐘 constant-functions.php
php
1.8 KB
2026-06-17 21:10
🐘 cookie.php
php
3 KB
2026-06-17 21:10
🐘 crud-posts.php
php
14.7 KB
2026-06-17 21:10
🐘 crud-terms.php
php
8.8 KB
2026-06-17 21:10
🐘 default-term.php
php
6.4 KB
2026-06-17 21:10
🐘 filter-rest-routes.php
php
5 KB
2026-06-17 21:10
🐘 filters-links.php
php
5.6 KB
2026-06-17 21:10
🐘 filters-sanitization.php
php
3.2 KB
2026-06-17 21:10
🐘 filters-widgets-options.php
php
2.6 KB
2026-06-17 21:10
🐘 filters.php
php
12.9 KB
2026-06-17 21:10
🐘 format-util.php
php
3 KB
2026-06-17 21:10
🐘 functions.php
php
5.1 KB
2026-06-17 21:10
🐘 language-deprecated.php
php
7.1 KB
2026-06-17 21:10
🐘 language-factory.php
php
9.4 KB
2026-06-17 21:10
🐘 language.php
php
18.1 KB
2026-06-17 21:10
🐘 license.php
php
9.4 KB
2026-06-17 21:10
🐘 links-abstract-domain.php
php
3.2 KB
2026-06-17 21:10
🐘 links-default.php
php
3 KB
2026-06-17 21:10
🐘 links-directory.php
php
9.5 KB
2026-06-17 21:10
🐘 links-domain.php
php
2.9 KB
2026-06-17 21:10
🐘 links-model.php
php
6.5 KB
2026-06-17 21:10
🐘 links-permalinks.php
php
5.6 KB
2026-06-17 21:10
🐘 links-subdomain.php
php
2.2 KB
2026-06-17 21:10
🐘 links.php
php
1.4 KB
2026-06-17 21:10
🐘 mo.php
php
3.4 KB
2026-06-17 21:10
🐘 model.php
php
23 KB
2026-06-17 21:10
🐘 nav-menu.php
php
4.5 KB
2026-06-17 21:10
🐘 olt-manager.php
php
3 KB
2026-06-17 21:10
🐘 query.php
php
7.7 KB
2026-06-17 21:10
🐘 rest-request.php
php
4.2 KB
2026-06-17 21:10
🐘 static-pages.php
php
6.3 KB
2026-06-17 21:10
🐘 switcher.php
php
11 KB
2026-06-17 21:10
🐘 term-slug.php
php
4.9 KB
2026-06-17 21:10
🐘 translatable-object-with-types-interface.php
php
1 KB
2026-06-17 21:10
🐘 translatable-object-with-types-trait.php
php
2 KB
2026-06-17 21:10
🐘 translatable-object.php
php
17.6 KB
2026-06-17 21:10
🐘 translatable-objects.php
php
3.7 KB
2026-06-17 21:10
🐘 translate-option.php
php
13.1 KB
2026-06-17 21:10
🐘 translated-object.php
php
18.9 KB
2026-06-17 21:10
🐘 translated-post.php
php
17.2 KB
2026-06-17 21:10
🐘 translated-term.php
php
14.8 KB
2026-06-17 21:10
🐘 walker-dropdown.php
php
3.8 KB
2026-06-17 21:10
🐘 walker-list.php
php
2.5 KB
2026-06-17 21:10
🐘 walker.php
php
2.4 KB
2026-06-17 21:10
🐘 widget-calendar.php
php
11.6 KB
2026-06-17 21:10
🐘 widget-languages.php
php
5.3 KB
2026-06-17 21:10