update functions.php for wp.com json rest api