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

weglot_exclude_urls

This filter allow you to modifiy the list of your excluded url.

The filter receives the list of excluded URLs and must return it. Each entry is an array: a Weglot\Util\Regex matched against the URL path, then the excluded languages (null for all languages).

add_filter( 'weglot_exclude_urls', 'custom_weglot_exclude_urls' );
function custom_weglot_exclude_urls( $exclude_urls ) {
    $exclude_urls[] = array( new \Weglot\Util\Regex( \Weglot\Util\Regex\RegexEnum::CONTAIN, '/members/' ), null );
    return $exclude_urls;
}

Last updated