Skip to content

Commit f2af510

Browse files
authored
Re-wrapped hyperlinks into explicit code blocks (#178)
* Cleaned up formatting in paragraphs and inline code * Re-wrapped code samples - hyperlinks inside backticks break formatting
1 parent dbb397e commit f2af510

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

key-concepts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ In this page we'll break down some of the key concepts and terms associated with
66

77
In the context of the WordPress REST API a **route** is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an **endpoint**.
88

9-
As an example, if we make a `GET` request to the URI `http://oursite.com/wp-json/` we are returned a JSON response showing what routes are available, and what endpoints are available within each route.
9+
As an example, if we make a `GET` request to the URI <code>http://oursite.com/wp-json/</code> we are returned a JSON response showing what routes are available, and what endpoints are available within each route.
1010

1111
`/wp-json/` is a route, and when that route receives a `GET` request then that request is handled by the endpoint which displays what is known as the index for the WordPress REST API.
1212

1313
The route `wp-json/wp/v2/posts` by contrast has a `GET` endpoint which returns a list of posts, but also a `POST` endpoint which accepts authenticated requests to create new posts.
1414

1515
We will learn how to register our own routes and endpoints in the following sections.
1616

17-
[info]If you are using [non-pretty permalinks](https://wordpress.org/support/article/using-permalinks/), you should pass the REST API route as a query string parameter. The route `http://oursite.com/wp-json/` in the example above would hence be `http://oursite.com/?rest_route=/`.[/info]
17+
[info]If you are using [non-pretty permalinks](https://wordpress.org/support/article/using-permalinks/), you should pass the REST API route as a query string parameter. The route <code>http://oursite.com/wp-json/</code> in the example above would hence be <code>http://oursite.com/?rest_route=/</code>.[/info]
1818

19-
If you get a `404` error when trying to access `http://oursite.com/wp-json/`, consider enabling pretty permalinks or try using the `rest_route` parameter instead.
19+
If you get a `404` error when trying to access <code>http://oursite.com/wp-json/</code>, consider enabling pretty permalinks or try using the `rest_route` parameter instead.
2020

2121
## Requests
2222

0 commit comments

Comments
 (0)