WP-API

The WP REST API has been merged into WordPress core. Please do not create issues or send pull requests. Submit support requests to the forums or patches to Trac (see README below for links).

Github星跟蹤圖

WP REST API v2.0 (formerly known as WP-API)

Access your WordPress site's data through an easy-to-use HTTP REST API.

Development is no longer taking place in this repository.

  • For support requests, use the
    WordPress forums.
  • For bugs and patches, use
    WordPress core Trac.
    Be sure to include full details and reproduction steps about the issue you are
    experiencing, and ideally a patch with unit tests.

The "develop" branch is version 2 which represents the last "beta" versions of the
plugin.
Read the documentation
to introduce yourself to endpoints, internal patterns, and implementation details.

The "master" branch represents the legacy version of the REST API.

About

WordPress is moving towards becoming a fully-fledged application framework, and
we need new APIs. This project was born to create an easy-to-use,
easy-to-understand and well-tested framework for creating these APIs, plus
creating APIs for core.

This plugin provides an easy to use REST API, available via HTTP. Grab your
site's data in simple JSON format, including users, posts, taxonomies and more.
Retrieving or updating data is as simple as sending a HTTP request.

Want to get your site's posts? Simply send a GET request to /wp-json/wp/v2/posts.
Update user with ID 4? Send a PUT request to /wp-json/wp/v2/users/4. Get the page
with slug "about-me"? GET /wp-json/wp/v2/pages?slug=about-me. Get all posts with
the search term "awesome"? GET /wp-json/wp/v2/posts?search=awesome. It's that easy.

The WordPress REST API exposes a simple yet easy interface to WP Query, the posts
API, post meta API, users API, revisions API and many more. Chances are, if you
can do it with WordPress, the API will let you do it.

The REST API also includes an easy-to-use JavaScript API based on Backbone models,
allowing plugin and theme developers to get up and running without needing to
know anything about the details of getting connected.

Check out our documentation for information on what's available in the
API and how to use it. We've also got documentation on extending the API with
extra data for plugin and theme developers!

The API code in this plugin is currently integrated into core WordPress starting in
4.7.

Development is no longer taking place in this repository.

  • For support requests, use the
    WordPress forums.
  • For bugs and patches, use
    WordPress core Trac.
    Be sure to include full details and reproduction steps about the issue you are
    experiencing, and ideally a patch with unit tests.

Quick Setup

Want to test out the WP REST API? The easiest way is just to install a
recent version of WordPress
(4.7 or later).

Testing

You can also set up a development environment to work on the API code.

See the
instructions for running the WordPress PHPUnit test suite
to get started.

Issue Tracking

All tickets for the project are being tracked on
WordPress core Trac.

Some previous issues can be found on the
issue tracker for this repository;
however, now that development of the API has moved to core Trac, new issues
should not be filed here.

Contributing

Want to get involved? Check out Contributing.md for details on
submitting fixes and new features.

Security

We take the security of the API extremely seriously. If you think you've found
a security issue with the API (whether information disclosure, privilege
escalation, or another issue), we'd appreciate responsible disclosure as soon
as possible.

To report a security issue, you can either email security[at]wordpress.org,
or file an issue on HackerOne. We will attempt to give an initial
response to security issues within 48 hours at most, however keep in mind that
the team is distributed across various timezones, and delays may occur as we
discuss internally.

(Please note: For testing, you should install a copy of the project and
WordPress on your own server. Do not test on servers you do not own.)

License

GPLv2+

主要指標

概覽
名稱與所有者WP-API/WP-API
主編程語言PHP
編程語言Shell (語言數: 3)
平台
許可證GNU General Public License v2.0
所有者活动
創建於2013-06-01 10:52:43
推送於2017-08-31 06:06:00
最后一次提交2016-01-11 08:55:23
發布數56
最新版本名稱2.0-beta15 (發布於 )
第一版名稱0.1 (發布於 2013-06-30 15:38:17)
用户参与
星數3.9k
關注者數226
派生數654
提交數4.3k
已啟用問題?
問題數1758
打開的問題數49
拉請求數984
打開的拉請求數3
關閉的拉請求數285
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?