Giter VIP home page Giter VIP logo

markdown-sync's Introduction

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+

markdown-sync's People

Contributors

joehoyle avatar kadamwhite avatar mikelittle avatar rmccue avatar roborourke avatar tcrsavage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

markdown-sync's Issues

Support for meta attributes in markdown documents

One thing I'd like to be able to do with the WP-CLI command docs (wp-cli/wp-cli#4244) is to have navigation links to the command's GitHub repo and "Create a new issue"

To do this, I'll need to be able to deliver some metadata in the markdown document that gets appropriately processed by WordPress.

Jekyll has some convention of using YAML at the top of the document:

image

https://raw.githubusercontent.com/wp-cli/wp-cli.github.com/master/_posts/2011-11-06-version-0.3.md

What do you think about taking a similar approach?

License?

What is the license of this code? It appears that it might be intended to be "GPL2+" according to the composer.json file, but there is no LICENSE file or headers in any source file. It appears this code is not allowed to be used anywhere.

Status of this repository, possible changes

I've implemented this on https://docs.classicpress.net.

It's working well, and I've made some changes that could be incorporated upstream. However it looks like the version of this code being used on wordpress.org is different / outdated so I thought I'd check on whether this is still being maintained first, and if there is interest in one or more of these changes I can write them up into PRs:

  • Improved debugging for what happens when importing a manifest file: ClassicPress/site-docs@15a8c75, ClassicPress/site-docs@d083b83
  • Disable editing content, title, and slug in wp-admin (classic editor only): ClassicPress/site-docs@5c8810d
  • Expose the protected function Editor#get_markdown_edit_link publicly so that themes can implement their own front-end edit links. This will cause a back compat issue if the visibility is changed, but a new method could be added instead.
  • Do not require jetpack_require_lib() to exist on the site, allow including and manually loading the required Jetpack code instead: ClassicPress/site-docs@eecfdb7
  • Improved debug messages for what happens when importing content: ClassicPress/site-docs@9e25b76
  • Create a new method Importer#is_markdown_post that can be overridden to allow more fine-grained logic for whether a post should be managed by the Markdown sync system.

If this repository isn't being actively maintained, then at least this can serve as a reference implementation for others. More information about our setup is here: https://github.com/ClassicPress/site-docs/tree/master/wp-content/mu-plugins/markdown-sync

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.