diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index 76802fe..70242de 100644
a
|
b
|
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
377 | 377 | $schema = parent::get_item_schema(); |
378 | 378 | |
379 | 379 | $schema['properties']['alt_text'] = array( |
| 380 | 'title' => __( 'Alternative Text' ), |
380 | 381 | 'description' => __( 'Alternative text to display when attachment is not displayed.' ), |
381 | 382 | 'type' => 'string', |
382 | 383 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
386 | 387 | ); |
387 | 388 | |
388 | 389 | $schema['properties']['caption'] = array( |
| 390 | 'title' => __( 'Caption' ), |
389 | 391 | 'description' => __( 'The attachment caption.' ), |
390 | 392 | 'type' => 'object', |
391 | 393 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
394 | 396 | ), |
395 | 397 | 'properties' => array( |
396 | 398 | 'raw' => array( |
| 399 | 'title' => __( 'Raw Caption' ), |
397 | 400 | 'description' => __( 'Caption for the attachment, as it exists in the database.' ), |
398 | 401 | 'type' => 'string', |
399 | 402 | 'context' => array( 'edit' ), |
400 | 403 | ), |
401 | 404 | 'rendered' => array( |
| 405 | 'title' => __( 'Caption' ), |
402 | 406 | 'description' => __( 'HTML caption for the attachment, transformed for display.' ), |
403 | 407 | 'type' => 'string', |
404 | 408 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
408 | 412 | ); |
409 | 413 | |
410 | 414 | $schema['properties']['description'] = array( |
| 415 | 'title' => __( 'Description' ), |
411 | 416 | 'description' => __( 'The attachment description.' ), |
412 | 417 | 'type' => 'object', |
413 | 418 | 'context' => array( 'view', 'edit' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
416 | 421 | ), |
417 | 422 | 'properties' => array( |
418 | 423 | 'raw' => array( |
| 424 | 'title' => __( 'Raw Description' ), |
419 | 425 | 'description' => __( 'Description for the object, as it exists in the database.' ), |
420 | 426 | 'type' => 'string', |
421 | 427 | 'context' => array( 'edit' ), |
422 | 428 | ), |
423 | 429 | 'rendered' => array( |
| 430 | 'title' => __( 'Description' ), |
424 | 431 | 'description' => __( 'HTML description for the object, transformed for display.' ), |
425 | 432 | 'type' => 'string', |
426 | 433 | 'context' => array( 'view', 'edit' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
430 | 437 | ); |
431 | 438 | |
432 | 439 | $schema['properties']['media_type'] = array( |
| 440 | 'title' => __( 'Attachment Type' ), |
433 | 441 | 'description' => __( 'Attachment type.' ), |
434 | 442 | 'type' => 'string', |
435 | 443 | 'enum' => array( 'image', 'file' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
438 | 446 | ); |
439 | 447 | |
440 | 448 | $schema['properties']['mime_type'] = array( |
| 449 | 'title' => __( 'MIME Type' ), |
441 | 450 | 'description' => __( 'The attachment MIME type.' ), |
442 | 451 | 'type' => 'string', |
443 | 452 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
445 | 454 | ); |
446 | 455 | |
447 | 456 | $schema['properties']['media_details'] = array( |
| 457 | 'title' => __( 'MIME Details' ), |
448 | 458 | 'description' => __( 'Details about the media file, specific to its type.' ), |
449 | 459 | 'type' => 'object', |
450 | 460 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
452 | 462 | ); |
453 | 463 | |
454 | 464 | $schema['properties']['post'] = array( |
| 465 | 'title' => __( 'Post' ), |
455 | 466 | 'description' => __( 'The ID for the associated post of the attachment.' ), |
456 | 467 | 'type' => 'integer', |
457 | 468 | 'context' => array( 'view', 'edit' ), |
458 | 469 | ); |
459 | 470 | |
460 | 471 | $schema['properties']['source_url'] = array( |
| 472 | 'title' => __( 'Source URL' ), |
461 | 473 | 'description' => __( 'URL to the original attachment file.' ), |
462 | 474 | 'type' => 'string', |
463 | 475 | 'format' => 'uri', |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
index e91fce2..6b1db51 100644
a
|
b
|
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1145 | 1145 | 'type' => 'object', |
1146 | 1146 | 'properties' => array( |
1147 | 1147 | 'id' => array( |
| 1148 | 'title' => __( 'ID' ), |
1148 | 1149 | 'description' => __( 'Unique identifier for the object.' ), |
1149 | 1150 | 'type' => 'integer', |
1150 | 1151 | 'context' => array( 'view', 'edit', 'embed' ), |
1151 | 1152 | 'readonly' => true, |
1152 | 1153 | ), |
1153 | 1154 | 'author' => array( |
| 1155 | 'title' => __( 'Author' ), |
1154 | 1156 | 'description' => __( 'The ID of the user object, if author was a user.' ), |
1155 | 1157 | 'type' => 'integer', |
1156 | 1158 | 'context' => array( 'view', 'edit', 'embed' ), |
1157 | 1159 | ), |
1158 | 1160 | 'author_email' => array( |
| 1161 | 'title' => __( 'Author Email' ), |
1159 | 1162 | 'description' => __( 'Email address for the object author.' ), |
1160 | 1163 | 'type' => 'string', |
1161 | 1164 | 'format' => 'email', |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1166 | 1169 | ), |
1167 | 1170 | ), |
1168 | 1171 | 'author_ip' => array( |
| 1172 | 'title' => __( 'Author IP' ), |
1169 | 1173 | 'description' => __( 'IP address for the object author.' ), |
1170 | 1174 | 'type' => 'string', |
1171 | 1175 | 'format' => 'ip', |
1172 | 1176 | 'context' => array( 'edit' ), |
1173 | 1177 | ), |
1174 | 1178 | 'author_name' => array( |
| 1179 | 'title' => __( 'Author Name' ), |
1175 | 1180 | 'description' => __( 'Display name for the object author.' ), |
1176 | 1181 | 'type' => 'string', |
1177 | 1182 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1180 | 1185 | ), |
1181 | 1186 | ), |
1182 | 1187 | 'author_url' => array( |
| 1188 | 'title' => __( 'Author URL' ), |
1183 | 1189 | 'description' => __( 'URL for the object author.' ), |
1184 | 1190 | 'type' => 'string', |
1185 | 1191 | 'format' => 'uri', |
1186 | 1192 | 'context' => array( 'view', 'edit', 'embed' ), |
1187 | 1193 | ), |
1188 | 1194 | 'author_user_agent' => array( |
| 1195 | 'title' => __( 'Author User Agent' ), |
1189 | 1196 | 'description' => __( 'User agent for the object author.' ), |
1190 | 1197 | 'type' => 'string', |
1191 | 1198 | 'context' => array( 'edit' ), |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1194 | 1201 | ), |
1195 | 1202 | ), |
1196 | 1203 | 'content' => array( |
| 1204 | 'title' => __( 'Content' ), |
1197 | 1205 | 'description' => __( 'The content for the object.' ), |
1198 | 1206 | 'type' => 'object', |
1199 | 1207 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1202 | 1210 | ), |
1203 | 1211 | 'properties' => array( |
1204 | 1212 | 'raw' => array( |
| 1213 | 'title' => __( 'Raw Content' ), |
1205 | 1214 | 'description' => __( 'Content for the object, as it exists in the database.' ), |
1206 | 1215 | 'type' => 'string', |
1207 | 1216 | 'context' => array( 'edit' ), |
1208 | 1217 | ), |
1209 | 1218 | 'rendered' => array( |
| 1219 | 'title' => __( 'Content' ), |
1210 | 1220 | 'description' => __( 'HTML content for the object, transformed for display.' ), |
1211 | 1221 | 'type' => 'string', |
1212 | 1222 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1215 | 1225 | ), |
1216 | 1226 | ), |
1217 | 1227 | 'date' => array( |
| 1228 | 'title' => __( 'Date' ), |
1218 | 1229 | 'description' => __( "The date the object was published, in the site's timezone." ), |
1219 | 1230 | 'type' => 'string', |
1220 | 1231 | 'format' => 'date-time', |
1221 | 1232 | 'context' => array( 'view', 'edit', 'embed' ), |
1222 | 1233 | ), |
1223 | 1234 | 'date_gmt' => array( |
| 1235 | 'title' => __( 'Date GMT' ), |
1224 | 1236 | 'description' => __( 'The date the object was published, as GMT.' ), |
1225 | 1237 | 'type' => 'string', |
1226 | 1238 | 'format' => 'date-time', |
1227 | 1239 | 'context' => array( 'view', 'edit' ), |
1228 | 1240 | ), |
1229 | 1241 | 'link' => array( |
| 1242 | 'title' => __( 'Link' ), |
1230 | 1243 | 'description' => __( 'URL to the object.' ), |
1231 | 1244 | 'type' => 'string', |
1232 | 1245 | 'format' => 'uri', |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1234 | 1247 | 'readonly' => true, |
1235 | 1248 | ), |
1236 | 1249 | 'parent' => array( |
| 1250 | 'title' => __( 'Parent' ), |
1237 | 1251 | 'description' => __( 'The ID for the parent of the object.' ), |
1238 | 1252 | 'type' => 'integer', |
1239 | 1253 | 'context' => array( 'view', 'edit', 'embed' ), |
1240 | 1254 | 'default' => 0, |
1241 | 1255 | ), |
1242 | 1256 | 'post' => array( |
| 1257 | 'title' => __( 'Post' ), |
1243 | 1258 | 'description' => __( 'The ID of the associated post object.' ), |
1244 | 1259 | 'type' => 'integer', |
1245 | 1260 | 'context' => array( 'view', 'edit' ), |
1246 | 1261 | 'default' => 0, |
1247 | 1262 | ), |
1248 | 1263 | 'status' => array( |
| 1264 | 'title' => __( 'Status' ), |
1249 | 1265 | 'description' => __( 'State of the object.' ), |
1250 | 1266 | 'type' => 'string', |
1251 | 1267 | 'context' => array( 'view', 'edit' ), |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1254 | 1270 | ), |
1255 | 1271 | ), |
1256 | 1272 | 'type' => array( |
| 1273 | 'title' => __( 'Type' ), |
1257 | 1274 | 'description' => __( 'Type of Comment for the object.' ), |
1258 | 1275 | 'type' => 'string', |
1259 | 1276 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Comments_Controller extends WP_REST_Controller { |
1277 | 1294 | } |
1278 | 1295 | |
1279 | 1296 | $schema['properties']['author_avatar_urls'] = array( |
| 1297 | 'title' => __( 'Avatar' ), |
1280 | 1298 | 'description' => __( 'Avatar URLs for the object author.' ), |
1281 | 1299 | 'type' => 'object', |
1282 | 1300 | 'context' => array( 'view', 'edit', 'embed' ), |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php
index 369cf3c..a90e724 100644
a
|
b
|
class WP_REST_Post_Statuses_Controller extends WP_REST_Controller { |
245 | 245 | 'type' => 'object', |
246 | 246 | 'properties' => array( |
247 | 247 | 'name' => array( |
| 248 | 'title' => __( 'Name' ), |
248 | 249 | 'description' => __( 'The title for the status.' ), |
249 | 250 | 'type' => 'string', |
250 | 251 | 'context' => array( 'embed', 'view', 'edit' ), |
251 | 252 | 'readonly' => true, |
252 | 253 | ), |
253 | 254 | 'private' => array( |
| 255 | 'title' => __( 'Private' ), |
254 | 256 | 'description' => __( 'Whether posts with this status should be private.' ), |
255 | 257 | 'type' => 'boolean', |
256 | 258 | 'context' => array( 'edit' ), |
257 | 259 | 'readonly' => true, |
258 | 260 | ), |
259 | 261 | 'protected' => array( |
| 262 | 'title' => __( 'Protected' ), |
260 | 263 | 'description' => __( 'Whether posts with this status should be protected.' ), |
261 | 264 | 'type' => 'boolean', |
262 | 265 | 'context' => array( 'edit' ), |
263 | 266 | 'readonly' => true, |
264 | 267 | ), |
265 | 268 | 'public' => array( |
| 269 | 'title' => __( 'Public' ), |
266 | 270 | 'description' => __( 'Whether posts of this status should be shown in the front end of the site.' ), |
267 | 271 | 'type' => 'boolean', |
268 | 272 | 'context' => array( 'view', 'edit' ), |
269 | 273 | 'readonly' => true, |
270 | 274 | ), |
271 | 275 | 'queryable' => array( |
| 276 | 'title' => __( 'Queryable' ), |
272 | 277 | 'description' => __( 'Whether posts with this status should be publicly-queryable.' ), |
273 | 278 | 'type' => 'boolean', |
274 | 279 | 'context' => array( 'view', 'edit' ), |
275 | 280 | 'readonly' => true, |
276 | 281 | ), |
277 | 282 | 'show_in_list' => array( |
| 283 | 'title' => __( 'Show in List' ), |
278 | 284 | 'description' => __( 'Whether to include posts in the edit listing for their post type.' ), |
279 | 285 | 'type' => 'boolean', |
280 | 286 | 'context' => array( 'edit' ), |
281 | 287 | 'readonly' => true, |
282 | 288 | ), |
283 | 289 | 'slug' => array( |
| 290 | 'title' => __( 'Slug' ), |
284 | 291 | 'description' => __( 'An alphanumeric identifier for the status.' ), |
285 | 292 | 'type' => 'string', |
286 | 293 | 'context' => array( 'embed', 'view', 'edit' ), |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
index c4571d9..4af042f 100644
a
|
b
|
class WP_REST_Post_Types_Controller extends WP_REST_Controller { |
206 | 206 | 'type' => 'object', |
207 | 207 | 'properties' => array( |
208 | 208 | 'capabilities' => array( |
| 209 | 'title' => __( 'Capabilities' ), |
209 | 210 | 'description' => __( 'All capabilities used by the post type.' ), |
210 | 211 | 'type' => 'object', |
211 | 212 | 'context' => array( 'edit' ), |
212 | 213 | 'readonly' => true, |
213 | 214 | ), |
214 | 215 | 'description' => array( |
| 216 | 'title' => __( 'Description' ), |
215 | 217 | 'description' => __( 'A human-readable description of the post type.' ), |
216 | 218 | 'type' => 'string', |
217 | 219 | 'context' => array( 'view', 'edit' ), |
218 | 220 | 'readonly' => true, |
219 | 221 | ), |
220 | 222 | 'hierarchical' => array( |
| 223 | 'title' => __( 'Hierarchical' ), |
221 | 224 | 'description' => __( 'Whether or not the post type should have children.' ), |
222 | 225 | 'type' => 'boolean', |
223 | 226 | 'context' => array( 'view', 'edit' ), |
224 | 227 | 'readonly' => true, |
225 | 228 | ), |
226 | 229 | 'labels' => array( |
| 230 | 'title' => __( 'Labels' ), |
227 | 231 | 'description' => __( 'Human-readable labels for the post type for various contexts.' ), |
228 | 232 | 'type' => 'object', |
229 | 233 | 'context' => array( 'edit' ), |
230 | 234 | 'readonly' => true, |
231 | 235 | ), |
232 | 236 | 'name' => array( |
| 237 | 'title' => __( 'Name' ), |
233 | 238 | 'description' => __( 'The title for the post type.' ), |
234 | 239 | 'type' => 'string', |
235 | 240 | 'context' => array( 'view', 'edit', 'embed' ), |
236 | 241 | 'readonly' => true, |
237 | 242 | ), |
238 | 243 | 'slug' => array( |
| 244 | 'title' => __( 'Slug' ), |
239 | 245 | 'description' => __( 'An alphanumeric identifier for the post type.' ), |
240 | 246 | 'type' => 'string', |
241 | 247 | 'context' => array( 'view', 'edit', 'embed' ), |
242 | 248 | 'readonly' => true, |
243 | 249 | ), |
244 | 250 | 'supports' => array( |
| 251 | 'title' => __( 'Supports' ), |
245 | 252 | 'description' => __( 'All features, supported by the post type.' ), |
246 | 253 | 'type' => 'object', |
247 | 254 | 'context' => array( 'edit' ), |
248 | 255 | 'readonly' => true, |
249 | 256 | ), |
250 | 257 | 'taxonomies' => array( |
| 258 | 'title' => __( 'Taxonomies' ), |
251 | 259 | 'description' => __( 'Taxonomies associated with post type.' ), |
252 | 260 | 'type' => 'array', |
253 | 261 | 'items' => array( |
… |
… |
class WP_REST_Post_Types_Controller extends WP_REST_Controller { |
257 | 265 | 'readonly' => true, |
258 | 266 | ), |
259 | 267 | 'rest_base' => array( |
| 268 | 'title' => __( 'REST Base' ), |
260 | 269 | 'description' => __( 'REST base route for the post type.' ), |
261 | 270 | 'type' => 'string', |
262 | 271 | 'context' => array( 'view', 'edit', 'embed' ), |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index f9de736..b081a38 100644
a
|
b
|
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1690 | 1690 | // Base properties for every Post. |
1691 | 1691 | 'properties' => array( |
1692 | 1692 | 'date' => array( |
| 1693 | 'title' => __( 'Date' ), |
1693 | 1694 | 'description' => __( "The date the object was published, in the site's timezone." ), |
1694 | 1695 | 'type' => 'string', |
1695 | 1696 | 'format' => 'date-time', |
1696 | 1697 | 'context' => array( 'view', 'edit', 'embed' ), |
1697 | 1698 | ), |
1698 | 1699 | 'date_gmt' => array( |
| 1700 | 'title' => __( 'Date GMT' ), |
1699 | 1701 | 'description' => __( 'The date the object was published, as GMT.' ), |
1700 | 1702 | 'type' => 'string', |
1701 | 1703 | 'format' => 'date-time', |
1702 | 1704 | 'context' => array( 'view', 'edit' ), |
1703 | 1705 | ), |
1704 | 1706 | 'guid' => array( |
| 1707 | 'title' => __( 'GUID' ), |
1705 | 1708 | 'description' => __( 'The globally unique identifier for the object.' ), |
1706 | 1709 | 'type' => 'object', |
1707 | 1710 | 'context' => array( 'view', 'edit' ), |
1708 | 1711 | 'readonly' => true, |
1709 | 1712 | 'properties' => array( |
1710 | 1713 | 'raw' => array( |
| 1714 | 'title' => __( 'Raw GUID' ), |
1711 | 1715 | 'description' => __( 'GUID for the object, as it exists in the database.' ), |
1712 | 1716 | 'type' => 'string', |
1713 | 1717 | 'context' => array( 'edit' ), |
1714 | 1718 | 'readonly' => true, |
1715 | 1719 | ), |
1716 | 1720 | 'rendered' => array( |
| 1721 | 'title' => __( 'GUID' ), |
1717 | 1722 | 'description' => __( 'GUID for the object, transformed for display.' ), |
1718 | 1723 | 'type' => 'string', |
1719 | 1724 | 'context' => array( 'view', 'edit' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1722 | 1727 | ), |
1723 | 1728 | ), |
1724 | 1729 | 'id' => array( |
| 1730 | 'title' => __( 'ID' ), |
1725 | 1731 | 'description' => __( 'Unique identifier for the object.' ), |
1726 | 1732 | 'type' => 'integer', |
1727 | 1733 | 'context' => array( 'view', 'edit', 'embed' ), |
1728 | 1734 | 'readonly' => true, |
1729 | 1735 | ), |
1730 | 1736 | 'link' => array( |
| 1737 | 'title' => __( 'Link' ), |
1731 | 1738 | 'description' => __( 'URL to the object.' ), |
1732 | 1739 | 'type' => 'string', |
1733 | 1740 | 'format' => 'uri', |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1735 | 1742 | 'readonly' => true, |
1736 | 1743 | ), |
1737 | 1744 | 'modified' => array( |
| 1745 | 'title' => __( 'Modified' ), |
1738 | 1746 | 'description' => __( "The date the object was last modified, in the site's timezone." ), |
1739 | 1747 | 'type' => 'string', |
1740 | 1748 | 'format' => 'date-time', |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1742 | 1750 | 'readonly' => true, |
1743 | 1751 | ), |
1744 | 1752 | 'modified_gmt' => array( |
| 1753 | 'title' => __( 'Modified GMT' ), |
1745 | 1754 | 'description' => __( 'The date the object was last modified, as GMT.' ), |
1746 | 1755 | 'type' => 'string', |
1747 | 1756 | 'format' => 'date-time', |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1749 | 1758 | 'readonly' => true, |
1750 | 1759 | ), |
1751 | 1760 | 'slug' => array( |
| 1761 | 'title' => __( 'Slug' ), |
1752 | 1762 | 'description' => __( 'An alphanumeric identifier for the object unique to its type.' ), |
1753 | 1763 | 'type' => 'string', |
1754 | 1764 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1757 | 1767 | ), |
1758 | 1768 | ), |
1759 | 1769 | 'status' => array( |
| 1770 | 'title' => __( 'Status' ), |
1760 | 1771 | 'description' => __( 'A named status for the object.' ), |
1761 | 1772 | 'type' => 'string', |
1762 | 1773 | 'enum' => array_keys( get_post_stati( array( 'internal' => false ) ) ), |
1763 | 1774 | 'context' => array( 'view', 'edit' ), |
1764 | 1775 | ), |
1765 | 1776 | 'type' => array( |
| 1777 | 'title' => __( 'Type' ), |
1766 | 1778 | 'description' => __( 'Type of Post for the object.' ), |
1767 | 1779 | 'type' => 'string', |
1768 | 1780 | 'context' => array( 'view', 'edit', 'embed' ), |
1769 | 1781 | 'readonly' => true, |
1770 | 1782 | ), |
1771 | 1783 | 'password' => array( |
| 1784 | 'title' => __( 'Password' ), |
1772 | 1785 | 'description' => __( 'A password to protect access to the content and excerpt.' ), |
1773 | 1786 | 'type' => 'string', |
1774 | 1787 | 'context' => array( 'edit' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1840 | 1853 | |
1841 | 1854 | case 'title': |
1842 | 1855 | $schema['properties']['title'] = array( |
| 1856 | 'title' => __( 'Title' ), |
1843 | 1857 | 'description' => __( 'The title for the object.' ), |
1844 | 1858 | 'type' => 'object', |
1845 | 1859 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1848 | 1862 | ), |
1849 | 1863 | 'properties' => array( |
1850 | 1864 | 'raw' => array( |
| 1865 | 'title' => __( 'Raw Title' ), |
1851 | 1866 | 'description' => __( 'Title for the object, as it exists in the database.' ), |
1852 | 1867 | 'type' => 'string', |
1853 | 1868 | 'context' => array( 'edit' ), |
1854 | 1869 | ), |
1855 | 1870 | 'rendered' => array( |
| 1871 | 'title' => __( 'Title' ), |
1856 | 1872 | 'description' => __( 'HTML title for the object, transformed for display.' ), |
1857 | 1873 | 'type' => 'string', |
1858 | 1874 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1864 | 1880 | |
1865 | 1881 | case 'editor': |
1866 | 1882 | $schema['properties']['content'] = array( |
| 1883 | 'title' => __( 'Content' ), |
1867 | 1884 | 'description' => __( 'The content for the object.' ), |
1868 | 1885 | 'type' => 'object', |
1869 | 1886 | 'context' => array( 'view', 'edit' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1872 | 1889 | ), |
1873 | 1890 | 'properties' => array( |
1874 | 1891 | 'raw' => array( |
| 1892 | 'title' => __( 'Raw Content' ), |
1875 | 1893 | 'description' => __( 'Content for the object, as it exists in the database.' ), |
1876 | 1894 | 'type' => 'string', |
1877 | 1895 | 'context' => array( 'edit' ), |
1878 | 1896 | ), |
1879 | 1897 | 'rendered' => array( |
| 1898 | 'title' => __( 'Content' ), |
1880 | 1899 | 'description' => __( 'HTML content for the object, transformed for display.' ), |
1881 | 1900 | 'type' => 'string', |
1882 | 1901 | 'context' => array( 'view', 'edit' ), |
1883 | 1902 | 'readonly' => true, |
1884 | 1903 | ), |
1885 | 1904 | 'protected' => array( |
| 1905 | 'title' => __( 'Protected Content' ), |
1886 | 1906 | 'description' => __( 'Whether the content is protected with a password.' ), |
1887 | 1907 | 'type' => 'boolean', |
1888 | 1908 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1894 | 1914 | |
1895 | 1915 | case 'author': |
1896 | 1916 | $schema['properties']['author'] = array( |
| 1917 | 'title' => __( 'Author' ), |
1897 | 1918 | 'description' => __( 'The ID for the author of the object.' ), |
1898 | 1919 | 'type' => 'integer', |
1899 | 1920 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1902 | 1923 | |
1903 | 1924 | case 'excerpt': |
1904 | 1925 | $schema['properties']['excerpt'] = array( |
| 1926 | 'title' => __( 'Excerpt' ), |
1905 | 1927 | 'description' => __( 'The excerpt for the object.' ), |
1906 | 1928 | 'type' => 'object', |
1907 | 1929 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1910 | 1932 | ), |
1911 | 1933 | 'properties' => array( |
1912 | 1934 | 'raw' => array( |
| 1935 | 'title' => __( 'Raw Excerpt' ), |
1913 | 1936 | 'description' => __( 'Excerpt for the object, as it exists in the database.' ), |
1914 | 1937 | 'type' => 'string', |
1915 | 1938 | 'context' => array( 'edit' ), |
1916 | 1939 | ), |
1917 | 1940 | 'rendered' => array( |
| 1941 | 'title' => __( 'Excerpt' ), |
1918 | 1942 | 'description' => __( 'HTML excerpt for the object, transformed for display.' ), |
1919 | 1943 | 'type' => 'string', |
1920 | 1944 | 'context' => array( 'view', 'edit', 'embed' ), |
1921 | 1945 | 'readonly' => true, |
1922 | 1946 | ), |
1923 | 1947 | 'protected' => array( |
| 1948 | 'title' => __( 'Protected Excerpt' ), |
1924 | 1949 | 'description' => __( 'Whether the excerpt is protected with a password.' ), |
1925 | 1950 | 'type' => 'boolean', |
1926 | 1951 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1932 | 1957 | |
1933 | 1958 | case 'thumbnail': |
1934 | 1959 | $schema['properties']['featured_media'] = array( |
| 1960 | 'title' => __( 'Featured Media' ), |
1935 | 1961 | 'description' => __( 'The ID of the featured media for the object.' ), |
1936 | 1962 | 'type' => 'integer', |
1937 | 1963 | 'context' => array( 'view', 'edit', 'embed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1940 | 1966 | |
1941 | 1967 | case 'comments': |
1942 | 1968 | $schema['properties']['comment_status'] = array( |
| 1969 | 'title' => __( 'Comment Status' ), |
1943 | 1970 | 'description' => __( 'Whether or not comments are open on the object.' ), |
1944 | 1971 | 'type' => 'string', |
1945 | 1972 | 'enum' => array( 'open', 'closed' ), |
1946 | 1973 | 'context' => array( 'view', 'edit' ), |
1947 | 1974 | ); |
1948 | 1975 | $schema['properties']['ping_status'] = array( |
| 1976 | 'title' => __( 'Ping Status' ), |
1949 | 1977 | 'description' => __( 'Whether or not the object can be pinged.' ), |
1950 | 1978 | 'type' => 'string', |
1951 | 1979 | 'enum' => array( 'open', 'closed' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1955 | 1983 | |
1956 | 1984 | case 'page-attributes': |
1957 | 1985 | $schema['properties']['menu_order'] = array( |
| 1986 | 'title' => __( 'Menu Order' ), |
1958 | 1987 | 'description' => __( 'The order of the object in relation to other object of its type.' ), |
1959 | 1988 | 'type' => 'integer', |
1960 | 1989 | 'context' => array( 'view', 'edit' ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1966 | 1995 | $formats = array_values( get_post_format_slugs() ); |
1967 | 1996 | |
1968 | 1997 | $schema['properties']['format'] = array( |
| 1998 | 'title' => __( 'Format' ), |
1969 | 1999 | 'description' => __( 'The format for the object.' ), |
1970 | 2000 | 'type' => 'string', |
1971 | 2001 | 'enum' => $formats, |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1989 | 2019 | } |
1990 | 2020 | |
1991 | 2021 | $schema['properties']['template'] = array( |
| 2022 | 'title' => __( 'Template' ), |
1992 | 2023 | 'description' => __( 'The theme file to use to display the object.' ), |
1993 | 2024 | 'type' => 'string', |
1994 | 2025 | 'enum' => array_merge( array_keys( wp_get_theme()->get_page_templates( null, $this->post_type ) ), array( '' ) ), |
… |
… |
class WP_REST_Posts_Controller extends WP_REST_Controller { |
1999 | 2030 | foreach ( $taxonomies as $taxonomy ) { |
2000 | 2031 | $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name; |
2001 | 2032 | $schema['properties'][ $base ] = array( |
| 2033 | 'title' => $taxonomy->name, |
2002 | 2034 | /* translators: %s: taxonomy name */ |
2003 | 2035 | 'description' => sprintf( __( 'The terms assigned to the object in the %s taxonomy.' ), $taxonomy->name ), |
2004 | 2036 | 'type' => 'array', |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php
index fdb01dc..43f2c23 100644
a
|
b
|
class WP_REST_Revisions_Controller extends WP_REST_Controller { |
457 | 457 | // Base properties for every Revision. |
458 | 458 | 'properties' => array( |
459 | 459 | 'author' => array( |
| 460 | 'title' => __( 'Author' ), |
460 | 461 | 'description' => __( 'The ID for the author of the object.' ), |
461 | 462 | 'type' => 'integer', |
462 | 463 | 'context' => array( 'view', 'edit', 'embed' ), |
463 | 464 | ), |
464 | 465 | 'date' => array( |
| 466 | 'title' => __( 'Date' ), |
465 | 467 | 'description' => __( "The date the object was published, in the site's timezone." ), |
466 | 468 | 'type' => 'string', |
467 | 469 | 'format' => 'date-time', |
468 | 470 | 'context' => array( 'view', 'edit', 'embed' ), |
469 | 471 | ), |
470 | 472 | 'date_gmt' => array( |
| 473 | 'title' => __( 'Date GMT' ), |
471 | 474 | 'description' => __( 'The date the object was published, as GMT.' ), |
472 | 475 | 'type' => 'string', |
473 | 476 | 'format' => 'date-time', |
474 | 477 | 'context' => array( 'view', 'edit' ), |
475 | 478 | ), |
476 | 479 | 'guid' => array( |
| 480 | 'title' => __( 'GUID' ), |
477 | 481 | 'description' => __( 'GUID for the object, as it exists in the database.' ), |
478 | 482 | 'type' => 'string', |
479 | 483 | 'context' => array( 'view', 'edit' ), |
480 | 484 | ), |
481 | 485 | 'id' => array( |
| 486 | 'title' => __( 'ID' ), |
482 | 487 | 'description' => __( 'Unique identifier for the object.' ), |
483 | 488 | 'type' => 'integer', |
484 | 489 | 'context' => array( 'view', 'edit', 'embed' ), |
485 | 490 | ), |
486 | 491 | 'modified' => array( |
| 492 | 'title' => __( 'Modified' ), |
487 | 493 | 'description' => __( "The date the object was last modified, in the site's timezone." ), |
488 | 494 | 'type' => 'string', |
489 | 495 | 'format' => 'date-time', |
490 | 496 | 'context' => array( 'view', 'edit' ), |
491 | 497 | ), |
492 | 498 | 'modified_gmt' => array( |
| 499 | 'title' => __( 'Modified GMT' ), |
493 | 500 | 'description' => __( 'The date the object was last modified, as GMT.' ), |
494 | 501 | 'type' => 'string', |
495 | 502 | 'format' => 'date-time', |
496 | 503 | 'context' => array( 'view', 'edit' ), |
497 | 504 | ), |
498 | 505 | 'parent' => array( |
| 506 | 'title' => __( 'Parent' ), |
499 | 507 | 'description' => __( 'The ID for the parent of the object.' ), |
500 | 508 | 'type' => 'integer', |
501 | 509 | 'context' => array( 'view', 'edit', 'embed' ), |
502 | 510 | ), |
503 | 511 | 'slug' => array( |
| 512 | 'title' => __( 'Slug' ), |
504 | 513 | 'description' => __( 'An alphanumeric identifier for the object unique to its type.' ), |
505 | 514 | 'type' => 'string', |
506 | 515 | 'context' => array( 'view', 'edit', 'embed' ), |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
index ea97135..caa8c05 100644
a
|
b
|
class WP_REST_Taxonomies_Controller extends WP_REST_Controller { |
233 | 233 | 'type' => 'object', |
234 | 234 | 'properties' => array( |
235 | 235 | 'capabilities' => array( |
| 236 | 'title' => __( 'Capabilities' ), |
236 | 237 | 'description' => __( 'All capabilities used by the taxonomy.' ), |
237 | 238 | 'type' => 'object', |
238 | 239 | 'context' => array( 'edit' ), |
239 | 240 | 'readonly' => true, |
240 | 241 | ), |
241 | 242 | 'description' => array( |
| 243 | 'title' => __( 'Description' ), |
242 | 244 | 'description' => __( 'A human-readable description of the taxonomy.' ), |
243 | 245 | 'type' => 'string', |
244 | 246 | 'context' => array( 'view', 'edit' ), |
245 | 247 | 'readonly' => true, |
246 | 248 | ), |
247 | 249 | 'hierarchical' => array( |
| 250 | 'title' => __( 'Hierarchical' ), |
248 | 251 | 'description' => __( 'Whether or not the taxonomy should have children.' ), |
249 | 252 | 'type' => 'boolean', |
250 | 253 | 'context' => array( 'view', 'edit' ), |
251 | 254 | 'readonly' => true, |
252 | 255 | ), |
253 | 256 | 'labels' => array( |
| 257 | 'title' => __( 'Labels' ), |
254 | 258 | 'description' => __( 'Human-readable labels for the taxonomy for various contexts.' ), |
255 | 259 | 'type' => 'object', |
256 | 260 | 'context' => array( 'edit' ), |
257 | 261 | 'readonly' => true, |
258 | 262 | ), |
259 | 263 | 'name' => array( |
| 264 | 'title' => __( 'Name' ), |
260 | 265 | 'description' => __( 'The title for the taxonomy.' ), |
261 | 266 | 'type' => 'string', |
262 | 267 | 'context' => array( 'view', 'edit', 'embed' ), |
263 | 268 | 'readonly' => true, |
264 | 269 | ), |
265 | 270 | 'slug' => array( |
| 271 | 'title' => __( 'Slug' ), |
266 | 272 | 'description' => __( 'An alphanumeric identifier for the taxonomy.' ), |
267 | 273 | 'type' => 'string', |
268 | 274 | 'context' => array( 'view', 'edit', 'embed' ), |
269 | 275 | 'readonly' => true, |
270 | 276 | ), |
271 | 277 | 'show_cloud' => array( |
| 278 | 'title' => __( 'Show Term Cloud' ), |
272 | 279 | 'description' => __( 'Whether or not the term cloud should be displayed.' ), |
273 | 280 | 'type' => 'boolean', |
274 | 281 | 'context' => array( 'edit' ), |
275 | 282 | 'readonly' => true, |
276 | 283 | ), |
277 | 284 | 'types' => array( |
| 285 | 'title' => __( 'Types' ), |
278 | 286 | 'description' => __( 'Types associated with the taxonomy.' ), |
279 | 287 | 'type' => 'array', |
280 | 288 | 'items' => array( |
… |
… |
class WP_REST_Taxonomies_Controller extends WP_REST_Controller { |
284 | 292 | 'readonly' => true, |
285 | 293 | ), |
286 | 294 | 'rest_base' => array( |
| 295 | 'title' => __( 'REST Base' ), |
287 | 296 | 'description' => __( 'REST base route for the taxonomy.' ), |
288 | 297 | 'type' => 'string', |
289 | 298 | 'context' => array( 'view', 'edit', 'embed' ), |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
index 0723022..b566ffc 100644
a
|
b
|
class WP_REST_Terms_Controller extends WP_REST_Controller { |
808 | 808 | 'type' => 'object', |
809 | 809 | 'properties' => array( |
810 | 810 | 'id' => array( |
| 811 | 'title' => __( 'ID' ), |
811 | 812 | 'description' => __( 'Unique identifier for the term.' ), |
812 | 813 | 'type' => 'integer', |
813 | 814 | 'context' => array( 'view', 'embed', 'edit' ), |
814 | 815 | 'readonly' => true, |
815 | 816 | ), |
816 | 817 | 'count' => array( |
| 818 | 'title' => __( 'Count' ), |
817 | 819 | 'description' => __( 'Number of published posts for the term.' ), |
818 | 820 | 'type' => 'integer', |
819 | 821 | 'context' => array( 'view', 'edit' ), |
820 | 822 | 'readonly' => true, |
821 | 823 | ), |
822 | 824 | 'description' => array( |
| 825 | 'title' => __( 'Description' ), |
823 | 826 | 'description' => __( 'HTML description of the term.' ), |
824 | 827 | 'type' => 'string', |
825 | 828 | 'context' => array( 'view', 'edit' ), |
826 | 829 | ), |
827 | 830 | 'link' => array( |
| 831 | 'title' => __( 'Link' ), |
828 | 832 | 'description' => __( 'URL of the term.' ), |
829 | 833 | 'type' => 'string', |
830 | 834 | 'format' => 'uri', |
… |
… |
class WP_REST_Terms_Controller extends WP_REST_Controller { |
832 | 836 | 'readonly' => true, |
833 | 837 | ), |
834 | 838 | 'name' => array( |
| 839 | 'title' => __( 'Name' ), |
835 | 840 | 'description' => __( 'HTML title for the term.' ), |
836 | 841 | 'type' => 'string', |
837 | 842 | 'context' => array( 'view', 'embed', 'edit' ), |
… |
… |
class WP_REST_Terms_Controller extends WP_REST_Controller { |
841 | 846 | 'required' => true, |
842 | 847 | ), |
843 | 848 | 'slug' => array( |
| 849 | 'title' => __( 'Slug' ), |
844 | 850 | 'description' => __( 'An alphanumeric identifier for the term unique to its type.' ), |
845 | 851 | 'type' => 'string', |
846 | 852 | 'context' => array( 'view', 'embed', 'edit' ), |
… |
… |
class WP_REST_Terms_Controller extends WP_REST_Controller { |
849 | 855 | ), |
850 | 856 | ), |
851 | 857 | 'taxonomy' => array( |
| 858 | 'title' => __( 'Taxonomy' ), |
852 | 859 | 'description' => __( 'Type attribution for the term.' ), |
853 | 860 | 'type' => 'string', |
854 | 861 | 'enum' => array_keys( get_taxonomies() ), |
… |
… |
class WP_REST_Terms_Controller extends WP_REST_Controller { |
862 | 869 | |
863 | 870 | if ( $taxonomy->hierarchical ) { |
864 | 871 | $schema['properties']['parent'] = array( |
| 872 | 'title' => __( 'Parent' ), |
865 | 873 | 'description' => __( 'The parent term ID.' ), |
866 | 874 | 'type' => 'integer', |
867 | 875 | 'context' => array( 'view', 'edit' ), |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
index 58046ba..f521e82 100644
a
|
b
|
class WP_REST_Users_Controller extends WP_REST_Controller { |
1133 | 1133 | 'type' => 'object', |
1134 | 1134 | 'properties' => array( |
1135 | 1135 | 'id' => array( |
| 1136 | 'title' => __( 'ID' ), |
1136 | 1137 | 'description' => __( 'Unique identifier for the user.' ), |
1137 | 1138 | 'type' => 'integer', |
1138 | 1139 | 'context' => array( 'embed', 'view', 'edit' ), |
1139 | 1140 | 'readonly' => true, |
1140 | 1141 | ), |
1141 | 1142 | 'username' => array( |
| 1143 | 'title' => __( 'Username' ), |
1142 | 1144 | 'description' => __( 'Login name for the user.' ), |
1143 | 1145 | 'type' => 'string', |
1144 | 1146 | 'context' => array( 'edit' ), |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1148 | 1150 | ), |
1149 | 1151 | ), |
1150 | 1152 | 'name' => array( |
| 1153 | 'title' => __( 'Name' ), |
1151 | 1154 | 'description' => __( 'Display name for the user.' ), |
1152 | 1155 | 'type' => 'string', |
1153 | 1156 | 'context' => array( 'embed', 'view', 'edit' ), |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1156 | 1159 | ), |
1157 | 1160 | ), |
1158 | 1161 | 'first_name' => array( |
| 1162 | 'title' => __( 'First Name' ), |
1159 | 1163 | 'description' => __( 'First name for the user.' ), |
1160 | 1164 | 'type' => 'string', |
1161 | 1165 | 'context' => array( 'edit' ), |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1164 | 1168 | ), |
1165 | 1169 | ), |
1166 | 1170 | 'last_name' => array( |
| 1171 | 'title' => __( 'Last Name' ), |
1167 | 1172 | 'description' => __( 'Last name for the user.' ), |
1168 | 1173 | 'type' => 'string', |
1169 | 1174 | 'context' => array( 'edit' ), |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1172 | 1177 | ), |
1173 | 1178 | ), |
1174 | 1179 | 'email' => array( |
| 1180 | 'title' => __( 'Email' ), |
1175 | 1181 | 'description' => __( 'The email address for the user.' ), |
1176 | 1182 | 'type' => 'string', |
1177 | 1183 | 'format' => 'email', |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1179 | 1185 | 'required' => true, |
1180 | 1186 | ), |
1181 | 1187 | 'url' => array( |
| 1188 | 'title' => __( 'URL' ), |
1182 | 1189 | 'description' => __( 'URL of the user.' ), |
1183 | 1190 | 'type' => 'string', |
1184 | 1191 | 'format' => 'uri', |
1185 | 1192 | 'context' => array( 'embed', 'view', 'edit' ), |
1186 | 1193 | ), |
1187 | 1194 | 'description' => array( |
| 1195 | 'title' => __( 'Description' ), |
1188 | 1196 | 'description' => __( 'Description of the user.' ), |
1189 | 1197 | 'type' => 'string', |
1190 | 1198 | 'context' => array( 'embed', 'view', 'edit' ), |
1191 | 1199 | ), |
1192 | 1200 | 'link' => array( |
| 1201 | 'title' => __( 'Link' ), |
1193 | 1202 | 'description' => __( 'Author URL of the user.' ), |
1194 | 1203 | 'type' => 'string', |
1195 | 1204 | 'format' => 'uri', |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1197 | 1206 | 'readonly' => true, |
1198 | 1207 | ), |
1199 | 1208 | 'locale' => array( |
| 1209 | 'title' => __( 'Locale' ), |
1200 | 1210 | 'description' => __( 'Locale for the user.' ), |
1201 | 1211 | 'type' => 'string', |
1202 | 1212 | 'enum' => array_merge( array( '', 'en_US' ), get_available_languages() ), |
1203 | 1213 | 'context' => array( 'edit' ), |
1204 | 1214 | ), |
1205 | 1215 | 'nickname' => array( |
| 1216 | 'title' => __( 'Nickname' ), |
1206 | 1217 | 'description' => __( 'The nickname for the user.' ), |
1207 | 1218 | 'type' => 'string', |
1208 | 1219 | 'context' => array( 'edit' ), |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1211 | 1222 | ), |
1212 | 1223 | ), |
1213 | 1224 | 'slug' => array( |
| 1225 | 'title' => __( 'Slug' ), |
1214 | 1226 | 'description' => __( 'An alphanumeric identifier for the user.' ), |
1215 | 1227 | 'type' => 'string', |
1216 | 1228 | 'context' => array( 'embed', 'view', 'edit' ), |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1219 | 1231 | ), |
1220 | 1232 | ), |
1221 | 1233 | 'registered_date' => array( |
| 1234 | 'title' => __( 'Registration Date' ), |
1222 | 1235 | 'description' => __( 'Registration date for the user.' ), |
1223 | 1236 | 'type' => 'string', |
1224 | 1237 | 'format' => 'date-time', |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1226 | 1239 | 'readonly' => true, |
1227 | 1240 | ), |
1228 | 1241 | 'roles' => array( |
| 1242 | 'title' => __( 'Roles' ), |
1229 | 1243 | 'description' => __( 'Roles assigned to the user.' ), |
1230 | 1244 | 'type' => 'array', |
1231 | 1245 | 'items' => array( |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1234 | 1248 | 'context' => array( 'edit' ), |
1235 | 1249 | ), |
1236 | 1250 | 'password' => array( |
| 1251 | 'title' => __( 'Password' ), |
1237 | 1252 | 'description' => __( 'Password for the user (never included).' ), |
1238 | 1253 | 'type' => 'string', |
1239 | 1254 | 'context' => array(), // Password is never displayed. |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1243 | 1258 | ), |
1244 | 1259 | ), |
1245 | 1260 | 'capabilities' => array( |
| 1261 | 'title' => __( 'Capabilities' ), |
1246 | 1262 | 'description' => __( 'All capabilities assigned to the user.' ), |
1247 | 1263 | 'type' => 'object', |
1248 | 1264 | 'context' => array( 'edit' ), |
1249 | 1265 | 'readonly' => true, |
1250 | 1266 | ), |
1251 | 1267 | 'extra_capabilities' => array( |
| 1268 | 'title' => __( 'Extra Capabilities' ), |
1252 | 1269 | 'description' => __( 'Any extra capabilities assigned to the user.' ), |
1253 | 1270 | 'type' => 'object', |
1254 | 1271 | 'context' => array( 'edit' ), |
… |
… |
class WP_REST_Users_Controller extends WP_REST_Controller { |
1273 | 1290 | } |
1274 | 1291 | |
1275 | 1292 | $schema['properties']['avatar_urls'] = array( |
| 1293 | 'title' => __( 'Avatar' ), |
1276 | 1294 | 'description' => __( 'Avatar URLs for the user.' ), |
1277 | 1295 | 'type' => 'object', |
1278 | 1296 | 'context' => array( 'embed', 'view', 'edit' ), |
diff --git a/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php b/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php
index 9288c0a..6a2c244 100644
a
|
b
|
abstract class WP_REST_Meta_Fields { |
376 | 376 | $fields = $this->get_registered_fields(); |
377 | 377 | |
378 | 378 | $schema = array( |
| 379 | 'title' => __( 'Meta Fields' ), |
379 | 380 | 'description' => __( 'Meta fields.' ), |
380 | 381 | 'type' => 'object', |
381 | 382 | 'context' => array( 'view', 'edit' ), |