Skip to content

Commit f096ebd

Browse files
authored
Merge pull request #165 from Scotchester/schema-field-type
Move schema field type to right column
2 parents ec65287 + b612ade commit f096ebd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1958
-1623
lines changed

bin/templates/reference-parts/schema.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ <h2>Schema</h2>
44
{% for key, property in schema.properties %}
55
<tr id="schema-{{ key }}">
66
<td>
7-
<code>{{ key }}</code><br />
8-
<span class="type">
9-
{{ property.type | join(' or ') }}{% if property.format %},
10-
{% if property.format == 'date-time' %}
11-
datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
12-
{% elseif property.format == 'uri' %}
13-
uri
14-
{% else %}
15-
{{ property.format }}
16-
{% endif %}{% endif %}
17-
</span>
7+
<code>{{ key }}</code>
188
</td>
199
<td>
2010
<p>{{ property.description }}</p>
11+
<p class="type">
12+
JSON data type: {{ property.type | join(' or ') }}{% if property.format %},
13+
{% if property.format == 'date-time' %}
14+
Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
15+
{% elseif property.format == 'uri' %}
16+
Format: uri
17+
{% else %}
18+
Format: {{ property.format }}
19+
{% endif %}{% endif %}
20+
</p>
2121
{% if property.readonly %}
2222
<p class="read-only">Read only</p>
2323
{% endif %}

reference/application-passwords.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,92 +10,92 @@
1010
<table class="attributes">
1111
<tr id="schema-uuid">
1212
<td>
13-
<code>uuid</code><br />
14-
<span class="type">
15-
string,
16-
uuid
17-
</span>
13+
<code>uuid</code>
1814
</td>
1915
<td>
2016
<p>The unique identifier for the application password.</p>
17+
<p class="type">
18+
JSON data type: string,
19+
Format: uuid
20+
</p>
2121
<p class="read-only">Read only</p>
2222
<p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p>
2323
</td>
2424
</tr>
2525
<tr id="schema-app_id">
2626
<td>
27-
<code>app_id</code><br />
28-
<span class="type">
29-
string,
30-
uuid
31-
</span>
27+
<code>app_id</code>
3228
</td>
3329
<td>
3430
<p>A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.</p>
31+
<p class="type">
32+
JSON data type: string,
33+
Format: uuid
34+
</p>
3535
<p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p>
3636
</td>
3737
</tr>
3838
<tr id="schema-name">
3939
<td>
40-
<code>name</code><br />
41-
<span class="type">
42-
string </span>
40+
<code>name</code>
4341
</td>
4442
<td>
4543
<p>The name of the application password.</p>
44+
<p class="type">
45+
JSON data type: string </p>
4646
<p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p>
4747
</td>
4848
</tr>
4949
<tr id="schema-password">
5050
<td>
51-
<code>password</code><br />
52-
<span class="type">
53-
string </span>
51+
<code>password</code>
5452
</td>
5553
<td>
5654
<p>The generated password. Only available after adding an application.</p>
55+
<p class="type">
56+
JSON data type: string </p>
5757
<p class="read-only">Read only</p>
5858
<p class="context">Context: <code>edit</code></p>
5959
</td>
6060
</tr>
6161
<tr id="schema-created">
6262
<td>
63-
<code>created</code><br />
64-
<span class="type">
65-
string,
66-
datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
67-
</span>
63+
<code>created</code>
6864
</td>
6965
<td>
7066
<p>The GMT date the application password was created.</p>
67+
<p class="type">
68+
JSON data type: string,
69+
Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
70+
</p>
7171
<p class="read-only">Read only</p>
7272
<p class="context">Context: <code>view</code>, <code>edit</code></p>
7373
</td>
7474
</tr>
7575
<tr id="schema-last_used">
7676
<td>
77-
<code>last_used</code><br />
78-
<span class="type">
79-
string or null,
80-
datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
81-
</span>
77+
<code>last_used</code>
8278
</td>
8379
<td>
8480
<p>The GMT date the application password was last used.</p>
81+
<p class="type">
82+
JSON data type: string or null,
83+
Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
84+
</p>
8585
<p class="read-only">Read only</p>
8686
<p class="context">Context: <code>view</code>, <code>edit</code></p>
8787
</td>
8888
</tr>
8989
<tr id="schema-last_ip">
9090
<td>
91-
<code>last_ip</code><br />
92-
<span class="type">
93-
string or null,
94-
ip
95-
</span>
91+
<code>last_ip</code>
9692
</td>
9793
<td>
9894
<p>The IP address the application password was last used by.</p>
95+
<p class="type">
96+
JSON data type: string or null,
97+
Format: ip
98+
</p>
9999
<p class="read-only">Read only</p>
100100
<p class="context">Context: <code>view</code>, <code>edit</code></p>
101101
</td>

