Skip to content

WP-API/docs

Folders and files

NameName
Last commit message
Last commit date
Nov 16, 2023
Sep 18, 2024
Aug 24, 2023
Aug 8, 2024
Feb 16, 2023
Mar 30, 2020
Dec 5, 2020
Apr 25, 2023
Apr 25, 2023
Mar 31, 2020
Oct 27, 2020
Apr 25, 2023
Aug 5, 2022
Mar 27, 2024
Feb 8, 2023
Jun 3, 2024
Mar 31, 2020

Repository files navigation

API Docs

This repo contains the source for documentation for the API on developer.wordpress.org (DevHub).

Adding/Removing Files

When creating new files, these must be added to the manifest. Run bin/generate-manifest.php to update this.

Removing files also requires regenerating the manifest. After deletion and sync with DevHub, the page also needs to be manually deleted from DevHub.

Refreshing the Templated API Reference

The reference section is created by parsing the output of a site's schema as retrieved from that site's REST API index route. The current method used to generate this approach is as follows:

  • Create a local WordPress environment (always use the current or Release Candidate version of WordPress) using the local environment tool of your choice.
  • Edit /etc/hosts to map the domain example.com to the IP of that WordPress instance, and ensure the site is configured to run at example.com.
  • Run composer install in this project's root directory to install dependencies.
  • Run composer run-script regenerate in this project's root directory to run the asset regeneration script.
  • Use git status and git diff to validate that the files were updated as expected.