Skip to content

A classic WP Plugin that has a custom table, 2 shortcodes and 2 REST API endpoints to handle the data.

Notifications You must be signed in to change notification settings

leomuniz/classic-wp-plugin

Repository files navigation

classic-wp-plugin

A classic WordPress plugin with custom table, shortcodes to insert and retrieve data and public REST API endpoints.

The plugin creates the {prefix}_classic_wp_plugin table, 2 shortcodes to handle the data into the table and 2 REST API endpoints.

Shortcodes

  • [classic_wp_display_form] - Display a form to input data in the custom table.
  • [classic_wp_display_list] - Display the up to the last 10 submitted reviews and a box to search for reviews and filter the table.

Public REST API Endpoints

[GET] /wp-json/review/v1/get

Get reviews from the custom table.

Possible params:

page (int) => default = 0
per_page (int) => default = 10 reviews per page
q (string) => search query

[POST] /wp-json/review/v1/add

Add a new review on the custom table.

POST Data:

name (string)
email (string - email)
rating (int)
comment (string)

Screenshots

Insert form

image

View entries and search

image image

About

A classic WP Plugin that has a custom table, 2 shortcodes and 2 REST API endpoints to handle the data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published