Salta la navigazione

Questo ticket contiene 0 risposta, ha 0 voci.

Ultimo aggiornamento da michaelS-278 2 settimana, 2 giorno fa.

Assistito da: Waqas Bin Hasan.

Autore Post
Giugno 2, 2025 alle 9:13 am #17097037

michaelS-278

Background of the issue:
Hello, we are currently using Twig language switcher on one of our client sites link nascosto
Here is the code snippet:
--------

{{ fn('my_custom_language_switcher') }}

---------
function my_custom_language_switcher() {
$languages = apply_filters( 'wpml_active_languages', NULL, array( 'skip_missing' => 0, 'link_empty_to' => 'link nascosto' ) );

$performance = get_query_var('performance');

if( !empty( $languages ) ) {
$i = 0;
echo '';
foreach( $languages as $k => $language ){
// echo '';
echo '';
// ob_end_clean();
// echo ''; var_dump($language); die;
if ( $performance ) {
$url = explode('?', $language['url']);
if ( count($url) > 1 ) {
$language['url'] = $url[0] . $performance . '?' . $url[1];
} else {
$language['url'] = $url[0] . $performance;
}

}
$native_name = $language['active'] ? strtoupper( $language['native_name'] ) : $language['native_name'];

echo '';
echo '' . esc_html( $native_name ) . '';
echo '';
$i += 1;
}
echo '';
}
}

Symptoms:
Following the https://wpml.org/changelog/2025/05/wpml-4-8-will-drop-support-for-twig-templates/
we would like to confirm whether our current use of Twig will require updates due to the upcoming changes.

Questions:
Could you confirm whether we need to make updates or not?