wpml_ls_enable_ajax_navigation
- Type
- filter
- Category
- Miscellaneous
- WPML Version
- 4.4.0
Description
This filter allows you to update the language switcher when a visitor navigates on the front-end and the theme or plugin is refreshing the page with AJAX (the language switcher links will follow the navigation).
Note: This feature will work only if the AJAX response receives the full page content, so that WPML can extract and replace the language switchers.
Arguments
- $isEnabled
- (boolean) Enable or disable AJAX navigation. Default:
false.
Example usage
// The AJAX navigation will always be enabled add_filter( 'wpml_ls_enable_ajax_navigation', '__return_true' );
Related hooks
icl_ls_languages, wpml_sync_custom_field_copied_value, wpml_element_type, wpml_setting, wpml_sub_setting, wpml_exclude_post_from_auto_translate, wpml_forms_config_ninja-forms, wpml_forms_config_wpforms, wpml_tf_feedback_open_link, wpml_translatable_user_meta_fields