Skip to content

Commit 78d76d1

Browse files
Regenerate reference for WP 5.5
1 parent 489dcd0 commit 78d76d1

File tree

17 files changed

+1217
-75
lines changed

17 files changed

+1217
-75
lines changed

bin/manifest.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,21 @@
7474
"parent": "extending-the-rest-api",
7575
"markdown_source": "https://github.com/WP-API/docs/blob/master/extending-the-rest-api/schema.md"
7676
},
77+
"reference/block-directory-items": {
78+
"slug": "block-directory-items",
79+
"parent": "reference",
80+
"markdown_source": "https://github.com/WP-API/docs/blob/master/reference/block-directory-items.md"
81+
},
7782
"reference/block-revisions": {
7883
"slug": "block-revisions",
7984
"parent": "reference",
8085
"markdown_source": "https://github.com/WP-API/docs/blob/master/reference/block-revisions.md"
8186
},
87+
"reference/block-types": {
88+
"slug": "block-types",
89+
"parent": "reference",
90+
"markdown_source": "https://github.com/WP-API/docs/blob/master/reference/block-types.md"
91+
},
8292
"reference/blocks": {
8393
"slug": "blocks",
8494
"parent": "reference",
@@ -109,6 +119,11 @@
109119
"parent": "reference",
110120
"markdown_source": "https://github.com/WP-API/docs/blob/master/reference/pages.md"
111121
},
122+
"reference/plugins": {
123+
"slug": "plugins",
124+
"parent": "reference",
125+
"markdown_source": "https://github.com/WP-API/docs/blob/master/reference/plugins.md"
126+
},
112127
"reference/post-revisions": {
113128
"slug": "post-revisions",
114129
"parent": "reference",

bin/templates/reference-parts/schema.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h2>Schema</h2>
66
<td>
77
<code>{{ key }}</code><br />
88
<span class="type">
9-
{{ property.type }}{% if property.format %},
9+
{{ property.type | join(' or ') }}{% if property.format %},
1010
{% if property.format == 'date-time' %}
1111
datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
1212
{% elseif property.format == 'uri' %}

composer.lock

Lines changed: 27 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference/block-directory-items.md

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
---
2+
---
3+
4+
# Block Directory Items
5+
6+
<section class="route">
7+
<div class="primary">
8+
<h2>Schema</h2>
9+
<p>The schema defines all the fields that exist within a block directory item record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.</p>
10+
<table class="attributes">
11+
<tr id="schema-name">
12+
<td>
13+
<code>name</code><br />
14+
<span class="type">
15+
string </span>
16+
</td>
17+
<td>
18+
<p>The block name, in namespace/block-name format.</p>
19+
<p class="context">Context: <code>view</code></p>
20+
</td>
21+
</tr>
22+
<tr id="schema-title">
23+
<td>
24+
<code>title</code><br />
25+
<span class="type">
26+
string </span>
27+
</td>
28+
<td>
29+
<p>The block title, in human readable format.</p>
30+
<p class="context">Context: <code>view</code></p>
31+
</td>
32+
</tr>
33+
<tr id="schema-description">
34+
<td>
35+
<code>description</code><br />
36+
<span class="type">
37+
string </span>
38+
</td>
39+
<td>
40+
<p>A short description of the block, in human readable format.</p>
41+
<p class="context">Context: <code>view</code></p>
42+
</td>
43+
</tr>
44+
<tr id="schema-id">
45+
<td>
46+
<code>id</code><br />
47+
<span class="type">
48+
string </span>
49+
</td>
50+
<td>
51+
<p>The block slug.</p>
52+
<p class="context">Context: <code>view</code></p>
53+
</td>
54+
</tr>
55+
<tr id="schema-rating">
56+
<td>
57+
<code>rating</code><br />
58+
<span class="type">
59+
integer </span>
60+
</td>
61+
<td>
62+
<p>The star rating of the block.</p>
63+
<p class="context">Context: <code>view</code></p>
64+
</td>
65+
</tr>
66+
<tr id="schema-rating_count">
67+
<td>
68+
<code>rating_count</code><br />
69+
<span class="type">
70+
integer </span>
71+
</td>
72+
<td>
73+
<p>The number of ratings.</p>
74+
<p class="context">Context: <code>view</code></p>
75+
</td>
76+
</tr>
77+
<tr id="schema-active_installs">
78+
<td>
79+
<code>active_installs</code><br />
80+
<span class="type">
81+
string </span>
82+
</td>
83+
<td>
84+
<p>The number sites that have activated this block.</p>
85+
<p class="context">Context: <code>view</code></p>
86+
</td>
87+
</tr>
88+
<tr id="schema-author_block_rating">
89+
<td>
90+
<code>author_block_rating</code><br />
91+
<span class="type">
92+
integer </span>
93+
</td>
94+
<td>
95+
<p>The average rating of blocks published by the same author.</p>
96+
<p class="context">Context: <code>view</code></p>
97+
</td>
98+
</tr>
99+
<tr id="schema-author_block_count">
100+
<td>
101+
<code>author_block_count</code><br />
102+
<span class="type">
103+
integer </span>
104+
</td>
105+
<td>
106+
<p>The number of blocks published by the same author.</p>
107+
<p class="context">Context: <code>view</code></p>
108+
</td>
109+
</tr>
110+
<tr id="schema-author">
111+
<td>
112+
<code>author</code><br />
113+
<span class="type">
114+
string </span>
115+
</td>
116+
<td>
117+
<p>The WordPress.org username of the block author.</p>
118+
<p class="context">Context: <code>view</code></p>
119+
</td>
120+
</tr>
121+
<tr id="schema-icon">
122+
<td>
123+
<code>icon</code><br />
124+
<span class="type">
125+
string,
126+
uri
127+
</span>
128+
</td>
129+
<td>
130+
<p>The block icon.</p>
131+
<p class="context">Context: <code>view</code></p>
132+
</td>
133+
</tr>
134+
<tr id="schema-last_updated">
135+
<td>
136+
<code>last_updated</code><br />
137+
<span class="type">
138+
string,
139+
datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
140+
</span>
141+
</td>
142+
<td>
143+
<p>The date when the block was last updated, in fuzzy human readable format.</p>
144+
<p class="context">Context: <code>view</code></p>
145+
</td>
146+
</tr>
147+
<tr id="schema-humanized_updated">
148+
<td>
149+
<code>humanized_updated</code><br />
150+
<span class="type">
151+
string </span>
152+
</td>
153+
<td>
154+
<p>The date when the block was last updated, in fuzzy human readable format.</p>
155+
<p class="context">Context: <code>view</code></p>
156+
</td>
157+
</tr>
158+
</table>
159+
160+
</div>
161+
</section>
162+
163+
<div><section class="route">
164+
<div class="primary">
165+
<h2>List Block Directory Items</h2>
166+
<p>Query this endpoint to retrieve a collection of block directory items. The response you receive can be controlled and filtered using the URL query parameters below.</p>
167+
168+
<h3>Definition</h3>
169+
170+
<code>GET /wp/v2/block-directory/search</code>
171+
172+
<h3>Example Request</h3>
173+
174+
<code>$ curl https://example.com/wp-json/wp/v2/block-directory/search</code>
175+
</div>
176+
<div class="secondary">
177+
<h3>Arguments</h3>
178+
<table class="arguments">
179+
<tr>
180+
<td>
181+
<code>context</code><br />
182+
</td>
183+
<td>
184+
<p>Scope under which the request is made; determines fields present in response.</p>
185+
<p class="default">
186+
Default: <code>view</code>
187+
</p>
188+
<p>One of: <code>view</code></p>
189+
</td>
190+
</tr>
191+
<tr>
192+
<td>
193+
<code>page</code><br />
194+
</td>
195+
<td>
196+
<p>Current page of the collection.</p>
197+
<p class="default">
198+
Default: <code>1</code>
199+
</p>
200+
</td>
201+
</tr>
202+
<tr>
203+
<td>
204+
<code>per_page</code><br />
205+
</td>
206+
<td>
207+
<p>Maximum number of items to be returned in result set.</p>
208+
<p class="default">
209+
Default: <code>10</code>
210+
</p>
211+
</td>
212+
</tr>
213+
<tr>
214+
<td>
215+
<code>term</code><br />
216+
</td>
217+
<td>
218+
<p>Limit result set to blocks matching the search term.</p>
219+
<p class="required">
220+
Required: 1
221+
</p>
222+
</td>
223+
</tr>
224+
</table>
225+
226+
</div>
227+
</section>
228+
</div>

0 commit comments

Comments
 (0)