I use WordPress to do web design. I’m gradually learning to manipulate the php files. I’m looking to create a must-use plugin I can add that will first test what theme is loaded, then, if it’s a certain theme, append all links on the page with “?mobile”. The idea is use a particular link containing “?mobile” that will (via a theme switcher plugin) tell the website to load a certain theme. Then, the must-use plugin would change all links from there, on.
I know how to check for the theme, I’m already doing that in other parts of the site. I just don’t what code to write to alter all links present on the page, or if that’s even possible.