set_attributes_for_block( $attributes ); $attributes['raw'] = false; $switcher = new PLL_Switcher(); $switcher_output = $switcher->the_languages( $this->links, $attributes ); if ( empty( $switcher_output ) ) { return ''; } $aria_label = __( 'Choose a language', 'polylang' ); if ( $attributes['dropdown'] ) { $switcher_output = '' . $switcher_output; $wrap_tag = '
%2$s
'; } else { $wrap_tag = ''; } $wrap_attributes = get_block_wrapper_attributes(); return sprintf( $wrap_tag, $wrap_attributes, $switcher_output ); } /** * Returns the path to the block JSON file directory. * The directory name being used to register a block. * * @since 3.8 * * @return string The path to the block. */ protected function get_path(): string { return __DIR__; } }