Hy, I created a WordPress Theme using a lot of custom options. While saving the options in the backend amongst other things I'm adding backslashes before characters that need to be escaped. Such as ' and ".
Now I need to remove them before displaying them on the frontend. The easiest way would be stripslashes(get_option($key))
. But that would mean I'd have to go though the whole Theme and change all get_option()
manually.
Is there a way to add a filter to the get_option()
?
If not, is there a way to achieve this with find/replace (I'm using Sublime Text 3 which allows regex)?