Best Practice for PHP

That’s question is only relevant, because WordPress use a mix from a coding language and layout language. If you would use a template language, syntax, than is this topic not relevant. But to your question. If you use your example source for a Theme, much more layout language like html, then I prefer the first … Read more

With “magic quotes” disabled, why does PHP/WordPress continue to auto-escape my POST data?

I think I found it. Problem (bug): http://core.trac.wordpress.org/ticket/18322 Solution: http://codex.wordpress.org/Function_Reference/stripslashes_deep Note: As suggested by @Alexandar O’Mara, you might want to reconsider overwriting the superglobals like this. If it’s appropriate for your situation, for example, you might just “strip locally” using an alternative like $post = array_map(‘stripslashes_deep’, $_POST); Also see @quickshiftin’s excellent answer.