No description, website, or topics provided.
PHP JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
inc
.codeclimate.yml
.editorconfig
.gitignore
README.md
composer.json
deploy.sh
gulpfile.js
license.txt
package.json
readme.txt
wp-js-plugin.php

README.md

Code Climate Latest Stable Version License

WP-JS Plugin

This plugin provides endpoints for the WordPress REST API for any posts, terms, options and more with detailed controls about API content.

It is being specifically developed to act as a server for apps using the JavaScript library WP-JS which makes it easy to create modern apps with WordPress as a backend. However, the plugin can be used on its own as well to simply provide you with API endpoints for your custom needs.

Features

The plugin adds endpoints for:

  • posts of any post type including meta data
  • terms of any taxonomy including meta data
  • users including meta data
  • options
  • theme mods
  • sites (for multisite)

The data for all endpoints is heavily customizable through an admin interface, for example you can select which post types should be available and which meta data should be displayed for each post type.

Note that all endpoints except for the users endpoint are read-only since the plugin is designed for frontend-facing usage only. The user endpoint is an exception so that an authenticated user can modify his own data.

Installation and Setup

You can download the latest version from the WordPress plugin repository.

If you like, you can also use it as a must-use plugin by moving the directory into the wp-content/mu-plugins directory and then moving the main file wp-js-plugin.php from the plugin's directory to the must-use plugins root directory (i.e. from wp-content/mu-plugins/wp-js-plugin to wp-content/mu-plugins). Note that, while must-use plugins have the advantage that they cannot be disabled from the admin area, they cannot be updated through WordPress, so you're recommended to keep them up to date manually.

Once the plugin is activated, you will see a new submenu item "WP-JS API" under Settings through which you can manage the API endpoints.

Contributions and Bugs

If you have ideas on how to improve the plugin or if you discover a bug, I would appreciate if you shared them with me, right here on Github. In either case, please open a new issue here!

You can also contribute to the plugin by translating it. Simply visit translate.wordpress.org to get started.