Link Manipulation


I am looking for a plugin that can manipulate links in posts before they are rendered. I.e. the links entered by the authors are not to be changed, just what is displayed to visitors. Such that if the plugin is disabled or uninstalled the original links, exactly as the authors entered, would be rendered.

Regarding the manipulate functionality the plugin should be able to be configured to do stuff like this:

  • If the link is to the domain, add the query string parameter aid=12345678.
  • If the link has a query string parameter of the kind bid=*, remove it.
  • If the link is to the domain and path, remove all query string parameters.
  • If the link is to the domain, link instead to . With an additional query string did=[ENCODEDORIGLINK] ; where [ENCODEDORIGLINK] is the whole original link url uncoded.

One should be able to change the configuration easily. For example:

  • From now on links to should instead have the path part /12345678/ added right after the domain and port part of the url.

It would of course be an added bonus if these could be given a priority and chained. For Example, remove all query string parameters, add a parameter, now url encode the link and add that as a query string parameter to this other link.

I have only been able to find a couple of solutions that use code. This answer is what I would have used if the end users were programmers Alas, they are not.

, varsbill 4 months 0 Answers 61 views 0

Leave an answer