Skip to main content
8 events
when toggle format what by license comment
Jan 17, 2017 at 7:43 comment added ojrask Fetch API is as pure as can be, it is implemented by browsers (caniuse.com/#search=fetch) instead of having to rely on jQuery or other libraries. ;)
Jan 16, 2017 at 17:37 comment added T.Todua @ojrask ok, good if solved. ( if you did pure(correct) AJAX call, it could be solved too.)
Jan 16, 2017 at 13:32 comment added ojrask Haha, you pointed me to the right direction! The fetch call must manually be set to send over cookies. Enabled that and the thing seems to work. I need to do some more testing on it. Many thanks!
Jan 16, 2017 at 13:25 comment added ojrask fetch is a Fetch API call (which I have additionally polyfilled using whatwg-fetch): developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Jan 16, 2017 at 13:12 comment added T.Todua note, you should use AJAX request in this manner: codex.wordpress.org/… you'b better show the source of FETCH function in your post. Or do a pure AJAX request like in that example.
Jan 16, 2017 at 13:10 comment added ojrask Changing to GET changes nothing.
Jan 16, 2017 at 13:07 comment added ojrask I'll try changing to a GET request if that changes anything. The generated nonce is supplied using wp_localize_script but I left that out for a leaner example code.
Jan 16, 2017 at 12:58 history answered T.Todua CC BY-SA 3.0