reference/block-directory-items.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,148 +10,148 @@
1010
<table class="attributes">
1111
<tr id="schema-name">
1212
<td>
13-
<code>name</code><br />
14-
<span class="type">
15-
string </span>
13+
<code>name</code>
1614
</td>
1715
<td>
1816
<p>The block name, in namespace/block-name format.</p>
17+
<p class="type">
18+
JSON data type: string </p>
1919
<p class="context">Context: <code>view</code></p>
2020
</td>
2121
</tr>
2222
<tr id="schema-title">
2323
<td>
24-
<code>title</code><br />
25-
<span class="type">
26-
string </span>
24+
<code>title</code>
2725
</td>
2826
<td>
2927
<p>The block title, in human readable format.</p>
28+
<p class="type">
29+
JSON data type: string </p>
3030
<p class="context">Context: <code>view</code></p>
3131
</td>
3232
</tr>
3333
<tr id="schema-description">
3434
<td>
35-
<code>description</code><br />
36-
<span class="type">
37-
string </span>
35+
<code>description</code>
3836
</td>
3937
<td>
4038
<p>A short description of the block, in human readable format.</p>
39+
<p class="type">
40+
JSON data type: string </p>
4141
<p class="context">Context: <code>view</code></p>
4242
</td>
4343
</tr>
4444
<tr id="schema-id">
4545
<td>
46-
<code>id</code><br />
47-
<span class="type">
48-
string </span>
46+
<code>id</code>
4947
</td>
5048
<td>
5149
<p>The block slug.</p>
50+
<p class="type">
51+
JSON data type: string </p>
5252
<p class="context">Context: <code>view</code></p>
5353
</td>
5454
</tr>
5555
<tr id="schema-rating">
5656
<td>
57-
<code>rating</code><br />
58-
<span class="type">
59-
number </span>
57+
<code>rating</code>
6058
</td>
6159
<td>
6260
<p>The star rating of the block.</p>
61+
<p class="type">
62+
JSON data type: number </p>
6363
<p class="context">Context: <code>view</code></p>
6464
</td>
6565
</tr>
6666
<tr id="schema-rating_count">
6767
<td>
68-
<code>rating_count</code><br />
69-
<span class="type">
70-
integer </span>
68+
<code>rating_count</code>
7169
</td>
7270
<td>
7371
<p>The number of ratings.</p>
72+
<p class="type">
73+
JSON data type: integer </p>
7474
<p class="context">Context: <code>view</code></p>
7575
</td>
7676
</tr>
7777
<tr id="schema-active_installs">
7878
<td>
79-
<code>active_installs</code><br />
80-
<span class="type">
81-
integer </span>
79+
<code>active_installs</code>
8280
</td>
8381
<td>
8482
<p>The number sites that have activated this block.</p>
83+
<p class="type">
84+
JSON data type: integer </p>
8585
<p class="context">Context: <code>view</code></p>
8686
</td>
8787
</tr>
8888
<tr id="schema-author_block_rating">
8989
<td>
90-
<code>author_block_rating</code><br />
91-
<span class="type">
92-
number </span>
90+
<code>author_block_rating</code>
9391
</td>
9492
<td>
9593
<p>The average rating of blocks published by the same author.</p>
94+
<p class="type">
95+
JSON data type: number </p>
9696
<p class="context">Context: <code>view</code></p>
9797
</td>
9898
</tr>
9999
<tr id="schema-author_block_count">
100100
<td>
101-
<code>author_block_count</code><br />
102-
<span class="type">
103-
integer </span>
101+
<code>author_block_count</code>
104102
</td>
105103
<td>
106104
<p>The number of blocks published by the same author.</p>
105+
<p class="type">
106+
JSON data type: integer </p>
107107
<p class="context">Context: <code>view</code></p>
108108
</td>
109109
</tr>
110110
<tr id="schema-author">
111111
<td>
112-
<code>author</code><br />
113-
<span class="type">
114-
string </span>
112+
<code>author</code>
115113
</td>
116114
<td>
117115
<p>The WordPress.org username of the block author.</p>
116+
<p class="type">
117+
JSON data type: string </p>
118118
<p class="context">Context: <code>view</code></p>
119119
</td>
120120
</tr>
121121
<tr id="schema-icon">
122122
<td>
123-
<code>icon</code><br />
124-
<span class="type">
125-
string,
126-
uri
127-
</span>
123+
<code>icon</code>
128124
</td>
129125
<td>
130126
<p>The block icon.</p>
127+
<p class="type">
128+
JSON data type: string,
129+
Format: uri
130+
</p>
131131
<p class="context">Context: <code>view</code></p>
132132
</td>
133133
</tr>
134134
<tr id="schema-last_updated">
135135
<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>
136+
<code>last_updated</code>
141137
</td>
142138
<td>
143139
<p>The date when the block was last updated.</p>
140+
<p class="type">
141+
JSON data type: string,
142+
Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)
143+
</p>
144144
<p class="context">Context: <code>view</code></p>
145145
</td>
146146
</tr>
147147
<tr id="schema-humanized_updated">
148148
<td>
149-
<code>humanized_updated</code><br />
150-
<span class="type">
151-
string </span>
149+
<code>humanized_updated</code>
152150
</td>
153151
<td>
154152
<p>The date when the block was last updated, in fuzzy human readable format.</p>
153+
<p class="type">
154+
JSON data type: string </p>
155155
<p class="context">Context: <code>view</code></p>
156156
</td>
157157
</tr>

