JavaScript for WP-API project