header() command breaks all themes
-
The
header('Content-Type: application/json');
command is executed regardless of whether “?json” is present in the query string, meaning that ALL rendered content is served as type JSON. This breaks every theme.At minimum, this plugin should be updated so that the “header()” command is wrapped in a conditional as well:
function add_header_xua() { if(isset($_REQUEST['json'])) { header('Content-Type: application/json'); } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘header() command breaks all themes’ is closed to new replies.