[ 'class' => true, 'role' => true, 'aria-label' => true ], 'img' => [ 'src' => true, 'class' => true, 'alt' => true, 'role' => true, 'loading' => true ], ] ); $anchor_classes = [ 'trp-language-switcher', 'trp-ls-dropdown', 'trp-shortcode-switcher', 'trp-shortcode-anchor' ]; $overlay_classes = [ 'trp-language-switcher', 'trp-ls-dropdown', 'trp-shortcode-switcher', 'trp-shortcode-overlay' ]; $mode_class = $open_on_click ? 'trp-open-on-click' : 'trp-open-on-hover'; $anchor_classes[] = $mode_class; // harmless on anchor (layout only) $overlay_classes[] = $mode_class; // used by CSS/JS on overlay if ( ! empty( $is_opposite ) ) { $anchor_classes[] = 'trp-opposite-button'; $overlay_classes[] = 'trp-opposite-button'; } $current = $list[0]; $has_more = count( $list ) > 1; $list_id = 'trp-shortcode-dropdown-' . uniqid(); $render_header = static function( array $item, bool $show_arrow, bool $clickable, bool $is_opposite, string $flag_position, array $allowed_flag_html, bool $has_more, bool $as_control, string $list_id ): string { ob_start(); ?>