Title: Hook for Rewrites_Redirection class
Last modified: July 4, 2023

---

# Hook for Rewrites_Redirection class

 *  Resolved [heimer79](https://wordpress.org/support/users/heimer79/)
 * (@heimer79)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/hook-for-rewrites_redirection-class/)
 * Hey dev team,
 * We have installed the plugin and it works perfectly for us, but we need to make
   an adjustment in the plugin in the Rewrites_Redirection class located in Models
   so that it passes us the value for a language parameter, that is ?lang=en and
   similar from the cloaked url to the destination url, that is for example:
 * I need it to be like this e.g. [https://www.google.com/?lang=es](https://www.google.com/?lang=es).
   That is, ‘es’ is the value that the key ‘lang’ should have, the destination url
   must have any value or values that I pass, that is, it can be any like these:
 * [http://thirsty-links.local/go/test/?en](http://thirsty-links.local/go/test/?en)
   
   [http://thirsty-links.local/go/test/?es](http://thirsty-links.local/go/test/?es)
 * [http://thirsty-links.local/go/test/?fr](http://thirsty-links.local/go/test/?fr)
   
   and later goes to:
 * [https://www.google.com/?lang=](https://www.google.com/?lang=es)en
 * [https://www.google.com/?lang=](https://www.google.com/?lang=es)es
 * [https://www.google.com/?lang=](https://www.google.com/?lang=es)fr
 * So in the link editing field I would put this destination URL without the language
   value [https://www.google.com/?lang=](https://www.google.com/?lang=) expecting
   the value.
 * I already managed to adjust it by adjusting the code of the Rewrites_Redirection
   class, but I tried to extend the functionality without having to modify the plugin
   code but I can’t because the class is private, do you have a hook to modify this
   behavior from the outside? either a plugin, theme?
 * Thank you
    -  This topic was modified 2 years, 11 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
    -  This topic was modified 2 years, 11 months ago by [heimer79](https://wordpress.org/support/users/heimer79/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Caseproof LLC](https://wordpress.org/support/users/caseproof/)
 * (@caseproof)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/hook-for-rewrites_redirection-class/#post-16873789)
 * Hi,
 * We already use this hook:
 * ta_filter_redirect_url
 * $redirect_url  = apply_filters( ‘ta_filter_redirect_url’ , $redirect_url , $thirstylink,”);
 *  It’s line 236 of Rewrites_Redirection.php

Viewing 1 replies (of 1 total)

The topic ‘Hook for Rewrites_Redirection class’ is closed to new replies.

 * ![](https://ps.w.org/thirstyaffiliates/assets/icon-256x256.jpg?rev=2686825)
 * [ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin](https://wordpress.org/plugins/thirstyaffiliates/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/thirstyaffiliates/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/thirstyaffiliates/)
 * [Active Topics](https://wordpress.org/support/plugin/thirstyaffiliates/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/thirstyaffiliates/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/thirstyaffiliates/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Caseproof LLC](https://wordpress.org/support/users/caseproof/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/hook-for-rewrites_redirection-class/#post-16873789)
 * Status: resolved