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

weglot_is_eligible_url

Lets you force whether a URL counts as translatable for the language switcher, the hreflang tags and the weglot_is_eligible_url() helper. The filter receives the current decision and the URL object.

add_filter( 'weglot_is_eligible_url', 'custom_weglot_is_eligible_url', 10, 2 );
function custom_weglot_is_eligible_url( $eligible, $weglot_url ) {
    // return true or false to force eligibility
    return $eligible;
}

Last updated