> For the complete documentation index, see [llms.txt](https://developers.weglot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.weglot.com/wordpress/helpers-functions-1/weglot_replace_link.md).

# weglot\_replace\_link

This filter allow you to modifiy the dom after the link has benne replaced.

This filter lets you modify the DOM while Weglot replaces links. It receives the DOM string being processed and must return it.

```php
add_filter( 'weglot_replace_link', 'custom_weglot_replace_link' );
function custom_weglot_replace_link( $dom ) {
    // Modify $dom here.
    return $dom;
}
```
