/home/techb158/primomovers.ca/wp-content/plugins/polylang/src
NameSizeModeActions
admin/-0755rm
Capabilities/-0755rm
frontend/-0755rm
install/-0755rm
integrations/-0755rm
Model/-0755rm
modules/-0755rm
Options/-0755rm
settings/-0755rm
api.php222910644editdlrm
base.php62590644editdlrm
cache.php24540644editdlrm
class-polylang.php85370644editdlrm
constant-functions.php18530644editdlrm
cookie.php31040644editdlrm
crud-posts.php150490644editdlrm
crud-terms.php89620644editdlrm
default-term.php65950644editdlrm
filter-rest-routes.php51000644editdlrm
filters-links.php57800644editdlrm
filters-sanitization.php33110644editdlrm
filters-widgets-options.php26970644editdlrm
filters.php132480644editdlrm
format-util.php31140644editdlrm
functions.php52640644editdlrm
language-deprecated.php72960644editdlrm
language-factory.php96300644editdlrm
language.php185020644editdlrm
license.php96200644editdlrm
links-abstract-domain.php32400644editdlrm
links-default.php31000644editdlrm
links-directory.php97260644editdlrm
links-domain.php29800644editdlrm
links-model.php66780644editdlrm
links-permalinks.php57530644editdlrm
links-subdomain.php22090644editdlrm
links.php14150644editdlrm
mo.php35040644editdlrm
model.php235080644editdlrm
nav-menu.php46090644editdlrm
olt-manager.php30560644editdlrm
query.php79130644editdlrm
rest-request.php43250644editdlrm
static-pages.php64180644editdlrm
switcher.php112370644editdlrm
term-slug.php50120644editdlrm
translatable-object-with-types-interface.php10550644editdlrm
translatable-object-with-types-trait.php20050644editdlrm
translatable-object.php180420644editdlrm
translatable-objects.php37990644editdlrm
translate-option.php134170644editdlrm
translated-object.php193880644editdlrm
translated-post.php175860644editdlrm
translated-term.php151710644editdlrm
walker-dropdown.php38570644editdlrm
walker-list.php26020644editdlrm
walker.php24340644editdlrm
widget-calendar.php118580644editdlrm
widget-languages.php54660644editdlrm
Edit: /home/techb158/primomovers.ca/wp-content/plugins/polylang/src/walker-dropdown.php (3857B)
'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" . '' . "\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 $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( '%s', empty( $lang->flag ) ? esc_html( $lang->slug ) : $lang->flag ); } $output .= sprintf( '' . "\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; } }