> 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_url_object.md).

# weglot\_url\_object

Advanced. Lets you replace the `Weglot\Util\Url` object Weglot uses for the current request.

```php
add_filter( 'weglot_url_object', 'custom_weglot_url_object' );
function custom_weglot_url_object( $weglot_url ) {
    return $weglot_url;
}
```
