|
|
Background of the issue:
I want to reopen a thread related to TWIG on the WPML support forum. The thread is located at https://wpml.org/forums/topic/twig/. I am following some documentation.
Symptoms:
No specific issue or error message mentioned.
Questions:
How can I reopen the thread at https://wpml.org/forums/topic/twig/?
|
|
|
Hi,
we can continue the conversation here. Here’s the last message I sent:
To assist you further, I’d like to request FTP access. This would help me better understand how your theme is working and allow me to review the Twig implementation directly. If possible, we’d look into temporarily commenting out the relevant code to prevent errors from the deprecation, and evaluate whether switching to a standard menu-based solution could work—ideally without requiring a custom PHP switcher. This really depends on how the current switcher is styled and implemented, which I can't assess without seeing the actual output.
I've enabled a private message so you can securely share the credentials.
Best regards,
Marcel
|
|
|
Thanks! I'm currently downloading your theme via FTP so I can search through all the Twig files locally and better understand where each part is coming from. I’ll keep you posted.
Best regards,
Marcel
|
|
|
Hi,
I forward your case to our developers. I will keep you updated once I receive feedback.
Best Regards,
Marcel
|
|
|
Hi there,
thanks for your patience. We checked your theme code and in your case, you are using timber with an integration such as:
add_filter('timber/context', function ($context) {
$context['menu'] = \Timber\Timber::get_menu('primary');
$context['mega_menu'] = \Timber\Timber::get_menu('megamenu');
$context['footer'] = \Timber\Timber::get_menu('footer');
$context['secondary_footer'] = \Timber\Timber::get_menu('secondary_footer');
$context['options'] = get_fields('options');
$context['abs_path'] = __DIR__;
$context['cookies'] = $_COOKIE;
$context['global_pagination_mid_size'] = 3;
$context['is_mobile'] = wp_is_mobile();
$context['languages'] = apply_filters('wpml_active_languages', NULL);
$context['current_language'] = apply_filters('wpml_current_language', NULL);
$context['is_within_hours'] = is_within_hours($context['options']['open_hour'], $context['options']['close_hour']);
$context['is_today_weekend'] = is_today_weekend();
$context['shop_url'] = get_permalink(wc_get_page_id('shop'));
$context['global_per_page'] = 24;
$context['equipment_with_hotspots_id'] = 'equipment-with-hotspots';
$context['instructions_id'] = 'instructions';
$context['dimensions_id'] = 'dimensions';
return $context;
});
That means the switcher integration is handled via PHP, so no changes are needed. Twig code within your template is not affected by our update — unless you’ve used our Twig template inside short codes, which is not the case based on the code above.
Best Regards,
Marcel
|
|
|
Thank you, let's hope this is the case 🙂
|