JSON and Wordpress API
JSON and Wordpress API
toplisek
Posts: 26Questions: 5Answers: 0
I try to link WordPress plugin installation and DataTables table. Is there paid (ready-made) plugin code to manage connection WordPress JSON and DataTables application like Laravel?
This question has an accepted answers - jump to answer
Answers
Does this Datatables with Wordpress blog help?
Kevin
I see a link.
I am asking using a code. As I understand paid package supports API and a custom plugin can connect WordPress and pushes JSON value to the DataTables. Is there an example which supports API and Data Tables?
The DataTables JavaScript library has its own licensing (open source, but also paid licenses with support). I do not see PHP code for DataTables JavaScript library and an example:
DataTables makes an Ajax response to the server for JSON data and the data that it received back was as a valid JSON.
I see the ability to read abstract data formats like this is a new feature of DataTables 1.8:
https://datatables.net/blog/2011-05-01
Demo: https://datatables.net/beta/1.8/examples/server_side/object_data.html
So, is there any PHP code example to connect a plugin and receive a data lik:/?json=get_recent_posts&dev=1&post_type=videos
Anything that does not meet this criterion is invalid JSON, and will throw an error in DataTables where it expects JSON.
Should we use JSON just for licenses and connection validation due to security and settings for the WordPress plugin will be used only for a license value?
There isn't a paid package for integration of DataTables into WordPress by me (the author of DataTables), but there might be one by someone else I don't know.
As long as you can make an Ajax request to get JSON data, then DataTables will be able to read it. What PHP you use to generate the JSON is up to you. We do provide the Editor PHP libraries which can read and write to a database, but that isn't explicitly for WordPress.
Allan