[wp-trac] [WordPress Trac] #45220: register_rest_field doesn't work

WordPress Trac noreply at wordpress.org
Mon Oct 29 15:49:04 UTC 2018


#45220: register_rest_field doesn't work
-------------------------------+------------------------------
 Reporter:  Dudo               |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  REST API           |     Version:  5.0
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by Dudo):

 nope, the js part is just this


 {{{
     fetch('http://192.168.33.10/plugin_development/wp-
 json/wp/v2/posts/3569').then(response => {
         return response.json();
     }).then(data => {
         // Work with JSON data here
         console.log(data);
     }).catch(err => {
         // Do something for an error here
     });
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45220#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list