PATH:
home
/
centosnipponia
/
public_html
/
lineup
/
wp-content
/
plugins
/
polylang
/
include
<?php /** * @package Polylang */ /** * Displays a language list * * @since 1.2 */ class PLL_Walker_List extends 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 $output .= sprintf( '%6$s<li class="%1$s"><a %8$s lang="%2$s" hreflang="%2$s" href="%3$s">%4$s%5$s</a></li>%7$s', esc_attr( implode( ' ', $element->classes ) ), esc_attr( $element->locale ), esc_url( $element->url ), $element->flag, $args['show_flags'] && $args['show_names'] ? sprintf( '<span style="margin-%1$s:0.3em;">%2$s</span>', is_rtl() ? 'right' : 'left', esc_html( $element->name ) ) : esc_html( $element->name ), 'discard' === $args['item_spacing'] ? '' : "\t", 'discard' === $args['item_spacing'] ? '' : "\n", empty( $element->link_classes ) ? '' : 'class="' . esc_attr( implode( ' ', $element->link_classes ) ) . '"' ); } /** * Overrides Walker::display_element as it expects an object with a parent property * * @since 1.2 * * @param stdClass $element Data object. * @param array $children_elements List of elements to continue traversing. * @param int $max_depth Max depth to traverse. * @param int $depth Depth of current element. * @param array $args An array of arguments. * @param string $output Passed by reference. Used to append additional content. * @return void */ public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { $element = (object) $element; // Make sure we have an object $element->parent = $element->id = 0; // Don't care about this parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); } /** * Overrides Walker:walk to set depth argument * * @since 1.2 * @since 2.6.7 Use $max_depth and ...$args parameters to follow the move of WP 5.3 * * @param array $elements An array of elements. * @param int $max_depth The maximum hierarchical depth. * @param mixed ...$args Additional arguments. * @return string The hierarchical item output. */ public function walk( $elements, $max_depth, ...$args ) { // phpcs:ignore WordPressVIPMinimum.Classes.DeclarationCompatibility.DeclarationCompatibility if ( is_array( $max_depth ) ) { // @phpstan-ignore-line // Backward compatibility with Polylang < 2.6.7 if ( WP_DEBUG ) { trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions sprintf( '%s was called incorrectly. The method expects an integer as second parameter since Polylang 2.6.7', __METHOD__ ) ); } $args = $max_depth; $max_depth = -1; } else { $args = isset( $args[0] ) ? $args[0] : array(); } return parent::walk( $elements, $max_depth, $args ); } }
[+]
..
[-] api.php
[edit]
[-] base.php
[edit]
[-] cache.php
[edit]
[-] class-polylang.php
[edit]
[-] cookie.php
[edit]
[-] crud-posts.php
[edit]
[-] crud-terms.php
[edit]
[-] db-tools.php
[edit]
[-] filters-links.php
[edit]
[-] filters.php
[edit]
[-] filters-sanitization.php
[edit]
[-] filters-widgets-options.php
[edit]
[-] functions.php
[edit]
[-] language.php
[edit]
[-] license.php
[edit]
[-] links-abstract-domain.php
[edit]
[-] links-default.php
[edit]
[-] links-directory.php
[edit]
[-] links-domain.php
[edit]
[-] links-model.php
[edit]
[-] links-permalinks.php
[edit]
[-] links.php
[edit]
[-] links-subdomain.php
[edit]
[-] model.php
[edit]
[-] mo.php
[edit]
[-] nav-menu.php
[edit]
[-] olt-manager.php
[edit]
[-] query.php
[edit]
[-] rest-request.php
[edit]
[-] static-pages.php
[edit]
[-] switcher.php
[edit]
[-] translated-object.php
[edit]
[-] translated-post.php
[edit]
[-] translated-term.php
[edit]
[-] translate-option.php
[edit]
[-] walker-dropdown.php
[edit]
[-] walker-list.php
[edit]
[-] widget-calendar.php
[edit]
[-] widget-languages.php
[edit]
[-] .htaccess.disabled
[edit]