Proof of concept WordPress plugin to submit posts from the front end using the WordPress REST API and Vue.js
http://jimfrenette.com/2017/01/post-from-front-end-wp-api-vuejs-part2/
https://www.youtube.com/watch?v=aRHX-Xpy67E&t
Three different web request handler examples are included:
The jquery-p02 tag contains the following additions:
- List posts submitted by the current user
- Select from the list to edit a post
- Delete a post from the list
The jquery-p01 tag was cut from master and updated to replace vue-resource with the ajax method available in the external jQuery library loaded by default in WordPress.
The axios-p01 tag was cut from master and updated with axios and vue-axios to replace vue-resource.
The vue-resource-p01 tag was the initial version, created in master using the vue-resource plugin for Vue.js to provide services for making web requests and handle responses using a XMLHttpRequest.
# install dependencies
npm install
# build for production with minification
npm run build
For detailed explanation on how things work, consult the docs for vue-loader.