Just another HTML Table Plugin
In this Plugin has custom endpoint, if the user visit to this custom endpoint. The Plugin will call to an HTTP Request to REST API endpoint. The API is available at https://jsonplaceholder.typicode.com/ and the endpoint to call is /users. Plugin receives an JSON Response and parse the JSON response. It will display HTML Table with user’s information and display in table with ID, Name, Username. User click on Detail and see the further detail. Ajax will send and receive data asynchronously and call to a function to get an information of user.
Information
- Download the zip from the repository.
- Install and activate the plugin through the ‘plugin’ screen in WordPress.
- Add the shortcode to create HTML Table.
Custom endpoint for the users http://localhost/wordpress/wp-json/wl/v1/users
Get data using AJAX for user detail in Wp
- Pass Nonce & AJAX URL Via Localize Script
- Make Ajax call with Nonce and URL in JavaScript
- Hook PHP Ajax Function into WordPress Ajax Hooks
- Use JavaScript to Handle Ajax Response.
Shortcode to add plugin in post/page
- create new post or edit existed post
- add [ext_data]
- update or save changes of post.