Changeset 51026
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r51000 r51026 2942 2942 $terms = array(); 2943 2943 $include_children = false; 2944 $operator = 'IN'; 2944 2945 2945 2946 if ( rest_is_array( $tax_include ) ) { … … 2948 2949 $terms = empty( $tax_include['terms'] ) ? array() : $tax_include['terms']; 2949 2950 $include_children = ! empty( $tax_include['include_children'] ); 2951 2952 if ( isset( $tax_include['operator'] ) && 'AND' === $tax_include['operator'] ) { 2953 $operator = 'AND'; 2954 } 2950 2955 } 2951 2956 … … 2956 2961 'terms' => $terms, 2957 2962 'include_children' => $include_children, 2963 'operator' => $operator, 2958 2964 ); 2959 2965 } … … 3049 3055 $limit_schema 3050 3056 ); 3057 // 'operator' is supported only for 'include' queries. 3058 $include_schema['oneOf'][1]['properties']['operator'] = array( 3059 'description' => __( 'Whether items must be assigned all or any of the specified terms.' ), 3060 'type' => 'string', 3061 'enum' => array( 'AND', 'OR' ), 3062 'default' => 'OR', 3063 ); 3064 3051 3065 $exclude_schema = array_merge( 3052 3066 array( -
trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
r50717 r51026 1293 1293 $this->assertNotContains( $p1, $found_ids ); 1294 1294 $this->assertContains( $p2, $found_ids ); 1295 } 1296 1297 /** 1298 * @ticket 41287 1299 */ 1300 public function test_get_items_with_all_categories() { 1301 $taxonomy = get_taxonomy( 'category' ); 1302 $categories = static::factory()->term->create_many( 2, array( 'taxonomy' => $taxonomy->name ) ); 1303 1304 $p1 = static::factory()->post->create( 1305 array( 1306 'post_status' => 'publish', 1307 'post_category' => array( $categories[0] ), 1308 ) 1309 ); 1310 $p2 = static::factory()->post->create( 1311 array( 1312 'post_status' => 'publish', 1313 'post_category' => array( $categories[1] ), 1314 ) 1315 ); 1316 $p3 = static::factory()->post->create( 1317 array( 1318 'post_status' => 'publish', 1319 'post_category' => $categories, 1320 ) 1321 ); 1322 1323 $request = new WP_REST_Request( 'GET', '/wp/v2/posts' ); 1324 $request->set_param( 1325 $taxonomy->rest_base, 1326 array( 1327 'terms' => $categories, 1328 'operator' => 'AND', 1329 ) 1330 ); 1331 $response = rest_get_server()->dispatch( $request ); 1332 $data = $response->get_data(); 1333 1334 $this->assertCount( 1, $data ); 1335 $this->assertSame( $p3, $data[0]['id'] ); 1295 1336 } 1296 1337 -
trunk/tests/qunit/fixtures/wp-api-generated.js
r50995 r51026 369 369 }, 370 370 "orderby": { 371 "description": "Sort collection by object attribute.",371 "description": "Sort collection by post attribute.", 372 372 "type": "string", 373 373 "default": "date", … … 429 429 "categories": { 430 430 "description": "Limit result set to items with specific terms assigned in the categories taxonomy.", 431 "type": [ 432 "object", 433 "array" 434 ], 435 "oneOf": [ 436 { 437 "title": "Term ID List", 438 "description": "Match terms with the listed IDs.", 439 "type": "array", 440 "items": { 441 "type": "integer" 442 } 443 }, 444 { 445 "title": "Term ID Taxonomy Query", 446 "description": "Perform an advanced term query.", 447 "type": "object", 448 "properties": { 449 "terms": { 450 "description": "Term IDs.", 451 "type": "array", 452 "items": { 453 "type": "integer" 454 }, 455 "default": [] 456 }, 457 "include_children": { 458 "description": "Whether to include child terms in the terms limiting the result set.", 459 "type": "boolean", 460 "default": false 461 }, 462 "operator": { 463 "description": "Whether items must be assigned all or any of the specified terms.", 464 "type": "string", 465 "enum": [ 466 "AND", 467 "OR" 468 ], 469 "default": "OR" 470 } 471 }, 472 "additionalProperties": false 473 } 474 ], 475 "required": false 476 }, 477 "categories_exclude": { 478 "description": "Limit result set to items except those with specific terms assigned in the categories taxonomy.", 431 479 "type": [ 432 480 "object", … … 466 514 "required": false 467 515 }, 468 " categories_exclude": {469 "description": "Limit result set to items except those with specific terms assigned in the categories taxonomy.",516 "tags": { 517 "description": "Limit result set to items with specific terms assigned in the tags taxonomy.", 470 518 "type": [ 471 519 "object", … … 494 542 "default": [] 495 543 }, 496 "include_children": { 497 "description": "Whether to include child terms in the terms limiting the result set.", 498 "type": "boolean", 499 "default": false 544 "operator": { 545 "description": "Whether items must be assigned all or any of the specified terms.", 546 "type": "string", 547 "enum": [ 548 "AND", 549 "OR" 550 ], 551 "default": "OR" 500 552 } 501 553 }, … … 505 557 "required": false 506 558 }, 507 "tags ": {508 "description": "Limit result set to items with specific terms assigned in the tags taxonomy.",559 "tags_exclude": { 560 "description": "Limit result set to items except those with specific terms assigned in the tags taxonomy.", 509 561 "type": [ 510 562 "object", … … 539 591 "required": false 540 592 }, 541 "tags_exclude": {542 "description": "Limit result set to items except those with specific terms assigned in the tags taxonomy.",543 "type": [544 "object",545 "array"546 ],547 "oneOf": [548 {549 "title": "Term ID List",550 "description": "Match terms with the listed IDs.",551 "type": "array",552 "items": {553 "type": "integer"554 }555 },556 {557 "title": "Term ID Taxonomy Query",558 "description": "Perform an advanced term query.",559 "type": "object",560 "properties": {561 "terms": {562 "description": "Term IDs.",563 "type": "array",564 "items": {565 "type": "integer"566 },567 "default": []568 }569 },570 "additionalProperties": false571 }572 ],573 "required": false574 },575 593 "sticky": { 576 594 "description": "Limit result set to items that are sticky.", … … 586 604 "args": { 587 605 "date": { 588 "description": "The date the object was published, in the site's timezone.",606 "description": "The date the post was published, in the site's timezone.", 589 607 "type": [ 590 608 "string", … … 595 613 }, 596 614 "date_gmt": { 597 "description": "The date the object was published, as GMT.",615 "description": "The date the post was published, as GMT.", 598 616 "type": [ 599 617 "string", … … 604 622 }, 605 623 "slug": { 606 "description": "An alphanumeric identifier for the object unique to its type.",624 "description": "An alphanumeric identifier for the post unique to its type.", 607 625 "type": "string", 608 626 "required": false 609 627 }, 610 628 "status": { 611 "description": "A named status for the object.",629 "description": "A named status for the post.", 612 630 "type": "string", 613 631 "enum": [ … … 626 644 }, 627 645 "title": { 628 "description": "The title for the object.",646 "description": "The title for the post.", 629 647 "type": "object", 630 648 "properties": { 631 649 "raw": { 632 "description": "Title for the object, as it exists in the database.",650 "description": "Title for the post, as it exists in the database.", 633 651 "type": "string", 634 652 "context": [ … … 637 655 }, 638 656 "rendered": { 639 "description": "HTML title for the object, transformed for display.",657 "description": "HTML title for the post, transformed for display.", 640 658 "type": "string", 641 659 "context": [ … … 650 668 }, 651 669 "content": { 652 "description": "The content for the object.",670 "description": "The content for the post.", 653 671 "type": "object", 654 672 "properties": { 655 673 "raw": { 656 "description": "Content for the object, as it exists in the database.",674 "description": "Content for the post, as it exists in the database.", 657 675 "type": "string", 658 676 "context": [ … … 661 679 }, 662 680 "rendered": { 663 "description": "HTML content for the object, transformed for display.",681 "description": "HTML content for the post, transformed for display.", 664 682 "type": "string", 665 683 "context": [ … … 670 688 }, 671 689 "block_version": { 672 "description": "Version of the content block format used by the object.",690 "description": "Version of the content block format used by the post.", 673 691 "type": "integer", 674 692 "context": [ … … 691 709 }, 692 710 "author": { 693 "description": "The ID for the author of the object.",711 "description": "The ID for the author of the post.", 694 712 "type": "integer", 695 713 "required": false 696 714 }, 697 715 "excerpt": { 698 "description": "The excerpt for the object.",716 "description": "The excerpt for the post.", 699 717 "type": "object", 700 718 "properties": { 701 719 "raw": { 702 "description": "Excerpt for the object, as it exists in the database.",720 "description": "Excerpt for the post, as it exists in the database.", 703 721 "type": "string", 704 722 "context": [ … … 707 725 }, 708 726 "rendered": { 709 "description": "HTML excerpt for the object, transformed for display.",727 "description": "HTML excerpt for the post, transformed for display.", 710 728 "type": "string", 711 729 "context": [ … … 730 748 }, 731 749 "featured_media": { 732 "description": "The ID of the featured media for the object.",750 "description": "The ID of the featured media for the post.", 733 751 "type": "integer", 734 752 "required": false 735 753 }, 736 754 "comment_status": { 737 "description": "Whether or not comments are open on the object.",755 "description": "Whether or not comments are open on the post.", 738 756 "type": "string", 739 757 "enum": [ … … 744 762 }, 745 763 "ping_status": { 746 "description": "Whether or not the object can be pinged.",764 "description": "Whether or not the post can be pinged.", 747 765 "type": "string", 748 766 "enum": [ … … 753 771 }, 754 772 "format": { 755 "description": "The format for the object.",773 "description": "The format for the post.", 756 774 "type": "string", 757 775 "enum": [ … … 776 794 }, 777 795 "sticky": { 778 "description": "Whether or not the object should be treated as sticky.",796 "description": "Whether or not the post should be treated as sticky.", 779 797 "type": "boolean", 780 798 "required": false 781 799 }, 782 800 "template": { 783 "description": "The theme file to use to display the object.",801 "description": "The theme file to use to display the post.", 784 802 "type": "string", 785 803 "required": false 786 804 }, 787 805 "categories": { 788 "description": "The terms assigned to the object in the category taxonomy.",806 "description": "The terms assigned to the post in the category taxonomy.", 789 807 "type": "array", 790 808 "items": { … … 794 812 }, 795 813 "tags": { 796 "description": "The terms assigned to the object in the post_tag taxonomy.",814 "description": "The terms assigned to the post in the post_tag taxonomy.", 797 815 "type": "array", 798 816 "items": { … … 824 842 "args": { 825 843 "id": { 826 "description": "Unique identifier for the object.",844 "description": "Unique identifier for the post.", 827 845 "type": "integer", 828 846 "required": false … … 854 872 "args": { 855 873 "id": { 856 "description": "Unique identifier for the object.",874 "description": "Unique identifier for the post.", 857 875 "type": "integer", 858 876 "required": false 859 877 }, 860 878 "date": { 861 "description": "The date the object was published, in the site's timezone.",879 "description": "The date the post was published, in the site's timezone.", 862 880 "type": [ 863 881 "string", … … 868 886 }, 869 887 "date_gmt": { 870 "description": "The date the object was published, as GMT.",888 "description": "The date the post was published, as GMT.", 871 889 "type": [ 872 890 "string", … … 877 895 }, 878 896 "slug": { 879 "description": "An alphanumeric identifier for the object unique to its type.",897 "description": "An alphanumeric identifier for the post unique to its type.", 880 898 "type": "string", 881 899 "required": false 882 900 }, 883 901 "status": { 884 "description": "A named status for the object.",902 "description": "A named status for the post.", 885 903 "type": "string", 886 904 "enum": [ … … 899 917 }, 900 918 "title": { 901 "description": "The title for the object.",919 "description": "The title for the post.", 902 920 "type": "object", 903 921 "properties": { 904 922 "raw": { 905 "description": "Title for the object, as it exists in the database.",923 "description": "Title for the post, as it exists in the database.", 906 924 "type": "string", 907 925 "context": [ … … 910 928 }, 911 929 "rendered": { 912 "description": "HTML title for the object, transformed for display.",930 "description": "HTML title for the post, transformed for display.", 913 931 "type": "string", 914 932 "context": [ … … 923 941 }, 924 942 "content": { 925 "description": "The content for the object.",943 "description": "The content for the post.", 926 944 "type": "object", 927 945 "properties": { 928 946 "raw": { 929 "description": "Content for the object, as it exists in the database.",947 "description": "Content for the post, as it exists in the database.", 930 948 "type": "string", 931 949 "context": [ … … 934 952 }, 935 953 "rendered": { 936 "description": "HTML content for the object, transformed for display.",954 "description": "HTML content for the post, transformed for display.", 937 955 "type": "string", 938 956 "context": [ … … 943 961 }, 944 962 "block_version": { 945 "description": "Version of the content block format used by the object.",963 "description": "Version of the content block format used by the post.", 946 964 "type": "integer", 947 965 "context": [ … … 964 982 }, 965 983 "author": { 966 "description": "The ID for the author of the object.",984 "description": "The ID for the author of the post.", 967 985 "type": "integer", 968 986 "required": false 969 987 }, 970 988 "excerpt": { 971 "description": "The excerpt for the object.",989 "description": "The excerpt for the post.", 972 990 "type": "object", 973 991 "properties": { 974 992 "raw": { 975 "description": "Excerpt for the object, as it exists in the database.",993 "description": "Excerpt for the post, as it exists in the database.", 976 994 "type": "string", 977 995 "context": [ … … 980 998 }, 981 999 "rendered": { 982 "description": "HTML excerpt for the object, transformed for display.",1000 "description": "HTML excerpt for the post, transformed for display.", 983 1001 "type": "string", 984 1002 "context": [ … … 1003 1021 }, 1004 1022 "featured_media": { 1005 "description": "The ID of the featured media for the object.",1023 "description": "The ID of the featured media for the post.", 1006 1024 "type": "integer", 1007 1025 "required": false 1008 1026 }, 1009 1027 "comment_status": { 1010 "description": "Whether or not comments are open on the object.",1028 "description": "Whether or not comments are open on the post.", 1011 1029 "type": "string", 1012 1030 "enum": [ … … 1017 1035 }, 1018 1036 "ping_status": { 1019 "description": "Whether or not the object can be pinged.",1037 "description": "Whether or not the post can be pinged.", 1020 1038 "type": "string", 1021 1039 "enum": [ … … 1026 1044 }, 1027 1045 "format": { 1028 "description": "The format for the object.",1046 "description": "The format for the post.", 1029 1047 "type": "string", 1030 1048 "enum": [ … … 1049 1067 }, 1050 1068 "sticky": { 1051 "description": "Whether or not the object should be treated as sticky.",1069 "description": "Whether or not the post should be treated as sticky.", 1052 1070 "type": "boolean", 1053 1071 "required": false 1054 1072 }, 1055 1073 "template": { 1056 "description": "The theme file to use to display the object.",1074 "description": "The theme file to use to display the post.", 1057 1075 "type": "string", 1058 1076 "required": false 1059 1077 }, 1060 1078 "categories": { 1061 "description": "The terms assigned to the object in the category taxonomy.",1079 "description": "The terms assigned to the post in the category taxonomy.", 1062 1080 "type": "array", 1063 1081 "items": { … … 1067 1085 }, 1068 1086 "tags": { 1069 "description": "The terms assigned to the object in the post_tag taxonomy.",1087 "description": "The terms assigned to the post in the post_tag taxonomy.", 1070 1088 "type": "array", 1071 1089 "items": { … … 1082 1100 "args": { 1083 1101 "id": { 1084 "description": "Unique identifier for the object.",1102 "description": "Unique identifier for the post.", 1085 1103 "type": "integer", 1086 1104 "required": false … … 1108 1126 "args": { 1109 1127 "parent": { 1110 "description": "The ID for the parent of the object.",1128 "description": "The ID for the parent of the revision.", 1111 1129 "type": "integer", 1112 1130 "required": false … … 1207 1225 "args": { 1208 1226 "parent": { 1209 "description": "The ID for the parent of the object.",1227 "description": "The ID for the parent of the revision.", 1210 1228 "type": "integer", 1211 1229 "required": false 1212 1230 }, 1213 1231 "id": { 1214 "description": "Unique identifier for the object.",1232 "description": "Unique identifier for the revision.", 1215 1233 "type": "integer", 1216 1234 "required": false … … 1235 1253 "args": { 1236 1254 "parent": { 1237 "description": "The ID for the parent of the object.",1255 "description": "The ID for the parent of the revision.", 1238 1256 "type": "integer", 1239 1257 "required": false 1240 1258 }, 1241 1259 "id": { 1242 "description": "Unique identifier for the object.",1260 "description": "Unique identifier for the revision.", 1243 1261 "type": "integer", 1244 1262 "required": false … … 1267 1285 "args": { 1268 1286 "parent": { 1269 "description": "The ID for the parent of the object.",1287 "description": "The ID for the parent of the autosave.", 1270 1288 "type": "integer", 1271 1289 "required": false … … 1290 1308 "args": { 1291 1309 "parent": { 1292 "description": "The ID for the parent of the object.",1310 "description": "The ID for the parent of the autosave.", 1293 1311 "type": "integer", 1294 1312 "required": false 1295 1313 }, 1296 1314 "date": { 1297 "description": "The date the object was published, in the site's timezone.",1315 "description": "The date the post was published, in the site's timezone.", 1298 1316 "type": [ 1299 1317 "string", … … 1304 1322 }, 1305 1323 "date_gmt": { 1306 "description": "The date the object was published, as GMT.",1324 "description": "The date the post was published, as GMT.", 1307 1325 "type": [ 1308 1326 "string", … … 1313 1331 }, 1314 1332 "slug": { 1315 "description": "An alphanumeric identifier for the object unique to its type.",1333 "description": "An alphanumeric identifier for the post unique to its type.", 1316 1334 "type": "string", 1317 1335 "required": false 1318 1336 }, 1319 1337 "status": { 1320 "description": "A named status for the object.",1338 "description": "A named status for the post.", 1321 1339 "type": "string", 1322 1340 "enum": [ … … 1335 1353 }, 1336 1354 "title": { 1337 "description": "The title for the object.",1355 "description": "The title for the post.", 1338 1356 "type": "object", 1339 1357 "properties": { 1340 1358 "raw": { 1341 "description": "Title for the object, as it exists in the database.",1359 "description": "Title for the post, as it exists in the database.", 1342 1360 "type": "string", 1343 1361 "context": [ … … 1346 1364 }, 1347 1365 "rendered": { 1348 "description": "HTML title for the object, transformed for display.",1366 "description": "HTML title for the post, transformed for display.", 1349 1367 "type": "string", 1350 1368 "context": [ … … 1359 1377 }, 1360 1378 "content": { 1361 "description": "The content for the object.",1379 "description": "The content for the post.", 1362 1380 "type": "object", 1363 1381 "properties": { 1364 1382 "raw": { 1365 "description": "Content for the object, as it exists in the database.",1383 "description": "Content for the post, as it exists in the database.", 1366 1384 "type": "string", 1367 1385 "context": [ … … 1370 1388 }, 1371 1389 "rendered": { 1372 "description": "HTML content for the object, transformed for display.",1390 "description": "HTML content for the post, transformed for display.", 1373 1391 "type": "string", 1374 1392 "context": [ … … 1379 1397 }, 1380 1398 "block_version": { 1381 "description": "Version of the content block format used by the object.",1399 "description": "Version of the content block format used by the post.", 1382 1400 "type": "integer", 1383 1401 "context": [ … … 1400 1418 }, 1401 1419 "author": { 1402 "description": "The ID for the author of the object.",1420 "description": "The ID for the author of the post.", 1403 1421 "type": "integer", 1404 1422 "required": false 1405 1423 }, 1406 1424 "excerpt": { 1407 "description": "The excerpt for the object.",1425 "description": "The excerpt for the post.", 1408 1426 "type": "object", 1409 1427 "properties": { 1410 1428 "raw": { 1411 "description": "Excerpt for the object, as it exists in the database.",1429 "description": "Excerpt for the post, as it exists in the database.", 1412 1430 "type": "string", 1413 1431 "context": [ … … 1416 1434 }, 1417 1435 "rendered": { 1418 "description": "HTML excerpt for the object, transformed for display.",1436 "description": "HTML excerpt for the post, transformed for display.", 1419 1437 "type": "string", 1420 1438 "context": [ … … 1439 1457 }, 1440 1458 "featured_media": { 1441 "description": "The ID of the featured media for the object.",1459 "description": "The ID of the featured media for the post.", 1442 1460 "type": "integer", 1443 1461 "required": false 1444 1462 }, 1445 1463 "comment_status": { 1446 "description": "Whether or not comments are open on the object.",1464 "description": "Whether or not comments are open on the post.", 1447 1465 "type": "string", 1448 1466 "enum": [ … … 1453 1471 }, 1454 1472 "ping_status": { 1455 "description": "Whether or not the object can be pinged.",1473 "description": "Whether or not the post can be pinged.", 1456 1474 "type": "string", 1457 1475 "enum": [ … … 1462 1480 }, 1463 1481 "format": { 1464 "description": "The format for the object.",1482 "description": "The format for the post.", 1465 1483 "type": "string", 1466 1484 "enum": [ … … 1485 1503 }, 1486 1504 "sticky": { 1487 "description": "Whether or not the object should be treated as sticky.",1505 "description": "Whether or not the post should be treated as sticky.", 1488 1506 "type": "boolean", 1489 1507 "required": false 1490 1508 }, 1491 1509 "template": { 1492 "description": "The theme file to use to display the object.",1510 "description": "The theme file to use to display the post.", 1493 1511 "type": "string", 1494 1512 "required": false 1495 1513 }, 1496 1514 "categories": { 1497 "description": "The terms assigned to the object in the category taxonomy.",1515 "description": "The terms assigned to the post in the category taxonomy.", 1498 1516 "type": "array", 1499 1517 "items": { … … 1503 1521 }, 1504 1522 "tags": { 1505 "description": "The terms assigned to the object in the post_tag taxonomy.",1523 "description": "The terms assigned to the post in the post_tag taxonomy.", 1506 1524 "type": "array", 1507 1525 "items": { … … 1526 1544 "args": { 1527 1545 "parent": { 1528 "description": "The ID for the parent of the object.",1546 "description": "The ID for the parent of the autosave.", 1529 1547 "type": "integer", 1530 1548 "required": false 1531 1549 }, 1532 1550 "id": { 1533 "description": "The ID for the object.",1551 "description": "The ID for the autosave.", 1534 1552 "type": "integer", 1535 1553 "required": false … … 1674 1692 }, 1675 1693 "orderby": { 1676 "description": "Sort collection by object attribute.",1694 "description": "Sort collection by post attribute.", 1677 1695 "type": "string", 1678 1696 "default": "date", … … 1750 1768 "args": { 1751 1769 "date": { 1752 "description": "The date the object was published, in the site's timezone.",1770 "description": "The date the post was published, in the site's timezone.", 1753 1771 "type": [ 1754 1772 "string", … … 1759 1777 }, 1760 1778 "date_gmt": { 1761 "description": "The date the object was published, as GMT.",1779 "description": "The date the post was published, as GMT.", 1762 1780 "type": [ 1763 1781 "string", … … 1768 1786 }, 1769 1787 "slug": { 1770 "description": "An alphanumeric identifier for the object unique to its type.",1788 "description": "An alphanumeric identifier for the post unique to its type.", 1771 1789 "type": "string", 1772 1790 "required": false 1773 1791 }, 1774 1792 "status": { 1775 "description": "A named status for the object.",1793 "description": "A named status for the post.", 1776 1794 "type": "string", 1777 1795 "enum": [ … … 1790 1808 }, 1791 1809 "parent": { 1792 "description": "The ID for the parent of the object.",1810 "description": "The ID for the parent of the post.", 1793 1811 "type": "integer", 1794 1812 "required": false 1795 1813 }, 1796 1814 "title": { 1797 "description": "The title for the object.",1815 "description": "The title for the post.", 1798 1816 "type": "object", 1799 1817 "properties": { 1800 1818 "raw": { 1801 "description": "Title for the object, as it exists in the database.",1819 "description": "Title for the post, as it exists in the database.", 1802 1820 "type": "string", 1803 1821 "context": [ … … 1806 1824 }, 1807 1825 "rendered": { 1808 "description": "HTML title for the object, transformed for display.",1826 "description": "HTML title for the post, transformed for display.", 1809 1827 "type": "string", 1810 1828 "context": [ … … 1819 1837 }, 1820 1838 "content": { 1821 "description": "The content for the object.",1839 "description": "The content for the post.", 1822 1840 "type": "object", 1823 1841 "properties": { 1824 1842 "raw": { 1825 "description": "Content for the object, as it exists in the database.",1843 "description": "Content for the post, as it exists in the database.", 1826 1844 "type": "string", 1827 1845 "context": [ … … 1830 1848 }, 1831 1849 "rendered": { 1832 "description": "HTML content for the object, transformed for display.",1850 "description": "HTML content for the post, transformed for display.", 1833 1851 "type": "string", 1834 1852 "context": [ … … 1839 1857 }, 1840 1858 "block_version": { 1841 "description": "Version of the content block format used by the object.",1859 "description": "Version of the content block format used by the post.", 1842 1860 "type": "integer", 1843 1861 "context": [ … … 1860 1878 }, 1861 1879 "author": { 1862 "description": "The ID for the author of the object.",1880 "description": "The ID for the author of the post.", 1863 1881 "type": "integer", 1864 1882 "required": false 1865 1883 }, 1866 1884 "excerpt": { 1867 "description": "The excerpt for the object.",1885 "description": "The excerpt for the post.", 1868 1886 "type": "object", 1869 1887 "properties": { 1870 1888 "raw": { 1871 "description": "Excerpt for the object, as it exists in the database.",1889 "description": "Excerpt for the post, as it exists in the database.", 1872 1890 "type": "string", 1873 1891 "context": [ … … 1876 1894 }, 1877 1895 "rendered": { 1878 "description": "HTML excerpt for the object, transformed for display.",1896 "description": "HTML excerpt for the post, transformed for display.", 1879 1897 "type": "string", 1880 1898 "context": [ … … 1899 1917 }, 1900 1918 "featured_media": { 1901 "description": "The ID of the featured media for the object.",1919 "description": "The ID of the featured media for the post.", 1902 1920 "type": "integer", 1903 1921 "required": false 1904 1922 }, 1905 1923 "comment_status": { 1906 "description": "Whether or not comments are open on the object.",1924 "description": "Whether or not comments are open on the post.", 1907 1925 "type": "string", 1908 1926 "enum": [ … … 1913 1931 }, 1914 1932 "ping_status": { 1915 "description": "Whether or not the object can be pinged.",1933 "description": "Whether or not the post can be pinged.", 1916 1934 "type": "string", 1917 1935 "enum": [ … … 1922 1940 }, 1923 1941 "menu_order": { 1924 "description": "The order of the object in relation to other object of its type.",1942 "description": "The order of the post in relation to other posts.", 1925 1943 "type": "integer", 1926 1944 "required": false … … 1933 1951 }, 1934 1952 "template": { 1935 "description": "The theme file to use to display the object.",1953 "description": "The theme file to use to display the post.", 1936 1954 "type": "string", 1937 1955 "required": false … … 1960 1978 "args": { 1961 1979 "id": { 1962 "description": "Unique identifier for the object.",1980 "description": "Unique identifier for the post.", 1963 1981 "type": "integer", 1964 1982 "required": false … … 1990 2008 "args": { 1991 2009 "id": { 1992 "description": "Unique identifier for the object.",2010 "description": "Unique identifier for the post.", 1993 2011 "type": "integer", 1994 2012 "required": false 1995 2013 }, 1996 2014 "date": { 1997 "description": "The date the object was published, in the site's timezone.",2015 "description": "The date the post was published, in the site's timezone.", 1998 2016 "type": [ 1999 2017 "string", … … 2004 2022 }, 2005 2023 "date_gmt": { 2006 "description": "The date the object was published, as GMT.",2024 "description": "The date the post was published, as GMT.", 2007 2025 "type": [ 2008 2026 "string", … … 2013 2031 }, 2014 2032 "slug": { 2015 "description": "An alphanumeric identifier for the object unique to its type.",2033 "description": "An alphanumeric identifier for the post unique to its type.", 2016 2034 "type": "string", 2017 2035 "required": false 2018 2036 }, 2019 2037 "status": { 2020 "description": "A named status for the object.",2038 "description": "A named status for the post.", 2021 2039 "type": "string", 2022 2040 "enum": [ … … 2035 2053 }, 2036 2054 "parent": { 2037 "description": "The ID for the parent of the object.",2055 "description": "The ID for the parent of the post.", 2038 2056 "type": "integer", 2039 2057 "required": false 2040 2058 }, 2041 2059 "title": { 2042 "description": "The title for the object.",2060 "description": "The title for the post.", 2043 2061 "type": "object", 2044 2062 "properties": { 2045 2063 "raw": { 2046 "description": "Title for the object, as it exists in the database.",2064 "description": "Title for the post, as it exists in the database.", 2047 2065 "type": "string", 2048 2066 "context": [ … … 2051 2069 }, 2052 2070 "rendered": { 2053 "description": "HTML title for the object, transformed for display.",2071 "description": "HTML title for the post, transformed for display.", 2054 2072 "type": "string", 2055 2073 "context": [ … … 2064 2082 }, 2065 2083 "content": { 2066 "description": "The content for the object.",2084 "description": "The content for the post.", 2067 2085 "type": "object", 2068 2086 "properties": { 2069 2087 "raw": { 2070 "description": "Content for the object, as it exists in the database.",2088 "description": "Content for the post, as it exists in the database.", 2071 2089 "type": "string", 2072 2090 "context": [ … … 2075 2093 }, 2076 2094 "rendered": { 2077 "description": "HTML content for the object, transformed for display.",2095 "description": "HTML content for the post, transformed for display.", 2078 2096 "type": "string", 2079 2097 "context": [ … … 2084 2102 }, 2085 2103 "block_version": { 2086 "description": "Version of the content block format used by the object.",2104 "description": "Version of the content block format used by the post.", 2087 2105 "type": "integer", 2088 2106 "context": [ … … 2105 2123 }, 2106 2124 "author": { 2107 "description": "The ID for the author of the object.",2125 "description": "The ID for the author of the post.", 2108 2126 "type": "integer", 2109 2127 "required": false 2110 2128 }, 2111 2129 "excerpt": { 2112 "description": "The excerpt for the object.",2130 "description": "The excerpt for the post.", 2113 2131 "type": "object", 2114 2132 "properties": { 2115 2133 "raw": { 2116 "description": "Excerpt for the object, as it exists in the database.",2134 "description": "Excerpt for the post, as it exists in the database.", 2117 2135 "type": "string", 2118 2136 "context": [ … … 2121 2139 }, 2122 2140 "rendered": { 2123 "description": "HTML excerpt for the object, transformed for display.",2141 "description": "HTML excerpt for the post, transformed for display.", 2124 2142 "type": "string", 2125 2143 "context": [ … … 2144 2162 }, 2145 2163 "featured_media": { 2146 "description": "The ID of the featured media for the object.",2164 "description": "The ID of the featured media for the post.", 2147 2165 "type": "integer", 2148 2166 "required": false 2149 2167 }, 2150 2168 "comment_status": { 2151 "description": "Whether or not comments are open on the object.",2169 "description": "Whether or not comments are open on the post.", 2152 2170 "type": "string", 2153 2171 "enum": [ … … 2158 2176 }, 2159 2177 "ping_status": { 2160 "description": "Whether or not the object can be pinged.",2178 "description": "Whether or not the post can be pinged.", 2161 2179 "type": "string", 2162 2180 "enum": [ … … 2167 2185 }, 2168 2186 "menu_order": { 2169 "description": "The order of the object in relation to other object of its type.",2187 "description": "The order of the post in relation to other posts.", 2170 2188 "type": "integer", 2171 2189 "required": false … … 2178 2196 }, 2179 2197 "template": { 2180 "description": "The theme file to use to display the object.",2198 "description": "The theme file to use to display the post.", 2181 2199 "type": "string", 2182 2200 "required": false … … 2190 2208 "args": { 2191 2209 "id": { 2192 "description": "Unique identifier for the object.",2210 "description": "Unique identifier for the post.", 2193 2211 "type": "integer", 2194 2212 "required": false … … 2216 2234 "args": { 2217 2235 "parent": { 2218 "description": "The ID for the parent of the object.",2236 "description": "The ID for the parent of the revision.", 2219 2237 "type": "integer", 2220 2238 "required": false … … 2315 2333 "args": { 2316 2334 "parent": { 2317 "description": "The ID for the parent of the object.",2335 "description": "The ID for the parent of the revision.", 2318 2336 "type": "integer", 2319 2337 "required": false 2320 2338 }, 2321 2339 "id": { 2322 "description": "Unique identifier for the object.",2340 "description": "Unique identifier for the revision.", 2323 2341 "type": "integer", 2324 2342 "required": false … … 2343 2361 "args": { 2344 2362 "parent": { 2345 "description": "The ID for the parent of the object.",2363 "description": "The ID for the parent of the revision.", 2346 2364 "type": "integer", 2347 2365 "required": false 2348 2366 }, 2349 2367 "id": { 2350 "description": "Unique identifier for the object.",2368 "description": "Unique identifier for the revision.", 2351 2369 "type": "integer", 2352 2370 "required": false … … 2375 2393 "args": { 2376 2394 "parent": { 2377 "description": "The ID for the parent of the object.",2395 "description": "The ID for the parent of the autosave.", 2378 2396 "type": "integer", 2379 2397 "required": false … … 2398 2416 "args": { 2399 2417 "parent": { 2400 "description": "The ID for the parent of the object.",2418 "description": "The ID for the parent of the post.", 2401 2419 "type": "integer", 2402 2420 "required": false 2403 2421 }, 2404 2422 "date": { 2405 "description": "The date the object was published, in the site's timezone.",2423 "description": "The date the post was published, in the site's timezone.", 2406 2424 "type": [ 2407 2425 "string", … … 2412 2430 }, 2413 2431 "date_gmt": { 2414 "description": "The date the object was published, as GMT.",2432 "description": "The date the post was published, as GMT.", 2415 2433 "type": [ 2416 2434 "string", … … 2421 2439 }, 2422 2440 "slug": { 2423 "description": "An alphanumeric identifier for the object unique to its type.",2441 "description": "An alphanumeric identifier for the post unique to its type.", 2424 2442 "type": "string", 2425 2443 "required": false 2426 2444 }, 2427 2445 "status": { 2428 "description": "A named status for the object.",2446 "description": "A named status for the post.", 2429 2447 "type": "string", 2430 2448 "enum": [ … … 2443 2461 }, 2444 2462 "title": { 2445 "description": "The title for the object.",2463 "description": "The title for the post.", 2446 2464 "type": "object", 2447 2465 "properties": { 2448 2466 "raw": { 2449 "description": "Title for the object, as it exists in the database.",2467 "description": "Title for the post, as it exists in the database.", 2450 2468 "type": "string", 2451 2469 "context": [ … … 2454 2472 }, 2455 2473 "rendered": { 2456 "description": "HTML title for the object, transformed for display.",2474 "description": "HTML title for the post, transformed for display.", 2457 2475 "type": "string", 2458 2476 "context": [ … … 2467 2485 }, 2468 2486 "content": { 2469 "description": "The content for the object.",2487 "description": "The content for the post.", 2470 2488 "type": "object", 2471 2489 "properties": { 2472 2490 "raw": { 2473 "description": "Content for the object, as it exists in the database.",2491 "description": "Content for the post, as it exists in the database.", 2474 2492 "type": "string", 2475 2493 "context": [ … … 2478 2496 }, 2479 2497 "rendered": { 2480 "description": "HTML content for the object, transformed for display.",2498 "description": "HTML content for the post, transformed for display.", 2481 2499 "type": "string", 2482 2500 "context": [ … … 2487 2505 }, 2488 2506 "block_version": { 2489 "description": "Version of the content block format used by the object.",2507 "description": "Version of the content block format used by the post.", 2490 2508 "type": "integer", 2491 2509 "context": [ … … 2508 2526 }, 2509 2527 "author": { 2510 "description": "The ID for the author of the object.",2528 "description": "The ID for the author of the post.", 2511 2529 "type": "integer", 2512 2530 "required": false 2513 2531 }, 2514 2532 "excerpt": { 2515 "description": "The excerpt for the object.",2533 "description": "The excerpt for the post.", 2516 2534 "type": "object", 2517 2535 "properties": { 2518 2536 "raw": { 2519 "description": "Excerpt for the object, as it exists in the database.",2537 "description": "Excerpt for the post, as it exists in the database.", 2520 2538 "type": "string", 2521 2539 "context": [ … … 2524 2542 }, 2525 2543 "rendered": { 2526 "description": "HTML excerpt for the object, transformed for display.",2544 "description": "HTML excerpt for the post, transformed for display.", 2527 2545 "type": "string", 2528 2546 "context": [ … … 2547 2565 }, 2548 2566 "featured_media": { 2549 "description": "The ID of the featured media for the object.",2567 "description": "The ID of the featured media for the post.", 2550 2568 "type": "integer", 2551 2569 "required": false 2552 2570 }, 2553 2571 "comment_status": { 2554 "description": "Whether or not comments are open on the object.",2572 "description": "Whether or not comments are open on the post.", 2555 2573 "type": "string", 2556 2574 "enum": [ … … 2561 2579 }, 2562 2580 "ping_status": { 2563 "description": "Whether or not the object can be pinged.",2581 "description": "Whether or not the post can be pinged.", 2564 2582 "type": "string", 2565 2583 "enum": [ … … 2570 2588 }, 2571 2589 "menu_order": { 2572 "description": "The order of the object in relation to other object of its type.",2590 "description": "The order of the post in relation to other posts.", 2573 2591 "type": "integer", 2574 2592 "required": false … … 2581 2599 }, 2582 2600 "template": { 2583 "description": "The theme file to use to display the object.",2601 "description": "The theme file to use to display the post.", 2584 2602 "type": "string", 2585 2603 "required": false … … 2601 2619 "args": { 2602 2620 "parent": { 2603 "description": "The ID for the parent of the object.",2621 "description": "The ID for the parent of the autosave.", 2604 2622 "type": "integer", 2605 2623 "required": false 2606 2624 }, 2607 2625 "id": { 2608 "description": "The ID for the object.",2626 "description": "The ID for the autosave.", 2609 2627 "type": "integer", 2610 2628 "required": false … … 2744 2762 }, 2745 2763 "orderby": { 2746 "description": "Sort collection by object attribute.",2764 "description": "Sort collection by post attribute.", 2747 2765 "type": "string", 2748 2766 "default": "date", … … 2828 2846 "args": { 2829 2847 "date": { 2830 "description": "The date the object was published, in the site's timezone.",2848 "description": "The date the post was published, in the site's timezone.", 2831 2849 "type": [ 2832 2850 "string", … … 2837 2855 }, 2838 2856 "date_gmt": { 2839 "description": "The date the object was published, as GMT.",2857 "description": "The date the post was published, as GMT.", 2840 2858 "type": [ 2841 2859 "string", … … 2846 2864 }, 2847 2865 "slug": { 2848 "description": "An alphanumeric identifier for the object unique to its type.",2866 "description": "An alphanumeric identifier for the post unique to its type.", 2849 2867 "type": "string", 2850 2868 "required": false 2851 2869 }, 2852 2870 "status": { 2853 "description": "A named status for the object.",2871 "description": "A named status for the post.", 2854 2872 "type": "string", 2855 2873 "enum": [ … … 2863 2881 }, 2864 2882 "title": { 2865 "description": "The title for the object.",2883 "description": "The title for the post.", 2866 2884 "type": "object", 2867 2885 "properties": { 2868 2886 "raw": { 2869 "description": "Title for the object, as it exists in the database.",2887 "description": "Title for the post, as it exists in the database.", 2870 2888 "type": "string", 2871 2889 "context": [ … … 2874 2892 }, 2875 2893 "rendered": { 2876 "description": "HTML title for the object, transformed for display.",2894 "description": "HTML title for the post, transformed for display.", 2877 2895 "type": "string", 2878 2896 "context": [ … … 2887 2905 }, 2888 2906 "author": { 2889 "description": "The ID for the author of the object.",2907 "description": "The ID for the author of the post.", 2890 2908 "type": "integer", 2891 2909 "required": false 2892 2910 }, 2893 2911 "comment_status": { 2894 "description": "Whether or not comments are open on the object.",2912 "description": "Whether or not comments are open on the post.", 2895 2913 "type": "string", 2896 2914 "enum": [ … … 2901 2919 }, 2902 2920 "ping_status": { 2903 "description": "Whether or not the object can be pinged.",2921 "description": "Whether or not the post can be pinged.", 2904 2922 "type": "string", 2905 2923 "enum": [ … … 2916 2934 }, 2917 2935 "template": { 2918 "description": "The theme file to use to display the object.",2936 "description": "The theme file to use to display the post.", 2919 2937 "type": "string", 2920 2938 "required": false … … 2954 2972 "properties": { 2955 2973 "raw": { 2956 "description": "Description for the object, as it exists in the database.",2974 "description": "Description for the attachment, as it exists in the database.", 2957 2975 "type": "string", 2958 2976 "context": [ … … 2961 2979 }, 2962 2980 "rendered": { 2963 "description": "HTML description for the object, transformed for display.",2981 "description": "HTML description for the attachment, transformed for display.", 2964 2982 "type": "string", 2965 2983 "context": [ … … 3000 3018 "args": { 3001 3019 "id": { 3002 "description": "Unique identifier for the object.",3020 "description": "Unique identifier for the post.", 3003 3021 "type": "integer", 3004 3022 "required": false … … 3025 3043 "args": { 3026 3044 "id": { 3027 "description": "Unique identifier for the object.",3045 "description": "Unique identifier for the post.", 3028 3046 "type": "integer", 3029 3047 "required": false 3030 3048 }, 3031 3049 "date": { 3032 "description": "The date the object was published, in the site's timezone.",3050 "description": "The date the post was published, in the site's timezone.", 3033 3051 "type": [ 3034 3052 "string", … … 3039 3057 }, 3040 3058 "date_gmt": { 3041 "description": "The date the object was published, as GMT.",3059 "description": "The date the post was published, as GMT.", 3042 3060 "type": [ 3043 3061 "string", … … 3048 3066 }, 3049 3067 "slug": { 3050 "description": "An alphanumeric identifier for the object unique to its type.",3068 "description": "An alphanumeric identifier for the post unique to its type.", 3051 3069 "type": "string", 3052 3070 "required": false 3053 3071 }, 3054 3072 "status": { 3055 "description": "A named status for the object.",3073 "description": "A named status for the post.", 3056 3074 "type": "string", 3057 3075 "enum": [ … … 3065 3083 }, 3066 3084 "title": { 3067 "description": "The title for the object.",3085 "description": "The title for the post.", 3068 3086 "type": "object", 3069 3087 "properties": { 3070 3088 "raw": { 3071 "description": "Title for the object, as it exists in the database.",3089 "description": "Title for the post, as it exists in the database.", 3072 3090 "type": "string", 3073 3091 "context": [ … … 3076 3094 }, 3077 3095 "rendered": { 3078 "description": "HTML title for the object, transformed for display.",3096 "description": "HTML title for the post, transformed for display.", 3079 3097 "type": "string", 3080 3098 "context": [ … … 3089 3107 }, 3090 3108 "author": { 3091 "description": "The ID for the author of the object.",3109 "description": "The ID for the author of the post.", 3092 3110 "type": "integer", 3093 3111 "required": false 3094 3112 }, 3095 3113 "comment_status": { 3096 "description": "Whether or not comments are open on the object.",3114 "description": "Whether or not comments are open on the post.", 3097 3115 "type": "string", 3098 3116 "enum": [ … … 3103 3121 }, 3104 3122 "ping_status": { 3105 "description": "Whether or not the object can be pinged.",3123 "description": "Whether or not the post can be pinged.", 3106 3124 "type": "string", 3107 3125 "enum": [ … … 3118 3136 }, 3119 3137 "template": { 3120 "description": "The theme file to use to display the object.",3138 "description": "The theme file to use to display the post.", 3121 3139 "type": "string", 3122 3140 "required": false … … 3156 3174 "properties": { 3157 3175 "raw": { 3158 "description": "Description for the object, as it exists in the database.",3176 "description": "Description for the attachment, as it exists in the database.", 3159 3177 "type": "string", 3160 3178 "context": [ … … 3163 3181 }, 3164 3182 "rendered": { 3165 "description": "HTML description for the object, transformed for display.",3183 "description": "HTML description for the attachment, transformed for display.", 3166 3184 "type": "string", 3167 3185 "context": [ … … 3187 3205 "args": { 3188 3206 "id": { 3189 "description": "Unique identifier for the object.",3207 "description": "Unique identifier for the post.", 3190 3208 "type": "integer", 3191 3209 "required": false … … 3213 3231 "args": { 3214 3232 "id": { 3215 "description": "Unique identifier for the object.",3233 "description": "Unique identifier for the attachment.", 3216 3234 "type": "integer", 3217 3235 "required": false … … 3468 3486 }, 3469 3487 "orderby": { 3470 "description": "Sort collection by object attribute.",3488 "description": "Sort collection by post attribute.", 3471 3489 "type": "string", 3472 3490 "default": "date", … … 3525 3543 "args": { 3526 3544 "date": { 3527 "description": "The date the object was published, in the site's timezone.",3545 "description": "The date the post was published, in the site's timezone.", 3528 3546 "type": [ 3529 3547 "string", … … 3534 3552 }, 3535 3553 "date_gmt": { 3536 "description": "The date the object was published, as GMT.",3554 "description": "The date the post was published, as GMT.", 3537 3555 "type": [ 3538 3556 "string", … … 3543 3561 }, 3544 3562 "slug": { 3545 "description": "An alphanumeric identifier for the object unique to its type.",3563 "description": "An alphanumeric identifier for the post unique to its type.", 3546 3564 "type": "string", 3547 3565 "required": false 3548 3566 }, 3549 3567 "status": { 3550 "description": "A named status for the object.",3568 "description": "A named status for the post.", 3551 3569 "type": "string", 3552 3570 "enum": [ … … 3565 3583 }, 3566 3584 "title": { 3567 "description": "The title for the object.",3585 "description": "The title for the post.", 3568 3586 "type": "object", 3569 3587 "properties": { 3570 3588 "raw": { 3571 "description": "Title for the object, as it exists in the database.",3589 "description": "Title for the post, as it exists in the database.", 3572 3590 "type": "string", 3573 3591 "context": [ … … 3580 3598 }, 3581 3599 "content": { 3582 "description": "The content for the object.",3600 "description": "The content for the post.", 3583 3601 "type": "object", 3584 3602 "properties": { 3585 3603 "raw": { 3586 "description": "Content for the object, as it exists in the database.",3604 "description": "Content for the post, as it exists in the database.", 3587 3605 "type": "string", 3588 3606 "context": [ … … 3592 3610 }, 3593 3611 "block_version": { 3594 "description": "Version of the content block format used by the object.",3612 "description": "Version of the content block format used by the post.", 3595 3613 "type": "integer", 3596 3614 "context": [ … … 3613 3631 }, 3614 3632 "template": { 3615 "description": "The theme file to use to display the object.",3633 "description": "The theme file to use to display the post.", 3616 3634 "type": "string", 3617 3635 "required": false … … 3640 3658 "args": { 3641 3659 "id": { 3642 "description": "Unique identifier for the object.",3660 "description": "Unique identifier for the post.", 3643 3661 "type": "integer", 3644 3662 "required": false … … 3670 3688 "args": { 3671 3689 "id": { 3672 "description": "Unique identifier for the object.",3690 "description": "Unique identifier for the post.", 3673 3691 "type": "integer", 3674 3692 "required": false 3675 3693 }, 3676 3694 "date": { 3677 "description": "The date the object was published, in the site's timezone.",3695 "description": "The date the post was published, in the site's timezone.", 3678 3696 "type": [ 3679 3697 "string", … … 3684 3702 }, 3685 3703 "date_gmt": { 3686 "description": "The date the object was published, as GMT.",3704 "description": "The date the post was published, as GMT.", 3687 3705 "type": [ 3688 3706 "string", … … 3693 3711 }, 3694 3712 "slug": { 3695 "description": "An alphanumeric identifier for the object unique to its type.",3713 "description": "An alphanumeric identifier for the post unique to its type.", 3696 3714 "type": "string", 3697 3715 "required": false 3698 3716 }, 3699 3717 "status": { 3700 "description": "A named status for the object.",3718 "description": "A named status for the post.", 3701 3719 "type": "string", 3702 3720 "enum": [ … … 3715 3733 }, 3716 3734 "title": { 3717 "description": "The title for the object.",3735 "description": "The title for the post.", 3718 3736 "type": "object", 3719 3737 "properties": { 3720 3738 "raw": { 3721 "description": "Title for the object, as it exists in the database.",3739 "description": "Title for the post, as it exists in the database.", 3722 3740 "type": "string", 3723 3741 "context": [ … … 3730 3748 }, 3731 3749 "content": { 3732 "description": "The content for the object.",3750 "description": "The content for the post.", 3733 3751 "type": "object", 3734 3752 "properties": { 3735 3753 "raw": { 3736 "description": "Content for the object, as it exists in the database.",3754 "description": "Content for the post, as it exists in the database.", 3737 3755 "type": "string", 3738 3756 "context": [ … … 3742 3760 }, 3743 3761 "block_version": { 3744 "description": "Version of the content block format used by the object.",3762 "description": "Version of the content block format used by the post.", 3745 3763 "type": "integer", 3746 3764 "context": [ … … 3763 3781 }, 3764 3782 "template": { 3765 "description": "The theme file to use to display the object.",3783 "description": "The theme file to use to display the post.", 3766 3784 "type": "string", 3767 3785 "required": false … … 3775 3793 "args": { 3776 3794 "id": { 3777 "description": "Unique identifier for the object.",3795 "description": "Unique identifier for the post.", 3778 3796 "type": "integer", 3779 3797 "required": false … … 3801 3819 "args": { 3802 3820 "parent": { 3803 "description": "The ID for the parent of the object.",3821 "description": "The ID for the parent of the revision.", 3804 3822 "type": "integer", 3805 3823 "required": false … … 3900 3918 "args": { 3901 3919 "parent": { 3902 "description": "The ID for the parent of the object.",3920 "description": "The ID for the parent of the revision.", 3903 3921 "type": "integer", 3904 3922 "required": false 3905 3923 }, 3906 3924 "id": { 3907 "description": "Unique identifier for the object.",3925 "description": "Unique identifier for the revision.", 3908 3926 "type": "integer", 3909 3927 "required": false … … 3928 3946 "args": { 3929 3947 "parent": { 3930 "description": "The ID for the parent of the object.",3948 "description": "The ID for the parent of the revision.", 3931 3949 "type": "integer", 3932 3950 "required": false 3933 3951 }, 3934 3952 "id": { 3935 "description": "Unique identifier for the object.",3953 "description": "Unique identifier for the revision.", 3936 3954 "type": "integer", 3937 3955 "required": false … … 3960 3978 "args": { 3961 3979 "parent": { 3962 "description": "The ID for the parent of the object.",3980 "description": "The ID for the parent of the autosave.", 3963 3981 "type": "integer", 3964 3982 "required": false … … 3983 4001 "args": { 3984 4002 "parent": { 3985 "description": "The ID for the parent of the object.",4003 "description": "The ID for the parent of the autosave.", 3986 4004 "type": "integer", 3987 4005 "required": false 3988 4006 }, 3989 4007 "date": { 3990 "description": "The date the object was published, in the site's timezone.",4008 "description": "The date the post was published, in the site's timezone.", 3991 4009 "type": [ 3992 4010 "string", … … 3997 4015 }, 3998 4016 "date_gmt": { 3999 "description": "The date the object was published, as GMT.",4017 "description": "The date the post was published, as GMT.", 4000 4018 "type": [ 4001 4019 "string", … … 4006 4024 }, 4007 4025 "slug": { 4008 "description": "An alphanumeric identifier for the object unique to its type.",4026 "description": "An alphanumeric identifier for the post unique to its type.", 4009 4027 "type": "string", 4010 4028 "required": false 4011 4029 }, 4012 4030 "status": { 4013 "description": "A named status for the object.",4031 "description": "A named status for the post.", 4014 4032 "type": "string", 4015 4033 "enum": [ … … 4028 4046 }, 4029 4047 "title": { 4030 "description": "The title for the object.",4048 "description": "The title for the post.", 4031 4049 "type": "object", 4032 4050 "properties": { 4033 4051 "raw": { 4034 "description": "Title for the object, as it exists in the database.",4052 "description": "Title for the post, as it exists in the database.", 4035 4053 "type": "string", 4036 4054 "context": [ … … 4043 4061 }, 4044 4062 "content": { 4045 "description": "The content for the object.",4063 "description": "The content for the post.", 4046 4064 "type": "object", 4047 4065 "properties": { 4048 4066 "raw": { 4049 "description": "Content for the object, as it exists in the database.",4067 "description": "Content for the post, as it exists in the database.", 4050 4068 "type": "string", 4051 4069 "context": [ … … 4055 4073 }, 4056 4074 "block_version": { 4057 "description": "Version of the content block format used by the object.",4075 "description": "Version of the content block format used by the post.", 4058 4076 "type": "integer", 4059 4077 "context": [ … … 4076 4094 }, 4077 4095 "template": { 4078 "description": "The theme file to use to display the object.",4096 "description": "The theme file to use to display the post.", 4079 4097 "type": "string", 4080 4098 "required": false … … 4096 4114 "args": { 4097 4115 "parent": { 4098 "description": "The ID for the parent of the object.",4116 "description": "The ID for the parent of the autosave.", 4099 4117 "type": "integer", 4100 4118 "required": false 4101 4119 }, 4102 4120 "id": { 4103 "description": "The ID for the object.", 4121 "description": "The ID for the autosave.", 4122 "type": "integer", 4123 "required": false 4124 }, 4125 "context": { 4126 "description": "Scope under which the request is made; determines fields present in response.", 4127 "type": "string", 4128 "enum": [ 4129 "view", 4130 "embed", 4131 "edit" 4132 ], 4133 "default": "view", 4134 "required": false 4135 } 4136 } 4137 } 4138 ] 4139 }, 4140 "/wp/v2/templates": { 4141 "namespace": "wp/v2", 4142 "methods": [ 4143 "GET", 4144 "POST" 4145 ], 4146 "endpoints": [ 4147 { 4148 "methods": [ 4149 "GET" 4150 ], 4151 "args": { 4152 "context": { 4153 "description": "Scope under which the request is made; determines fields present in response.", 4154 "type": "string", 4155 "enum": [ 4156 "view", 4157 "embed", 4158 "edit" 4159 ], 4160 "required": false 4161 }, 4162 "wp_id": { 4163 "description": "Limit to the specified post id.", 4164 "type": "integer", 4165 "required": false 4166 } 4167 } 4168 }, 4169 { 4170 "methods": [ 4171 "POST" 4172 ], 4173 "args": { 4174 "slug": { 4175 "description": "Unique slug identifying the template.", 4176 "type": "string", 4177 "minLength": 1, 4178 "pattern": "[a-zA-Z_\\-]+", 4179 "required": true 4180 }, 4181 "theme": { 4182 "description": "Theme identifier for the template.", 4183 "type": "string", 4184 "required": false 4185 }, 4186 "content": { 4187 "default": "", 4188 "description": "Content of template.", 4189 "type": [ 4190 "object", 4191 "string" 4192 ], 4193 "required": false 4194 }, 4195 "title": { 4196 "default": "", 4197 "description": "Title of template.", 4198 "type": [ 4199 "object", 4200 "string" 4201 ], 4202 "required": false 4203 }, 4204 "description": { 4205 "default": "", 4206 "description": "Description of template.", 4207 "type": "string", 4208 "required": false 4209 }, 4210 "status": { 4211 "default": "publish", 4212 "description": "Status of template.", 4213 "type": "string", 4214 "required": false 4215 } 4216 } 4217 } 4218 ], 4219 "_links": { 4220 "self": [ 4221 { 4222 "href": "http://example.org/index.php?rest_route=/wp/v2/templates" 4223 } 4224 ] 4225 } 4226 }, 4227 "/wp/v2/templates/(?P<id>[\\/\\w-]+)": { 4228 "namespace": "wp/v2", 4229 "methods": [ 4230 "GET", 4231 "POST", 4232 "PUT", 4233 "PATCH", 4234 "DELETE" 4235 ], 4236 "endpoints": [ 4237 { 4238 "methods": [ 4239 "GET" 4240 ], 4241 "args": { 4242 "id": { 4243 "description": "The id of a template", 4244 "type": "string", 4245 "required": false 4246 } 4247 } 4248 }, 4249 { 4250 "methods": [ 4251 "POST", 4252 "PUT", 4253 "PATCH" 4254 ], 4255 "args": { 4256 "slug": { 4257 "description": "Unique slug identifying the template.", 4258 "type": "string", 4259 "minLength": 1, 4260 "pattern": "[a-zA-Z_\\-]+", 4261 "required": false 4262 }, 4263 "theme": { 4264 "description": "Theme identifier for the template.", 4265 "type": "string", 4266 "required": false 4267 }, 4268 "content": { 4269 "description": "Content of template.", 4270 "type": [ 4271 "object", 4272 "string" 4273 ], 4274 "required": false 4275 }, 4276 "title": { 4277 "description": "Title of template.", 4278 "type": [ 4279 "object", 4280 "string" 4281 ], 4282 "required": false 4283 }, 4284 "description": { 4285 "description": "Description of template.", 4286 "type": "string", 4287 "required": false 4288 }, 4289 "status": { 4290 "description": "Status of template.", 4291 "type": "string", 4292 "required": false 4293 } 4294 } 4295 }, 4296 { 4297 "methods": [ 4298 "DELETE" 4299 ], 4300 "args": { 4301 "force": { 4302 "type": "boolean", 4303 "default": false, 4304 "description": "Whether to bypass Trash and force deletion.", 4305 "required": false 4306 } 4307 } 4308 } 4309 ] 4310 }, 4311 "/wp/v2/templates/(?P<parent>[\\d]+)/revisions": { 4312 "namespace": "wp/v2", 4313 "methods": [ 4314 "GET" 4315 ], 4316 "endpoints": [ 4317 { 4318 "methods": [ 4319 "GET" 4320 ], 4321 "args": { 4322 "parent": { 4323 "description": "The ID for the parent of the revision.", 4324 "type": "integer", 4325 "required": false 4326 }, 4327 "context": { 4328 "description": "Scope under which the request is made; determines fields present in response.", 4329 "type": "string", 4330 "enum": [ 4331 "view", 4332 "embed", 4333 "edit" 4334 ], 4335 "default": "view", 4336 "required": false 4337 }, 4338 "page": { 4339 "description": "Current page of the collection.", 4340 "type": "integer", 4341 "default": 1, 4342 "minimum": 1, 4343 "required": false 4344 }, 4345 "per_page": { 4346 "description": "Maximum number of items to be returned in result set.", 4347 "type": "integer", 4348 "minimum": 1, 4349 "maximum": 100, 4350 "required": false 4351 }, 4352 "search": { 4353 "description": "Limit results to those matching a string.", 4354 "type": "string", 4355 "required": false 4356 }, 4357 "exclude": { 4358 "description": "Ensure result set excludes specific IDs.", 4359 "type": "array", 4360 "items": { 4361 "type": "integer" 4362 }, 4363 "default": [], 4364 "required": false 4365 }, 4366 "include": { 4367 "description": "Limit result set to specific IDs.", 4368 "type": "array", 4369 "items": { 4370 "type": "integer" 4371 }, 4372 "default": [], 4373 "required": false 4374 }, 4375 "offset": { 4376 "description": "Offset the result set by a specific number of items.", 4377 "type": "integer", 4378 "required": false 4379 }, 4380 "order": { 4381 "description": "Order sort attribute ascending or descending.", 4382 "type": "string", 4383 "default": "desc", 4384 "enum": [ 4385 "asc", 4386 "desc" 4387 ], 4388 "required": false 4389 }, 4390 "orderby": { 4391 "description": "Sort collection by object attribute.", 4392 "type": "string", 4393 "default": "date", 4394 "enum": [ 4395 "date", 4396 "id", 4397 "include", 4398 "relevance", 4399 "slug", 4400 "include_slugs", 4401 "title" 4402 ], 4403 "required": false 4404 } 4405 } 4406 } 4407 ] 4408 }, 4409 "/wp/v2/templates/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 4410 "namespace": "wp/v2", 4411 "methods": [ 4412 "GET", 4413 "DELETE" 4414 ], 4415 "endpoints": [ 4416 { 4417 "methods": [ 4418 "GET" 4419 ], 4420 "args": { 4421 "parent": { 4422 "description": "The ID for the parent of the revision.", 4423 "type": "integer", 4424 "required": false 4425 }, 4426 "id": { 4427 "description": "Unique identifier for the revision.", 4428 "type": "integer", 4429 "required": false 4430 }, 4431 "context": { 4432 "description": "Scope under which the request is made; determines fields present in response.", 4433 "type": "string", 4434 "enum": [ 4435 "view", 4436 "embed", 4437 "edit" 4438 ], 4439 "default": "view", 4440 "required": false 4441 } 4442 } 4443 }, 4444 { 4445 "methods": [ 4446 "DELETE" 4447 ], 4448 "args": { 4449 "parent": { 4450 "description": "The ID for the parent of the revision.", 4451 "type": "integer", 4452 "required": false 4453 }, 4454 "id": { 4455 "description": "Unique identifier for the revision.", 4456 "type": "integer", 4457 "required": false 4458 }, 4459 "force": { 4460 "type": "boolean", 4461 "default": false, 4462 "description": "Required to be true, as revisions do not support trashing.", 4463 "required": false 4464 } 4465 } 4466 } 4467 ] 4468 }, 4469 "/wp/v2/templates/(?P<id>[\\d]+)/autosaves": { 4470 "namespace": "wp/v2", 4471 "methods": [ 4472 "GET", 4473 "POST" 4474 ], 4475 "endpoints": [ 4476 { 4477 "methods": [ 4478 "GET" 4479 ], 4480 "args": { 4481 "parent": { 4482 "description": "The ID for the parent of the autosave.", 4483 "type": "integer", 4484 "required": false 4485 }, 4486 "context": { 4487 "description": "Scope under which the request is made; determines fields present in response.", 4488 "type": "string", 4489 "enum": [ 4490 "view", 4491 "embed", 4492 "edit" 4493 ], 4494 "default": "view", 4495 "required": false 4496 } 4497 } 4498 }, 4499 { 4500 "methods": [ 4501 "POST" 4502 ], 4503 "args": { 4504 "parent": { 4505 "description": "The ID for the parent of the autosave.", 4506 "type": "integer", 4507 "required": false 4508 }, 4509 "slug": { 4510 "description": "Unique slug identifying the template.", 4511 "type": "string", 4512 "minLength": 1, 4513 "pattern": "[a-zA-Z_\\-]+", 4514 "required": false 4515 }, 4516 "theme": { 4517 "description": "Theme identifier for the template.", 4518 "type": "string", 4519 "required": false 4520 }, 4521 "content": { 4522 "description": "Content of template.", 4523 "type": [ 4524 "object", 4525 "string" 4526 ], 4527 "required": false 4528 }, 4529 "title": { 4530 "description": "Title of template.", 4531 "type": [ 4532 "object", 4533 "string" 4534 ], 4535 "required": false 4536 }, 4537 "description": { 4538 "description": "Description of template.", 4539 "type": "string", 4540 "required": false 4541 }, 4542 "status": { 4543 "description": "Status of template.", 4544 "type": "string", 4545 "required": false 4546 } 4547 } 4548 } 4549 ] 4550 }, 4551 "/wp/v2/templates/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": { 4552 "namespace": "wp/v2", 4553 "methods": [ 4554 "GET" 4555 ], 4556 "endpoints": [ 4557 { 4558 "methods": [ 4559 "GET" 4560 ], 4561 "args": { 4562 "parent": { 4563 "description": "The ID for the parent of the autosave.", 4564 "type": "integer", 4565 "required": false 4566 }, 4567 "id": { 4568 "description": "The ID for the autosave.", 4104 4569 "type": "integer", 4105 4570 "required": false … … 4863 5328 "orderby": { 4864 5329 "default": "name", 4865 "description": "Sort collection by objectattribute.",5330 "description": "Sort collection by user attribute.", 4866 5331 "enum": [ 4867 5332 "id", … … 5534 5999 }, 5535 6000 "orderby": { 5536 "description": "Sort collection by object attribute.",6001 "description": "Sort collection by comment attribute.", 5537 6002 "type": "string", 5538 6003 "default": "date_gmt", … … 5605 6070 }, 5606 6071 "author_email": { 5607 "description": "Email address for the object author.",6072 "description": "Email address for the comment author.", 5608 6073 "type": "string", 5609 6074 "format": "email", … … 5611 6076 }, 5612 6077 "author_ip": { 5613 "description": "IP address for the object author.",6078 "description": "IP address for the comment author.", 5614 6079 "type": "string", 5615 6080 "format": "ip", … … 5617 6082 }, 5618 6083 "author_name": { 5619 "description": "Display name for the object author.",6084 "description": "Display name for the comment author.", 5620 6085 "type": "string", 5621 6086 "required": false 5622 6087 }, 5623 6088 "author_url": { 5624 "description": "URL for the object author.",6089 "description": "URL for the comment author.", 5625 6090 "type": "string", 5626 6091 "format": "uri", … … 5628 6093 }, 5629 6094 "author_user_agent": { 5630 "description": "User agent for the object author.",6095 "description": "User agent for the comment author.", 5631 6096 "type": "string", 5632 6097 "required": false 5633 6098 }, 5634 6099 "content": { 5635 "description": "The content for the object.",6100 "description": "The content for the comment.", 5636 6101 "type": "object", 5637 6102 "properties": { 5638 6103 "raw": { 5639 "description": "Content for the object, as it exists in the database.",6104 "description": "Content for the comment, as it exists in the database.", 5640 6105 "type": "string", 5641 6106 "context": [ … … 5644 6109 }, 5645 6110 "rendered": { 5646 "description": "HTML content for the object, transformed for display.",6111 "description": "HTML content for the comment, transformed for display.", 5647 6112 "type": "string", 5648 6113 "context": [ … … 5657 6122 }, 5658 6123 "date": { 5659 "description": "The date the object was published, in the site's timezone.",6124 "description": "The date the comment was published, in the site's timezone.", 5660 6125 "type": "string", 5661 6126 "format": "date-time", … … 5663 6128 }, 5664 6129 "date_gmt": { 5665 "description": "The date the object was published, as GMT.",6130 "description": "The date the comment was published, as GMT.", 5666 6131 "type": "string", 5667 6132 "format": "date-time", … … 5670 6135 "parent": { 5671 6136 "default": 0, 5672 "description": "The ID for the parent of the object.",6137 "description": "The ID for the parent of the comment.", 5673 6138 "type": "integer", 5674 6139 "required": false … … 5681 6146 }, 5682 6147 "status": { 5683 "description": "State of the object.",6148 "description": "State of the comment.", 5684 6149 "type": "string", 5685 6150 "required": false … … 5714 6179 "args": { 5715 6180 "id": { 5716 "description": "Unique identifier for the object.",6181 "description": "Unique identifier for the comment.", 5717 6182 "type": "integer", 5718 6183 "required": false … … 5744 6209 "args": { 5745 6210 "id": { 5746 "description": "Unique identifier for the object.",6211 "description": "Unique identifier for the comment.", 5747 6212 "type": "integer", 5748 6213 "required": false … … 5754 6219 }, 5755 6220 "author_email": { 5756 "description": "Email address for the object author.",6221 "description": "Email address for the comment author.", 5757 6222 "type": "string", 5758 6223 "format": "email", … … 5760 6225 }, 5761 6226 "author_ip": { 5762 "description": "IP address for the object author.",6227 "description": "IP address for the comment author.", 5763 6228 "type": "string", 5764 6229 "format": "ip", … … 5766 6231 }, 5767 6232 "author_name": { 5768 "description": "Display name for the object author.",6233 "description": "Display name for the comment author.", 5769 6234 "type": "string", 5770 6235 "required": false 5771 6236 }, 5772 6237 "author_url": { 5773 "description": "URL for the object author.",6238 "description": "URL for the comment author.", 5774 6239 "type": "string", 5775 6240 "format": "uri", … … 5777 6242 }, 5778 6243 "author_user_agent": { 5779 "description": "User agent for the object author.",6244 "description": "User agent for the comment author.", 5780 6245 "type": "string", 5781 6246 "required": false 5782 6247 }, 5783 6248 "content": { 5784 "description": "The content for the object.",6249 "description": "The content for the comment.", 5785 6250 "type": "object", 5786 6251 "properties": { 5787 6252 "raw": { 5788 "description": "Content for the object, as it exists in the database.",6253 "description": "Content for the comment, as it exists in the database.", 5789 6254 "type": "string", 5790 6255 "context": [ … … 5793 6258 }, 5794 6259 "rendered": { 5795 "description": "HTML content for the object, transformed for display.",6260 "description": "HTML content for the comment, transformed for display.", 5796 6261 "type": "string", 5797 6262 "context": [ … … 5806 6271 }, 5807 6272 "date": { 5808 "description": "The date the object was published, in the site's timezone.",6273 "description": "The date the comment was published, in the site's timezone.", 5809 6274 "type": "string", 5810 6275 "format": "date-time", … … 5812 6277 }, 5813 6278 "date_gmt": { 5814 "description": "The date the object was published, as GMT.",6279 "description": "The date the comment was published, as GMT.", 5815 6280 "type": "string", 5816 6281 "format": "date-time", … … 5818 6283 }, 5819 6284 "parent": { 5820 "description": "The ID for the parent of the object.",6285 "description": "The ID for the parent of the comment.", 5821 6286 "type": "integer", 5822 6287 "required": false … … 5828 6293 }, 5829 6294 "status": { 5830 "description": "State of the object.",6295 "description": "State of the comment.", 5831 6296 "type": "string", 5832 6297 "required": false … … 5846 6311 "args": { 5847 6312 "id": { 5848 "description": "Unique identifier for the object.",6313 "description": "Unique identifier for the comment.", 5849 6314 "type": "integer", 5850 6315 "required": false … … 6852 7317 { 6853 7318 "href": "http://example.org/index.php?rest_route=/wp/v2/block-directory/search" 7319 } 7320 ] 7321 } 7322 }, 7323 "/wp/v2/pattern-directory/patterns": { 7324 "namespace": "wp/v2", 7325 "methods": [ 7326 "GET" 7327 ], 7328 "endpoints": [ 7329 { 7330 "methods": [ 7331 "GET" 7332 ], 7333 "args": { 7334 "context": { 7335 "description": "Scope under which the request is made; determines fields present in response.", 7336 "type": "string", 7337 "enum": [ 7338 "view", 7339 "embed" 7340 ], 7341 "default": "view", 7342 "required": false 7343 }, 7344 "search": { 7345 "description": "Limit results to those matching a string.", 7346 "type": "string", 7347 "minLength": 1, 7348 "required": false 7349 }, 7350 "category": { 7351 "description": "Limit results to those matching a category ID.", 7352 "type": "integer", 7353 "minimum": 1, 7354 "required": false 7355 }, 7356 "keyword": { 7357 "description": "Limit results to those matching a keyword ID.", 7358 "type": "integer", 7359 "minimum": 1, 7360 "required": false 7361 } 7362 } 7363 } 7364 ], 7365 "_links": { 7366 "self": [ 7367 { 7368 "href": "http://example.org/index.php?rest_route=/wp/v2/pattern-directory/patterns" 6854 7369 } 6855 7370 ] … … 7908 8423 ] 7909 8424 } 8425 }, 8426 "wp_template": { 8427 "description": "Templates to include in your theme.", 8428 "hierarchical": false, 8429 "name": "Templates", 8430 "slug": "wp_template", 8431 "taxonomies": [], 8432 "rest_base": "templates", 8433 "_links": { 8434 "collection": [ 8435 { 8436 "href": "http://example.org/index.php?rest_route=/wp/v2/types" 8437 } 8438 ], 8439 "wp:items": [ 8440 { 8441 "href": "http://example.org/index.php?rest_route=/wp/v2/templates" 8442 } 8443 ], 8444 "curies": [ 8445 { 8446 "name": "wp", 8447 "href": "https://api.w.org/{rel}", 8448 "templated": true 8449 } 8450 ] 8451 } 7910 8452 } 7911 8453 };
Note: See TracChangeset
for help on using the changeset viewer.