Proxify Url

Since the version 4.2 of Weglot plugin, you have a filter to proxify an url

If you want to proxify the following url : https://my.ressource.io/ you have to transform the url like this :

proxy.weglot.com/API_KEY/LANGUAGE_FROM/LANGAUAGE_TO/my.ressource.io to do that you can use this filter

// Add this using plugin "Code Snippet" or directly in functions.php
function proxify_callback( $url_to_proxify ) {
    $url_to_proxify = [];
    $url_to_proxify[] = 'https://my.ressource.io/';
    return $url_to_proxify;
}
add_filter( 'weglot_proxify_urls', 'proxify_callback' );

NB : you can pass many url into the array

Last updated