tweaks to wp-json.php to get it to work as part of core