Download the PHP package kucrut/bridge without Composer
On this page you can find all versions of the php package kucrut/bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kucrut/bridge
More information about kucrut/bridge
Files in kucrut/bridge
Package bridge
Short Description Additional REST API endpoints and functionalities
License GPL-2.0
Homepage https://github.com/kucrut/wp-bridge
Informations about the package bridge
Bridge
This plugin was built to provide a bridge between WordPress and Minnie. It modifies the results of some WP API requests.
Requirements
- WordPress 4.5
- WP API 2.0-beta13
More bridges:
Endpoints
Info
Endpoint: /wp-json/bridge/v1/info
Results Modifications
To get a modified result, a "Client ID" must be registered first:
Then, every API request must include an X-Requested-With
header and the value set to the registered Client ID, in this case minnie
.
Terms
Home URL is stripped from term links.
Original Result
Modified Result
Posts
The result of requests to posts endpoints will have these modifications:
- Home URL is stripped from
link
,content.rendered
. title
gets a new item:from_content
. It's generated from post content and is useful in case the post doesn't have a title and you still want to display a generated title on the client app.date_formatted
andmodified_formatted
are added, so you don't need to format the post dates in the client app.- The value of
categories
,tags
andformats
is converted to WP_Term objects. - When post preview is requested (by setting the
preview
parameter to1
), the title and content will be replaced with the ones from the post's latest revision.
Original Result
Modified Result
Attachments
In additions to the modifications above, the result of requests to attachments/media will have these modifications:
parent_post
is added.
Modified Result
Comments
Original Result
Modified Result
Changelog
0.8.0
- Fix compatibility with WordPress 4.7
0.7.0
- Support custom taxonomies
0.6.0
- Add
/info
endpoint
0.5.0
- Live Preview
0.4.0
- Comments mods
0.3.0
- Strip
home_url()
from menu items' url.
0.2.1
- Add
lang
andhtml_dir
to index's response
0.2.0
- Remove Menus & Post Formats (now as standalone plugins)
0.1.0
- Initial