For the complete documentation index, see llms.txt. This page is also available as Markdown.

weglot_get_slugs_cache_duration

This filter allow you to change the duration of cache we store the slugs. By default is setting to 0.

Translated URL slugs are cached in a transient. By default the duration is 0 (no explicit expiration set on the transient). Use this filter to set a custom cache duration, in seconds.

add_filter( 'weglot_get_slugs_cache_duration', 'custom_weglot_get_slugs_cache_duration' );
function custom_weglot_get_slugs_cache_duration( $duration ) {
    return HOUR_IN_SECONDS;
}

Last updated