reference/block-pattern-categories.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@
1010
<table class="attributes">
1111
<tr id="schema-name">
1212
<td>
13-
<code>name</code><br />
14-
<span class="type">
15-
string </span>
13+
<code>name</code>
1614
</td>
1715
<td>
1816
<p>The category name.</p>
17+
<p class="type">
18+
JSON data type: string </p>
1919
<p class="read-only">Read only</p>
2020
<p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p>
2121
</td>
2222
</tr>
2323
<tr id="schema-label">
2424
<td>
25-
<code>label</code><br />
26-
<span class="type">
27-
string </span>
25+
<code>label</code>
2826
</td>
2927
<td>
3028
<p>The category label, in human readable format.</p>
29+
<p class="type">
30+
JSON data type: string </p>
3131
<p class="read-only">Read only</p>
3232
<p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p>
3333
</td>
3434
</tr>
3535
<tr id="schema-description">
3636
<td>
37-
<code>description</code><br />
38-
<span class="type">
39-
string </span>
37+
<code>description</code>
4038
</td>
4139
<td>
4240
<p>The category description, in human readable format.</p>
41+
<p class="type">
42+
JSON data type: string </p>
4343
<p class="read-only">Read only</p>
4444
<p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p>
4545
</td>

0 commit comments

Comments
 (0)