Web design and development for companies and individuals in the Czech Republic
+420 608 713 199

WordPress Adds Slashes to $_POST (solved)

WordPress since version 3.0 basically runs magic_quotes on $_POST, $_GET, $_REQUEST, and $_COOKIE (adds backslashes to $_POST and other mentioned super-globals), even though PHP has deprecated such behavior. Here is a small snippet to solve this issue:

function ap_get_normal_globals()
    return array(
        'get' => stripslashes_deep($_GET),
        'post' => stripslashes_deep($_POST),
        'cookie' => stripslashes_deep($_COOKIE),
        'request' => stripslashes_deep($_REQUEST),
Interested in our services?
Hire Us