Skip to content

Commit

Permalink
Document rename wp-json to api update
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed May 5, 2024
1 parent ef888cf commit f9472e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ WordPlate is a boilerplate for WordPress, built with Composer and designed with
- [Plugins](#plugins)
- [Vite.js](#vitejs)
- [Mail](#mail)
- [API](#api)
- [FAQ](#faq)
- [Upgrade Guide](#upgrade-guide)
- [Acknowledgements](#acknowledgements)
Expand Down Expand Up @@ -203,6 +204,14 @@ MAIL_FROM_NAME="Example"

If you're using a local email service like [Mailpit](https://github.com/axllent/mailpit), you need to disable encryption by setting the `MAIL_ENCRYPTION` environment variable to `null`.

## API

WordPlate automagically renames API routes from `/wp-json` to `/api`, resulting in cleaner URLs. This feature can be disabled by removing the following line from the `functions.php` file:

```diff
-add_filter('rest_url_prefix', fn() => 'api');
```

## FAQ

<details>
Expand Down

0 comments on commit f9472e2

Please sign in to comment.