Changeset 56819
- Timestamp:
- 10/10/2023 02:03:03 PM (20 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r56805 r56819 725 725 * @since 5.9.0 726 726 * @since 6.3.0 Added `modified` property to template objects. 727 * @since 6.4.0 Added support for a revision post to be passed to this function. 727 728 * @access private 728 729 * … … 732 733 function _build_block_template_result_from_post( $post ) { 733 734 $default_template_types = get_default_block_template_types(); 734 $terms = get_the_terms( $post, 'wp_theme' ); 735 736 $post_id = wp_is_post_revision( $post ); 737 if ( ! $post_id ) { 738 $post_id = $post; 739 } 740 $parent_post = get_post( $post_id ); 741 742 $terms = get_the_terms( $parent_post, 'wp_theme' ); 735 743 736 744 if ( is_wp_error( $terms ) ) { … … 746 754 $has_theme_file = get_stylesheet() === $theme && null !== $template_file; 747 755 748 $origin = get_post_meta( $p ost->ID, 'origin', true );749 $is_wp_suggestion = get_post_meta( $p ost->ID, 'is_wp_suggestion', true );756 $origin = get_post_meta( $parent_post->ID, 'origin', true ); 757 $is_wp_suggestion = get_post_meta( $parent_post->ID, 'is_wp_suggestion', true ); 750 758 751 759 $template = new WP_Block_Template(); 752 760 $template->wp_id = $post->ID; 753 $template->id = $theme . '//' . $p ost->post_name;761 $template->id = $theme . '//' . $parent_post->post_name; 754 762 $template->theme = $theme; 755 763 $template->content = $post->post_content; … … 766 774 $template->modified = $post->post_modified; 767 775 768 if ( 'wp_template' === $p ost->post_type && $has_theme_file && isset( $template_file['postTypes'] ) ) {776 if ( 'wp_template' === $parent_post->post_type && $has_theme_file && isset( $template_file['postTypes'] ) ) { 769 777 $template->post_types = $template_file['postTypes']; 770 778 } 771 779 772 if ( 'wp_template' === $p ost->post_type && isset( $default_template_types[ $template->slug ] ) ) {780 if ( 'wp_template' === $parent_post->post_type && isset( $default_template_types[ $template->slug ] ) ) { 773 781 $template->is_custom = false; 774 782 } 775 783 776 if ( 'wp_template_part' === $p ost->post_type ) {777 $type_terms = get_the_terms( $p ost, 'wp_template_part_area' );784 if ( 'wp_template_part' === $parent_post->post_type ) { 785 $type_terms = get_the_terms( $parent_post, 'wp_template_part_area' ); 778 786 if ( ! is_wp_error( $type_terms ) && false !== $type_terms ) { 779 787 $template->area = $type_terms[0]->name; … … 782 790 783 791 // Check for a block template without a description and title or with a title equal to the slug. 784 if ( 'wp_template' === $p ost->post_type && empty( $template->description ) && ( empty( $template->title ) || $template->title === $template->slug ) ) {792 if ( 'wp_template' === $parent_post->post_type && empty( $template->description ) && ( empty( $template->title ) || $template->title === $template->slug ) ) { 785 793 $matches = array(); 786 794 -
trunk/src/wp-includes/class-wp-post-type.php
r56515 r56819 396 396 */ 397 397 public $rest_controller; 398 399 /** 400 * The controller for this post type's revisions REST API endpoints. 401 * 402 * Custom controllers must extend WP_REST_Controller. 403 * 404 * @since 6.4.0 405 * @var string|bool $revisions_rest_controller_class 406 */ 407 public $revisions_rest_controller_class; 408 409 /** 410 * The controller instance for this post type's revisions REST API endpoints. 411 * 412 * Lazily computed. Should be accessed using {@see WP_Post_Type::get_revisions_rest_controller()}. 413 * 414 * @since 6.4.0 415 * @var WP_REST_Controller $revisions_rest_controller 416 */ 417 public $revisions_rest_controller; 418 419 /** 420 * The controller for this post type's autosave REST API endpoints. 421 * 422 * Custom controllers must extend WP_REST_Controller. 423 * 424 * @since 6.4.0 425 * @var string|bool $autosave_rest_controller_class 426 */ 427 public $autosave_rest_controller_class; 428 429 /** 430 * The controller instance for this post type's autosave REST API endpoints. 431 * 432 * Lazily computed. Should be accessed using {@see WP_Post_Type::get_autosave_rest_controller()}. 433 * 434 * @since 6.4.0 435 * @var WP_REST_Controller $autosave_rest_controller 436 */ 437 public $autosave_rest_controller; 438 439 /** 440 * A flag to register the post type REST API controller after its associated autosave / revisions controllers, instead of before. Registration order affects route matching priority. 441 * 442 * @since 6.4.0 443 * @var bool $late_route_registration 444 */ 445 public $late_route_registration; 398 446 399 447 /** … … 456 504 * 457 505 * @since 6.0.0 506 * @since 6.4.0 Added `late_route_registration`, `autosave_rest_controller_class` and `revisions_rest_controller_class` arguments. 458 507 * 459 508 * @param array $args Array of arguments for registering a post type. … … 467 516 // Args prefixed with an underscore are reserved for internal use. 468 517 $defaults = array( 469 'labels' => array(), 470 'description' => '', 471 'public' => false, 472 'hierarchical' => false, 473 'exclude_from_search' => null, 474 'publicly_queryable' => null, 475 'show_ui' => null, 476 'show_in_menu' => null, 477 'show_in_nav_menus' => null, 478 'show_in_admin_bar' => null, 479 'menu_position' => null, 480 'menu_icon' => null, 481 'capability_type' => 'post', 482 'capabilities' => array(), 483 'map_meta_cap' => null, 484 'supports' => array(), 485 'register_meta_box_cb' => null, 486 'taxonomies' => array(), 487 'has_archive' => false, 488 'rewrite' => true, 489 'query_var' => true, 490 'can_export' => true, 491 'delete_with_user' => null, 492 'show_in_rest' => false, 493 'rest_base' => false, 494 'rest_namespace' => false, 495 'rest_controller_class' => false, 496 'template' => array(), 497 'template_lock' => false, 498 '_builtin' => false, 499 '_edit_link' => 'post.php?post=%d', 518 'labels' => array(), 519 'description' => '', 520 'public' => false, 521 'hierarchical' => false, 522 'exclude_from_search' => null, 523 'publicly_queryable' => null, 524 'show_ui' => null, 525 'show_in_menu' => null, 526 'show_in_nav_menus' => null, 527 'show_in_admin_bar' => null, 528 'menu_position' => null, 529 'menu_icon' => null, 530 'capability_type' => 'post', 531 'capabilities' => array(), 532 'map_meta_cap' => null, 533 'supports' => array(), 534 'register_meta_box_cb' => null, 535 'taxonomies' => array(), 536 'has_archive' => false, 537 'rewrite' => true, 538 'query_var' => true, 539 'can_export' => true, 540 'delete_with_user' => null, 541 'show_in_rest' => false, 542 'rest_base' => false, 543 'rest_namespace' => false, 544 'rest_controller_class' => false, 545 'autosave_rest_controller_class' => false, 546 'revisions_rest_controller_class' => false, 547 'late_route_registration' => false, 548 'template' => array(), 549 'template_lock' => false, 550 '_builtin' => false, 551 '_edit_link' => 'post.php?post=%d', 500 552 ); 501 553 … … 815 867 816 868 return $this->rest_controller; 869 } 870 871 /** 872 * Gets the REST API revisions controller for this post type. 873 * 874 * Will only instantiate the controller class once per request. 875 * 876 * @since 6.4.0 877 * 878 * @return WP_REST_Controller|null The controller instance, or null if the post type 879 * is set not to show in rest. 880 */ 881 public function get_revisions_rest_controller() { 882 if ( ! $this->show_in_rest ) { 883 return null; 884 } 885 886 if ( ! post_type_supports( $this->name, 'revisions' ) ) { 887 return null; 888 } 889 890 $class = $this->revisions_rest_controller_class ? $this->revisions_rest_controller_class : WP_REST_Revisions_Controller::class; 891 if ( ! class_exists( $class ) ) { 892 return null; 893 } 894 895 if ( ! is_subclass_of( $class, WP_REST_Controller::class ) ) { 896 return null; 897 } 898 899 if ( ! $this->revisions_rest_controller ) { 900 $this->revisions_rest_controller = new $class( $this->name ); 901 } 902 903 if ( ! ( $this->revisions_rest_controller instanceof $class ) ) { 904 return null; 905 } 906 907 return $this->revisions_rest_controller; 908 } 909 910 /** 911 * Gets the REST API autosave controller for this post type. 912 * 913 * Will only instantiate the controller class once per request. 914 * 915 * @since 6.4.0 916 * 917 * @return WP_REST_Controller|null The controller instance, or null if the post type 918 * is set not to show in rest. 919 */ 920 public function get_autosave_rest_controller() { 921 if ( ! $this->show_in_rest ) { 922 return null; 923 } 924 925 if ( 'attachment' === $this->name ) { 926 return null; 927 } 928 929 $class = $this->autosave_rest_controller_class ? $this->autosave_rest_controller_class : WP_REST_Autosaves_Controller::class; 930 931 if ( ! class_exists( $class ) ) { 932 return null; 933 } 934 935 if ( ! is_subclass_of( $class, WP_REST_Controller::class ) ) { 936 return null; 937 } 938 939 if ( ! $this->autosave_rest_controller ) { 940 $this->autosave_rest_controller = new $class( $this->name ); 941 } 942 943 if ( ! ( $this->autosave_rest_controller instanceof $class ) ) { 944 return null; 945 } 946 947 return $this->autosave_rest_controller; 817 948 } 818 949 -
trunk/src/wp-includes/post.php
r56811 r56819 347 347 'wp_template', 348 348 array( 349 'labels' => array(349 'labels' => array( 350 350 'name' => _x( 'Templates', 'post type general name' ), 351 351 'singular_name' => _x( 'Template', 'post type singular name' ), … … 367 367 'items_list' => __( 'Templates list' ), 368 368 ), 369 'description' => __( 'Templates to include in your theme.' ), 370 'public' => false, 371 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 372 '_edit_link' => $template_edit_link, /* internal use only. don't use this when registering your own post type. */ 373 'has_archive' => false, 374 'show_ui' => false, 375 'show_in_menu' => false, 376 'show_in_rest' => true, 377 'rewrite' => false, 378 'rest_base' => 'templates', 379 'rest_controller_class' => 'WP_REST_Templates_Controller', 380 'capability_type' => array( 'template', 'templates' ), 381 'capabilities' => array( 369 'description' => __( 'Templates to include in your theme.' ), 370 'public' => false, 371 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 372 '_edit_link' => $template_edit_link, /* internal use only. don't use this when registering your own post type. */ 373 'has_archive' => false, 374 'show_ui' => false, 375 'show_in_menu' => false, 376 'show_in_rest' => true, 377 'rewrite' => false, 378 'rest_base' => 'templates', 379 'rest_controller_class' => 'WP_REST_Templates_Controller', 380 'autosave_rest_controller_class' => 'WP_REST_Template_Autosaves_Controller', 381 'revisions_rest_controller_class' => 'WP_REST_Template_Revisions_Controller', 382 'late_route_registration' => true, 383 'capability_type' => array( 'template', 'templates' ), 384 'capabilities' => array( 382 385 'create_posts' => 'edit_theme_options', 383 386 'delete_posts' => 'edit_theme_options', … … 393 396 'read_private_posts' => 'edit_theme_options', 394 397 ), 395 'map_meta_cap' => true,396 'supports' => array(398 'map_meta_cap' => true, 399 'supports' => array( 397 400 'title', 398 401 'slug', … … 408 411 'wp_template_part', 409 412 array( 410 'labels' => array(413 'labels' => array( 411 414 'name' => _x( 'Template Parts', 'post type general name' ), 412 415 'singular_name' => _x( 'Template Part', 'post type singular name' ), … … 428 431 'items_list' => __( 'Template parts list' ), 429 432 ), 430 'description' => __( 'Template parts to include in your templates.' ), 431 'public' => false, 432 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 433 '_edit_link' => $template_edit_link, /* internal use only. don't use this when registering your own post type. */ 434 'has_archive' => false, 435 'show_ui' => false, 436 'show_in_menu' => false, 437 'show_in_rest' => true, 438 'rewrite' => false, 439 'rest_base' => 'template-parts', 440 'rest_controller_class' => 'WP_REST_Templates_Controller', 441 'map_meta_cap' => true, 442 'capabilities' => array( 433 'description' => __( 'Template parts to include in your templates.' ), 434 'public' => false, 435 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 436 '_edit_link' => $template_edit_link, /* internal use only. don't use this when registering your own post type. */ 437 'has_archive' => false, 438 'show_ui' => false, 439 'show_in_menu' => false, 440 'show_in_rest' => true, 441 'rewrite' => false, 442 'rest_base' => 'template-parts', 443 'rest_controller_class' => 'WP_REST_Templates_Controller', 444 'autosave_rest_controller_class' => 'WP_REST_Template_Autosaves_Controller', 445 'revisions_rest_controller_class' => 'WP_REST_Template_Revisions_Controller', 446 'late_route_registration' => true, 447 'map_meta_cap' => true, 448 'capabilities' => array( 443 449 'create_posts' => 'edit_theme_options', 444 450 'delete_posts' => 'edit_theme_options', … … 454 460 'read_private_posts' => 'edit_theme_options', 455 461 ), 456 'supports' => array(462 'supports' => array( 457 463 'title', 458 464 'slug', … … 1576 1582 * Array or string of arguments for registering a post type. 1577 1583 * 1578 * @type string $label Name of the post type shown in the menu. Usually plural. 1579 * Default is value of $labels['name']. 1580 * @type string[] $labels An array of labels for this post type. If not set, post 1581 * labels are inherited for non-hierarchical types and page 1582 * labels for hierarchical ones. See get_post_type_labels() for a full 1583 * list of supported labels. 1584 * @type string $description A short descriptive summary of what the post type is. 1585 * Default empty. 1586 * @type bool $public Whether a post type is intended for use publicly either via 1587 * the admin interface or by front-end users. While the default 1588 * settings of $exclude_from_search, $publicly_queryable, $show_ui, 1589 * and $show_in_nav_menus are inherited from $public, each does not 1590 * rely on this relationship and controls a very specific intention. 1591 * Default false. 1592 * @type bool $hierarchical Whether the post type is hierarchical (e.g. page). Default false. 1593 * @type bool $exclude_from_search Whether to exclude posts with this post type from front end search 1594 * results. Default is the opposite value of $public. 1595 * @type bool $publicly_queryable Whether queries can be performed on the front end for the post type 1596 * as part of parse_request(). Endpoints would include: 1597 * * ?post_type={post_type_key} 1598 * * ?{post_type_key}={single_post_slug} 1599 * * ?{post_type_query_var}={single_post_slug} 1600 * If not set, the default is inherited from $public. 1601 * @type bool $show_ui Whether to generate and allow a UI for managing this post type in the 1602 * admin. Default is value of $public. 1603 * @type bool|string $show_in_menu Where to show the post type in the admin menu. To work, $show_ui 1604 * must be true. If true, the post type is shown in its own top level 1605 * menu. If false, no menu is shown. If a string of an existing top 1606 * level menu ('tools.php' or 'edit.php?post_type=page', for example), the 1607 * post type will be placed as a sub-menu of that. 1608 * Default is value of $show_ui. 1609 * @type bool $show_in_nav_menus Makes this post type available for selection in navigation menus. 1610 * Default is value of $public. 1611 * @type bool $show_in_admin_bar Makes this post type available via the admin bar. Default is value 1612 * of $show_in_menu. 1613 * @type bool $show_in_rest Whether to include the post type in the REST API. Set this to true 1614 * for the post type to be available in the block editor. 1615 * @type string $rest_base To change the base URL of REST API route. Default is $post_type. 1616 * @type string $rest_namespace To change the namespace URL of REST API route. Default is wp/v2. 1617 * @type string $rest_controller_class REST API controller class name. Default is 'WP_REST_Posts_Controller'. 1618 * @type int $menu_position The position in the menu order the post type should appear. To work, 1619 * $show_in_menu must be true. Default null (at the bottom). 1620 * @type string $menu_icon The URL to the icon to be used for this menu. Pass a base64-encoded 1621 * SVG using a data URI, which will be colored to match the color scheme 1622 * -- this should begin with 'data:image/svg+xml;base64,'. Pass the name 1623 * of a Dashicons helper class to use a font icon, e.g. 1624 * 'dashicons-chart-pie'. Pass 'none' to leave div.wp-menu-image empty 1625 * so an icon can be added via CSS. Defaults to use the posts icon. 1626 * @type string|array $capability_type The string to use to build the read, edit, and delete capabilities. 1627 * May be passed as an array to allow for alternative plurals when using 1628 * this argument as a base to construct the capabilities, e.g. 1629 * array('story', 'stories'). Default 'post'. 1630 * @type string[] $capabilities Array of capabilities for this post type. $capability_type is used 1631 * as a base to construct capabilities by default. 1632 * See get_post_type_capabilities(). 1633 * @type bool $map_meta_cap Whether to use the internal default meta capability handling. 1634 * Default false. 1635 * @type array $supports Core feature(s) the post type supports. Serves as an alias for calling 1636 * add_post_type_support() directly. Core features include 'title', 1637 * 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', 1638 * 'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'. 1639 * Additionally, the 'revisions' feature dictates whether the post type 1640 * will store revisions, and the 'comments' feature dictates whether the 1641 * comments count will show on the edit screen. A feature can also be 1642 * specified as an array of arguments to provide additional information 1643 * about supporting that feature. 1644 * Example: `array( 'my_feature', array( 'field' => 'value' ) )`. 1645 * Default is an array containing 'title' and 'editor'. 1646 * @type callable $register_meta_box_cb Provide a callback function that sets up the meta boxes for the 1647 * edit form. Do remove_meta_box() and add_meta_box() calls in the 1648 * callback. Default null. 1649 * @type string[] $taxonomies An array of taxonomy identifiers that will be registered for the 1650 * post type. Taxonomies can be registered later with register_taxonomy() 1651 * or register_taxonomy_for_object_type(). 1652 * Default empty array. 1653 * @type bool|string $has_archive Whether there should be post type archives, or if a string, the 1654 * archive slug to use. Will generate the proper rewrite rules if 1655 * $rewrite is enabled. Default false. 1656 * @type bool|array $rewrite { 1584 * @type string $label Name of the post type shown in the menu. Usually plural. 1585 * Default is value of $labels['name']. 1586 * @type string[] $labels An array of labels for this post type. If not set, post 1587 * labels are inherited for non-hierarchical types and page 1588 * labels for hierarchical ones. See get_post_type_labels() for a full 1589 * list of supported labels. 1590 * @type string $description A short descriptive summary of what the post type is. 1591 * Default empty. 1592 * @type bool $public Whether a post type is intended for use publicly either via 1593 * the admin interface or by front-end users. While the default 1594 * settings of $exclude_from_search, $publicly_queryable, $show_ui, 1595 * and $show_in_nav_menus are inherited from $public, each does not 1596 * rely on this relationship and controls a very specific intention. 1597 * Default false. 1598 * @type bool $hierarchical Whether the post type is hierarchical (e.g. page). Default false. 1599 * @type bool $exclude_from_search Whether to exclude posts with this post type from front end search 1600 * results. Default is the opposite value of $public. 1601 * @type bool $publicly_queryable Whether queries can be performed on the front end for the post type 1602 * as part of parse_request(). Endpoints would include: 1603 * * ?post_type={post_type_key} 1604 * * ?{post_type_key}={single_post_slug} 1605 * * ?{post_type_query_var}={single_post_slug} 1606 * If not set, the default is inherited from $public. 1607 * @type bool $show_ui Whether to generate and allow a UI for managing this post type in the 1608 * admin. Default is value of $public. 1609 * @type bool|string $show_in_menu Where to show the post type in the admin menu. To work, $show_ui 1610 * must be true. If true, the post type is shown in its own top level 1611 * menu. If false, no menu is shown. If a string of an existing top 1612 * level menu ('tools.php' or 'edit.php?post_type=page', for example), the 1613 * post type will be placed as a sub-menu of that. 1614 * Default is value of $show_ui. 1615 * @type bool $show_in_nav_menus Makes this post type available for selection in navigation menus. 1616 * Default is value of $public. 1617 * @type bool $show_in_admin_bar Makes this post type available via the admin bar. Default is value 1618 * of $show_in_menu. 1619 * @type bool $show_in_rest Whether to include the post type in the REST API. Set this to true 1620 * for the post type to be available in the block editor. 1621 * @type string $rest_base To change the base URL of REST API route. Default is $post_type. 1622 * @type string $rest_namespace To change the namespace URL of REST API route. Default is wp/v2. 1623 * @type string $rest_controller_class REST API controller class name. Default is 'WP_REST_Posts_Controller'. 1624 * @type string|bool $autosave_rest_controller_class REST API controller class name. Default is 'WP_REST_Autosaves_Controller'. 1625 * @type string|bool $revisions_rest_controller_class REST API controller class name. Default is 'WP_REST_Revisions_Controller'. 1626 * @type bool $late_route_registration A flag to direct the REST API controllers for autosave / revisions should be registered before/after the post type controller. 1627 * @type int $menu_position The position in the menu order the post type should appear. To work, 1628 * $show_in_menu must be true. Default null (at the bottom). 1629 * @type string $menu_icon The URL to the icon to be used for this menu. Pass a base64-encoded 1630 * SVG using a data URI, which will be colored to match the color scheme 1631 * -- this should begin with 'data:image/svg+xml;base64,'. Pass the name 1632 * of a Dashicons helper class to use a font icon, e.g. 1633 * 'dashicons-chart-pie'. Pass 'none' to leave div.wp-menu-image empty 1634 * so an icon can be added via CSS. Defaults to use the posts icon. 1635 * @type string|array $capability_type The string to use to build the read, edit, and delete capabilities. 1636 * May be passed as an array to allow for alternative plurals when using 1637 * this argument as a base to construct the capabilities, e.g. 1638 * array('story', 'stories'). Default 'post'. 1639 * @type string[] $capabilities Array of capabilities for this post type. $capability_type is used 1640 * as a base to construct capabilities by default. 1641 * See get_post_type_capabilities(). 1642 * @type bool $map_meta_cap Whether to use the internal default meta capability handling. 1643 * Default false. 1644 * @type array $supports Core feature(s) the post type supports. Serves as an alias for calling 1645 * add_post_type_support() directly. Core features include 'title', 1646 * 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', 1647 * 'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'. 1648 * Additionally, the 'revisions' feature dictates whether the post type 1649 * will store revisions, and the 'comments' feature dictates whether the 1650 * comments count will show on the edit screen. A feature can also be 1651 * specified as an array of arguments to provide additional information 1652 * about supporting that feature. 1653 * Example: `array( 'my_feature', array( 'field' => 'value' ) )`. 1654 * Default is an array containing 'title' and 'editor'. 1655 * @type callable $register_meta_box_cb Provide a callback function that sets up the meta boxes for the 1656 * edit form. Do remove_meta_box() and add_meta_box() calls in the 1657 * callback. Default null. 1658 * @type string[] $taxonomies An array of taxonomy identifiers that will be registered for the 1659 * post type. Taxonomies can be registered later with register_taxonomy() 1660 * or register_taxonomy_for_object_type(). 1661 * Default empty array. 1662 * @type bool|string $has_archive Whether there should be post type archives, or if a string, the 1663 * archive slug to use. Will generate the proper rewrite rules if 1664 * $rewrite is enabled. Default false. 1665 * @type bool|array $rewrite { 1657 1666 * Triggers the handling of rewrites for this post type. To prevent rewrite, set to false. 1658 1667 * Defaults to true, using $post_type as slug. To specify rewrite rules, an array can be … … 1669 1678 * is not set, defaults to EP_PERMALINK. 1670 1679 * } 1671 * @type string|bool $query_var Sets the query_var key for this post type. Defaults to $post_type1672 * key. If false, a post type cannot be loaded at1673 * ?{query_var}={post_slug}. If specified as a string, the query1674 * ?{query_var_string}={post_slug} will be valid.1675 * @type bool $can_export Whether to allow this post type to be exported. Default true.1676 * @type bool $delete_with_user Whether to delete posts of this type when deleting a user.1677 * * If true, posts of this type belonging to the user will be moved1678 * to Trash when the user is deleted.1679 * * If false, posts of this type belonging to the user will *not*1680 * be trashed or deleted.1681 * * If not set (the default), posts are trashed if post type supports1682 * the 'author' feature. Otherwise posts are not trashed or deleted.1683 * Default null.1684 * @type array $template Array of blocks to use as the default initial state for an editor1685 * session. Each item should be an array containing block name and1686 * optional attributes. Default empty array.1687 * @type string|false $template_lock Whether the block template should be locked if $template is set.1688 * * If set to 'all', the user is unable to insert new blocks,1689 * move existing blocks and delete blocks.1690 * * If set to 'insert', the user is able to move existing blocks1691 * but is unable to insert new blocks and delete blocks.1692 * Default false.1693 * @type bool $_builtin FOR INTERNAL USE ONLY! True if this post type is a native or1694 * "built-in" post_type. Default false.1695 * @type string $_edit_link FOR INTERNAL USE ONLY! URL segment to use for edit link of1696 * this post type. Default 'post.php?post=%d'.1680 * @type string|bool $query_var Sets the query_var key for this post type. Defaults to $post_type 1681 * key. If false, a post type cannot be loaded at 1682 * ?{query_var}={post_slug}. If specified as a string, the query 1683 * ?{query_var_string}={post_slug} will be valid. 1684 * @type bool $can_export Whether to allow this post type to be exported. Default true. 1685 * @type bool $delete_with_user Whether to delete posts of this type when deleting a user. 1686 * * If true, posts of this type belonging to the user will be moved 1687 * to Trash when the user is deleted. 1688 * * If false, posts of this type belonging to the user will *not* 1689 * be trashed or deleted. 1690 * * If not set (the default), posts are trashed if post type supports 1691 * the 'author' feature. Otherwise posts are not trashed or deleted. 1692 * Default null. 1693 * @type array $template Array of blocks to use as the default initial state for an editor 1694 * session. Each item should be an array containing block name and 1695 * optional attributes. Default empty array. 1696 * @type string|false $template_lock Whether the block template should be locked if $template is set. 1697 * * If set to 'all', the user is unable to insert new blocks, 1698 * move existing blocks and delete blocks. 1699 * * If set to 'insert', the user is able to move existing blocks 1700 * but is unable to insert new blocks and delete blocks. 1701 * Default false. 1702 * @type bool $_builtin FOR INTERNAL USE ONLY! True if this post type is a native or 1703 * "built-in" post_type. Default false. 1704 * @type string $_edit_link FOR INTERNAL USE ONLY! URL segment to use for edit link of 1705 * this post type. Default 'post.php?post=%d'. 1697 1706 * } 1698 1707 * @return WP_Post_Type|WP_Error The registered post type object on success, -
trunk/src/wp-includes/rest-api.php
r56767 r56819 242 242 } 243 243 244 $controller->register_routes(); 245 246 if ( post_type_supports( $post_type->name, 'revisions' ) ) { 247 $revisions_controller = new WP_REST_Revisions_Controller( $post_type->name ); 244 if ( ! $post_type->late_route_registration ) { 245 $controller->register_routes(); 246 } 247 248 $revisions_controller = $post_type->get_revisions_rest_controller(); 249 if ( $revisions_controller ) { 248 250 $revisions_controller->register_routes(); 249 251 } 250 252 251 if ( 'attachment' !== $post_type->name ) {252 $autosaves_controller = new WP_REST_Autosaves_Controller( $post_type->name );253 $autosaves_controller = $post_type->get_autosave_rest_controller(); 254 if ( $autosaves_controller ) { 253 255 $autosaves_controller->register_routes(); 256 } 257 258 if ( $post_type->late_route_registration ) { 259 $controller->register_routes(); 254 260 } 255 261 } -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php
r56745 r56819 66 66 } 67 67 68 $this->parent_controller = $parent_controller; 69 $this->revisions_controller = new WP_REST_Revisions_Controller( $parent_post_type ); 68 $this->parent_controller = $parent_controller; 69 70 $revisions_controller = $post_type_object->get_revisions_rest_controller(); 71 if ( ! $revisions_controller ) { 72 $revisions_controller = new WP_REST_Revisions_Controller( $parent_post_type ); 73 } 74 $this->revisions_controller = $revisions_controller; 70 75 $this->rest_base = 'autosaves'; 71 76 $this->parent_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name; … … 206 211 public function create_item( $request ) { 207 212 208 if ( ! defined( ' DOING_AUTOSAVE' ) ) {213 if ( ! defined( 'WP_RUN_CORE_TESTS' ) && ! defined( 'DOING_AUTOSAVE' ) ) { 209 214 define( 'DOING_AUTOSAVE', true ); 210 215 } 211 216 212 $post = get_post( $request['id'] );217 $post = $this->get_parent( $request['id'] ); 213 218 214 219 if ( is_wp_error( $post ) ) { -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
r56753 r56819 761 761 $links = array( 762 762 'self' => array( 763 'href' => rest_url( rest_get_route_for_post($id ) ),763 'href' => rest_url( sprintf( '/%s/%s/%s', $this->namespace, $this->rest_base, $id ) ), 764 764 ), 765 765 'collection' => array( … … 770 770 ), 771 771 ); 772 773 if ( post_type_supports( $this->post_type, 'revisions' ) ) { 774 $template = get_block_template( $id, $this->post_type ); 775 if ( $template instanceof WP_Block_Template && ! empty( $template->wp_id ) ) { 776 $revisions = wp_get_latest_revision_id_and_total_count( $template->wp_id ); 777 $revisions_count = ! is_wp_error( $revisions ) ? $revisions['count'] : 0; 778 $revisions_base = sprintf( '/%s/%s/%s/revisions', $this->namespace, $this->rest_base, $id ); 779 780 $links['version-history'] = array( 781 'href' => rest_url( $revisions_base ), 782 'count' => $revisions_count, 783 ); 784 785 if ( $revisions_count > 0 ) { 786 $links['predecessor-version'] = array( 787 'href' => rest_url( $revisions_base . '/' . $revisions['latest_id'] ), 788 'id' => $revisions['latest_id'], 789 ); 790 } 791 } 792 } 772 793 773 794 return $links; -
trunk/src/wp-settings.php
r56793 r56819 274 274 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php'; 275 275 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php'; 276 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-template-revisions-controller.php'; 276 277 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php'; 278 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php'; 277 279 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php'; 278 280 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php'; -
trunk/tests/phpunit/tests/post/wpPostType.php
r53126 r56819 230 230 $this->assertSame( 3, $action->get_call_count() ); 231 231 } 232 233 /** 234 * @ticket 56922 235 * 236 * @dataProvider data_should_have_correct_custom_revisions_and_autosaves_controllers_properties 237 * 238 * @covers WP_Post_Type::set_props 239 * 240 * @param string $property_name Property name. 241 * @param string $property_value Property value. 242 * @param string|bool $expected_property_value Expected property value. 243 */ 244 public function test_should_have_correct_custom_revisions_and_autosaves_controllers_properties( $property_name, $property_value, $expected_property_value ) { 245 $properties = null === $property_value ? array() : array( $property_name => $property_value ); 246 247 $post_type = new WP_Post_Type( 'test_post_type', $properties ); 248 249 $this->assertObjectHasProperty( $property_name, $post_type, "The WP_Post_Type object does not have the expected {$property_name} property." ); 250 $this->assertSame( 251 $expected_property_value, 252 $post_type->$property_name, 253 sprintf( 'Expected the property "%s" to have the %s value.', $property_name, var_export( $expected_property_value, true ) ) 254 ); 255 } 256 257 /** 258 * Data provider for test_should_allow_to_set_custom_revisions_and_autosaves_controllers_properties. 259 * 260 * @return array[] Arguments { 261 * @type string $property_name Property name. 262 * @type string $property_value Property value. 263 * @type string|bool $expected_property_value Expected property value. 264 * } 265 */ 266 public function data_should_have_correct_custom_revisions_and_autosaves_controllers_properties() { 267 return array( 268 'autosave_rest_controller_class property' => array( 269 'autosave_rest_controller_class', 270 'My_Custom_Template_Autosaves_Controller', 271 'My_Custom_Template_Autosaves_Controller', 272 ), 273 'autosave_rest_controller_class property (null value)' => array( 274 'autosave_rest_controller_class', 275 null, 276 false, 277 ), 278 'revisions_rest_controller_class property' => array( 279 'revisions_rest_controller_class', 280 'My_Custom_Template_Revisions_Controller', 281 'My_Custom_Template_Revisions_Controller', 282 ), 283 'revisions_rest_controller_class property (null value)' => array( 284 'revisions_rest_controller_class', 285 null, 286 false, 287 ), 288 ); 289 } 290 291 /** 292 * @ticket 56922 293 * 294 * @covers WP_Post_Type::get_revisions_rest_controller 295 * 296 * @dataProvider data_get_revisions_rest_controller_should_return_correct_values 297 * 298 * @param bool $show_in_rest Enables "show_in_rest" support. 299 * @param bool $supports_revisions Enables revisions support. 300 * @param string|bool $revisions_rest_controller_class Custom revisions REST controller class. 301 * @param string|null $expected_value Expected value. 302 */ 303 public function test_get_revisions_rest_controller_should_return_correct_values( $show_in_rest, $supports_revisions, $revisions_rest_controller_class, $expected_value ) { 304 $post_type = 'test_post_type'; 305 $properties = array( 306 'show_in_rest' => $show_in_rest, 307 'supports' => $supports_revisions ? array( 'revisions' ) : array(), 308 'revisions_rest_controller_class' => $revisions_rest_controller_class, 309 ); 310 register_post_type( $post_type, $properties ); 311 $post_type = get_post_type_object( $post_type ); 312 313 $controller = $post_type->get_revisions_rest_controller(); 314 if ( $expected_value ) { 315 $this->assertInstanceOf( $expected_value, $controller ); 316 317 return; 318 } 319 320 $this->assertSame( $expected_value, $controller ); 321 } 322 323 /** 324 * Data provider for test_get_revisions_rest_controller_should_return_correct_values. 325 * 326 * @return array[] Arguments { 327 * @type bool $show_in_rest Enables "show_in_rest" support. 328 * @type bool $supports_revisions Enables revisions support. 329 * @type string|bool $revisions_rest_controller_class Custom revisions REST controller class. 330 * @type string|null $expected_value Expected value. 331 * } 332 */ 333 public function data_get_revisions_rest_controller_should_return_correct_values() { 334 return array( 335 'disable show_in_rest' => array( 336 false, 337 false, 338 false, 339 null, 340 ), 341 'disable revisions support' => array( 342 true, 343 false, 344 false, 345 null, 346 ), 347 'default rest revisions controller' => array( 348 true, 349 true, 350 false, 351 WP_REST_Revisions_Controller::class, 352 ), 353 'incorrect rest revisions controller' => array( 354 true, 355 true, 356 stdClass::class, 357 null, 358 ), 359 'correct rest revisions controller' => array( 360 true, 361 true, 362 WP_REST_Template_Revisions_Controller::class, 363 WP_REST_Template_Revisions_Controller::class, 364 ), 365 ); 366 } 367 368 /** 369 * @ticket 56922 370 * 371 * @covers WP_Post_Type::get_autosave_rest_controller 372 * 373 * @dataProvider data_get_autosave_rest_controller_should_return_correct_values 374 * 375 * @param bool $show_in_rest Enables "show_in_rest" support. 376 * @param string $post_type Post type. 377 * @param string|bool $autosave_rest_controller_class Custom autosave REST controller class. 378 * @param string|null $expected_value Expected value. 379 */ 380 public function test_get_autosave_rest_controller_should_return_correct_values( $show_in_rest, $post_type, $autosave_rest_controller_class, $expected_value ) { 381 $properties = array( 382 'show_in_rest' => $show_in_rest, 383 'autosave_rest_controller_class' => $autosave_rest_controller_class, 384 ); 385 register_post_type( $post_type, $properties ); 386 $post_type = get_post_type_object( $post_type ); 387 388 $controller = $post_type->get_autosave_rest_controller(); 389 if ( $expected_value ) { 390 $this->assertInstanceOf( $expected_value, $controller ); 391 392 return; 393 } 394 395 $this->assertSame( $expected_value, $controller ); 396 } 397 398 /** 399 * Data provider for test_get_autosave_rest_controller_should_return_correct_values. 400 * 401 * @return array[] Arguments { 402 * @type bool $show_in_rest Enables "show_in_rest" support. 403 * @type string $post_type Post type. 404 * @type string|bool $autosave_rest_controller_class Custom autosave REST controller class. 405 * @type string|null $expected_value Expected value. 406 * } 407 */ 408 public function data_get_autosave_rest_controller_should_return_correct_values() { 409 return array( 410 'disable show_in_rest' => array( 411 false, 412 'attachment', 413 false, 414 null, 415 ), 416 'invalid post type' => array( 417 true, 418 'attachment', 419 false, 420 null, 421 ), 422 'default rest autosave controller' => array( 423 true, 424 'test_post_type', 425 false, 426 WP_REST_Autosaves_Controller::class, 427 ), 428 'incorrect rest autosave controller' => array( 429 true, 430 'test_post_type', 431 stdClass::class, 432 null, 433 ), 434 'correct rest autosave controller' => array( 435 true, 436 'test_post_type', 437 WP_REST_Template_Autosaves_Controller::class, 438 WP_REST_Template_Autosaves_Controller::class, 439 ), 440 ); 441 } 232 442 } -
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r56642 r56819 145 145 '/wp/v2/settings', 146 146 '/wp/v2/template-parts', 147 '/wp/v2/template-parts/(?P<id>[\d]+)/autosaves',148 147 '/wp/v2/template-parts/(?P<id>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)', 149 '/wp/v2/template-parts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)', 150 '/wp/v2/template-parts/(?P<parent>[\d]+)/revisions', 151 '/wp/v2/template-parts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)', 148 '/wp/v2/template-parts/(?P<id>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/autosaves', 149 '/wp/v2/template-parts/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/autosaves/(?P<id>[\d]+)', 150 '/wp/v2/template-parts/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions', 151 '/wp/v2/template-parts/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions/(?P<id>[\d]+)', 152 152 '/wp/v2/template-parts/lookup', 153 153 '/wp/v2/templates', 154 '/wp/v2/templates/(?P<id>[\d]+)/autosaves',155 154 '/wp/v2/templates/(?P<id>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)', 156 '/wp/v2/templates/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)', 157 '/wp/v2/templates/(?P<parent>[\d]+)/revisions', 158 '/wp/v2/templates/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)', 155 '/wp/v2/templates/(?P<id>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/autosaves', 156 '/wp/v2/templates/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/autosaves/(?P<id>[\d]+)', 157 '/wp/v2/templates/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions', 158 '/wp/v2/templates/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions/(?P<id>[\d]+)', 159 159 '/wp/v2/templates/lookup', 160 160 '/wp/v2/themes', -
trunk/tests/qunit/fixtures/wp-api-generated.js
r56714 r56819 2673 2673 }, 2674 2674 "/wp/v2/pages/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": { 2675 "namespace": "wp/v2", 2676 "methods": [ 2677 "GET" 2678 ], 2679 "endpoints": [ 2680 { 2681 "methods": [ 2682 "GET" 2683 ], 2684 "args": { 2685 "parent": { 2686 "description": "The ID for the parent of the autosave.", 2687 "type": "integer", 2688 "required": false 2689 }, 2690 "id": { 2691 "description": "The ID for the autosave.", 2692 "type": "integer", 2693 "required": false 2694 }, 2695 "context": { 2696 "description": "Scope under which the request is made; determines fields present in response.", 2697 "type": "string", 2698 "enum": [ 2699 "view", 2700 "embed", 2701 "edit" 2702 ], 2703 "default": "view", 2704 "required": false 2705 } 2706 } 2707 } 2708 ] 2709 }, 2710 "/wp/v2/menu-items": { 2711 "namespace": "wp/v2", 2712 "methods": [ 2713 "GET", 2714 "POST" 2715 ], 2716 "endpoints": [ 2717 { 2718 "methods": [ 2719 "GET" 2720 ], 2721 "allow_batch": { 2722 "v1": true 2723 }, 2724 "args": { 2725 "context": { 2726 "description": "Scope under which the request is made; determines fields present in response.", 2727 "type": "string", 2728 "enum": [ 2729 "view", 2730 "embed", 2731 "edit" 2732 ], 2733 "default": "view", 2734 "required": false 2735 }, 2736 "page": { 2737 "description": "Current page of the collection.", 2738 "type": "integer", 2739 "default": 1, 2740 "minimum": 1, 2741 "required": false 2742 }, 2743 "per_page": { 2744 "description": "Maximum number of items to be returned in result set.", 2745 "type": "integer", 2746 "default": 100, 2747 "minimum": 1, 2748 "maximum": 100, 2749 "required": false 2750 }, 2751 "search": { 2752 "description": "Limit results to those matching a string.", 2753 "type": "string", 2754 "required": false 2755 }, 2756 "after": { 2757 "description": "Limit response to posts published after a given ISO8601 compliant date.", 2758 "type": "string", 2759 "format": "date-time", 2760 "required": false 2761 }, 2762 "modified_after": { 2763 "description": "Limit response to posts modified after a given ISO8601 compliant date.", 2764 "type": "string", 2765 "format": "date-time", 2766 "required": false 2767 }, 2768 "before": { 2769 "description": "Limit response to posts published before a given ISO8601 compliant date.", 2770 "type": "string", 2771 "format": "date-time", 2772 "required": false 2773 }, 2774 "modified_before": { 2775 "description": "Limit response to posts modified before a given ISO8601 compliant date.", 2776 "type": "string", 2777 "format": "date-time", 2778 "required": false 2779 }, 2780 "exclude": { 2781 "description": "Ensure result set excludes specific IDs.", 2782 "type": "array", 2783 "items": { 2784 "type": "integer" 2785 }, 2786 "default": [], 2787 "required": false 2788 }, 2789 "include": { 2790 "description": "Limit result set to specific IDs.", 2791 "type": "array", 2792 "items": { 2793 "type": "integer" 2794 }, 2795 "default": [], 2796 "required": false 2797 }, 2798 "offset": { 2799 "description": "Offset the result set by a specific number of items.", 2800 "type": "integer", 2801 "required": false 2802 }, 2803 "order": { 2804 "description": "Order sort attribute ascending or descending.", 2805 "type": "string", 2806 "default": "asc", 2807 "enum": [ 2808 "asc", 2809 "desc" 2810 ], 2811 "required": false 2812 }, 2813 "orderby": { 2814 "description": "Sort collection by object attribute.", 2815 "type": "string", 2816 "default": "menu_order", 2817 "enum": [ 2818 "author", 2819 "date", 2820 "id", 2821 "include", 2822 "modified", 2823 "parent", 2824 "relevance", 2825 "slug", 2826 "include_slugs", 2827 "title", 2828 "menu_order" 2829 ], 2830 "required": false 2831 }, 2832 "search_columns": { 2833 "default": [], 2834 "description": "Array of column names to be searched.", 2835 "type": "array", 2836 "items": { 2837 "enum": [ 2838 "post_title", 2839 "post_content", 2840 "post_excerpt" 2841 ], 2842 "type": "string" 2843 }, 2844 "required": false 2845 }, 2846 "slug": { 2847 "description": "Limit result set to posts with one or more specific slugs.", 2848 "type": "array", 2849 "items": { 2850 "type": "string" 2851 }, 2852 "required": false 2853 }, 2854 "status": { 2855 "default": "publish", 2856 "description": "Limit result set to posts assigned one or more statuses.", 2857 "type": "array", 2858 "items": { 2859 "enum": [ 2860 "publish", 2861 "future", 2862 "draft", 2863 "pending", 2864 "private", 2865 "trash", 2866 "auto-draft", 2867 "inherit", 2868 "request-pending", 2869 "request-confirmed", 2870 "request-failed", 2871 "request-completed", 2872 "any" 2873 ], 2874 "type": "string" 2875 }, 2876 "required": false 2877 }, 2878 "tax_relation": { 2879 "description": "Limit result set based on relationship between multiple taxonomies.", 2880 "type": "string", 2881 "enum": [ 2882 "AND", 2883 "OR" 2884 ], 2885 "required": false 2886 }, 2887 "menus": { 2888 "description": "Limit result set to items with specific terms assigned in the menus taxonomy.", 2889 "type": [ 2890 "object", 2891 "array" 2892 ], 2893 "oneOf": [ 2894 { 2895 "title": "Term ID List", 2896 "description": "Match terms with the listed IDs.", 2897 "type": "array", 2898 "items": { 2899 "type": "integer" 2900 } 2901 }, 2902 { 2903 "title": "Term ID Taxonomy Query", 2904 "description": "Perform an advanced term query.", 2905 "type": "object", 2906 "properties": { 2907 "terms": { 2908 "description": "Term IDs.", 2909 "type": "array", 2910 "items": { 2911 "type": "integer" 2912 }, 2913 "default": [] 2914 }, 2915 "operator": { 2916 "description": "Whether items must be assigned all or any of the specified terms.", 2917 "type": "string", 2918 "enum": [ 2919 "AND", 2920 "OR" 2921 ], 2922 "default": "OR" 2923 } 2924 }, 2925 "additionalProperties": false 2926 } 2927 ], 2928 "required": false 2929 }, 2930 "menus_exclude": { 2931 "description": "Limit result set to items except those with specific terms assigned in the menus taxonomy.", 2932 "type": [ 2933 "object", 2934 "array" 2935 ], 2936 "oneOf": [ 2937 { 2938 "title": "Term ID List", 2939 "description": "Match terms with the listed IDs.", 2940 "type": "array", 2941 "items": { 2942 "type": "integer" 2943 } 2944 }, 2945 { 2946 "title": "Term ID Taxonomy Query", 2947 "description": "Perform an advanced term query.", 2948 "type": "object", 2949 "properties": { 2950 "terms": { 2951 "description": "Term IDs.", 2952 "type": "array", 2953 "items": { 2954 "type": "integer" 2955 }, 2956 "default": [] 2957 } 2958 }, 2959 "additionalProperties": false 2960 } 2961 ], 2962 "required": false 2963 }, 2964 "menu_order": { 2965 "description": "Limit result set to posts with a specific menu_order value.", 2966 "type": "integer", 2967 "required": false 2968 } 2969 } 2970 }, 2971 { 2972 "methods": [ 2973 "POST" 2974 ], 2975 "allow_batch": { 2976 "v1": true 2977 }, 2978 "args": { 2979 "title": { 2980 "description": "The title for the object.", 2981 "type": [ 2982 "string", 2983 "object" 2984 ], 2985 "properties": { 2986 "raw": { 2987 "description": "Title for the object, as it exists in the database.", 2988 "type": "string", 2989 "context": [ 2990 "edit" 2991 ] 2992 }, 2993 "rendered": { 2994 "description": "HTML title for the object, transformed for display.", 2995 "type": "string", 2996 "context": [ 2997 "view", 2998 "edit", 2999 "embed" 3000 ], 3001 "readonly": true 3002 } 3003 }, 3004 "required": false 3005 }, 3006 "type": { 3007 "default": "custom", 3008 "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", 3009 "type": "string", 3010 "enum": [ 3011 "taxonomy", 3012 "post_type", 3013 "post_type_archive", 3014 "custom" 3015 ], 3016 "required": false 3017 }, 3018 "status": { 3019 "default": "publish", 3020 "description": "A named status for the object.", 3021 "type": "string", 3022 "enum": [ 3023 "publish", 3024 "future", 3025 "draft", 3026 "pending", 3027 "private" 3028 ], 3029 "required": false 3030 }, 3031 "parent": { 3032 "default": 0, 3033 "description": "The ID for the parent of the object.", 3034 "type": "integer", 3035 "minimum": 0, 3036 "required": false 3037 }, 3038 "attr_title": { 3039 "description": "Text for the title attribute of the link element for this menu item.", 3040 "type": "string", 3041 "required": false 3042 }, 3043 "classes": { 3044 "description": "Class names for the link element of this menu item.", 3045 "type": "array", 3046 "items": { 3047 "type": "string" 3048 }, 3049 "required": false 3050 }, 3051 "description": { 3052 "description": "The description of this menu item.", 3053 "type": "string", 3054 "required": false 3055 }, 3056 "menu_order": { 3057 "default": 1, 3058 "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", 3059 "type": "integer", 3060 "minimum": 1, 3061 "required": false 3062 }, 3063 "object": { 3064 "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", 3065 "type": "string", 3066 "required": false 3067 }, 3068 "object_id": { 3069 "default": 0, 3070 "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", 3071 "type": "integer", 3072 "minimum": 0, 3073 "required": false 3074 }, 3075 "target": { 3076 "description": "The target attribute of the link element for this menu item.", 3077 "type": "string", 3078 "enum": [ 3079 "_blank", 3080 "" 3081 ], 3082 "required": false 3083 }, 3084 "url": { 3085 "description": "The URL to which this menu item points.", 3086 "type": "string", 3087 "format": "uri", 3088 "required": false 3089 }, 3090 "xfn": { 3091 "description": "The XFN relationship expressed in the link of this menu item.", 3092 "type": "array", 3093 "items": { 3094 "type": "string" 3095 }, 3096 "required": false 3097 }, 3098 "menus": { 3099 "description": "The terms assigned to the object in the nav_menu taxonomy.", 3100 "type": "integer", 3101 "required": false 3102 }, 3103 "meta": { 3104 "description": "Meta fields.", 3105 "type": "object", 3106 "properties": [], 3107 "required": false 3108 } 3109 } 3110 } 3111 ], 3112 "_links": { 3113 "self": [ 3114 { 3115 "href": "http://example.org/index.php?rest_route=/wp/v2/menu-items" 3116 } 3117 ] 3118 } 3119 }, 3120 "/wp/v2/menu-items/(?P<id>[\\d]+)": { 3121 "namespace": "wp/v2", 3122 "methods": [ 3123 "GET", 3124 "POST", 3125 "PUT", 3126 "PATCH", 3127 "DELETE" 3128 ], 3129 "endpoints": [ 3130 { 3131 "methods": [ 3132 "GET" 3133 ], 3134 "allow_batch": { 3135 "v1": true 3136 }, 3137 "args": { 3138 "id": { 3139 "description": "Unique identifier for the post.", 3140 "type": "integer", 3141 "required": false 3142 }, 3143 "context": { 3144 "description": "Scope under which the request is made; determines fields present in response.", 3145 "type": "string", 3146 "enum": [ 3147 "view", 3148 "embed", 3149 "edit" 3150 ], 3151 "default": "view", 3152 "required": false 3153 } 3154 } 3155 }, 3156 { 3157 "methods": [ 3158 "POST", 3159 "PUT", 3160 "PATCH" 3161 ], 3162 "allow_batch": { 3163 "v1": true 3164 }, 3165 "args": { 3166 "id": { 3167 "description": "Unique identifier for the post.", 3168 "type": "integer", 3169 "required": false 3170 }, 3171 "title": { 3172 "description": "The title for the object.", 3173 "type": [ 3174 "string", 3175 "object" 3176 ], 3177 "properties": { 3178 "raw": { 3179 "description": "Title for the object, as it exists in the database.", 3180 "type": "string", 3181 "context": [ 3182 "edit" 3183 ] 3184 }, 3185 "rendered": { 3186 "description": "HTML title for the object, transformed for display.", 3187 "type": "string", 3188 "context": [ 3189 "view", 3190 "edit", 3191 "embed" 3192 ], 3193 "readonly": true 3194 } 3195 }, 3196 "required": false 3197 }, 3198 "type": { 3199 "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", 3200 "type": "string", 3201 "enum": [ 3202 "taxonomy", 3203 "post_type", 3204 "post_type_archive", 3205 "custom" 3206 ], 3207 "required": false 3208 }, 3209 "status": { 3210 "description": "A named status for the object.", 3211 "type": "string", 3212 "enum": [ 3213 "publish", 3214 "future", 3215 "draft", 3216 "pending", 3217 "private" 3218 ], 3219 "required": false 3220 }, 3221 "parent": { 3222 "description": "The ID for the parent of the object.", 3223 "type": "integer", 3224 "minimum": 0, 3225 "required": false 3226 }, 3227 "attr_title": { 3228 "description": "Text for the title attribute of the link element for this menu item.", 3229 "type": "string", 3230 "required": false 3231 }, 3232 "classes": { 3233 "description": "Class names for the link element of this menu item.", 3234 "type": "array", 3235 "items": { 3236 "type": "string" 3237 }, 3238 "required": false 3239 }, 3240 "description": { 3241 "description": "The description of this menu item.", 3242 "type": "string", 3243 "required": false 3244 }, 3245 "menu_order": { 3246 "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", 3247 "type": "integer", 3248 "minimum": 1, 3249 "required": false 3250 }, 3251 "object": { 3252 "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", 3253 "type": "string", 3254 "required": false 3255 }, 3256 "object_id": { 3257 "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", 3258 "type": "integer", 3259 "minimum": 0, 3260 "required": false 3261 }, 3262 "target": { 3263 "description": "The target attribute of the link element for this menu item.", 3264 "type": "string", 3265 "enum": [ 3266 "_blank", 3267 "" 3268 ], 3269 "required": false 3270 }, 3271 "url": { 3272 "description": "The URL to which this menu item points.", 3273 "type": "string", 3274 "format": "uri", 3275 "required": false 3276 }, 3277 "xfn": { 3278 "description": "The XFN relationship expressed in the link of this menu item.", 3279 "type": "array", 3280 "items": { 3281 "type": "string" 3282 }, 3283 "required": false 3284 }, 3285 "menus": { 3286 "description": "The terms assigned to the object in the nav_menu taxonomy.", 3287 "type": "integer", 3288 "required": false 3289 }, 3290 "meta": { 3291 "description": "Meta fields.", 3292 "type": "object", 3293 "properties": [], 3294 "required": false 3295 } 3296 } 3297 }, 3298 { 3299 "methods": [ 3300 "DELETE" 3301 ], 3302 "allow_batch": { 3303 "v1": true 3304 }, 3305 "args": { 3306 "id": { 3307 "description": "Unique identifier for the post.", 3308 "type": "integer", 3309 "required": false 3310 }, 3311 "force": { 3312 "type": "boolean", 3313 "default": false, 3314 "description": "Whether to bypass Trash and force deletion.", 3315 "required": false 3316 } 3317 } 3318 } 3319 ] 3320 }, 3321 "/wp/v2/menu-items/(?P<id>[\\d]+)/autosaves": { 3322 "namespace": "wp/v2", 3323 "methods": [ 3324 "GET", 3325 "POST" 3326 ], 3327 "endpoints": [ 3328 { 3329 "methods": [ 3330 "GET" 3331 ], 3332 "args": { 3333 "parent": { 3334 "description": "The ID for the parent of the autosave.", 3335 "type": "integer", 3336 "required": false 3337 }, 3338 "context": { 3339 "description": "Scope under which the request is made; determines fields present in response.", 3340 "type": "string", 3341 "enum": [ 3342 "view", 3343 "embed", 3344 "edit" 3345 ], 3346 "default": "view", 3347 "required": false 3348 } 3349 } 3350 }, 3351 { 3352 "methods": [ 3353 "POST" 3354 ], 3355 "args": { 3356 "parent": { 3357 "description": "The ID for the parent of the object.", 3358 "type": "integer", 3359 "minimum": 0, 3360 "required": false 3361 }, 3362 "title": { 3363 "description": "The title for the object.", 3364 "type": [ 3365 "string", 3366 "object" 3367 ], 3368 "properties": { 3369 "raw": { 3370 "description": "Title for the object, as it exists in the database.", 3371 "type": "string", 3372 "context": [ 3373 "edit" 3374 ] 3375 }, 3376 "rendered": { 3377 "description": "HTML title for the object, transformed for display.", 3378 "type": "string", 3379 "context": [ 3380 "view", 3381 "edit", 3382 "embed" 3383 ], 3384 "readonly": true 3385 } 3386 }, 3387 "required": false 3388 }, 3389 "type": { 3390 "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", 3391 "type": "string", 3392 "enum": [ 3393 "taxonomy", 3394 "post_type", 3395 "post_type_archive", 3396 "custom" 3397 ], 3398 "required": false 3399 }, 3400 "status": { 3401 "description": "A named status for the object.", 3402 "type": "string", 3403 "enum": [ 3404 "publish", 3405 "future", 3406 "draft", 3407 "pending", 3408 "private" 3409 ], 3410 "required": false 3411 }, 3412 "attr_title": { 3413 "description": "Text for the title attribute of the link element for this menu item.", 3414 "type": "string", 3415 "required": false 3416 }, 3417 "classes": { 3418 "description": "Class names for the link element of this menu item.", 3419 "type": "array", 3420 "items": { 3421 "type": "string" 3422 }, 3423 "required": false 3424 }, 3425 "description": { 3426 "description": "The description of this menu item.", 3427 "type": "string", 3428 "required": false 3429 }, 3430 "menu_order": { 3431 "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", 3432 "type": "integer", 3433 "minimum": 1, 3434 "required": false 3435 }, 3436 "object": { 3437 "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", 3438 "type": "string", 3439 "required": false 3440 }, 3441 "object_id": { 3442 "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", 3443 "type": "integer", 3444 "minimum": 0, 3445 "required": false 3446 }, 3447 "target": { 3448 "description": "The target attribute of the link element for this menu item.", 3449 "type": "string", 3450 "enum": [ 3451 "_blank", 3452 "" 3453 ], 3454 "required": false 3455 }, 3456 "url": { 3457 "description": "The URL to which this menu item points.", 3458 "type": "string", 3459 "format": "uri", 3460 "required": false 3461 }, 3462 "xfn": { 3463 "description": "The XFN relationship expressed in the link of this menu item.", 3464 "type": "array", 3465 "items": { 3466 "type": "string" 3467 }, 3468 "required": false 3469 }, 3470 "menus": { 3471 "description": "The terms assigned to the object in the nav_menu taxonomy.", 3472 "type": "integer", 3473 "required": false 3474 }, 3475 "meta": { 3476 "description": "Meta fields.", 3477 "type": "object", 3478 "properties": [], 3479 "required": false 3480 } 3481 } 3482 } 3483 ] 3484 }, 3485 "/wp/v2/menu-items/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": { 3486 "namespace": "wp/v2", 3487 "methods": [ 3488 "GET" 3489 ], 3490 "endpoints": [ 3491 { 3492 "methods": [ 3493 "GET" 3494 ], 3495 "args": { 3496 "parent": { 3497 "description": "The ID for the parent of the autosave.", 3498 "type": "integer", 3499 "required": false 3500 }, 3501 "id": { 3502 "description": "The ID for the autosave.", 3503 "type": "integer", 3504 "required": false 3505 }, 3506 "context": { 3507 "description": "Scope under which the request is made; determines fields present in response.", 3508 "type": "string", 3509 "enum": [ 3510 "view", 3511 "embed", 3512 "edit" 3513 ], 3514 "default": "view", 3515 "required": false 3516 } 3517 } 3518 } 3519 ] 3520 }, 3521 "/wp/v2/blocks": { 3522 "namespace": "wp/v2", 3523 "methods": [ 3524 "GET", 3525 "POST" 3526 ], 3527 "endpoints": [ 3528 { 3529 "methods": [ 3530 "GET" 3531 ], 3532 "allow_batch": { 3533 "v1": true 3534 }, 3535 "args": { 3536 "context": { 3537 "description": "Scope under which the request is made; determines fields present in response.", 3538 "type": "string", 3539 "enum": [ 3540 "view", 3541 "embed", 3542 "edit" 3543 ], 3544 "default": "view", 3545 "required": false 3546 }, 3547 "page": { 3548 "description": "Current page of the collection.", 3549 "type": "integer", 3550 "default": 1, 3551 "minimum": 1, 3552 "required": false 3553 }, 3554 "per_page": { 3555 "description": "Maximum number of items to be returned in result set.", 3556 "type": "integer", 3557 "default": 10, 3558 "minimum": 1, 3559 "maximum": 100, 3560 "required": false 3561 }, 3562 "search": { 3563 "description": "Limit results to those matching a string.", 3564 "type": "string", 3565 "required": false 3566 }, 3567 "after": { 3568 "description": "Limit response to posts published after a given ISO8601 compliant date.", 3569 "type": "string", 3570 "format": "date-time", 3571 "required": false 3572 }, 3573 "modified_after": { 3574 "description": "Limit response to posts modified after a given ISO8601 compliant date.", 3575 "type": "string", 3576 "format": "date-time", 3577 "required": false 3578 }, 3579 "before": { 3580 "description": "Limit response to posts published before a given ISO8601 compliant date.", 3581 "type": "string", 3582 "format": "date-time", 3583 "required": false 3584 }, 3585 "modified_before": { 3586 "description": "Limit response to posts modified before a given ISO8601 compliant date.", 3587 "type": "string", 3588 "format": "date-time", 3589 "required": false 3590 }, 3591 "exclude": { 3592 "description": "Ensure result set excludes specific IDs.", 3593 "type": "array", 3594 "items": { 3595 "type": "integer" 3596 }, 3597 "default": [], 3598 "required": false 3599 }, 3600 "include": { 3601 "description": "Limit result set to specific IDs.", 3602 "type": "array", 3603 "items": { 3604 "type": "integer" 3605 }, 3606 "default": [], 3607 "required": false 3608 }, 3609 "offset": { 3610 "description": "Offset the result set by a specific number of items.", 3611 "type": "integer", 3612 "required": false 3613 }, 3614 "order": { 3615 "description": "Order sort attribute ascending or descending.", 3616 "type": "string", 3617 "default": "desc", 3618 "enum": [ 3619 "asc", 3620 "desc" 3621 ], 3622 "required": false 3623 }, 3624 "orderby": { 3625 "description": "Sort collection by post attribute.", 3626 "type": "string", 3627 "default": "date", 3628 "enum": [ 3629 "author", 3630 "date", 3631 "id", 3632 "include", 3633 "modified", 3634 "parent", 3635 "relevance", 3636 "slug", 3637 "include_slugs", 3638 "title" 3639 ], 3640 "required": false 3641 }, 3642 "search_columns": { 3643 "default": [], 3644 "description": "Array of column names to be searched.", 3645 "type": "array", 3646 "items": { 3647 "enum": [ 3648 "post_title", 3649 "post_content", 3650 "post_excerpt" 3651 ], 3652 "type": "string" 3653 }, 3654 "required": false 3655 }, 3656 "slug": { 3657 "description": "Limit result set to posts with one or more specific slugs.", 3658 "type": "array", 3659 "items": { 3660 "type": "string" 3661 }, 3662 "required": false 3663 }, 3664 "status": { 3665 "default": "publish", 3666 "description": "Limit result set to posts assigned one or more statuses.", 3667 "type": "array", 3668 "items": { 3669 "enum": [ 3670 "publish", 3671 "future", 3672 "draft", 3673 "pending", 3674 "private", 3675 "trash", 3676 "auto-draft", 3677 "inherit", 3678 "request-pending", 3679 "request-confirmed", 3680 "request-failed", 3681 "request-completed", 3682 "any" 3683 ], 3684 "type": "string" 3685 }, 3686 "required": false 3687 }, 3688 "tax_relation": { 3689 "description": "Limit result set based on relationship between multiple taxonomies.", 3690 "type": "string", 3691 "enum": [ 3692 "AND", 3693 "OR" 3694 ], 3695 "required": false 3696 }, 3697 "wp_pattern_category": { 3698 "description": "Limit result set to items with specific terms assigned in the wp_pattern_category taxonomy.", 3699 "type": [ 3700 "object", 3701 "array" 3702 ], 3703 "oneOf": [ 3704 { 3705 "title": "Term ID List", 3706 "description": "Match terms with the listed IDs.", 3707 "type": "array", 3708 "items": { 3709 "type": "integer" 3710 } 3711 }, 3712 { 3713 "title": "Term ID Taxonomy Query", 3714 "description": "Perform an advanced term query.", 3715 "type": "object", 3716 "properties": { 3717 "terms": { 3718 "description": "Term IDs.", 3719 "type": "array", 3720 "items": { 3721 "type": "integer" 3722 }, 3723 "default": [] 3724 }, 3725 "operator": { 3726 "description": "Whether items must be assigned all or any of the specified terms.", 3727 "type": "string", 3728 "enum": [ 3729 "AND", 3730 "OR" 3731 ], 3732 "default": "OR" 3733 } 3734 }, 3735 "additionalProperties": false 3736 } 3737 ], 3738 "required": false 3739 }, 3740 "wp_pattern_category_exclude": { 3741 "description": "Limit result set to items except those with specific terms assigned in the wp_pattern_category taxonomy.", 3742 "type": [ 3743 "object", 3744 "array" 3745 ], 3746 "oneOf": [ 3747 { 3748 "title": "Term ID List", 3749 "description": "Match terms with the listed IDs.", 3750 "type": "array", 3751 "items": { 3752 "type": "integer" 3753 } 3754 }, 3755 { 3756 "title": "Term ID Taxonomy Query", 3757 "description": "Perform an advanced term query.", 3758 "type": "object", 3759 "properties": { 3760 "terms": { 3761 "description": "Term IDs.", 3762 "type": "array", 3763 "items": { 3764 "type": "integer" 3765 }, 3766 "default": [] 3767 } 3768 }, 3769 "additionalProperties": false 3770 } 3771 ], 3772 "required": false 3773 } 3774 } 3775 }, 3776 { 3777 "methods": [ 3778 "POST" 3779 ], 3780 "allow_batch": { 3781 "v1": true 3782 }, 3783 "args": { 3784 "date": { 3785 "description": "The date the post was published, in the site's timezone.", 3786 "type": [ 3787 "string", 3788 "null" 3789 ], 3790 "format": "date-time", 3791 "required": false 3792 }, 3793 "date_gmt": { 3794 "description": "The date the post was published, as GMT.", 3795 "type": [ 3796 "string", 3797 "null" 3798 ], 3799 "format": "date-time", 3800 "required": false 3801 }, 3802 "slug": { 3803 "description": "An alphanumeric identifier for the post unique to its type.", 3804 "type": "string", 3805 "required": false 3806 }, 3807 "status": { 3808 "description": "A named status for the post.", 3809 "type": "string", 3810 "enum": [ 3811 "publish", 3812 "future", 3813 "draft", 3814 "pending", 3815 "private" 3816 ], 3817 "required": false 3818 }, 3819 "password": { 3820 "description": "A password to protect access to the content and excerpt.", 3821 "type": "string", 3822 "required": false 3823 }, 3824 "title": { 3825 "description": "The title for the post.", 3826 "type": "object", 3827 "properties": { 3828 "raw": { 3829 "description": "Title for the post, as it exists in the database.", 3830 "type": "string", 3831 "context": [ 3832 "view", 3833 "edit" 3834 ] 3835 } 3836 }, 3837 "required": false 3838 }, 3839 "content": { 3840 "description": "The content for the post.", 3841 "type": "object", 3842 "properties": { 3843 "raw": { 3844 "description": "Content for the post, as it exists in the database.", 3845 "type": "string", 3846 "context": [ 3847 "view", 3848 "edit" 3849 ] 3850 }, 3851 "block_version": { 3852 "description": "Version of the content block format used by the post.", 3853 "type": "integer", 3854 "context": [ 3855 "edit" 3856 ], 3857 "readonly": true 3858 }, 3859 "protected": { 3860 "description": "Whether the content is protected with a password.", 3861 "type": "boolean", 3862 "context": [ 3863 "view", 3864 "edit", 3865 "embed" 3866 ], 3867 "readonly": true 3868 } 3869 }, 3870 "required": false 3871 }, 3872 "meta": { 3873 "description": "Meta fields.", 3874 "type": "object", 3875 "properties": [], 3876 "required": false 3877 }, 3878 "template": { 3879 "description": "The theme file to use to display the post.", 3880 "type": "string", 3881 "required": false 3882 }, 3883 "wp_pattern_category": { 3884 "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", 3885 "type": "array", 3886 "items": { 3887 "type": "integer" 3888 }, 3889 "required": false 3890 } 3891 } 3892 } 3893 ], 3894 "_links": { 3895 "self": "http://example.org/index.php?rest_route=/wp/v2/blocks" 3896 } 3897 }, 3898 "/wp/v2/blocks/(?P<id>[\\d]+)": { 3899 "namespace": "wp/v2", 3900 "methods": [ 3901 "GET", 3902 "POST", 3903 "PUT", 3904 "PATCH", 3905 "DELETE" 3906 ], 3907 "endpoints": [ 3908 { 3909 "methods": [ 3910 "GET" 3911 ], 3912 "allow_batch": { 3913 "v1": true 3914 }, 3915 "args": { 3916 "id": { 3917 "description": "Unique identifier for the post.", 3918 "type": "integer", 3919 "required": false 3920 }, 3921 "context": { 3922 "description": "Scope under which the request is made; determines fields present in response.", 3923 "type": "string", 3924 "enum": [ 3925 "view", 3926 "embed", 3927 "edit" 3928 ], 3929 "default": "view", 3930 "required": false 3931 }, 3932 "password": { 3933 "description": "The password for the post if it is password protected.", 3934 "type": "string", 3935 "required": false 3936 } 3937 } 3938 }, 3939 { 3940 "methods": [ 3941 "POST", 3942 "PUT", 3943 "PATCH" 3944 ], 3945 "allow_batch": { 3946 "v1": true 3947 }, 3948 "args": { 3949 "id": { 3950 "description": "Unique identifier for the post.", 3951 "type": "integer", 3952 "required": false 3953 }, 3954 "date": { 3955 "description": "The date the post was published, in the site's timezone.", 3956 "type": [ 3957 "string", 3958 "null" 3959 ], 3960 "format": "date-time", 3961 "required": false 3962 }, 3963 "date_gmt": { 3964 "description": "The date the post was published, as GMT.", 3965 "type": [ 3966 "string", 3967 "null" 3968 ], 3969 "format": "date-time", 3970 "required": false 3971 }, 3972 "slug": { 3973 "description": "An alphanumeric identifier for the post unique to its type.", 3974 "type": "string", 3975 "required": false 3976 }, 3977 "status": { 3978 "description": "A named status for the post.", 3979 "type": "string", 3980 "enum": [ 3981 "publish", 3982 "future", 3983 "draft", 3984 "pending", 3985 "private" 3986 ], 3987 "required": false 3988 }, 3989 "password": { 3990 "description": "A password to protect access to the content and excerpt.", 3991 "type": "string", 3992 "required": false 3993 }, 3994 "title": { 3995 "description": "The title for the post.", 3996 "type": "object", 3997 "properties": { 3998 "raw": { 3999 "description": "Title for the post, as it exists in the database.", 4000 "type": "string", 4001 "context": [ 4002 "view", 4003 "edit" 4004 ] 4005 } 4006 }, 4007 "required": false 4008 }, 4009 "content": { 4010 "description": "The content for the post.", 4011 "type": "object", 4012 "properties": { 4013 "raw": { 4014 "description": "Content for the post, as it exists in the database.", 4015 "type": "string", 4016 "context": [ 4017 "view", 4018 "edit" 4019 ] 4020 }, 4021 "block_version": { 4022 "description": "Version of the content block format used by the post.", 4023 "type": "integer", 4024 "context": [ 4025 "edit" 4026 ], 4027 "readonly": true 4028 }, 4029 "protected": { 4030 "description": "Whether the content is protected with a password.", 4031 "type": "boolean", 4032 "context": [ 4033 "view", 4034 "edit", 4035 "embed" 4036 ], 4037 "readonly": true 4038 } 4039 }, 4040 "required": false 4041 }, 4042 "meta": { 4043 "description": "Meta fields.", 4044 "type": "object", 4045 "properties": [], 4046 "required": false 4047 }, 4048 "template": { 4049 "description": "The theme file to use to display the post.", 4050 "type": "string", 4051 "required": false 4052 }, 4053 "wp_pattern_category": { 4054 "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", 4055 "type": "array", 4056 "items": { 4057 "type": "integer" 4058 }, 4059 "required": false 4060 } 4061 } 4062 }, 4063 { 4064 "methods": [ 4065 "DELETE" 4066 ], 4067 "allow_batch": { 4068 "v1": true 4069 }, 4070 "args": { 4071 "id": { 4072 "description": "Unique identifier for the post.", 4073 "type": "integer", 4074 "required": false 4075 }, 4076 "force": { 4077 "type": "boolean", 4078 "default": false, 4079 "description": "Whether to bypass Trash and force deletion.", 4080 "required": false 4081 } 4082 } 4083 } 4084 ] 4085 }, 4086 "/wp/v2/blocks/(?P<parent>[\\d]+)/revisions": { 4087 "namespace": "wp/v2", 4088 "methods": [ 4089 "GET" 4090 ], 4091 "endpoints": [ 4092 { 4093 "methods": [ 4094 "GET" 4095 ], 4096 "args": { 4097 "parent": { 4098 "description": "The ID for the parent of the revision.", 4099 "type": "integer", 4100 "required": false 4101 }, 4102 "context": { 4103 "description": "Scope under which the request is made; determines fields present in response.", 4104 "type": "string", 4105 "enum": [ 4106 "view", 4107 "embed", 4108 "edit" 4109 ], 4110 "default": "view", 4111 "required": false 4112 }, 4113 "page": { 4114 "description": "Current page of the collection.", 4115 "type": "integer", 4116 "default": 1, 4117 "minimum": 1, 4118 "required": false 4119 }, 4120 "per_page": { 4121 "description": "Maximum number of items to be returned in result set.", 4122 "type": "integer", 4123 "minimum": 1, 4124 "maximum": 100, 4125 "required": false 4126 }, 4127 "search": { 4128 "description": "Limit results to those matching a string.", 4129 "type": "string", 4130 "required": false 4131 }, 4132 "exclude": { 4133 "description": "Ensure result set excludes specific IDs.", 4134 "type": "array", 4135 "items": { 4136 "type": "integer" 4137 }, 4138 "default": [], 4139 "required": false 4140 }, 4141 "include": { 4142 "description": "Limit result set to specific IDs.", 4143 "type": "array", 4144 "items": { 4145 "type": "integer" 4146 }, 4147 "default": [], 4148 "required": false 4149 }, 4150 "offset": { 4151 "description": "Offset the result set by a specific number of items.", 4152 "type": "integer", 4153 "required": false 4154 }, 4155 "order": { 4156 "description": "Order sort attribute ascending or descending.", 4157 "type": "string", 4158 "default": "desc", 4159 "enum": [ 4160 "asc", 4161 "desc" 4162 ], 4163 "required": false 4164 }, 4165 "orderby": { 4166 "description": "Sort collection by object attribute.", 4167 "type": "string", 4168 "default": "date", 4169 "enum": [ 4170 "date", 4171 "id", 4172 "include", 4173 "relevance", 4174 "slug", 4175 "include_slugs", 4176 "title" 4177 ], 4178 "required": false 4179 } 4180 } 4181 } 4182 ] 4183 }, 4184 "/wp/v2/blocks/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 4185 "namespace": "wp/v2", 4186 "methods": [ 4187 "GET", 4188 "DELETE" 4189 ], 4190 "endpoints": [ 4191 { 4192 "methods": [ 4193 "GET" 4194 ], 4195 "args": { 4196 "parent": { 4197 "description": "The ID for the parent of the revision.", 4198 "type": "integer", 4199 "required": false 4200 }, 4201 "id": { 4202 "description": "Unique identifier for the revision.", 4203 "type": "integer", 4204 "required": false 4205 }, 4206 "context": { 4207 "description": "Scope under which the request is made; determines fields present in response.", 4208 "type": "string", 4209 "enum": [ 4210 "view", 4211 "embed", 4212 "edit" 4213 ], 4214 "default": "view", 4215 "required": false 4216 } 4217 } 4218 }, 4219 { 4220 "methods": [ 4221 "DELETE" 4222 ], 4223 "args": { 4224 "parent": { 4225 "description": "The ID for the parent of the revision.", 4226 "type": "integer", 4227 "required": false 4228 }, 4229 "id": { 4230 "description": "Unique identifier for the revision.", 4231 "type": "integer", 4232 "required": false 4233 }, 4234 "force": { 4235 "type": "boolean", 4236 "default": false, 4237 "description": "Required to be true, as revisions do not support trashing.", 4238 "required": false 4239 } 4240 } 4241 } 4242 ] 4243 }, 4244 "/wp/v2/blocks/(?P<id>[\\d]+)/autosaves": { 4245 "namespace": "wp/v2", 4246 "methods": [ 4247 "GET", 4248 "POST" 4249 ], 4250 "endpoints": [ 4251 { 4252 "methods": [ 4253 "GET" 4254 ], 4255 "args": { 4256 "parent": { 4257 "description": "The ID for the parent of the autosave.", 4258 "type": "integer", 4259 "required": false 4260 }, 4261 "context": { 4262 "description": "Scope under which the request is made; determines fields present in response.", 4263 "type": "string", 4264 "enum": [ 4265 "view", 4266 "embed", 4267 "edit" 4268 ], 4269 "default": "view", 4270 "required": false 4271 } 4272 } 4273 }, 4274 { 4275 "methods": [ 4276 "POST" 4277 ], 4278 "args": { 4279 "parent": { 4280 "description": "The ID for the parent of the autosave.", 4281 "type": "integer", 4282 "required": false 4283 }, 4284 "date": { 4285 "description": "The date the post was published, in the site's timezone.", 4286 "type": [ 4287 "string", 4288 "null" 4289 ], 4290 "format": "date-time", 4291 "required": false 4292 }, 4293 "date_gmt": { 4294 "description": "The date the post was published, as GMT.", 4295 "type": [ 4296 "string", 4297 "null" 4298 ], 4299 "format": "date-time", 4300 "required": false 4301 }, 4302 "slug": { 4303 "description": "An alphanumeric identifier for the post unique to its type.", 4304 "type": "string", 4305 "required": false 4306 }, 4307 "status": { 4308 "description": "A named status for the post.", 4309 "type": "string", 4310 "enum": [ 4311 "publish", 4312 "future", 4313 "draft", 4314 "pending", 4315 "private" 4316 ], 4317 "required": false 4318 }, 4319 "password": { 4320 "description": "A password to protect access to the content and excerpt.", 4321 "type": "string", 4322 "required": false 4323 }, 4324 "title": { 4325 "description": "The title for the post.", 4326 "type": "object", 4327 "properties": { 4328 "raw": { 4329 "description": "Title for the post, as it exists in the database.", 4330 "type": "string", 4331 "context": [ 4332 "view", 4333 "edit" 4334 ] 4335 } 4336 }, 4337 "required": false 4338 }, 4339 "content": { 4340 "description": "The content for the post.", 4341 "type": "object", 4342 "properties": { 4343 "raw": { 4344 "description": "Content for the post, as it exists in the database.", 4345 "type": "string", 4346 "context": [ 4347 "view", 4348 "edit" 4349 ] 4350 }, 4351 "block_version": { 4352 "description": "Version of the content block format used by the post.", 4353 "type": "integer", 4354 "context": [ 4355 "edit" 4356 ], 4357 "readonly": true 4358 }, 4359 "protected": { 4360 "description": "Whether the content is protected with a password.", 4361 "type": "boolean", 4362 "context": [ 4363 "view", 4364 "edit", 4365 "embed" 4366 ], 4367 "readonly": true 4368 } 4369 }, 4370 "required": false 4371 }, 4372 "meta": { 4373 "description": "Meta fields.", 4374 "type": "object", 4375 "properties": [], 4376 "required": false 4377 }, 4378 "template": { 4379 "description": "The theme file to use to display the post.", 4380 "type": "string", 4381 "required": false 4382 }, 4383 "wp_pattern_category": { 4384 "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", 4385 "type": "array", 4386 "items": { 4387 "type": "integer" 4388 }, 4389 "required": false 4390 } 4391 } 4392 } 4393 ] 4394 }, 4395 "/wp/v2/blocks/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": { 4396 "namespace": "wp/v2", 4397 "methods": [ 4398 "GET" 4399 ], 4400 "endpoints": [ 4401 { 4402 "methods": [ 4403 "GET" 4404 ], 4405 "args": { 4406 "parent": { 4407 "description": "The ID for the parent of the autosave.", 4408 "type": "integer", 4409 "required": false 4410 }, 4411 "id": { 4412 "description": "The ID for the autosave.", 4413 "type": "integer", 4414 "required": false 4415 }, 4416 "context": { 4417 "description": "Scope under which the request is made; determines fields present in response.", 4418 "type": "string", 4419 "enum": [ 4420 "view", 4421 "embed", 4422 "edit" 4423 ], 4424 "default": "view", 4425 "required": false 4426 } 4427 } 4428 } 4429 ] 4430 }, 4431 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { 4432 "namespace": "wp/v2", 4433 "methods": [ 4434 "GET" 4435 ], 4436 "endpoints": [ 4437 { 4438 "methods": [ 4439 "GET" 4440 ], 4441 "args": { 4442 "parent": { 4443 "description": "The id of a template", 4444 "type": "string", 4445 "required": false 4446 }, 4447 "context": { 4448 "description": "Scope under which the request is made; determines fields present in response.", 4449 "type": "string", 4450 "enum": [ 4451 "view", 4452 "embed", 4453 "edit" 4454 ], 4455 "default": "view", 4456 "required": false 4457 }, 4458 "page": { 4459 "description": "Current page of the collection.", 4460 "type": "integer", 4461 "default": 1, 4462 "minimum": 1, 4463 "required": false 4464 }, 4465 "per_page": { 4466 "description": "Maximum number of items to be returned in result set.", 4467 "type": "integer", 4468 "minimum": 1, 4469 "maximum": 100, 4470 "required": false 4471 }, 4472 "search": { 4473 "description": "Limit results to those matching a string.", 4474 "type": "string", 4475 "required": false 4476 }, 4477 "exclude": { 4478 "description": "Ensure result set excludes specific IDs.", 4479 "type": "array", 4480 "items": { 4481 "type": "integer" 4482 }, 4483 "default": [], 4484 "required": false 4485 }, 4486 "include": { 4487 "description": "Limit result set to specific IDs.", 4488 "type": "array", 4489 "items": { 4490 "type": "integer" 4491 }, 4492 "default": [], 4493 "required": false 4494 }, 4495 "offset": { 4496 "description": "Offset the result set by a specific number of items.", 4497 "type": "integer", 4498 "required": false 4499 }, 4500 "order": { 4501 "description": "Order sort attribute ascending or descending.", 4502 "type": "string", 4503 "default": "desc", 4504 "enum": [ 4505 "asc", 4506 "desc" 4507 ], 4508 "required": false 4509 }, 4510 "orderby": { 4511 "description": "Sort collection by object attribute.", 4512 "type": "string", 4513 "default": "date", 4514 "enum": [ 4515 "date", 4516 "id", 4517 "include", 4518 "relevance", 4519 "slug", 4520 "include_slugs", 4521 "title" 4522 ], 4523 "required": false 4524 } 4525 } 4526 } 4527 ] 4528 }, 4529 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": { 4530 "namespace": "wp/v2", 4531 "methods": [ 4532 "GET", 4533 "DELETE" 4534 ], 4535 "endpoints": [ 4536 { 4537 "methods": [ 4538 "GET" 4539 ], 4540 "args": { 4541 "parent": { 4542 "description": "The id of a template", 4543 "type": "string", 4544 "required": false 4545 }, 4546 "id": { 4547 "description": "Unique identifier for the revision.", 4548 "type": "integer", 4549 "required": false 4550 }, 4551 "context": { 4552 "description": "Scope under which the request is made; determines fields present in response.", 4553 "type": "string", 4554 "enum": [ 4555 "view", 4556 "embed", 4557 "edit" 4558 ], 4559 "default": "view", 4560 "required": false 4561 } 4562 } 4563 }, 4564 { 4565 "methods": [ 4566 "DELETE" 4567 ], 4568 "args": { 4569 "parent": { 4570 "description": "The id of a template", 4571 "type": "string", 4572 "required": false 4573 }, 4574 "id": { 4575 "description": "Unique identifier for the revision.", 4576 "type": "integer", 4577 "required": false 4578 }, 4579 "force": { 4580 "type": "boolean", 4581 "default": false, 4582 "description": "Required to be true, as revisions do not support trashing.", 4583 "required": false 4584 } 4585 } 4586 } 4587 ] 4588 }, 4589 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { 4590 "namespace": "wp/v2", 4591 "methods": [ 4592 "GET", 4593 "POST" 4594 ], 4595 "endpoints": [ 4596 { 4597 "methods": [ 4598 "GET" 4599 ], 4600 "args": { 4601 "id": { 4602 "description": "The id of a template", 4603 "type": "string", 4604 "required": false 4605 }, 4606 "context": { 4607 "description": "Scope under which the request is made; determines fields present in response.", 4608 "type": "string", 4609 "enum": [ 4610 "view", 4611 "embed", 4612 "edit" 4613 ], 4614 "default": "view", 4615 "required": false 4616 } 4617 } 4618 }, 4619 { 4620 "methods": [ 4621 "POST" 4622 ], 4623 "args": { 4624 "id": { 4625 "description": "The id of a template", 4626 "type": "string", 4627 "required": false 4628 }, 4629 "slug": { 4630 "description": "Unique slug identifying the template.", 4631 "type": "string", 4632 "minLength": 1, 4633 "pattern": "[a-zA-Z0-9_\\%-]+", 4634 "required": false 4635 }, 4636 "theme": { 4637 "description": "Theme identifier for the template.", 4638 "type": "string", 4639 "required": false 4640 }, 4641 "type": { 4642 "description": "Type of template.", 4643 "type": "string", 4644 "required": false 4645 }, 4646 "content": { 4647 "description": "Content of template.", 4648 "type": [ 4649 "object", 4650 "string" 4651 ], 4652 "properties": { 4653 "raw": { 4654 "description": "Content for the template, as it exists in the database.", 4655 "type": "string", 4656 "context": [ 4657 "view", 4658 "edit" 4659 ] 4660 }, 4661 "block_version": { 4662 "description": "Version of the content block format used by the template.", 4663 "type": "integer", 4664 "context": [ 4665 "edit" 4666 ], 4667 "readonly": true 4668 } 4669 }, 4670 "required": false 4671 }, 4672 "title": { 4673 "description": "Title of template.", 4674 "type": [ 4675 "object", 4676 "string" 4677 ], 4678 "properties": { 4679 "raw": { 4680 "description": "Title for the template, as it exists in the database.", 4681 "type": "string", 4682 "context": [ 4683 "view", 4684 "edit", 4685 "embed" 4686 ] 4687 }, 4688 "rendered": { 4689 "description": "HTML title for the template, transformed for display.", 4690 "type": "string", 4691 "context": [ 4692 "view", 4693 "edit", 4694 "embed" 4695 ], 4696 "readonly": true 4697 } 4698 }, 4699 "required": false 4700 }, 4701 "description": { 4702 "description": "Description of template.", 4703 "type": "string", 4704 "required": false 4705 }, 4706 "status": { 4707 "description": "Status of template.", 4708 "type": "string", 4709 "enum": [ 4710 "publish", 4711 "future", 4712 "draft", 4713 "pending", 4714 "private" 4715 ], 4716 "required": false 4717 }, 4718 "author": { 4719 "description": "The ID for the author of the template.", 4720 "type": "integer", 4721 "required": false 4722 } 4723 } 4724 } 4725 ] 4726 }, 4727 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": { 4728 "namespace": "wp/v2", 4729 "methods": [ 4730 "GET" 4731 ], 4732 "endpoints": [ 4733 { 4734 "methods": [ 4735 "GET" 4736 ], 4737 "args": { 4738 "parent": { 4739 "description": "The id of a template", 4740 "type": "string", 4741 "required": false 4742 }, 4743 "id": { 4744 "description": "The ID for the autosave.", 4745 "type": "integer", 4746 "required": false 4747 }, 4748 "context": { 4749 "description": "Scope under which the request is made; determines fields present in response.", 4750 "type": "string", 4751 "enum": [ 4752 "view", 4753 "embed", 4754 "edit" 4755 ], 4756 "default": "view", 4757 "required": false 4758 } 4759 } 4760 } 4761 ] 4762 }, 4763 "/wp/v2/templates": { 4764 "namespace": "wp/v2", 4765 "methods": [ 4766 "GET", 4767 "POST" 4768 ], 4769 "endpoints": [ 4770 { 4771 "methods": [ 4772 "GET" 4773 ], 4774 "args": { 4775 "context": { 4776 "description": "Scope under which the request is made; determines fields present in response.", 4777 "type": "string", 4778 "enum": [ 4779 "view", 4780 "embed", 4781 "edit" 4782 ], 4783 "default": "view", 4784 "required": false 4785 }, 4786 "wp_id": { 4787 "description": "Limit to the specified post id.", 4788 "type": "integer", 4789 "required": false 4790 }, 4791 "area": { 4792 "description": "Limit to the specified template part area.", 4793 "type": "string", 4794 "required": false 4795 }, 4796 "post_type": { 4797 "description": "Post type to get the templates for.", 4798 "type": "string", 4799 "required": false 4800 } 4801 } 4802 }, 4803 { 4804 "methods": [ 4805 "POST" 4806 ], 4807 "args": { 4808 "slug": { 4809 "description": "Unique slug identifying the template.", 4810 "type": "string", 4811 "minLength": 1, 4812 "pattern": "[a-zA-Z0-9_\\%-]+", 4813 "required": true 4814 }, 4815 "theme": { 4816 "description": "Theme identifier for the template.", 4817 "type": "string", 4818 "required": false 4819 }, 4820 "type": { 4821 "description": "Type of template.", 4822 "type": "string", 4823 "required": false 4824 }, 4825 "content": { 4826 "default": "", 4827 "description": "Content of template.", 4828 "type": [ 4829 "object", 4830 "string" 4831 ], 4832 "properties": { 4833 "raw": { 4834 "description": "Content for the template, as it exists in the database.", 4835 "type": "string", 4836 "context": [ 4837 "view", 4838 "edit" 4839 ] 4840 }, 4841 "block_version": { 4842 "description": "Version of the content block format used by the template.", 4843 "type": "integer", 4844 "context": [ 4845 "edit" 4846 ], 4847 "readonly": true 4848 } 4849 }, 4850 "required": false 4851 }, 4852 "title": { 4853 "default": "", 4854 "description": "Title of template.", 4855 "type": [ 4856 "object", 4857 "string" 4858 ], 4859 "properties": { 4860 "raw": { 4861 "description": "Title for the template, as it exists in the database.", 4862 "type": "string", 4863 "context": [ 4864 "view", 4865 "edit", 4866 "embed" 4867 ] 4868 }, 4869 "rendered": { 4870 "description": "HTML title for the template, transformed for display.", 4871 "type": "string", 4872 "context": [ 4873 "view", 4874 "edit", 4875 "embed" 4876 ], 4877 "readonly": true 4878 } 4879 }, 4880 "required": false 4881 }, 4882 "description": { 4883 "default": "", 4884 "description": "Description of template.", 4885 "type": "string", 4886 "required": false 4887 }, 4888 "status": { 4889 "default": "publish", 4890 "description": "Status of template.", 4891 "type": "string", 4892 "enum": [ 4893 "publish", 4894 "future", 4895 "draft", 4896 "pending", 4897 "private" 4898 ], 4899 "required": false 4900 }, 4901 "author": { 4902 "description": "The ID for the author of the template.", 4903 "type": "integer", 4904 "required": false 4905 } 4906 } 4907 } 4908 ], 4909 "_links": { 4910 "self": [ 4911 { 4912 "href": "http://example.org/index.php?rest_route=/wp/v2/templates" 4913 } 4914 ] 4915 } 4916 }, 4917 "/wp/v2/templates/lookup": { 4918 "namespace": "wp/v2", 4919 "methods": [ 4920 "GET" 4921 ], 4922 "endpoints": [ 4923 { 4924 "methods": [ 4925 "GET" 4926 ], 4927 "args": { 4928 "slug": { 4929 "description": "The slug of the template to get the fallback for", 4930 "type": "string", 4931 "required": true 4932 }, 4933 "is_custom": { 4934 "description": "Indicates if a template is custom or part of the template hierarchy", 4935 "type": "boolean", 4936 "required": false 4937 }, 4938 "template_prefix": { 4939 "description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`", 4940 "type": "string", 4941 "required": false 4942 } 4943 } 4944 } 4945 ], 4946 "_links": { 4947 "self": [ 4948 { 4949 "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" 4950 } 4951 ] 4952 } 4953 }, 4954 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 4955 "namespace": "wp/v2", 4956 "methods": [ 4957 "GET", 4958 "POST", 4959 "PUT", 4960 "PATCH", 4961 "DELETE" 4962 ], 4963 "endpoints": [ 4964 { 4965 "methods": [ 4966 "GET" 4967 ], 4968 "args": { 4969 "id": { 4970 "description": "The id of a template", 4971 "type": "string", 4972 "required": false 4973 }, 4974 "context": { 4975 "description": "Scope under which the request is made; determines fields present in response.", 4976 "type": "string", 4977 "enum": [ 4978 "view", 4979 "embed", 4980 "edit" 4981 ], 4982 "default": "view", 4983 "required": false 4984 } 4985 } 4986 }, 4987 { 4988 "methods": [ 4989 "POST", 4990 "PUT", 4991 "PATCH" 4992 ], 4993 "args": { 4994 "id": { 4995 "description": "The id of a template", 4996 "type": "string", 4997 "required": false 4998 }, 4999 "slug": { 5000 "description": "Unique slug identifying the template.", 5001 "type": "string", 5002 "minLength": 1, 5003 "pattern": "[a-zA-Z0-9_\\%-]+", 5004 "required": false 5005 }, 5006 "theme": { 5007 "description": "Theme identifier for the template.", 5008 "type": "string", 5009 "required": false 5010 }, 5011 "type": { 5012 "description": "Type of template.", 5013 "type": "string", 5014 "required": false 5015 }, 5016 "content": { 5017 "description": "Content of template.", 5018 "type": [ 5019 "object", 5020 "string" 5021 ], 5022 "properties": { 5023 "raw": { 5024 "description": "Content for the template, as it exists in the database.", 5025 "type": "string", 5026 "context": [ 5027 "view", 5028 "edit" 5029 ] 5030 }, 5031 "block_version": { 5032 "description": "Version of the content block format used by the template.", 5033 "type": "integer", 5034 "context": [ 5035 "edit" 5036 ], 5037 "readonly": true 5038 } 5039 }, 5040 "required": false 5041 }, 5042 "title": { 5043 "description": "Title of template.", 5044 "type": [ 5045 "object", 5046 "string" 5047 ], 5048 "properties": { 5049 "raw": { 5050 "description": "Title for the template, as it exists in the database.", 5051 "type": "string", 5052 "context": [ 5053 "view", 5054 "edit", 5055 "embed" 5056 ] 5057 }, 5058 "rendered": { 5059 "description": "HTML title for the template, transformed for display.", 5060 "type": "string", 5061 "context": [ 5062 "view", 5063 "edit", 5064 "embed" 5065 ], 5066 "readonly": true 5067 } 5068 }, 5069 "required": false 5070 }, 5071 "description": { 5072 "description": "Description of template.", 5073 "type": "string", 5074 "required": false 5075 }, 5076 "status": { 5077 "description": "Status of template.", 5078 "type": "string", 5079 "enum": [ 5080 "publish", 5081 "future", 5082 "draft", 5083 "pending", 5084 "private" 5085 ], 5086 "required": false 5087 }, 5088 "author": { 5089 "description": "The ID for the author of the template.", 5090 "type": "integer", 5091 "required": false 5092 } 5093 } 5094 }, 5095 { 5096 "methods": [ 5097 "DELETE" 5098 ], 5099 "args": { 5100 "id": { 5101 "description": "The id of a template", 5102 "type": "string", 5103 "required": false 5104 }, 5105 "force": { 5106 "type": "boolean", 5107 "default": false, 5108 "description": "Whether to bypass Trash and force deletion.", 5109 "required": false 5110 } 5111 } 5112 } 5113 ] 5114 }, 5115 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { 5116 "namespace": "wp/v2", 5117 "methods": [ 5118 "GET" 5119 ], 5120 "endpoints": [ 5121 { 5122 "methods": [ 5123 "GET" 5124 ], 5125 "args": { 5126 "parent": { 5127 "description": "The id of a template", 5128 "type": "string", 5129 "required": false 5130 }, 5131 "context": { 5132 "description": "Scope under which the request is made; determines fields present in response.", 5133 "type": "string", 5134 "enum": [ 5135 "view", 5136 "embed", 5137 "edit" 5138 ], 5139 "default": "view", 5140 "required": false 5141 }, 5142 "page": { 5143 "description": "Current page of the collection.", 5144 "type": "integer", 5145 "default": 1, 5146 "minimum": 1, 5147 "required": false 5148 }, 5149 "per_page": { 5150 "description": "Maximum number of items to be returned in result set.", 5151 "type": "integer", 5152 "minimum": 1, 5153 "maximum": 100, 5154 "required": false 5155 }, 5156 "search": { 5157 "description": "Limit results to those matching a string.", 5158 "type": "string", 5159 "required": false 5160 }, 5161 "exclude": { 5162 "description": "Ensure result set excludes specific IDs.", 5163 "type": "array", 5164 "items": { 5165 "type": "integer" 5166 }, 5167 "default": [], 5168 "required": false 5169 }, 5170 "include": { 5171 "description": "Limit result set to specific IDs.", 5172 "type": "array", 5173 "items": { 5174 "type": "integer" 5175 }, 5176 "default": [], 5177 "required": false 5178 }, 5179 "offset": { 5180 "description": "Offset the result set by a specific number of items.", 5181 "type": "integer", 5182 "required": false 5183 }, 5184 "order": { 5185 "description": "Order sort attribute ascending or descending.", 5186 "type": "string", 5187 "default": "desc", 5188 "enum": [ 5189 "asc", 5190 "desc" 5191 ], 5192 "required": false 5193 }, 5194 "orderby": { 5195 "description": "Sort collection by object attribute.", 5196 "type": "string", 5197 "default": "date", 5198 "enum": [ 5199 "date", 5200 "id", 5201 "include", 5202 "relevance", 5203 "slug", 5204 "include_slugs", 5205 "title" 5206 ], 5207 "required": false 5208 } 5209 } 5210 } 5211 ] 5212 }, 5213 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": { 5214 "namespace": "wp/v2", 5215 "methods": [ 5216 "GET", 5217 "DELETE" 5218 ], 5219 "endpoints": [ 5220 { 5221 "methods": [ 5222 "GET" 5223 ], 5224 "args": { 5225 "parent": { 5226 "description": "The id of a template", 5227 "type": "string", 5228 "required": false 5229 }, 5230 "id": { 5231 "description": "Unique identifier for the revision.", 5232 "type": "integer", 5233 "required": false 5234 }, 5235 "context": { 5236 "description": "Scope under which the request is made; determines fields present in response.", 5237 "type": "string", 5238 "enum": [ 5239 "view", 5240 "embed", 5241 "edit" 5242 ], 5243 "default": "view", 5244 "required": false 5245 } 5246 } 5247 }, 5248 { 5249 "methods": [ 5250 "DELETE" 5251 ], 5252 "args": { 5253 "parent": { 5254 "description": "The id of a template", 5255 "type": "string", 5256 "required": false 5257 }, 5258 "id": { 5259 "description": "Unique identifier for the revision.", 5260 "type": "integer", 5261 "required": false 5262 }, 5263 "force": { 5264 "type": "boolean", 5265 "default": false, 5266 "description": "Required to be true, as revisions do not support trashing.", 5267 "required": false 5268 } 5269 } 5270 } 5271 ] 5272 }, 5273 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { 5274 "namespace": "wp/v2", 5275 "methods": [ 5276 "GET", 5277 "POST" 5278 ], 5279 "endpoints": [ 5280 { 5281 "methods": [ 5282 "GET" 5283 ], 5284 "args": { 5285 "id": { 5286 "description": "The id of a template", 5287 "type": "string", 5288 "required": false 5289 }, 5290 "context": { 5291 "description": "Scope under which the request is made; determines fields present in response.", 5292 "type": "string", 5293 "enum": [ 5294 "view", 5295 "embed", 5296 "edit" 5297 ], 5298 "default": "view", 5299 "required": false 5300 } 5301 } 5302 }, 5303 { 5304 "methods": [ 5305 "POST" 5306 ], 5307 "args": { 5308 "id": { 5309 "description": "The id of a template", 5310 "type": "string", 5311 "required": false 5312 }, 5313 "slug": { 5314 "description": "Unique slug identifying the template.", 5315 "type": "string", 5316 "minLength": 1, 5317 "pattern": "[a-zA-Z0-9_\\%-]+", 5318 "required": false 5319 }, 5320 "theme": { 5321 "description": "Theme identifier for the template.", 5322 "type": "string", 5323 "required": false 5324 }, 5325 "type": { 5326 "description": "Type of template.", 5327 "type": "string", 5328 "required": false 5329 }, 5330 "content": { 5331 "description": "Content of template.", 5332 "type": [ 5333 "object", 5334 "string" 5335 ], 5336 "properties": { 5337 "raw": { 5338 "description": "Content for the template, as it exists in the database.", 5339 "type": "string", 5340 "context": [ 5341 "view", 5342 "edit" 5343 ] 5344 }, 5345 "block_version": { 5346 "description": "Version of the content block format used by the template.", 5347 "type": "integer", 5348 "context": [ 5349 "edit" 5350 ], 5351 "readonly": true 5352 } 5353 }, 5354 "required": false 5355 }, 5356 "title": { 5357 "description": "Title of template.", 5358 "type": [ 5359 "object", 5360 "string" 5361 ], 5362 "properties": { 5363 "raw": { 5364 "description": "Title for the template, as it exists in the database.", 5365 "type": "string", 5366 "context": [ 5367 "view", 5368 "edit", 5369 "embed" 5370 ] 5371 }, 5372 "rendered": { 5373 "description": "HTML title for the template, transformed for display.", 5374 "type": "string", 5375 "context": [ 5376 "view", 5377 "edit", 5378 "embed" 5379 ], 5380 "readonly": true 5381 } 5382 }, 5383 "required": false 5384 }, 5385 "description": { 5386 "description": "Description of template.", 5387 "type": "string", 5388 "required": false 5389 }, 5390 "status": { 5391 "description": "Status of template.", 5392 "type": "string", 5393 "enum": [ 5394 "publish", 5395 "future", 5396 "draft", 5397 "pending", 5398 "private" 5399 ], 5400 "required": false 5401 }, 5402 "author": { 5403 "description": "The ID for the author of the template.", 5404 "type": "integer", 5405 "required": false 5406 }, 5407 "area": { 5408 "description": "Where the template part is intended for use (header, footer, etc.)", 5409 "type": "string", 5410 "required": false 5411 } 5412 } 5413 } 5414 ] 5415 }, 5416 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": { 5417 "namespace": "wp/v2", 5418 "methods": [ 5419 "GET" 5420 ], 5421 "endpoints": [ 5422 { 5423 "methods": [ 5424 "GET" 5425 ], 5426 "args": { 5427 "parent": { 5428 "description": "The id of a template", 5429 "type": "string", 5430 "required": false 5431 }, 5432 "id": { 5433 "description": "The ID for the autosave.", 5434 "type": "integer", 5435 "required": false 5436 }, 5437 "context": { 5438 "description": "Scope under which the request is made; determines fields present in response.", 5439 "type": "string", 5440 "enum": [ 5441 "view", 5442 "embed", 5443 "edit" 5444 ], 5445 "default": "view", 5446 "required": false 5447 } 5448 } 5449 } 5450 ] 5451 }, 5452 "/wp/v2/template-parts": { 5453 "namespace": "wp/v2", 5454 "methods": [ 5455 "GET", 5456 "POST" 5457 ], 5458 "endpoints": [ 5459 { 5460 "methods": [ 5461 "GET" 5462 ], 5463 "args": { 5464 "context": { 5465 "description": "Scope under which the request is made; determines fields present in response.", 5466 "type": "string", 5467 "enum": [ 5468 "view", 5469 "embed", 5470 "edit" 5471 ], 5472 "default": "view", 5473 "required": false 5474 }, 5475 "wp_id": { 5476 "description": "Limit to the specified post id.", 5477 "type": "integer", 5478 "required": false 5479 }, 5480 "area": { 5481 "description": "Limit to the specified template part area.", 5482 "type": "string", 5483 "required": false 5484 }, 5485 "post_type": { 5486 "description": "Post type to get the templates for.", 5487 "type": "string", 5488 "required": false 5489 } 5490 } 5491 }, 5492 { 5493 "methods": [ 5494 "POST" 5495 ], 5496 "args": { 5497 "slug": { 5498 "description": "Unique slug identifying the template.", 5499 "type": "string", 5500 "minLength": 1, 5501 "pattern": "[a-zA-Z0-9_\\%-]+", 5502 "required": true 5503 }, 5504 "theme": { 5505 "description": "Theme identifier for the template.", 5506 "type": "string", 5507 "required": false 5508 }, 5509 "type": { 5510 "description": "Type of template.", 5511 "type": "string", 5512 "required": false 5513 }, 5514 "content": { 5515 "default": "", 5516 "description": "Content of template.", 5517 "type": [ 5518 "object", 5519 "string" 5520 ], 5521 "properties": { 5522 "raw": { 5523 "description": "Content for the template, as it exists in the database.", 5524 "type": "string", 5525 "context": [ 5526 "view", 5527 "edit" 5528 ] 5529 }, 5530 "block_version": { 5531 "description": "Version of the content block format used by the template.", 5532 "type": "integer", 5533 "context": [ 5534 "edit" 5535 ], 5536 "readonly": true 5537 } 5538 }, 5539 "required": false 5540 }, 5541 "title": { 5542 "default": "", 5543 "description": "Title of template.", 5544 "type": [ 5545 "object", 5546 "string" 5547 ], 5548 "properties": { 5549 "raw": { 5550 "description": "Title for the template, as it exists in the database.", 5551 "type": "string", 5552 "context": [ 5553 "view", 5554 "edit", 5555 "embed" 5556 ] 5557 }, 5558 "rendered": { 5559 "description": "HTML title for the template, transformed for display.", 5560 "type": "string", 5561 "context": [ 5562 "view", 5563 "edit", 5564 "embed" 5565 ], 5566 "readonly": true 5567 } 5568 }, 5569 "required": false 5570 }, 5571 "description": { 5572 "default": "", 5573 "description": "Description of template.", 5574 "type": "string", 5575 "required": false 5576 }, 5577 "status": { 5578 "default": "publish", 5579 "description": "Status of template.", 5580 "type": "string", 5581 "enum": [ 5582 "publish", 5583 "future", 5584 "draft", 5585 "pending", 5586 "private" 5587 ], 5588 "required": false 5589 }, 5590 "author": { 5591 "description": "The ID for the author of the template.", 5592 "type": "integer", 5593 "required": false 5594 }, 5595 "area": { 5596 "description": "Where the template part is intended for use (header, footer, etc.)", 5597 "type": "string", 5598 "required": false 5599 } 5600 } 5601 } 5602 ], 5603 "_links": { 5604 "self": [ 5605 { 5606 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts" 5607 } 5608 ] 5609 } 5610 }, 5611 "/wp/v2/template-parts/lookup": { 5612 "namespace": "wp/v2", 5613 "methods": [ 5614 "GET" 5615 ], 5616 "endpoints": [ 5617 { 5618 "methods": [ 5619 "GET" 5620 ], 5621 "args": { 5622 "slug": { 5623 "description": "The slug of the template to get the fallback for", 5624 "type": "string", 5625 "required": true 5626 }, 5627 "is_custom": { 5628 "description": "Indicates if a template is custom or part of the template hierarchy", 5629 "type": "boolean", 5630 "required": false 5631 }, 5632 "template_prefix": { 5633 "description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`", 5634 "type": "string", 5635 "required": false 5636 } 5637 } 5638 } 5639 ], 5640 "_links": { 5641 "self": [ 5642 { 5643 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup" 5644 } 5645 ] 5646 } 5647 }, 5648 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 5649 "namespace": "wp/v2", 5650 "methods": [ 5651 "GET", 5652 "POST", 5653 "PUT", 5654 "PATCH", 5655 "DELETE" 5656 ], 5657 "endpoints": [ 5658 { 5659 "methods": [ 5660 "GET" 5661 ], 5662 "args": { 5663 "id": { 5664 "description": "The id of a template", 5665 "type": "string", 5666 "required": false 5667 }, 5668 "context": { 5669 "description": "Scope under which the request is made; determines fields present in response.", 5670 "type": "string", 5671 "enum": [ 5672 "view", 5673 "embed", 5674 "edit" 5675 ], 5676 "default": "view", 5677 "required": false 5678 } 5679 } 5680 }, 5681 { 5682 "methods": [ 5683 "POST", 5684 "PUT", 5685 "PATCH" 5686 ], 5687 "args": { 5688 "id": { 5689 "description": "The id of a template", 5690 "type": "string", 5691 "required": false 5692 }, 5693 "slug": { 5694 "description": "Unique slug identifying the template.", 5695 "type": "string", 5696 "minLength": 1, 5697 "pattern": "[a-zA-Z0-9_\\%-]+", 5698 "required": false 5699 }, 5700 "theme": { 5701 "description": "Theme identifier for the template.", 5702 "type": "string", 5703 "required": false 5704 }, 5705 "type": { 5706 "description": "Type of template.", 5707 "type": "string", 5708 "required": false 5709 }, 5710 "content": { 5711 "description": "Content of template.", 5712 "type": [ 5713 "object", 5714 "string" 5715 ], 5716 "properties": { 5717 "raw": { 5718 "description": "Content for the template, as it exists in the database.", 5719 "type": "string", 5720 "context": [ 5721 "view", 5722 "edit" 5723 ] 5724 }, 5725 "block_version": { 5726 "description": "Version of the content block format used by the template.", 5727 "type": "integer", 5728 "context": [ 5729 "edit" 5730 ], 5731 "readonly": true 5732 } 5733 }, 5734 "required": false 5735 }, 5736 "title": { 5737 "description": "Title of template.", 5738 "type": [ 5739 "object", 5740 "string" 5741 ], 5742 "properties": { 5743 "raw": { 5744 "description": "Title for the template, as it exists in the database.", 5745 "type": "string", 5746 "context": [ 5747 "view", 5748 "edit", 5749 "embed" 5750 ] 5751 }, 5752 "rendered": { 5753 "description": "HTML title for the template, transformed for display.", 5754 "type": "string", 5755 "context": [ 5756 "view", 5757 "edit", 5758 "embed" 5759 ], 5760 "readonly": true 5761 } 5762 }, 5763 "required": false 5764 }, 5765 "description": { 5766 "description": "Description of template.", 5767 "type": "string", 5768 "required": false 5769 }, 5770 "status": { 5771 "description": "Status of template.", 5772 "type": "string", 5773 "enum": [ 5774 "publish", 5775 "future", 5776 "draft", 5777 "pending", 5778 "private" 5779 ], 5780 "required": false 5781 }, 5782 "author": { 5783 "description": "The ID for the author of the template.", 5784 "type": "integer", 5785 "required": false 5786 }, 5787 "area": { 5788 "description": "Where the template part is intended for use (header, footer, etc.)", 5789 "type": "string", 5790 "required": false 5791 } 5792 } 5793 }, 5794 { 5795 "methods": [ 5796 "DELETE" 5797 ], 5798 "args": { 5799 "id": { 5800 "description": "The id of a template", 5801 "type": "string", 5802 "required": false 5803 }, 5804 "force": { 5805 "type": "boolean", 5806 "default": false, 5807 "description": "Whether to bypass Trash and force deletion.", 5808 "required": false 5809 } 5810 } 5811 } 5812 ] 5813 }, 5814 "/wp/v2/navigation": { 5815 "namespace": "wp/v2", 5816 "methods": [ 5817 "GET", 5818 "POST" 5819 ], 5820 "endpoints": [ 5821 { 5822 "methods": [ 5823 "GET" 5824 ], 5825 "allow_batch": { 5826 "v1": true 5827 }, 5828 "args": { 5829 "context": { 5830 "description": "Scope under which the request is made; determines fields present in response.", 5831 "type": "string", 5832 "enum": [ 5833 "view", 5834 "embed", 5835 "edit" 5836 ], 5837 "default": "view", 5838 "required": false 5839 }, 5840 "page": { 5841 "description": "Current page of the collection.", 5842 "type": "integer", 5843 "default": 1, 5844 "minimum": 1, 5845 "required": false 5846 }, 5847 "per_page": { 5848 "description": "Maximum number of items to be returned in result set.", 5849 "type": "integer", 5850 "default": 10, 5851 "minimum": 1, 5852 "maximum": 100, 5853 "required": false 5854 }, 5855 "search": { 5856 "description": "Limit results to those matching a string.", 5857 "type": "string", 5858 "required": false 5859 }, 5860 "after": { 5861 "description": "Limit response to posts published after a given ISO8601 compliant date.", 5862 "type": "string", 5863 "format": "date-time", 5864 "required": false 5865 }, 5866 "modified_after": { 5867 "description": "Limit response to posts modified after a given ISO8601 compliant date.", 5868 "type": "string", 5869 "format": "date-time", 5870 "required": false 5871 }, 5872 "before": { 5873 "description": "Limit response to posts published before a given ISO8601 compliant date.", 5874 "type": "string", 5875 "format": "date-time", 5876 "required": false 5877 }, 5878 "modified_before": { 5879 "description": "Limit response to posts modified before a given ISO8601 compliant date.", 5880 "type": "string", 5881 "format": "date-time", 5882 "required": false 5883 }, 5884 "exclude": { 5885 "description": "Ensure result set excludes specific IDs.", 5886 "type": "array", 5887 "items": { 5888 "type": "integer" 5889 }, 5890 "default": [], 5891 "required": false 5892 }, 5893 "include": { 5894 "description": "Limit result set to specific IDs.", 5895 "type": "array", 5896 "items": { 5897 "type": "integer" 5898 }, 5899 "default": [], 5900 "required": false 5901 }, 5902 "offset": { 5903 "description": "Offset the result set by a specific number of items.", 5904 "type": "integer", 5905 "required": false 5906 }, 5907 "order": { 5908 "description": "Order sort attribute ascending or descending.", 5909 "type": "string", 5910 "default": "desc", 5911 "enum": [ 5912 "asc", 5913 "desc" 5914 ], 5915 "required": false 5916 }, 5917 "orderby": { 5918 "description": "Sort collection by post attribute.", 5919 "type": "string", 5920 "default": "date", 5921 "enum": [ 5922 "author", 5923 "date", 5924 "id", 5925 "include", 5926 "modified", 5927 "parent", 5928 "relevance", 5929 "slug", 5930 "include_slugs", 5931 "title" 5932 ], 5933 "required": false 5934 }, 5935 "search_columns": { 5936 "default": [], 5937 "description": "Array of column names to be searched.", 5938 "type": "array", 5939 "items": { 5940 "enum": [ 5941 "post_title", 5942 "post_content", 5943 "post_excerpt" 5944 ], 5945 "type": "string" 5946 }, 5947 "required": false 5948 }, 5949 "slug": { 5950 "description": "Limit result set to posts with one or more specific slugs.", 5951 "type": "array", 5952 "items": { 5953 "type": "string" 5954 }, 5955 "required": false 5956 }, 5957 "status": { 5958 "default": "publish", 5959 "description": "Limit result set to posts assigned one or more statuses.", 5960 "type": "array", 5961 "items": { 5962 "enum": [ 5963 "publish", 5964 "future", 5965 "draft", 5966 "pending", 5967 "private", 5968 "trash", 5969 "auto-draft", 5970 "inherit", 5971 "request-pending", 5972 "request-confirmed", 5973 "request-failed", 5974 "request-completed", 5975 "any" 5976 ], 5977 "type": "string" 5978 }, 5979 "required": false 5980 } 5981 } 5982 }, 5983 { 5984 "methods": [ 5985 "POST" 5986 ], 5987 "allow_batch": { 5988 "v1": true 5989 }, 5990 "args": { 5991 "date": { 5992 "description": "The date the post was published, in the site's timezone.", 5993 "type": [ 5994 "string", 5995 "null" 5996 ], 5997 "format": "date-time", 5998 "required": false 5999 }, 6000 "date_gmt": { 6001 "description": "The date the post was published, as GMT.", 6002 "type": [ 6003 "string", 6004 "null" 6005 ], 6006 "format": "date-time", 6007 "required": false 6008 }, 6009 "slug": { 6010 "description": "An alphanumeric identifier for the post unique to its type.", 6011 "type": "string", 6012 "required": false 6013 }, 6014 "status": { 6015 "description": "A named status for the post.", 6016 "type": "string", 6017 "enum": [ 6018 "publish", 6019 "future", 6020 "draft", 6021 "pending", 6022 "private" 6023 ], 6024 "required": false 6025 }, 6026 "password": { 6027 "description": "A password to protect access to the content and excerpt.", 6028 "type": "string", 6029 "required": false 6030 }, 6031 "title": { 6032 "description": "The title for the post.", 6033 "type": "object", 6034 "properties": { 6035 "raw": { 6036 "description": "Title for the post, as it exists in the database.", 6037 "type": "string", 6038 "context": [ 6039 "edit", 6040 "embed" 6041 ] 6042 }, 6043 "rendered": { 6044 "description": "HTML title for the post, transformed for display.", 6045 "type": "string", 6046 "context": [ 6047 "view", 6048 "edit", 6049 "embed" 6050 ], 6051 "readonly": true 6052 } 6053 }, 6054 "required": false 6055 }, 6056 "content": { 6057 "description": "The content for the post.", 6058 "type": "object", 6059 "properties": { 6060 "raw": { 6061 "description": "Content for the post, as it exists in the database.", 6062 "type": "string", 6063 "context": [ 6064 "edit", 6065 "embed" 6066 ] 6067 }, 6068 "rendered": { 6069 "description": "HTML content for the post, transformed for display.", 6070 "type": "string", 6071 "context": [ 6072 "view", 6073 "edit", 6074 "embed" 6075 ], 6076 "readonly": true 6077 }, 6078 "block_version": { 6079 "description": "Version of the content block format used by the post.", 6080 "type": "integer", 6081 "context": [ 6082 "edit", 6083 "embed" 6084 ], 6085 "readonly": true 6086 }, 6087 "protected": { 6088 "description": "Whether the content is protected with a password.", 6089 "type": "boolean", 6090 "context": [ 6091 "view", 6092 "edit", 6093 "embed" 6094 ], 6095 "readonly": true 6096 } 6097 }, 6098 "required": false 6099 }, 6100 "template": { 6101 "description": "The theme file to use to display the post.", 6102 "type": "string", 6103 "required": false 6104 } 6105 } 6106 } 6107 ], 6108 "_links": { 6109 "self": [ 6110 { 6111 "href": "http://example.org/index.php?rest_route=/wp/v2/navigation" 6112 } 6113 ] 6114 } 6115 }, 6116 "/wp/v2/navigation/(?P<id>[\\d]+)": { 6117 "namespace": "wp/v2", 6118 "methods": [ 6119 "GET", 6120 "POST", 6121 "PUT", 6122 "PATCH", 6123 "DELETE" 6124 ], 6125 "endpoints": [ 6126 { 6127 "methods": [ 6128 "GET" 6129 ], 6130 "allow_batch": { 6131 "v1": true 6132 }, 6133 "args": { 6134 "id": { 6135 "description": "Unique identifier for the post.", 6136 "type": "integer", 6137 "required": false 6138 }, 6139 "context": { 6140 "description": "Scope under which the request is made; determines fields present in response.", 6141 "type": "string", 6142 "enum": [ 6143 "view", 6144 "embed", 6145 "edit" 6146 ], 6147 "default": "view", 6148 "required": false 6149 }, 6150 "password": { 6151 "description": "The password for the post if it is password protected.", 6152 "type": "string", 6153 "required": false 6154 } 6155 } 6156 }, 6157 { 6158 "methods": [ 6159 "POST", 6160 "PUT", 6161 "PATCH" 6162 ], 6163 "allow_batch": { 6164 "v1": true 6165 }, 6166 "args": { 6167 "id": { 6168 "description": "Unique identifier for the post.", 6169 "type": "integer", 6170 "required": false 6171 }, 6172 "date": { 6173 "description": "The date the post was published, in the site's timezone.", 6174 "type": [ 6175 "string", 6176 "null" 6177 ], 6178 "format": "date-time", 6179 "required": false 6180 }, 6181 "date_gmt": { 6182 "description": "The date the post was published, as GMT.", 6183 "type": [ 6184 "string", 6185 "null" 6186 ], 6187 "format": "date-time", 6188 "required": false 6189 }, 6190 "slug": { 6191 "description": "An alphanumeric identifier for the post unique to its type.", 6192 "type": "string", 6193 "required": false 6194 }, 6195 "status": { 6196 "description": "A named status for the post.", 6197 "type": "string", 6198 "enum": [ 6199 "publish", 6200 "future", 6201 "draft", 6202 "pending", 6203 "private" 6204 ], 6205 "required": false 6206 }, 6207 "password": { 6208 "description": "A password to protect access to the content and excerpt.", 6209 "type": "string", 6210 "required": false 6211 }, 6212 "title": { 6213 "description": "The title for the post.", 6214 "type": "object", 6215 "properties": { 6216 "raw": { 6217 "description": "Title for the post, as it exists in the database.", 6218 "type": "string", 6219 "context": [ 6220 "edit", 6221 "embed" 6222 ] 6223 }, 6224 "rendered": { 6225 "description": "HTML title for the post, transformed for display.", 6226 "type": "string", 6227 "context": [ 6228 "view", 6229 "edit", 6230 "embed" 6231 ], 6232 "readonly": true 6233 } 6234 }, 6235 "required": false 6236 }, 6237 "content": { 6238 "description": "The content for the post.", 6239 "type": "object", 6240 "properties": { 6241 "raw": { 6242 "description": "Content for the post, as it exists in the database.", 6243 "type": "string", 6244 "context": [ 6245 "edit", 6246 "embed" 6247 ] 6248 }, 6249 "rendered": { 6250 "description": "HTML content for the post, transformed for display.", 6251 "type": "string", 6252 "context": [ 6253 "view", 6254 "edit", 6255 "embed" 6256 ], 6257 "readonly": true 6258 }, 6259 "block_version": { 6260 "description": "Version of the content block format used by the post.", 6261 "type": "integer", 6262 "context": [ 6263 "edit", 6264 "embed" 6265 ], 6266 "readonly": true 6267 }, 6268 "protected": { 6269 "description": "Whether the content is protected with a password.", 6270 "type": "boolean", 6271 "context": [ 6272 "view", 6273 "edit", 6274 "embed" 6275 ], 6276 "readonly": true 6277 } 6278 }, 6279 "required": false 6280 }, 6281 "template": { 6282 "description": "The theme file to use to display the post.", 6283 "type": "string", 6284 "required": false 6285 } 6286 } 6287 }, 6288 { 6289 "methods": [ 6290 "DELETE" 6291 ], 6292 "allow_batch": { 6293 "v1": true 6294 }, 6295 "args": { 6296 "id": { 6297 "description": "Unique identifier for the post.", 6298 "type": "integer", 6299 "required": false 6300 }, 6301 "force": { 6302 "type": "boolean", 6303 "default": false, 6304 "description": "Whether to bypass Trash and force deletion.", 6305 "required": false 6306 } 6307 } 6308 } 6309 ] 6310 }, 6311 "/wp/v2/navigation/(?P<parent>[\\d]+)/revisions": { 6312 "namespace": "wp/v2", 6313 "methods": [ 6314 "GET" 6315 ], 6316 "endpoints": [ 6317 { 6318 "methods": [ 6319 "GET" 6320 ], 6321 "args": { 6322 "parent": { 6323 "description": "The ID for the parent of the revision.", 6324 "type": "integer", 6325 "required": false 6326 }, 6327 "context": { 6328 "description": "Scope under which the request is made; determines fields present in response.", 6329 "type": "string", 6330 "enum": [ 6331 "view", 6332 "embed", 6333 "edit" 6334 ], 6335 "default": "view", 6336 "required": false 6337 }, 6338 "page": { 6339 "description": "Current page of the collection.", 6340 "type": "integer", 6341 "default": 1, 6342 "minimum": 1, 6343 "required": false 6344 }, 6345 "per_page": { 6346 "description": "Maximum number of items to be returned in result set.", 6347 "type": "integer", 6348 "minimum": 1, 6349 "maximum": 100, 6350 "required": false 6351 }, 6352 "search": { 6353 "description": "Limit results to those matching a string.", 6354 "type": "string", 6355 "required": false 6356 }, 6357 "exclude": { 6358 "description": "Ensure result set excludes specific IDs.", 6359 "type": "array", 6360 "items": { 6361 "type": "integer" 6362 }, 6363 "default": [], 6364 "required": false 6365 }, 6366 "include": { 6367 "description": "Limit result set to specific IDs.", 6368 "type": "array", 6369 "items": { 6370 "type": "integer" 6371 }, 6372 "default": [], 6373 "required": false 6374 }, 6375 "offset": { 6376 "description": "Offset the result set by a specific number of items.", 6377 "type": "integer", 6378 "required": false 6379 }, 6380 "order": { 6381 "description": "Order sort attribute ascending or descending.", 6382 "type": "string", 6383 "default": "desc", 6384 "enum": [ 6385 "asc", 6386 "desc" 6387 ], 6388 "required": false 6389 }, 6390 "orderby": { 6391 "description": "Sort collection by object attribute.", 6392 "type": "string", 6393 "default": "date", 6394 "enum": [ 6395 "date", 6396 "id", 6397 "include", 6398 "relevance", 6399 "slug", 6400 "include_slugs", 6401 "title" 6402 ], 6403 "required": false 6404 } 6405 } 6406 } 6407 ] 6408 }, 6409 "/wp/v2/navigation/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 6410 "namespace": "wp/v2", 6411 "methods": [ 6412 "GET", 6413 "DELETE" 6414 ], 6415 "endpoints": [ 6416 { 6417 "methods": [ 6418 "GET" 6419 ], 6420 "args": { 6421 "parent": { 6422 "description": "The ID for the parent of the revision.", 6423 "type": "integer", 6424 "required": false 6425 }, 6426 "id": { 6427 "description": "Unique identifier for the revision.", 6428 "type": "integer", 6429 "required": false 6430 }, 6431 "context": { 6432 "description": "Scope under which the request is made; determines fields present in response.", 6433 "type": "string", 6434 "enum": [ 6435 "view", 6436 "embed", 6437 "edit" 6438 ], 6439 "default": "view", 6440 "required": false 6441 } 6442 } 6443 }, 6444 { 6445 "methods": [ 6446 "DELETE" 6447 ], 6448 "args": { 6449 "parent": { 6450 "description": "The ID for the parent of the revision.", 6451 "type": "integer", 6452 "required": false 6453 }, 6454 "id": { 6455 "description": "Unique identifier for the revision.", 6456 "type": "integer", 6457 "required": false 6458 }, 6459 "force": { 6460 "type": "boolean", 6461 "default": false, 6462 "description": "Required to be true, as revisions do not support trashing.", 6463 "required": false 6464 } 6465 } 6466 } 6467 ] 6468 }, 6469 "/wp/v2/navigation/(?P<id>[\\d]+)/autosaves": { 6470 "namespace": "wp/v2", 6471 "methods": [ 6472 "GET", 6473 "POST" 6474 ], 6475 "endpoints": [ 6476 { 6477 "methods": [ 6478 "GET" 6479 ], 6480 "args": { 6481 "parent": { 6482 "description": "The ID for the parent of the autosave.", 6483 "type": "integer", 6484 "required": false 6485 }, 6486 "context": { 6487 "description": "Scope under which the request is made; determines fields present in response.", 6488 "type": "string", 6489 "enum": [ 6490 "view", 6491 "embed", 6492 "edit" 6493 ], 6494 "default": "view", 6495 "required": false 6496 } 6497 } 6498 }, 6499 { 6500 "methods": [ 6501 "POST" 6502 ], 6503 "args": { 6504 "parent": { 6505 "description": "The ID for the parent of the autosave.", 6506 "type": "integer", 6507 "required": false 6508 }, 6509 "date": { 6510 "description": "The date the post was published, in the site's timezone.", 6511 "type": [ 6512 "string", 6513 "null" 6514 ], 6515 "format": "date-time", 6516 "required": false 6517 }, 6518 "date_gmt": { 6519 "description": "The date the post was published, as GMT.", 6520 "type": [ 6521 "string", 6522 "null" 6523 ], 6524 "format": "date-time", 6525 "required": false 6526 }, 6527 "slug": { 6528 "description": "An alphanumeric identifier for the post unique to its type.", 6529 "type": "string", 6530 "required": false 6531 }, 6532 "status": { 6533 "description": "A named status for the post.", 6534 "type": "string", 6535 "enum": [ 6536 "publish", 6537 "future", 6538 "draft", 6539 "pending", 6540 "private" 6541 ], 6542 "required": false 6543 }, 6544 "password": { 6545 "description": "A password to protect access to the content and excerpt.", 6546 "type": "string", 6547 "required": false 6548 }, 6549 "title": { 6550 "description": "The title for the post.", 6551 "type": "object", 6552 "properties": { 6553 "raw": { 6554 "description": "Title for the post, as it exists in the database.", 6555 "type": "string", 6556 "context": [ 6557 "edit", 6558 "embed" 6559 ] 6560 }, 6561 "rendered": { 6562 "description": "HTML title for the post, transformed for display.", 6563 "type": "string", 6564 "context": [ 6565 "view", 6566 "edit", 6567 "embed" 6568 ], 6569 "readonly": true 6570 } 6571 }, 6572 "required": false 6573 }, 6574 "content": { 6575 "description": "The content for the post.", 6576 "type": "object", 6577 "properties": { 6578 "raw": { 6579 "description": "Content for the post, as it exists in the database.", 6580 "type": "string", 6581 "context": [ 6582 "edit", 6583 "embed" 6584 ] 6585 }, 6586 "rendered": { 6587 "description": "HTML content for the post, transformed for display.", 6588 "type": "string", 6589 "context": [ 6590 "view", 6591 "edit", 6592 "embed" 6593 ], 6594 "readonly": true 6595 }, 6596 "block_version": { 6597 "description": "Version of the content block format used by the post.", 6598 "type": "integer", 6599 "context": [ 6600 "edit", 6601 "embed" 6602 ], 6603 "readonly": true 6604 }, 6605 "protected": { 6606 "description": "Whether the content is protected with a password.", 6607 "type": "boolean", 6608 "context": [ 6609 "view", 6610 "edit", 6611 "embed" 6612 ], 6613 "readonly": true 6614 } 6615 }, 6616 "required": false 6617 }, 6618 "template": { 6619 "description": "The theme file to use to display the post.", 6620 "type": "string", 6621 "required": false 6622 } 6623 } 6624 } 6625 ] 6626 }, 6627 "/wp/v2/navigation/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": { 2675 6628 "namespace": "wp/v2", 2676 6629 "methods": [ … … 3464 7417 ] 3465 7418 }, 3466 "/wp/v2/menu-items": {3467 "namespace": "wp/v2",3468 "methods": [3469 "GET",3470 "POST"3471 ],3472 "endpoints": [3473 {3474 "methods": [3475 "GET"3476 ],3477 "allow_batch": {3478 "v1": true3479 },3480 "args": {3481 "context": {3482 "description": "Scope under which the request is made; determines fields present in response.",3483 "type": "string",3484 "enum": [3485 "view",3486 "embed",3487 "edit"3488 ],3489 "default": "view",3490 "required": false3491 },3492 "page": {3493 "description": "Current page of the collection.",3494 "type": "integer",3495 "default": 1,3496 "minimum": 1,3497 "required": false3498 },3499 "per_page": {3500 "description": "Maximum number of items to be returned in result set.",3501 "type": "integer",3502 "default": 100,3503 "minimum": 1,3504 "maximum": 100,3505 "required": false3506 },3507 "search": {3508 "description": "Limit results to those matching a string.",3509 "type": "string",3510 "required": false3511 },3512 "after": {3513 "description": "Limit response to posts published after a given ISO8601 compliant date.",3514 "type": "string",3515 "format": "date-time",3516 "required": false3517 },3518 "modified_after": {3519 "description": "Limit response to posts modified after a given ISO8601 compliant date.",3520 "type": "string",3521 "format": "date-time",3522 "required": false3523 },3524 "before": {3525 "description": "Limit response to posts published before a given ISO8601 compliant date.",3526 "type": "string",3527 "format": "date-time",3528 "required": false3529 },3530 "modified_before": {3531 "description": "Limit response to posts modified before a given ISO8601 compliant date.",3532 "type": "string",3533 "format": "date-time",3534 "required": false3535 },3536 "exclude": {3537 "description": "Ensure result set excludes specific IDs.",3538 "type": "array",3539 "items": {3540 "type": "integer"3541 },3542 "default": [],3543 "required": false3544 },3545 "include": {3546 "description": "Limit result set to specific IDs.",3547 "type": "array",3548 "items": {3549 "type": "integer"3550 },3551 "default": [],3552 "required": false3553 },3554 "offset": {3555 "description": "Offset the result set by a specific number of items.",3556 "type": "integer",3557 "required": false3558 },3559 "order": {3560 "description": "Order sort attribute ascending or descending.",3561 "type": "string",3562 "default": "asc",3563 "enum": [3564 "asc",3565 "desc"3566 ],3567 "required": false3568 },3569 "orderby": {3570 "description": "Sort collection by object attribute.",3571 "type": "string",3572 "default": "menu_order",3573 "enum": [3574 "author",3575 "date",3576 "id",3577 "include",3578 "modified",3579 "parent",3580 "relevance",3581 "slug",3582 "include_slugs",3583 "title",3584 "menu_order"3585 ],3586 "required": false3587 },3588 "search_columns": {3589 "default": [],3590 "description": "Array of column names to be searched.",3591 "type": "array",3592 "items": {3593 "enum": [3594 "post_title",3595 "post_content",3596 "post_excerpt"3597 ],3598 "type": "string"3599 },3600 "required": false3601 },3602 "slug": {3603 "description": "Limit result set to posts with one or more specific slugs.",3604 "type": "array",3605 "items": {3606 "type": "string"3607 },3608 "required": false3609 },3610 "status": {3611 "default": "publish",3612 "description": "Limit result set to posts assigned one or more statuses.",3613 "type": "array",3614 "items": {3615 "enum": [3616 "publish",3617 "future",3618 "draft",3619 "pending",3620 "private",3621 "trash",3622 "auto-draft",3623 "inherit",3624 "request-pending",3625 "request-confirmed",3626 "request-failed",3627 "request-completed",3628 "any"3629 ],3630 "type": "string"3631 },3632 "required": false3633 },3634 "tax_relation": {3635 "description": "Limit result set based on relationship between multiple taxonomies.",3636 "type": "string",3637 "enum": [3638 "AND",3639 "OR"3640 ],3641 "required": false3642 },3643 "menus": {3644 "description": "Limit result set to items with specific terms assigned in the menus taxonomy.",3645 "type": [3646 "object",3647 "array"3648 ],3649 "oneOf": [3650 {3651 "title": "Term ID List",3652 "description": "Match terms with the listed IDs.",3653 "type": "array",3654 "items": {3655 "type": "integer"3656 }3657 },3658 {3659 "title": "Term ID Taxonomy Query",3660 "description": "Perform an advanced term query.",3661 "type": "object",3662 "properties": {3663 "terms": {3664 "description": "Term IDs.",3665 "type": "array",3666 "items": {3667 "type": "integer"3668 },3669 "default": []3670 },3671 "operator": {3672 "description": "Whether items must be assigned all or any of the specified terms.",3673 "type": "string",3674 "enum": [3675 "AND",3676 "OR"3677 ],3678 "default": "OR"3679 }3680 },3681 "additionalProperties": false3682 }3683 ],3684 "required": false3685 },3686 "menus_exclude": {3687 "description": "Limit result set to items except those with specific terms assigned in the menus taxonomy.",3688 "type": [3689 "object",3690 "array"3691 ],3692 "oneOf": [3693 {3694 "title": "Term ID List",3695 "description": "Match terms with the listed IDs.",3696 "type": "array",3697 "items": {3698 "type": "integer"3699 }3700 },3701 {3702 "title": "Term ID Taxonomy Query",3703 "description": "Perform an advanced term query.",3704 "type": "object",3705 "properties": {3706 "terms": {3707 "description": "Term IDs.",3708 "type": "array",3709 "items": {3710 "type": "integer"3711 },3712 "default": []3713 }3714 },3715 "additionalProperties": false3716 }3717 ],3718 "required": false3719 },3720 "menu_order": {3721 "description": "Limit result set to posts with a specific menu_order value.",3722 "type": "integer",3723 "required": false3724 }3725 }3726 },3727 {3728 "methods": [3729 "POST"3730 ],3731 "allow_batch": {3732 "v1": true3733 },3734 "args": {3735 "title": {3736 "description": "The title for the object.",3737 "type": [3738 "string",3739 "object"3740 ],3741 "properties": {3742 "raw": {3743 "description": "Title for the object, as it exists in the database.",3744 "type": "string",3745 "context": [3746 "edit"3747 ]3748 },3749 "rendered": {3750 "description": "HTML title for the object, transformed for display.",3751 "type": "string",3752 "context": [3753 "view",3754 "edit",3755 "embed"3756 ],3757 "readonly": true3758 }3759 },3760 "required": false3761 },3762 "type": {3763 "default": "custom",3764 "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".",3765 "type": "string",3766 "enum": [3767 "taxonomy",3768 "post_type",3769 "post_type_archive",3770 "custom"3771 ],3772 "required": false3773 },3774 "status": {3775 "default": "publish",3776 "description": "A named status for the object.",3777 "type": "string",3778 "enum": [3779 "publish",3780 "future",3781 "draft",3782 "pending",3783 "private"3784 ],3785 "required": false3786 },3787 "parent": {3788 "default": 0,3789 "description": "The ID for the parent of the object.",3790 "type": "integer",3791 "minimum": 0,3792 "required": false3793 },3794 "attr_title": {3795 "description": "Text for the title attribute of the link element for this menu item.",3796 "type": "string",3797 "required": false3798 },3799 "classes": {3800 "description": "Class names for the link element of this menu item.",3801 "type": "array",3802 "items": {3803 "type": "string"3804 },3805 "required": false3806 },3807 "description": {3808 "description": "The description of this menu item.",3809 "type": "string",3810 "required": false3811 },3812 "menu_order": {3813 "default": 1,3814 "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.",3815 "type": "integer",3816 "minimum": 1,3817 "required": false3818 },3819 "object": {3820 "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".",3821 "type": "string",3822 "required": false3823 },3824 "object_id": {3825 "default": 0,3826 "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.",3827 "type": "integer",3828 "minimum": 0,3829 "required": false3830 },3831 "target": {3832 "description": "The target attribute of the link element for this menu item.",3833 "type": "string",3834 "enum": [3835 "_blank",3836 ""3837 ],3838 "required": false3839 },3840 "url": {3841 "description": "The URL to which this menu item points.",3842 "type": "string",3843 "format": "uri",3844 "required": false3845 },3846 "xfn": {3847 "description": "The XFN relationship expressed in the link of this menu item.",3848 "type": "array",3849 "items": {3850 "type": "string"3851 },3852 "required": false3853 },3854 "menus": {3855 "description": "The terms assigned to the object in the nav_menu taxonomy.",3856 "type": "integer",3857 "required": false3858 },3859 "meta": {3860 "description": "Meta fields.",3861 "type": "object",3862 "properties": [],3863 "required": false3864 }3865 }3866 }3867 ],3868 "_links": {3869 "self": [3870 {3871 "href": "http://example.org/index.php?rest_route=/wp/v2/menu-items"3872 }3873 ]3874 }3875 },3876 "/wp/v2/menu-items/(?P<id>[\\d]+)": {3877 "namespace": "wp/v2",3878 "methods": [3879 "GET",3880 "POST",3881 "PUT",3882 "PATCH",3883 "DELETE"3884 ],3885 "endpoints": [3886 {3887 "methods": [3888 "GET"3889 ],3890 "allow_batch": {3891 "v1": true3892 },3893 "args": {3894 "id": {3895 "description": "Unique identifier for the post.",3896 "type": "integer",3897 "required": false3898 },3899 "context": {3900 "description": "Scope under which the request is made; determines fields present in response.",3901 "type": "string",3902 "enum": [3903 "view",3904 "embed",3905 "edit"3906 ],3907 "default": "view",3908 "required": false3909 }3910 }3911 },3912 {3913 "methods": [3914 "POST",3915 "PUT",3916 "PATCH"3917 ],3918 "allow_batch": {3919 "v1": true3920 },3921 "args": {3922 "id": {3923 "description": "Unique identifier for the post.",3924 "type": "integer",3925 "required": false3926 },3927 "title": {3928 "description": "The title for the object.",3929 "type": [3930 "string",3931 "object"3932 ],3933 "properties": {3934 "raw": {3935 "description": "Title for the object, as it exists in the database.",3936 "type": "string",3937 "context": [3938 "edit"3939 ]3940 },3941 "rendered": {3942 "description": "HTML title for the object, transformed for display.",3943 "type": "string",3944 "context": [3945 "view",3946 "edit",3947 "embed"3948 ],3949 "readonly": true3950 }3951 },3952 "required": false3953 },3954 "type": {3955 "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".",3956 "type": "string",3957 "enum": [3958 "taxonomy",3959 "post_type",3960 "post_type_archive",3961 "custom"3962 ],3963 "required": false3964 },3965 "status": {3966 "description": "A named status for the object.",3967 "type": "string",3968 "enum": [3969 "publish",3970 "future",3971 "draft",3972 "pending",3973 "private"3974 ],3975 "required": false3976 },3977 "parent": {3978 "description": "The ID for the parent of the object.",3979 "type": "integer",3980 "minimum": 0,3981 "required": false3982 },3983 "attr_title": {3984 "description": "Text for the title attribute of the link element for this menu item.",3985 "type": "string",3986 "required": false3987 },3988 "classes": {3989 "description": "Class names for the link element of this menu item.",3990 "type": "array",3991 "items": {3992 "type": "string"3993 },3994 "required": false3995 },3996 "description": {3997 "description": "The description of this menu item.",3998 "type": "string",3999 "required": false4000 },4001 "menu_order": {4002 "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.",4003 "type": "integer",4004 "minimum": 1,4005 "required": false4006 },4007 "object": {4008 "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".",4009 "type": "string",4010 "required": false4011 },4012 "object_id": {4013 "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.",4014 "type": "integer",4015 "minimum": 0,4016 "required": false4017 },4018 "target": {4019 "description": "The target attribute of the link element for this menu item.",4020 "type": "string",4021 "enum": [4022 "_blank",4023 ""4024 ],4025 "required": false4026 },4027 "url": {4028 "description": "The URL to which this menu item points.",4029 "type": "string",4030 "format": "uri",4031 "required": false4032 },4033 "xfn": {4034 "description": "The XFN relationship expressed in the link of this menu item.",4035 "type": "array",4036 "items": {4037 "type": "string"4038 },4039 "required": false4040 },4041 "menus": {4042 "description": "The terms assigned to the object in the nav_menu taxonomy.",4043 "type": "integer",4044 "required": false4045 },4046 "meta": {4047 "description": "Meta fields.",4048 "type": "object",4049 "properties": [],4050 "required": false4051 }4052 }4053 },4054 {4055 "methods": [4056 "DELETE"4057 ],4058 "allow_batch": {4059 "v1": true4060 },4061 "args": {4062 "id": {4063 "description": "Unique identifier for the post.",4064 "type": "integer",4065 "required": false4066 },4067 "force": {4068 "type": "boolean",4069 "default": false,4070 "description": "Whether to bypass Trash and force deletion.",4071 "required": false4072 }4073 }4074 }4075 ]4076 },4077 "/wp/v2/menu-items/(?P<id>[\\d]+)/autosaves": {4078 "namespace": "wp/v2",4079 "methods": [4080 "GET",4081 "POST"4082 ],4083 "endpoints": [4084 {4085 "methods": [4086 "GET"4087 ],4088 "args": {4089 "parent": {4090 "description": "The ID for the parent of the autosave.",4091 "type": "integer",4092 "required": false4093 },4094 "context": {4095 "description": "Scope under which the request is made; determines fields present in response.",4096 "type": "string",4097 "enum": [4098 "view",4099 "embed",4100 "edit"4101 ],4102 "default": "view",4103 "required": false4104 }4105 }4106 },4107 {4108 "methods": [4109 "POST"4110 ],4111 "args": {4112 "parent": {4113 "description": "The ID for the parent of the object.",4114 "type": "integer",4115 "minimum": 0,4116 "required": false4117 },4118 "title": {4119 "description": "The title for the object.",4120 "type": [4121 "string",4122 "object"4123 ],4124 "properties": {4125 "raw": {4126 "description": "Title for the object, as it exists in the database.",4127 "type": "string",4128 "context": [4129 "edit"4130 ]4131 },4132 "rendered": {4133 "description": "HTML title for the object, transformed for display.",4134 "type": "string",4135 "context": [4136 "view",4137 "edit",4138 "embed"4139 ],4140 "readonly": true4141 }4142 },4143 "required": false4144 },4145 "type": {4146 "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".",4147 "type": "string",4148 "enum": [4149 "taxonomy",4150 "post_type",4151 "post_type_archive",4152 "custom"4153 ],4154 "required": false4155 },4156 "status": {4157 "description": "A named status for the object.",4158 "type": "string",4159 "enum": [4160 "publish",4161 "future",4162 "draft",4163 "pending",4164 "private"4165 ],4166 "required": false4167 },4168 "attr_title": {4169 "description": "Text for the title attribute of the link element for this menu item.",4170 "type": "string",4171 "required": false4172 },4173 "classes": {4174 "description": "Class names for the link element of this menu item.",4175 "type": "array",4176 "items": {4177 "type": "string"4178 },4179 "required": false4180 },4181 "description": {4182 "description": "The description of this menu item.",4183 "type": "string",4184 "required": false4185 },4186 "menu_order": {4187 "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.",4188 "type": "integer",4189 "minimum": 1,4190 "required": false4191 },4192 "object": {4193 "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".",4194 "type": "string",4195 "required": false4196 },4197 "object_id": {4198 "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.",4199 "type": "integer",4200 "minimum": 0,4201 "required": false4202 },4203 "target": {4204 "description": "The target attribute of the link element for this menu item.",4205 "type": "string",4206 "enum": [4207 "_blank",4208 ""4209 ],4210 "required": false4211 },4212 "url": {4213 "description": "The URL to which this menu item points.",4214 "type": "string",4215 "format": "uri",4216 "required": false4217 },4218 "xfn": {4219 "description": "The XFN relationship expressed in the link of this menu item.",4220 "type": "array",4221 "items": {4222 "type": "string"4223 },4224 "required": false4225 },4226 "menus": {4227 "description": "The terms assigned to the object in the nav_menu taxonomy.",4228 "type": "integer",4229 "required": false4230 },4231 "meta": {4232 "description": "Meta fields.",4233 "type": "object",4234 "properties": [],4235 "required": false4236 }4237 }4238 }4239 ]4240 },4241 "/wp/v2/menu-items/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": {4242 "namespace": "wp/v2",4243 "methods": [4244 "GET"4245 ],4246 "endpoints": [4247 {4248 "methods": [4249 "GET"4250 ],4251 "args": {4252 "parent": {4253 "description": "The ID for the parent of the autosave.",4254 "type": "integer",4255 "required": false4256 },4257 "id": {4258 "description": "The ID for the autosave.",4259 "type": "integer",4260 "required": false4261 },4262 "context": {4263 "description": "Scope under which the request is made; determines fields present in response.",4264 "type": "string",4265 "enum": [4266 "view",4267 "embed",4268 "edit"4269 ],4270 "default": "view",4271 "required": false4272 }4273 }4274 }4275 ]4276 },4277 "/wp/v2/blocks": {4278 "namespace": "wp/v2",4279 "methods": [4280 "GET",4281 "POST"4282 ],4283 "endpoints": [4284 {4285 "methods": [4286 "GET"4287 ],4288 "allow_batch": {4289 "v1": true4290 },4291 "args": {4292 "context": {4293 "description": "Scope under which the request is made; determines fields present in response.",4294 "type": "string",4295 "enum": [4296 "view",4297 "embed",4298 "edit"4299 ],4300 "default": "view",4301 "required": false4302 },4303 "page": {4304 "description": "Current page of the collection.",4305 "type": "integer",4306 "default": 1,4307 "minimum": 1,4308 "required": false4309 },4310 "per_page": {4311 "description": "Maximum number of items to be returned in result set.",4312 "type": "integer",4313 "default": 10,4314 "minimum": 1,4315 "maximum": 100,4316 "required": false4317 },4318 "search": {4319 "description": "Limit results to those matching a string.",4320 "type": "string",4321 "required": false4322 },4323 "after": {4324 "description": "Limit response to posts published after a given ISO8601 compliant date.",4325 "type": "string",4326 "format": "date-time",4327 "required": false4328 },4329 "modified_after": {4330 "description": "Limit response to posts modified after a given ISO8601 compliant date.",4331 "type": "string",4332 "format": "date-time",4333 "required": false4334 },4335 "before": {4336 "description": "Limit response to posts published before a given ISO8601 compliant date.",4337 "type": "string",4338 "format": "date-time",4339 "required": false4340 },4341 "modified_before": {4342 "description": "Limit response to posts modified before a given ISO8601 compliant date.",4343 "type": "string",4344 "format": "date-time",4345 "required": false4346 },4347 "exclude": {4348 "description": "Ensure result set excludes specific IDs.",4349 "type": "array",4350 "items": {4351 "type": "integer"4352 },4353 "default": [],4354 "required": false4355 },4356 "include": {4357 "description": "Limit result set to specific IDs.",4358 "type": "array",4359 "items": {4360 "type": "integer"4361 },4362 "default": [],4363 "required": false4364 },4365 "offset": {4366 "description": "Offset the result set by a specific number of items.",4367 "type": "integer",4368 "required": false4369 },4370 "order": {4371 "description": "Order sort attribute ascending or descending.",4372 "type": "string",4373 "default": "desc",4374 "enum": [4375 "asc",4376 "desc"4377 ],4378 "required": false4379 },4380 "orderby": {4381 "description": "Sort collection by post attribute.",4382 "type": "string",4383 "default": "date",4384 "enum": [4385 "author",4386 "date",4387 "id",4388 "include",4389 "modified",4390 "parent",4391 "relevance",4392 "slug",4393 "include_slugs",4394 "title"4395 ],4396 "required": false4397 },4398 "search_columns": {4399 "default": [],4400 "description": "Array of column names to be searched.",4401 "type": "array",4402 "items": {4403 "enum": [4404 "post_title",4405 "post_content",4406 "post_excerpt"4407 ],4408 "type": "string"4409 },4410 "required": false4411 },4412 "slug": {4413 "description": "Limit result set to posts with one or more specific slugs.",4414 "type": "array",4415 "items": {4416 "type": "string"4417 },4418 "required": false4419 },4420 "status": {4421 "default": "publish",4422 "description": "Limit result set to posts assigned one or more statuses.",4423 "type": "array",4424 "items": {4425 "enum": [4426 "publish",4427 "future",4428 "draft",4429 "pending",4430 "private",4431 "trash",4432 "auto-draft",4433 "inherit",4434 "request-pending",4435 "request-confirmed",4436 "request-failed",4437 "request-completed",4438 "any"4439 ],4440 "type": "string"4441 },4442 "required": false4443 },4444 "tax_relation": {4445 "description": "Limit result set based on relationship between multiple taxonomies.",4446 "type": "string",4447 "enum": [4448 "AND",4449 "OR"4450 ],4451 "required": false4452 },4453 "wp_pattern_category": {4454 "description": "Limit result set to items with specific terms assigned in the wp_pattern_category taxonomy.",4455 "type": [4456 "object",4457 "array"4458 ],4459 "oneOf": [4460 {4461 "title": "Term ID List",4462 "description": "Match terms with the listed IDs.",4463 "type": "array",4464 "items": {4465 "type": "integer"4466 }4467 },4468 {4469 "title": "Term ID Taxonomy Query",4470 "description": "Perform an advanced term query.",4471 "type": "object",4472 "properties": {4473 "terms": {4474 "description": "Term IDs.",4475 "type": "array",4476 "items": {4477 "type": "integer"4478 },4479 "default": []4480 },4481 "operator": {4482 "description": "Whether items must be assigned all or any of the specified terms.",4483 "type": "string",4484 "enum": [4485 "AND",4486 "OR"4487 ],4488 "default": "OR"4489 }4490 },4491 "additionalProperties": false4492 }4493 ],4494 "required": false4495 },4496 "wp_pattern_category_exclude": {4497 "description": "Limit result set to items except those with specific terms assigned in the wp_pattern_category taxonomy.",4498 "type": [4499 "object",4500 "array"4501 ],4502 "oneOf": [4503 {4504 "title": "Term ID List",4505 "description": "Match terms with the listed IDs.",4506 "type": "array",4507 "items": {4508 "type": "integer"4509 }4510 },4511 {4512 "title": "Term ID Taxonomy Query",4513 "description": "Perform an advanced term query.",4514 "type": "object",4515 "properties": {4516 "terms": {4517 "description": "Term IDs.",4518 "type": "array",4519 "items": {4520 "type": "integer"4521 },4522 "default": []4523 }4524 },4525 "additionalProperties": false4526 }4527 ],4528 "required": false4529 }4530 }4531 },4532 {4533 "methods": [4534 "POST"4535 ],4536 "allow_batch": {4537 "v1": true4538 },4539 "args": {4540 "date": {4541 "description": "The date the post was published, in the site's timezone.",4542 "type": [4543 "string",4544 "null"4545 ],4546 "format": "date-time",4547 "required": false4548 },4549 "date_gmt": {4550 "description": "The date the post was published, as GMT.",4551 "type": [4552 "string",4553 "null"4554 ],4555 "format": "date-time",4556 "required": false4557 },4558 "slug": {4559 "description": "An alphanumeric identifier for the post unique to its type.",4560 "type": "string",4561 "required": false4562 },4563 "status": {4564 "description": "A named status for the post.",4565 "type": "string",4566 "enum": [4567 "publish",4568 "future",4569 "draft",4570 "pending",4571 "private"4572 ],4573 "required": false4574 },4575 "password": {4576 "description": "A password to protect access to the content and excerpt.",4577 "type": "string",4578 "required": false4579 },4580 "title": {4581 "description": "The title for the post.",4582 "type": "object",4583 "properties": {4584 "raw": {4585 "description": "Title for the post, as it exists in the database.",4586 "type": "string",4587 "context": [4588 "view",4589 "edit"4590 ]4591 }4592 },4593 "required": false4594 },4595 "content": {4596 "description": "The content for the post.",4597 "type": "object",4598 "properties": {4599 "raw": {4600 "description": "Content for the post, as it exists in the database.",4601 "type": "string",4602 "context": [4603 "view",4604 "edit"4605 ]4606 },4607 "block_version": {4608 "description": "Version of the content block format used by the post.",4609 "type": "integer",4610 "context": [4611 "edit"4612 ],4613 "readonly": true4614 },4615 "protected": {4616 "description": "Whether the content is protected with a password.",4617 "type": "boolean",4618 "context": [4619 "view",4620 "edit",4621 "embed"4622 ],4623 "readonly": true4624 }4625 },4626 "required": false4627 },4628 "meta": {4629 "description": "Meta fields.",4630 "type": "object",4631 "properties": [],4632 "required": false4633 },4634 "template": {4635 "description": "The theme file to use to display the post.",4636 "type": "string",4637 "required": false4638 },4639 "wp_pattern_category": {4640 "description": "The terms assigned to the post in the wp_pattern_category taxonomy.",4641 "type": "array",4642 "items": {4643 "type": "integer"4644 },4645 "required": false4646 }4647 }4648 }4649 ],4650 "_links": {4651 "self": "http://example.org/index.php?rest_route=/wp/v2/blocks"4652 }4653 },4654 "/wp/v2/blocks/(?P<id>[\\d]+)": {4655 "namespace": "wp/v2",4656 "methods": [4657 "GET",4658 "POST",4659 "PUT",4660 "PATCH",4661 "DELETE"4662 ],4663 "endpoints": [4664 {4665 "methods": [4666 "GET"4667 ],4668 "allow_batch": {4669 "v1": true4670 },4671 "args": {4672 "id": {4673 "description": "Unique identifier for the post.",4674 "type": "integer",4675 "required": false4676 },4677 "context": {4678 "description": "Scope under which the request is made; determines fields present in response.",4679 "type": "string",4680 "enum": [4681 "view",4682 "embed",4683 "edit"4684 ],4685 "default": "view",4686 "required": false4687 },4688 "password": {4689 "description": "The password for the post if it is password protected.",4690 "type": "string",4691 "required": false4692 }4693 }4694 },4695 {4696 "methods": [4697 "POST",4698 "PUT",4699 "PATCH"4700 ],4701 "allow_batch": {4702 "v1": true4703 },4704 "args": {4705 "id": {4706 "description": "Unique identifier for the post.",4707 "type": "integer",4708 "required": false4709 },4710 "date": {4711 "description": "The date the post was published, in the site's timezone.",4712 "type": [4713 "string",4714 "null"4715 ],4716 "format": "date-time",4717 "required": false4718 },4719 "date_gmt": {4720 "description": "The date the post was published, as GMT.",4721 "type": [4722 "string",4723 "null"4724 ],4725 "format": "date-time",4726 "required": false4727 },4728 "slug": {4729 "description": "An alphanumeric identifier for the post unique to its type.",4730 "type": "string",4731 "required": false4732 },4733 "status": {4734 "description": "A named status for the post.",4735 "type": "string",4736 "enum": [4737 "publish",4738 "future",4739 "draft",4740 "pending",4741 "private"4742 ],4743 "required": false4744 },4745 "password": {4746 "description": "A password to protect access to the content and excerpt.",4747 "type": "string",4748 "required": false4749 },4750 "title": {4751 "description": "The title for the post.",4752 "type": "object",4753 "properties": {4754 "raw": {4755 "description": "Title for the post, as it exists in the database.",4756 "type": "string",4757 "context": [4758 "view",4759 "edit"4760 ]4761 }4762 },4763 "required": false4764 },4765 "content": {4766 "description": "The content for the post.",4767 "type": "object",4768 "properties": {4769 "raw": {4770 "description": "Content for the post, as it exists in the database.",4771 "type": "string",4772 "context": [4773 "view",4774 "edit"4775 ]4776 },4777 "block_version": {4778 "description": "Version of the content block format used by the post.",4779 "type": "integer",4780 "context": [4781 "edit"4782 ],4783 "readonly": true4784 },4785 "protected": {4786 "description": "Whether the content is protected with a password.",4787 "type": "boolean",4788 "context": [4789 "view",4790 "edit",4791 "embed"4792 ],4793 "readonly": true4794 }4795 },4796 "required": false4797 },4798 "meta": {4799 "description": "Meta fields.",4800 "type": "object",4801 "properties": [],4802 "required": false4803 },4804 "template": {4805 "description": "The theme file to use to display the post.",4806 "type": "string",4807 "required": false4808 },4809 "wp_pattern_category": {4810 "description": "The terms assigned to the post in the wp_pattern_category taxonomy.",4811 "type": "array",4812 "items": {4813 "type": "integer"4814 },4815 "required": false4816 }4817 }4818 },4819 {4820 "methods": [4821 "DELETE"4822 ],4823 "allow_batch": {4824 "v1": true4825 },4826 "args": {4827 "id": {4828 "description": "Unique identifier for the post.",4829 "type": "integer",4830 "required": false4831 },4832 "force": {4833 "type": "boolean",4834 "default": false,4835 "description": "Whether to bypass Trash and force deletion.",4836 "required": false4837 }4838 }4839 }4840 ]4841 },4842 "/wp/v2/blocks/(?P<parent>[\\d]+)/revisions": {4843 "namespace": "wp/v2",4844 "methods": [4845 "GET"4846 ],4847 "endpoints": [4848 {4849 "methods": [4850 "GET"4851 ],4852 "args": {4853 "parent": {4854 "description": "The ID for the parent of the revision.",4855 "type": "integer",4856 "required": false4857 },4858 "context": {4859 "description": "Scope under which the request is made; determines fields present in response.",4860 "type": "string",4861 "enum": [4862 "view",4863 "embed",4864 "edit"4865 ],4866 "default": "view",4867 "required": false4868 },4869 "page": {4870 "description": "Current page of the collection.",4871 "type": "integer",4872 "default": 1,4873 "minimum": 1,4874 "required": false4875 },4876 "per_page": {4877 "description": "Maximum number of items to be returned in result set.",4878 "type": "integer",4879 "minimum": 1,4880 "maximum": 100,4881 "required": false4882 },4883 "search": {4884 "description": "Limit results to those matching a string.",4885 "type": "string",4886 "required": false4887 },4888 "exclude": {4889 "description": "Ensure result set excludes specific IDs.",4890 "type": "array",4891 "items": {4892 "type": "integer"4893 },4894 "default": [],4895 "required": false4896 },4897 "include": {4898 "description": "Limit result set to specific IDs.",4899 "type": "array",4900 "items": {4901 "type": "integer"4902 },4903 "default": [],4904 "required": false4905 },4906 "offset": {4907 "description": "Offset the result set by a specific number of items.",4908 "type": "integer",4909 "required": false4910 },4911 "order": {4912 "description": "Order sort attribute ascending or descending.",4913 "type": "string",4914 "default": "desc",4915 "enum": [4916 "asc",4917 "desc"4918 ],4919 "required": false4920 },4921 "orderby": {4922 "description": "Sort collection by object attribute.",4923 "type": "string",4924 "default": "date",4925 "enum": [4926 "date",4927 "id",4928 "include",4929 "relevance",4930 "slug",4931 "include_slugs",4932 "title"4933 ],4934 "required": false4935 }4936 }4937 }4938 ]4939 },4940 "/wp/v2/blocks/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": {4941 "namespace": "wp/v2",4942 "methods": [4943 "GET",4944 "DELETE"4945 ],4946 "endpoints": [4947 {4948 "methods": [4949 "GET"4950 ],4951 "args": {4952 "parent": {4953 "description": "The ID for the parent of the revision.",4954 "type": "integer",4955 "required": false4956 },4957 "id": {4958 "description": "Unique identifier for the revision.",4959 "type": "integer",4960 "required": false4961 },4962 "context": {4963 "description": "Scope under which the request is made; determines fields present in response.",4964 "type": "string",4965 "enum": [4966 "view",4967 "embed",4968 "edit"4969 ],4970 "default": "view",4971 "required": false4972 }4973 }4974 },4975 {4976 "methods": [4977 "DELETE"4978 ],4979 "args": {4980 "parent": {4981 "description": "The ID for the parent of the revision.",4982 "type": "integer",4983 "required": false4984 },4985 "id": {4986 "description": "Unique identifier for the revision.",4987 "type": "integer",4988 "required": false4989 },4990 "force": {4991 "type": "boolean",4992 "default": false,4993 "description": "Required to be true, as revisions do not support trashing.",4994 "required": false4995 }4996 }4997 }4998 ]4999 },5000 "/wp/v2/blocks/(?P<id>[\\d]+)/autosaves": {5001 "namespace": "wp/v2",5002 "methods": [5003 "GET",5004 "POST"5005 ],5006 "endpoints": [5007 {5008 "methods": [5009 "GET"5010 ],5011 "args": {5012 "parent": {5013 "description": "The ID for the parent of the autosave.",5014 "type": "integer",5015 "required": false5016 },5017 "context": {5018 "description": "Scope under which the request is made; determines fields present in response.",5019 "type": "string",5020 "enum": [5021 "view",5022 "embed",5023 "edit"5024 ],5025 "default": "view",5026 "required": false5027 }5028 }5029 },5030 {5031 "methods": [5032 "POST"5033 ],5034 "args": {5035 "parent": {5036 "description": "The ID for the parent of the autosave.",5037 "type": "integer",5038 "required": false5039 },5040 "date": {5041 "description": "The date the post was published, in the site's timezone.",5042 "type": [5043 "string",5044 "null"5045 ],5046 "format": "date-time",5047 "required": false5048 },5049 "date_gmt": {5050 "description": "The date the post was published, as GMT.",5051 "type": [5052 "string",5053 "null"5054 ],5055 "format": "date-time",5056 "required": false5057 },5058 "slug": {5059 "description": "An alphanumeric identifier for the post unique to its type.",5060 "type": "string",5061 "required": false5062 },5063 "status": {5064 "description": "A named status for the post.",5065 "type": "string",5066 "enum": [5067 "publish",5068 "future",5069 "draft",5070 "pending",5071 "private"5072 ],5073 "required": false5074 },5075 "password": {5076 "description": "A password to protect access to the content and excerpt.",5077 "type": "string",5078 "required": false5079 },5080 "title": {5081 "description": "The title for the post.",5082 "type": "object",5083 "properties": {5084 "raw": {5085 "description": "Title for the post, as it exists in the database.",5086 "type": "string",5087 "context": [5088 "view",5089 "edit"5090 ]5091 }5092 },5093 "required": false5094 },5095 "content": {5096 "description": "The content for the post.",5097 "type": "object",5098 "properties": {5099 "raw": {5100 "description": "Content for the post, as it exists in the database.",5101 "type": "string",5102 "context": [5103 "view",5104 "edit"5105 ]5106 },5107 "block_version": {5108 "description": "Version of the content block format used by the post.",5109 "type": "integer",5110 "context": [5111 "edit"5112 ],5113 "readonly": true5114 },5115 "protected": {5116 "description": "Whether the content is protected with a password.",5117 "type": "boolean",5118 "context": [5119 "view",5120 "edit",5121 "embed"5122 ],5123 "readonly": true5124 }5125 },5126 "required": false5127 },5128 "meta": {5129 "description": "Meta fields.",5130 "type": "object",5131 "properties": [],5132 "required": false5133 },5134 "template": {5135 "description": "The theme file to use to display the post.",5136 "type": "string",5137 "required": false5138 },5139 "wp_pattern_category": {5140 "description": "The terms assigned to the post in the wp_pattern_category taxonomy.",5141 "type": "array",5142 "items": {5143 "type": "integer"5144 },5145 "required": false5146 }5147 }5148 }5149 ]5150 },5151 "/wp/v2/blocks/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": {5152 "namespace": "wp/v2",5153 "methods": [5154 "GET"5155 ],5156 "endpoints": [5157 {5158 "methods": [5159 "GET"5160 ],5161 "args": {5162 "parent": {5163 "description": "The ID for the parent of the autosave.",5164 "type": "integer",5165 "required": false5166 },5167 "id": {5168 "description": "The ID for the autosave.",5169 "type": "integer",5170 "required": false5171 },5172 "context": {5173 "description": "Scope under which the request is made; determines fields present in response.",5174 "type": "string",5175 "enum": [5176 "view",5177 "embed",5178 "edit"5179 ],5180 "default": "view",5181 "required": false5182 }5183 }5184 }5185 ]5186 },5187 "/wp/v2/templates": {5188 "namespace": "wp/v2",5189 "methods": [5190 "GET",5191 "POST"5192 ],5193 "endpoints": [5194 {5195 "methods": [5196 "GET"5197 ],5198 "args": {5199 "context": {5200 "description": "Scope under which the request is made; determines fields present in response.",5201 "type": "string",5202 "enum": [5203 "view",5204 "embed",5205 "edit"5206 ],5207 "default": "view",5208 "required": false5209 },5210 "wp_id": {5211 "description": "Limit to the specified post id.",5212 "type": "integer",5213 "required": false5214 },5215 "area": {5216 "description": "Limit to the specified template part area.",5217 "type": "string",5218 "required": false5219 },5220 "post_type": {5221 "description": "Post type to get the templates for.",5222 "type": "string",5223 "required": false5224 }5225 }5226 },5227 {5228 "methods": [5229 "POST"5230 ],5231 "args": {5232 "slug": {5233 "description": "Unique slug identifying the template.",5234 "type": "string",5235 "minLength": 1,5236 "pattern": "[a-zA-Z0-9_\\%-]+",5237 "required": true5238 },5239 "theme": {5240 "description": "Theme identifier for the template.",5241 "type": "string",5242 "required": false5243 },5244 "type": {5245 "description": "Type of template.",5246 "type": "string",5247 "required": false5248 },5249 "content": {5250 "default": "",5251 "description": "Content of template.",5252 "type": [5253 "object",5254 "string"5255 ],5256 "properties": {5257 "raw": {5258 "description": "Content for the template, as it exists in the database.",5259 "type": "string",5260 "context": [5261 "view",5262 "edit"5263 ]5264 },5265 "block_version": {5266 "description": "Version of the content block format used by the template.",5267 "type": "integer",5268 "context": [5269 "edit"5270 ],5271 "readonly": true5272 }5273 },5274 "required": false5275 },5276 "title": {5277 "default": "",5278 "description": "Title of template.",5279 "type": [5280 "object",5281 "string"5282 ],5283 "properties": {5284 "raw": {5285 "description": "Title for the template, as it exists in the database.",5286 "type": "string",5287 "context": [5288 "view",5289 "edit",5290 "embed"5291 ]5292 },5293 "rendered": {5294 "description": "HTML title for the template, transformed for display.",5295 "type": "string",5296 "context": [5297 "view",5298 "edit",5299 "embed"5300 ],5301 "readonly": true5302 }5303 },5304 "required": false5305 },5306 "description": {5307 "default": "",5308 "description": "Description of template.",5309 "type": "string",5310 "required": false5311 },5312 "status": {5313 "default": "publish",5314 "description": "Status of template.",5315 "type": "string",5316 "enum": [5317 "publish",5318 "future",5319 "draft",5320 "pending",5321 "private"5322 ],5323 "required": false5324 },5325 "author": {5326 "description": "The ID for the author of the template.",5327 "type": "integer",5328 "required": false5329 }5330 }5331 }5332 ],5333 "_links": {5334 "self": [5335 {5336 "href": "http://example.org/index.php?rest_route=/wp/v2/templates"5337 }5338 ]5339 }5340 },5341 "/wp/v2/templates/lookup": {5342 "namespace": "wp/v2",5343 "methods": [5344 "GET"5345 ],5346 "endpoints": [5347 {5348 "methods": [5349 "GET"5350 ],5351 "args": {5352 "slug": {5353 "description": "The slug of the template to get the fallback for",5354 "type": "string",5355 "required": true5356 },5357 "is_custom": {5358 "description": "Indicates if a template is custom or part of the template hierarchy",5359 "type": "boolean",5360 "required": false5361 },5362 "template_prefix": {5363 "description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`",5364 "type": "string",5365 "required": false5366 }5367 }5368 }5369 ],5370 "_links": {5371 "self": [5372 {5373 "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup"5374 }5375 ]5376 }5377 },5378 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": {5379 "namespace": "wp/v2",5380 "methods": [5381 "GET",5382 "POST",5383 "PUT",5384 "PATCH",5385 "DELETE"5386 ],5387 "endpoints": [5388 {5389 "methods": [5390 "GET"5391 ],5392 "args": {5393 "id": {5394 "description": "The id of a template",5395 "type": "string",5396 "required": false5397 },5398 "context": {5399 "description": "Scope under which the request is made; determines fields present in response.",5400 "type": "string",5401 "enum": [5402 "view",5403 "embed",5404 "edit"5405 ],5406 "default": "view",5407 "required": false5408 }5409 }5410 },5411 {5412 "methods": [5413 "POST",5414 "PUT",5415 "PATCH"5416 ],5417 "args": {5418 "id": {5419 "description": "The id of a template",5420 "type": "string",5421 "required": false5422 },5423 "slug": {5424 "description": "Unique slug identifying the template.",5425 "type": "string",5426 "minLength": 1,5427 "pattern": "[a-zA-Z0-9_\\%-]+",5428 "required": false5429 },5430 "theme": {5431 "description": "Theme identifier for the template.",5432 "type": "string",5433 "required": false5434 },5435 "type": {5436 "description": "Type of template.",5437 "type": "string",5438 "required": false5439 },5440 "content": {5441 "description": "Content of template.",5442 "type": [5443 "object",5444 "string"5445 ],5446 "properties": {5447 "raw": {5448 "description": "Content for the template, as it exists in the database.",5449 "type": "string",5450 "context": [5451 "view",5452 "edit"5453 ]5454 },5455 "block_version": {5456 "description": "Version of the content block format used by the template.",5457 "type": "integer",5458 "context": [5459 "edit"5460 ],5461 "readonly": true5462 }5463 },5464 "required": false5465 },5466 "title": {5467 "description": "Title of template.",5468 "type": [5469 "object",5470 "string"5471 ],5472 "properties": {5473 "raw": {5474 "description": "Title for the template, as it exists in the database.",5475 "type": "string",5476 "context": [5477 "view",5478 "edit",5479 "embed"5480 ]5481 },5482 "rendered": {5483 "description": "HTML title for the template, transformed for display.",5484 "type": "string",5485 "context": [5486 "view",5487 "edit",5488 "embed"5489 ],5490 "readonly": true5491 }5492 },5493 "required": false5494 },5495 "description": {5496 "description": "Description of template.",5497 "type": "string",5498 "required": false5499 },5500 "status": {5501 "description": "Status of template.",5502 "type": "string",5503 "enum": [5504 "publish",5505 "future",5506 "draft",5507 "pending",5508 "private"5509 ],5510 "required": false5511 },5512 "author": {5513 "description": "The ID for the author of the template.",5514 "type": "integer",5515 "required": false5516 }5517 }5518 },5519 {5520 "methods": [5521 "DELETE"5522 ],5523 "args": {5524 "id": {5525 "description": "The id of a template",5526 "type": "string",5527 "required": false5528 },5529 "force": {5530 "type": "boolean",5531 "default": false,5532 "description": "Whether to bypass Trash and force deletion.",5533 "required": false5534 }5535 }5536 }5537 ]5538 },5539 "/wp/v2/templates/(?P<parent>[\\d]+)/revisions": {5540 "namespace": "wp/v2",5541 "methods": [5542 "GET"5543 ],5544 "endpoints": [5545 {5546 "methods": [5547 "GET"5548 ],5549 "args": {5550 "parent": {5551 "description": "The ID for the parent of the revision.",5552 "type": "integer",5553 "required": false5554 },5555 "context": {5556 "description": "Scope under which the request is made; determines fields present in response.",5557 "type": "string",5558 "enum": [5559 "view",5560 "embed",5561 "edit"5562 ],5563 "default": "view",5564 "required": false5565 },5566 "page": {5567 "description": "Current page of the collection.",5568 "type": "integer",5569 "default": 1,5570 "minimum": 1,5571 "required": false5572 },5573 "per_page": {5574 "description": "Maximum number of items to be returned in result set.",5575 "type": "integer",5576 "minimum": 1,5577 "maximum": 100,5578 "required": false5579 },5580 "search": {5581 "description": "Limit results to those matching a string.",5582 "type": "string",5583 "required": false5584 },5585 "exclude": {5586 "description": "Ensure result set excludes specific IDs.",5587 "type": "array",5588 "items": {5589 "type": "integer"5590 },5591 "default": [],5592 "required": false5593 },5594 "include": {5595 "description": "Limit result set to specific IDs.",5596 "type": "array",5597 "items": {5598 "type": "integer"5599 },5600 "default": [],5601 "required": false5602 },5603 "offset": {5604 "description": "Offset the result set by a specific number of items.",5605 "type": "integer",5606 "required": false5607 },5608 "order": {5609 "description": "Order sort attribute ascending or descending.",5610 "type": "string",5611 "default": "desc",5612 "enum": [5613 "asc",5614 "desc"5615 ],5616 "required": false5617 },5618 "orderby": {5619 "description": "Sort collection by object attribute.",5620 "type": "string",5621 "default": "date",5622 "enum": [5623 "date",5624 "id",5625 "include",5626 "relevance",5627 "slug",5628 "include_slugs",5629 "title"5630 ],5631 "required": false5632 }5633 }5634 }5635 ]5636 },5637 "/wp/v2/templates/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": {5638 "namespace": "wp/v2",5639 "methods": [5640 "GET",5641 "DELETE"5642 ],5643 "endpoints": [5644 {5645 "methods": [5646 "GET"5647 ],5648 "args": {5649 "parent": {5650 "description": "The ID for the parent of the revision.",5651 "type": "integer",5652 "required": false5653 },5654 "id": {5655 "description": "Unique identifier for the revision.",5656 "type": "integer",5657 "required": false5658 },5659 "context": {5660 "description": "Scope under which the request is made; determines fields present in response.",5661 "type": "string",5662 "enum": [5663 "view",5664 "embed",5665 "edit"5666 ],5667 "default": "view",5668 "required": false5669 }5670 }5671 },5672 {5673 "methods": [5674 "DELETE"5675 ],5676 "args": {5677 "parent": {5678 "description": "The ID for the parent of the revision.",5679 "type": "integer",5680 "required": false5681 },5682 "id": {5683 "description": "Unique identifier for the revision.",5684 "type": "integer",5685 "required": false5686 },5687 "force": {5688 "type": "boolean",5689 "default": false,5690 "description": "Required to be true, as revisions do not support trashing.",5691 "required": false5692 }5693 }5694 }5695 ]5696 },5697 "/wp/v2/templates/(?P<id>[\\d]+)/autosaves": {5698 "namespace": "wp/v2",5699 "methods": [5700 "GET",5701 "POST"5702 ],5703 "endpoints": [5704 {5705 "methods": [5706 "GET"5707 ],5708 "args": {5709 "parent": {5710 "description": "The ID for the parent of the autosave.",5711 "type": "integer",5712 "required": false5713 },5714 "context": {5715 "description": "Scope under which the request is made; determines fields present in response.",5716 "type": "string",5717 "enum": [5718 "view",5719 "embed",5720 "edit"5721 ],5722 "default": "view",5723 "required": false5724 }5725 }5726 },5727 {5728 "methods": [5729 "POST"5730 ],5731 "args": {5732 "parent": {5733 "description": "The ID for the parent of the autosave.",5734 "type": "integer",5735 "required": false5736 },5737 "slug": {5738 "description": "Unique slug identifying the template.",5739 "type": "string",5740 "minLength": 1,5741 "pattern": "[a-zA-Z0-9_\\%-]+",5742 "required": false5743 },5744 "theme": {5745 "description": "Theme identifier for the template.",5746 "type": "string",5747 "required": false5748 },5749 "type": {5750 "description": "Type of template.",5751 "type": "string",5752 "required": false5753 },5754 "content": {5755 "description": "Content of template.",5756 "type": [5757 "object",5758 "string"5759 ],5760 "properties": {5761 "raw": {5762 "description": "Content for the template, as it exists in the database.",5763 "type": "string",5764 "context": [5765 "view",5766 "edit"5767 ]5768 },5769 "block_version": {5770 "description": "Version of the content block format used by the template.",5771 "type": "integer",5772 "context": [5773 "edit"5774 ],5775 "readonly": true5776 }5777 },5778 "required": false5779 },5780 "title": {5781 "description": "Title of template.",5782 "type": [5783 "object",5784 "string"5785 ],5786 "properties": {5787 "raw": {5788 "description": "Title for the template, as it exists in the database.",5789 "type": "string",5790 "context": [5791 "view",5792 "edit",5793 "embed"5794 ]5795 },5796 "rendered": {5797 "description": "HTML title for the template, transformed for display.",5798 "type": "string",5799 "context": [5800 "view",5801 "edit",5802 "embed"5803 ],5804 "readonly": true5805 }5806 },5807 "required": false5808 },5809 "description": {5810 "description": "Description of template.",5811 "type": "string",5812 "required": false5813 },5814 "status": {5815 "description": "Status of template.",5816 "type": "string",5817 "enum": [5818 "publish",5819 "future",5820 "draft",5821 "pending",5822 "private"5823 ],5824 "required": false5825 },5826 "author": {5827 "description": "The ID for the author of the template.",5828 "type": "integer",5829 "required": false5830 }5831 }5832 }5833 ]5834 },5835 "/wp/v2/templates/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": {5836 "namespace": "wp/v2",5837 "methods": [5838 "GET"5839 ],5840 "endpoints": [5841 {5842 "methods": [5843 "GET"5844 ],5845 "args": {5846 "parent": {5847 "description": "The ID for the parent of the autosave.",5848 "type": "integer",5849 "required": false5850 },5851 "id": {5852 "description": "The ID for the autosave.",5853 "type": "integer",5854 "required": false5855 },5856 "context": {5857 "description": "Scope under which the request is made; determines fields present in response.",5858 "type": "string",5859 "enum": [5860 "view",5861 "embed",5862 "edit"5863 ],5864 "default": "view",5865 "required": false5866 }5867 }5868 }5869 ]5870 },5871 "/wp/v2/template-parts": {5872 "namespace": "wp/v2",5873 "methods": [5874 "GET",5875 "POST"5876 ],5877 "endpoints": [5878 {5879 "methods": [5880 "GET"5881 ],5882 "args": {5883 "context": {5884 "description": "Scope under which the request is made; determines fields present in response.",5885 "type": "string",5886 "enum": [5887 "view",5888 "embed",5889 "edit"5890 ],5891 "default": "view",5892 "required": false5893 },5894 "wp_id": {5895 "description": "Limit to the specified post id.",5896 "type": "integer",5897 "required": false5898 },5899 "area": {5900 "description": "Limit to the specified template part area.",5901 "type": "string",5902 "required": false5903 },5904 "post_type": {5905 "description": "Post type to get the templates for.",5906 "type": "string",5907 "required": false5908 }5909 }5910 },5911 {5912 "methods": [5913 "POST"5914 ],5915 "args": {5916 "slug": {5917 "description": "Unique slug identifying the template.",5918 "type": "string",5919 "minLength": 1,5920 "pattern": "[a-zA-Z0-9_\\%-]+",5921 "required": true5922 },5923 "theme": {5924 "description": "Theme identifier for the template.",5925 "type": "string",5926 "required": false5927 },5928 "type": {5929 "description": "Type of template.",5930 "type": "string",5931 "required": false5932 },5933 "content": {5934 "default": "",5935 "description": "Content of template.",5936 "type": [5937 "object",5938 "string"5939 ],5940 "properties": {5941 "raw": {5942 "description": "Content for the template, as it exists in the database.",5943 "type": "string",5944 "context": [5945 "view",5946 "edit"5947 ]5948 },5949 "block_version": {5950 "description": "Version of the content block format used by the template.",5951 "type": "integer",5952 "context": [5953 "edit"5954 ],5955 "readonly": true5956 }5957 },5958 "required": false5959 },5960 "title": {5961 "default": "",5962 "description": "Title of template.",5963 "type": [5964 "object",5965 "string"5966 ],5967 "properties": {5968 "raw": {5969 "description": "Title for the template, as it exists in the database.",5970 "type": "string",5971 "context": [5972 "view",5973 "edit",5974 "embed"5975 ]5976 },5977 "rendered": {5978 "description": "HTML title for the template, transformed for display.",5979 "type": "string",5980 "context": [5981 "view",5982 "edit",5983 "embed"5984 ],5985 "readonly": true5986 }5987 },5988 "required": false5989 },5990 "description": {5991 "default": "",5992 "description": "Description of template.",5993 "type": "string",5994 "required": false5995 },5996 "status": {5997 "default": "publish",5998 "description": "Status of template.",5999 "type": "string",6000 "enum": [6001 "publish",6002 "future",6003 "draft",6004 "pending",6005 "private"6006 ],6007 "required": false6008 },6009 "author": {6010 "description": "The ID for the author of the template.",6011 "type": "integer",6012 "required": false6013 },6014 "area": {6015 "description": "Where the template part is intended for use (header, footer, etc.)",6016 "type": "string",6017 "required": false6018 }6019 }6020 }6021 ],6022 "_links": {6023 "self": [6024 {6025 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts"6026 }6027 ]6028 }6029 },6030 "/wp/v2/template-parts/lookup": {6031 "namespace": "wp/v2",6032 "methods": [6033 "GET"6034 ],6035 "endpoints": [6036 {6037 "methods": [6038 "GET"6039 ],6040 "args": {6041 "slug": {6042 "description": "The slug of the template to get the fallback for",6043 "type": "string",6044 "required": true6045 },6046 "is_custom": {6047 "description": "Indicates if a template is custom or part of the template hierarchy",6048 "type": "boolean",6049 "required": false6050 },6051 "template_prefix": {6052 "description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`",6053 "type": "string",6054 "required": false6055 }6056 }6057 }6058 ],6059 "_links": {6060 "self": [6061 {6062 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup"6063 }6064 ]6065 }6066 },6067 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": {6068 "namespace": "wp/v2",6069 "methods": [6070 "GET",6071 "POST",6072 "PUT",6073 "PATCH",6074 "DELETE"6075 ],6076 "endpoints": [6077 {6078 "methods": [6079 "GET"6080 ],6081 "args": {6082 "id": {6083 "description": "The id of a template",6084 "type": "string",6085 "required": false6086 },6087 "context": {6088 "description": "Scope under which the request is made; determines fields present in response.",6089 "type": "string",6090 "enum": [6091 "view",6092 "embed",6093 "edit"6094 ],6095 "default": "view",6096 "required": false6097 }6098 }6099 },6100 {6101 "methods": [6102 "POST",6103 "PUT",6104 "PATCH"6105 ],6106 "args": {6107 "id": {6108 "description": "The id of a template",6109 "type": "string",6110 "required": false6111 },6112 "slug": {6113 "description": "Unique slug identifying the template.",6114 "type": "string",6115 "minLength": 1,6116 "pattern": "[a-zA-Z0-9_\\%-]+",6117 "required": false6118 },6119 "theme": {6120 "description": "Theme identifier for the template.",6121 "type": "string",6122 "required": false6123 },6124 "type": {6125 "description": "Type of template.",6126 "type": "string",6127 "required": false6128 },6129 "content": {6130 "description": "Content of template.",6131 "type": [6132 "object",6133 "string"6134 ],6135 "properties": {6136 "raw": {6137 "description": "Content for the template, as it exists in the database.",6138 "type": "string",6139 "context": [6140 "view",6141 "edit"6142 ]6143 },6144 "block_version": {6145 "description": "Version of the content block format used by the template.",6146 "type": "integer",6147 "context": [6148 "edit"6149 ],6150 "readonly": true6151 }6152 },6153 "required": false6154 },6155 "title": {6156 "description": "Title of template.",6157 "type": [6158 "object",6159 "string"6160 ],6161 "properties": {6162 "raw": {6163 "description": "Title for the template, as it exists in the database.",6164 "type": "string",6165 "context": [6166 "view",6167 "edit",6168 "embed"6169 ]6170 },6171 "rendered": {6172 "description": "HTML title for the template, transformed for display.",6173 "type": "string",6174 "context": [6175 "view",6176 "edit",6177 "embed"6178 ],6179 "readonly": true6180 }6181 },6182 "required": false6183 },6184 "description": {6185 "description": "Description of template.",6186 "type": "string",6187 "required": false6188 },6189 "status": {6190 "description": "Status of template.",6191 "type": "string",6192 "enum": [6193 "publish",6194 "future",6195 "draft",6196 "pending",6197 "private"6198 ],6199 "required": false6200 },6201 "author": {6202 "description": "The ID for the author of the template.",6203 "type": "integer",6204 "required": false6205 },6206 "area": {6207 "description": "Where the template part is intended for use (header, footer, etc.)",6208 "type": "string",6209 "required": false6210 }6211 }6212 },6213 {6214 "methods": [6215 "DELETE"6216 ],6217 "args": {6218 "id": {6219 "description": "The id of a template",6220 "type": "string",6221 "required": false6222 },6223 "force": {6224 "type": "boolean",6225 "default": false,6226 "description": "Whether to bypass Trash and force deletion.",6227 "required": false6228 }6229 }6230 }6231 ]6232 },6233 "/wp/v2/template-parts/(?P<parent>[\\d]+)/revisions": {6234 "namespace": "wp/v2",6235 "methods": [6236 "GET"6237 ],6238 "endpoints": [6239 {6240 "methods": [6241 "GET"6242 ],6243 "args": {6244 "parent": {6245 "description": "The ID for the parent of the revision.",6246 "type": "integer",6247 "required": false6248 },6249 "context": {6250 "description": "Scope under which the request is made; determines fields present in response.",6251 "type": "string",6252 "enum": [6253 "view",6254 "embed",6255 "edit"6256 ],6257 "default": "view",6258 "required": false6259 },6260 "page": {6261 "description": "Current page of the collection.",6262 "type": "integer",6263 "default": 1,6264 "minimum": 1,6265 "required": false6266 },6267 "per_page": {6268 "description": "Maximum number of items to be returned in result set.",6269 "type": "integer",6270 "minimum": 1,6271 "maximum": 100,6272 "required": false6273 },6274 "search": {6275 "description": "Limit results to those matching a string.",6276 "type": "string",6277 "required": false6278 },6279 "exclude": {6280 "description": "Ensure result set excludes specific IDs.",6281 "type": "array",6282 "items": {6283 "type": "integer"6284 },6285 "default": [],6286 "required": false6287 },6288 "include": {6289 "description": "Limit result set to specific IDs.",6290 "type": "array",6291 "items": {6292 "type": "integer"6293 },6294 "default": [],6295 "required": false6296 },6297 "offset": {6298 "description": "Offset the result set by a specific number of items.",6299 "type": "integer",6300 "required": false6301 },6302 "order": {6303 "description": "Order sort attribute ascending or descending.",6304 "type": "string",6305 "default": "desc",6306 "enum": [6307 "asc",6308 "desc"6309 ],6310 "required": false6311 },6312 "orderby": {6313 "description": "Sort collection by object attribute.",6314 "type": "string",6315 "default": "date",6316 "enum": [6317 "date",6318 "id",6319 "include",6320 "relevance",6321 "slug",6322 "include_slugs",6323 "title"6324 ],6325 "required": false6326 }6327 }6328 }6329 ]6330 },6331 "/wp/v2/template-parts/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": {6332 "namespace": "wp/v2",6333 "methods": [6334 "GET",6335 "DELETE"6336 ],6337 "endpoints": [6338 {6339 "methods": [6340 "GET"6341 ],6342 "args": {6343 "parent": {6344 "description": "The ID for the parent of the revision.",6345 "type": "integer",6346 "required": false6347 },6348 "id": {6349 "description": "Unique identifier for the revision.",6350 "type": "integer",6351 "required": false6352 },6353 "context": {6354 "description": "Scope under which the request is made; determines fields present in response.",6355 "type": "string",6356 "enum": [6357 "view",6358 "embed",6359 "edit"6360 ],6361 "default": "view",6362 "required": false6363 }6364 }6365 },6366 {6367 "methods": [6368 "DELETE"6369 ],6370 "args": {6371 "parent": {6372 "description": "The ID for the parent of the revision.",6373 "type": "integer",6374 "required": false6375 },6376 "id": {6377 "description": "Unique identifier for the revision.",6378 "type": "integer",6379 "required": false6380 },6381 "force": {6382 "type": "boolean",6383 "default": false,6384 "description": "Required to be true, as revisions do not support trashing.",6385 "required": false6386 }6387 }6388 }6389 ]6390 },6391 "/wp/v2/template-parts/(?P<id>[\\d]+)/autosaves": {6392 "namespace": "wp/v2",6393 "methods": [6394 "GET",6395 "POST"6396 ],6397 "endpoints": [6398 {6399 "methods": [6400 "GET"6401 ],6402 "args": {6403 "parent": {6404 "description": "The ID for the parent of the autosave.",6405 "type": "integer",6406 "required": false6407 },6408 "context": {6409 "description": "Scope under which the request is made; determines fields present in response.",6410 "type": "string",6411 "enum": [6412 "view",6413 "embed",6414 "edit"6415 ],6416 "default": "view",6417 "required": false6418 }6419 }6420 },6421 {6422 "methods": [6423 "POST"6424 ],6425 "args": {6426 "parent": {6427 "description": "The ID for the parent of the autosave.",6428 "type": "integer",6429 "required": false6430 },6431 "slug": {6432 "description": "Unique slug identifying the template.",6433 "type": "string",6434 "minLength": 1,6435 "pattern": "[a-zA-Z0-9_\\%-]+",6436 "required": false6437 },6438 "theme": {6439 "description": "Theme identifier for the template.",6440 "type": "string",6441 "required": false6442 },6443 "type": {6444 "description": "Type of template.",6445 "type": "string",6446 "required": false6447 },6448 "content": {6449 "description": "Content of template.",6450 "type": [6451 "object",6452 "string"6453 ],6454 "properties": {6455 "raw": {6456 "description": "Content for the template, as it exists in the database.",6457 "type": "string",6458 "context": [6459 "view",6460 "edit"6461 ]6462 },6463 "block_version": {6464 "description": "Version of the content block format used by the template.",6465 "type": "integer",6466 "context": [6467 "edit"6468 ],6469 "readonly": true6470 }6471 },6472 "required": false6473 },6474 "title": {6475 "description": "Title of template.",6476 "type": [6477 "object",6478 "string"6479 ],6480 "properties": {6481 "raw": {6482 "description": "Title for the template, as it exists in the database.",6483 "type": "string",6484 "context": [6485 "view",6486 "edit",6487 "embed"6488 ]6489 },6490 "rendered": {6491 "description": "HTML title for the template, transformed for display.",6492 "type": "string",6493 "context": [6494 "view",6495 "edit",6496 "embed"6497 ],6498 "readonly": true6499 }6500 },6501 "required": false6502 },6503 "description": {6504 "description": "Description of template.",6505 "type": "string",6506 "required": false6507 },6508 "status": {6509 "description": "Status of template.",6510 "type": "string",6511 "enum": [6512 "publish",6513 "future",6514 "draft",6515 "pending",6516 "private"6517 ],6518 "required": false6519 },6520 "author": {6521 "description": "The ID for the author of the template.",6522 "type": "integer",6523 "required": false6524 },6525 "area": {6526 "description": "Where the template part is intended for use (header, footer, etc.)",6527 "type": "string",6528 "required": false6529 }6530 }6531 }6532 ]6533 },6534 "/wp/v2/template-parts/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": {6535 "namespace": "wp/v2",6536 "methods": [6537 "GET"6538 ],6539 "endpoints": [6540 {6541 "methods": [6542 "GET"6543 ],6544 "args": {6545 "parent": {6546 "description": "The ID for the parent of the autosave.",6547 "type": "integer",6548 "required": false6549 },6550 "id": {6551 "description": "The ID for the autosave.",6552 "type": "integer",6553 "required": false6554 },6555 "context": {6556 "description": "Scope under which the request is made; determines fields present in response.",6557 "type": "string",6558 "enum": [6559 "view",6560 "embed",6561 "edit"6562 ],6563 "default": "view",6564 "required": false6565 }6566 }6567 }6568 ]6569 },6570 "/wp/v2/navigation": {6571 "namespace": "wp/v2",6572 "methods": [6573 "GET",6574 "POST"6575 ],6576 "endpoints": [6577 {6578 "methods": [6579 "GET"6580 ],6581 "allow_batch": {6582 "v1": true6583 },6584 "args": {6585 "context": {6586 "description": "Scope under which the request is made; determines fields present in response.",6587 "type": "string",6588 "enum": [6589 "view",6590 "embed",6591 "edit"6592 ],6593 "default": "view",6594 "required": false6595 },6596 "page": {6597 "description": "Current page of the collection.",6598 "type": "integer",6599 "default": 1,6600 "minimum": 1,6601 "required": false6602 },6603 "per_page": {6604 "description": "Maximum number of items to be returned in result set.",6605 "type": "integer",6606 "default": 10,6607 "minimum": 1,6608 "maximum": 100,6609 "required": false6610 },6611 "search": {6612 "description": "Limit results to those matching a string.",6613 "type": "string",6614 "required": false6615 },6616 "after": {6617 "description": "Limit response to posts published after a given ISO8601 compliant date.",6618 "type": "string",6619 "format": "date-time",6620 "required": false6621 },6622 "modified_after": {6623 "description": "Limit response to posts modified after a given ISO8601 compliant date.",6624 "type": "string",6625 "format": "date-time",6626 "required": false6627 },6628 "before": {6629 "description": "Limit response to posts published before a given ISO8601 compliant date.",6630 "type": "string",6631 "format": "date-time",6632 "required": false6633 },6634 "modified_before": {6635 "description": "Limit response to posts modified before a given ISO8601 compliant date.",6636 "type": "string",6637 "format": "date-time",6638 "required": false6639 },6640 "exclude": {6641 "description": "Ensure result set excludes specific IDs.",6642 "type": "array",6643 "items": {6644 "type": "integer"6645 },6646 "default": [],6647 "required": false6648 },6649 "include": {6650 "description": "Limit result set to specific IDs.",6651 "type": "array",6652 "items": {6653 "type": "integer"6654 },6655 "default": [],6656 "required": false6657 },6658 "offset": {6659 "description": "Offset the result set by a specific number of items.",6660 "type": "integer",6661 "required": false6662 },6663 "order": {6664 "description": "Order sort attribute ascending or descending.",6665 "type": "string",6666 "default": "desc",6667 "enum": [6668 "asc",6669 "desc"6670 ],6671 "required": false6672 },6673 "orderby": {6674 "description": "Sort collection by post attribute.",6675 "type": "string",6676 "default": "date",6677 "enum": [6678 "author",6679 "date",6680 "id",6681 "include",6682 "modified",6683 "parent",6684 "relevance",6685 "slug",6686 "include_slugs",6687 "title"6688 ],6689 "required": false6690 },6691 "search_columns": {6692 "default": [],6693 "description": "Array of column names to be searched.",6694 "type": "array",6695 "items": {6696 "enum": [6697 "post_title",6698 "post_content",6699 "post_excerpt"6700 ],6701 "type": "string"6702 },6703 "required": false6704 },6705 "slug": {6706 "description": "Limit result set to posts with one or more specific slugs.",6707 "type": "array",6708 "items": {6709 "type": "string"6710 },6711 "required": false6712 },6713 "status": {6714 "default": "publish",6715 "description": "Limit result set to posts assigned one or more statuses.",6716 "type": "array",6717 "items": {6718 "enum": [6719 "publish",6720 "future",6721 "draft",6722 "pending",6723 "private",6724 "trash",6725 "auto-draft",6726 "inherit",6727 "request-pending",6728 "request-confirmed",6729 "request-failed",6730 "request-completed",6731 "any"6732 ],6733 "type": "string"6734 },6735 "required": false6736 }6737 }6738 },6739 {6740 "methods": [6741 "POST"6742 ],6743 "allow_batch": {6744 "v1": true6745 },6746 "args": {6747 "date": {6748 "description": "The date the post was published, in the site's timezone.",6749 "type": [6750 "string",6751 "null"6752 ],6753 "format": "date-time",6754 "required": false6755 },6756 "date_gmt": {6757 "description": "The date the post was published, as GMT.",6758 "type": [6759 "string",6760 "null"6761 ],6762 "format": "date-time",6763 "required": false6764 },6765 "slug": {6766 "description": "An alphanumeric identifier for the post unique to its type.",6767 "type": "string",6768 "required": false6769 },6770 "status": {6771 "description": "A named status for the post.",6772 "type": "string",6773 "enum": [6774 "publish",6775 "future",6776 "draft",6777 "pending",6778 "private"6779 ],6780 "required": false6781 },6782 "password": {6783 "description": "A password to protect access to the content and excerpt.",6784 "type": "string",6785 "required": false6786 },6787 "title": {6788 "description": "The title for the post.",6789 "type": "object",6790 "properties": {6791 "raw": {6792 "description": "Title for the post, as it exists in the database.",6793 "type": "string",6794 "context": [6795 "edit",6796 "embed"6797 ]6798 },6799 "rendered": {6800 "description": "HTML title for the post, transformed for display.",6801 "type": "string",6802 "context": [6803 "view",6804 "edit",6805 "embed"6806 ],6807 "readonly": true6808 }6809 },6810 "required": false6811 },6812 "content": {6813 "description": "The content for the post.",6814 "type": "object",6815 "properties": {6816 "raw": {6817 "description": "Content for the post, as it exists in the database.",6818 "type": "string",6819 "context": [6820 "edit",6821 "embed"6822 ]6823 },6824 "rendered": {6825 "description": "HTML content for the post, transformed for display.",6826 "type": "string",6827 "context": [6828 "view",6829 "edit",6830 "embed"6831 ],6832 "readonly": true6833 },6834 "block_version": {6835 "description": "Version of the content block format used by the post.",6836 "type": "integer",6837 "context": [6838 "edit",6839 "embed"6840 ],6841 "readonly": true6842 },6843 "protected": {6844 "description": "Whether the content is protected with a password.",6845 "type": "boolean",6846 "context": [6847 "view",6848 "edit",6849 "embed"6850 ],6851 "readonly": true6852 }6853 },6854 "required": false6855 },6856 "template": {6857 "description": "The theme file to use to display the post.",6858 "type": "string",6859 "required": false6860 }6861 }6862 }6863 ],6864 "_links": {6865 "self": [6866 {6867 "href": "http://example.org/index.php?rest_route=/wp/v2/navigation"6868 }6869 ]6870 }6871 },6872 "/wp/v2/navigation/(?P<id>[\\d]+)": {6873 "namespace": "wp/v2",6874 "methods": [6875 "GET",6876 "POST",6877 "PUT",6878 "PATCH",6879 "DELETE"6880 ],6881 "endpoints": [6882 {6883 "methods": [6884 "GET"6885 ],6886 "allow_batch": {6887 "v1": true6888 },6889 "args": {6890 "id": {6891 "description": "Unique identifier for the post.",6892 "type": "integer",6893 "required": false6894 },6895 "context": {6896 "description": "Scope under which the request is made; determines fields present in response.",6897 "type": "string",6898 "enum": [6899 "view",6900 "embed",6901 "edit"6902 ],6903 "default": "view",6904 "required": false6905 },6906 "password": {6907 "description": "The password for the post if it is password protected.",6908 "type": "string",6909 "required": false6910 }6911 }6912 },6913 {6914 "methods": [6915 "POST",6916 "PUT",6917 "PATCH"6918 ],6919 "allow_batch": {6920 "v1": true6921 },6922 "args": {6923 "id": {6924 "description": "Unique identifier for the post.",6925 "type": "integer",6926 "required": false6927 },6928 "date": {6929 "description": "The date the post was published, in the site's timezone.",6930 "type": [6931 "string",6932 "null"6933 ],6934 "format": "date-time",6935 "required": false6936 },6937 "date_gmt": {6938 "description": "The date the post was published, as GMT.",6939 "type": [6940 "string",6941 "null"6942 ],6943 "format": "date-time",6944 "required": false6945 },6946 "slug": {6947 "description": "An alphanumeric identifier for the post unique to its type.",6948 "type": "string",6949 "required": false6950 },6951 "status": {6952 "description": "A named status for the post.",6953 "type": "string",6954 "enum": [6955 "publish",6956 "future",6957 "draft",6958 "pending",6959 "private"6960 ],6961 "required": false6962 },6963 "password": {6964 "description": "A password to protect access to the content and excerpt.",6965 "type": "string",6966 "required": false6967 },6968 "title": {6969 "description": "The title for the post.",6970 "type": "object",6971 "properties": {6972 "raw": {6973 "description": "Title for the post, as it exists in the database.",6974 "type": "string",6975 "context": [6976 "edit",6977 "embed"6978 ]6979 },6980 "rendered": {6981 "description": "HTML title for the post, transformed for display.",6982 "type": "string",6983 "context": [6984 "view",6985 "edit",6986 "embed"6987 ],6988 "readonly": true6989 }6990 },6991 "required": false6992 },6993 "content": {6994 "description": "The content for the post.",6995 "type": "object",6996 "properties": {6997 "raw": {6998 "description": "Content for the post, as it exists in the database.",6999 "type": "string",7000 "context": [7001 "edit",7002 "embed"7003 ]7004 },7005 "rendered": {7006 "description": "HTML content for the post, transformed for display.",7007 "type": "string",7008 "context": [7009 "view",7010 "edit",7011 "embed"7012 ],7013 "readonly": true7014 },7015 "block_version": {7016 "description": "Version of the content block format used by the post.",7017 "type": "integer",7018 "context": [7019 "edit",7020 "embed"7021 ],7022 "readonly": true7023 },7024 "protected": {7025 "description": "Whether the content is protected with a password.",7026 "type": "boolean",7027 "context": [7028 "view",7029 "edit",7030 "embed"7031 ],7032 "readonly": true7033 }7034 },7035 "required": false7036 },7037 "template": {7038 "description": "The theme file to use to display the post.",7039 "type": "string",7040 "required": false7041 }7042 }7043 },7044 {7045 "methods": [7046 "DELETE"7047 ],7048 "allow_batch": {7049 "v1": true7050 },7051 "args": {7052 "id": {7053 "description": "Unique identifier for the post.",7054 "type": "integer",7055 "required": false7056 },7057 "force": {7058 "type": "boolean",7059 "default": false,7060 "description": "Whether to bypass Trash and force deletion.",7061 "required": false7062 }7063 }7064 }7065 ]7066 },7067 "/wp/v2/navigation/(?P<parent>[\\d]+)/revisions": {7068 "namespace": "wp/v2",7069 "methods": [7070 "GET"7071 ],7072 "endpoints": [7073 {7074 "methods": [7075 "GET"7076 ],7077 "args": {7078 "parent": {7079 "description": "The ID for the parent of the revision.",7080 "type": "integer",7081 "required": false7082 },7083 "context": {7084 "description": "Scope under which the request is made; determines fields present in response.",7085 "type": "string",7086 "enum": [7087 "view",7088 "embed",7089 "edit"7090 ],7091 "default": "view",7092 "required": false7093 },7094 "page": {7095 "description": "Current page of the collection.",7096 "type": "integer",7097 "default": 1,7098 "minimum": 1,7099 "required": false7100 },7101 "per_page": {7102 "description": "Maximum number of items to be returned in result set.",7103 "type": "integer",7104 "minimum": 1,7105 "maximum": 100,7106 "required": false7107 },7108 "search": {7109 "description": "Limit results to those matching a string.",7110 "type": "string",7111 "required": false7112 },7113 "exclude": {7114 "description": "Ensure result set excludes specific IDs.",7115 "type": "array",7116 "items": {7117 "type": "integer"7118 },7119 "default": [],7120 "required": false7121 },7122 "include": {7123 "description": "Limit result set to specific IDs.",7124 "type": "array",7125 "items": {7126 "type": "integer"7127 },7128 "default": [],7129 "required": false7130 },7131 "offset": {7132 "description": "Offset the result set by a specific number of items.",7133 "type": "integer",7134 "required": false7135 },7136 "order": {7137 "description": "Order sort attribute ascending or descending.",7138 "type": "string",7139 "default": "desc",7140 "enum": [7141 "asc",7142 "desc"7143 ],7144 "required": false7145 },7146 "orderby": {7147 "description": "Sort collection by object attribute.",7148 "type": "string",7149 "default": "date",7150 "enum": [7151 "date",7152 "id",7153 "include",7154 "relevance",7155 "slug",7156 "include_slugs",7157 "title"7158 ],7159 "required": false7160 }7161 }7162 }7163 ]7164 },7165 "/wp/v2/navigation/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": {7166 "namespace": "wp/v2",7167 "methods": [7168 "GET",7169 "DELETE"7170 ],7171 "endpoints": [7172 {7173 "methods": [7174 "GET"7175 ],7176 "args": {7177 "parent": {7178 "description": "The ID for the parent of the revision.",7179 "type": "integer",7180 "required": false7181 },7182 "id": {7183 "description": "Unique identifier for the revision.",7184 "type": "integer",7185 "required": false7186 },7187 "context": {7188 "description": "Scope under which the request is made; determines fields present in response.",7189 "type": "string",7190 "enum": [7191 "view",7192 "embed",7193 "edit"7194 ],7195 "default": "view",7196 "required": false7197 }7198 }7199 },7200 {7201 "methods": [7202 "DELETE"7203 ],7204 "args": {7205 "parent": {7206 "description": "The ID for the parent of the revision.",7207 "type": "integer",7208 "required": false7209 },7210 "id": {7211 "description": "Unique identifier for the revision.",7212 "type": "integer",7213 "required": false7214 },7215 "force": {7216 "type": "boolean",7217 "default": false,7218 "description": "Required to be true, as revisions do not support trashing.",7219 "required": false7220 }7221 }7222 }7223 ]7224 },7225 "/wp/v2/navigation/(?P<id>[\\d]+)/autosaves": {7226 "namespace": "wp/v2",7227 "methods": [7228 "GET",7229 "POST"7230 ],7231 "endpoints": [7232 {7233 "methods": [7234 "GET"7235 ],7236 "args": {7237 "parent": {7238 "description": "The ID for the parent of the autosave.",7239 "type": "integer",7240 "required": false7241 },7242 "context": {7243 "description": "Scope under which the request is made; determines fields present in response.",7244 "type": "string",7245 "enum": [7246 "view",7247 "embed",7248 "edit"7249 ],7250 "default": "view",7251 "required": false7252 }7253 }7254 },7255 {7256 "methods": [7257 "POST"7258 ],7259 "args": {7260 "parent": {7261 "description": "The ID for the parent of the autosave.",7262 "type": "integer",7263 "required": false7264 },7265 "date": {7266 "description": "The date the post was published, in the site's timezone.",7267 "type": [7268 "string",7269 "null"7270 ],7271 "format": "date-time",7272 "required": false7273 },7274 "date_gmt": {7275 "description": "The date the post was published, as GMT.",7276 "type": [7277 "string",7278 "null"7279 ],7280 "format": "date-time",7281 "required": false7282 },7283 "slug": {7284 "description": "An alphanumeric identifier for the post unique to its type.",7285 "type": "string",7286 "required": false7287 },7288 "status": {7289 "description": "A named status for the post.",7290 "type": "string",7291 "enum": [7292 "publish",7293 "future",7294 "draft",7295 "pending",7296 "private"7297 ],7298 "required": false7299 },7300 "password": {7301 "description": "A password to protect access to the content and excerpt.",7302 "type": "string",7303 "required": false7304 },7305 "title": {7306 "description": "The title for the post.",7307 "type": "object",7308 "properties": {7309 "raw": {7310 "description": "Title for the post, as it exists in the database.",7311 "type": "string",7312 "context": [7313 "edit",7314 "embed"7315 ]7316 },7317 "rendered": {7318 "description": "HTML title for the post, transformed for display.",7319 "type": "string",7320 "context": [7321 "view",7322 "edit",7323 "embed"7324 ],7325 "readonly": true7326 }7327 },7328 "required": false7329 },7330 "content": {7331 "description": "The content for the post.",7332 "type": "object",7333 "properties": {7334 "raw": {7335 "description": "Content for the post, as it exists in the database.",7336 "type": "string",7337 "context": [7338 "edit",7339 "embed"7340 ]7341 },7342 "rendered": {7343 "description": "HTML content for the post, transformed for display.",7344 "type": "string",7345 "context": [7346 "view",7347 "edit",7348 "embed"7349 ],7350 "readonly": true7351 },7352 "block_version": {7353 "description": "Version of the content block format used by the post.",7354 "type": "integer",7355 "context": [7356 "edit",7357 "embed"7358 ],7359 "readonly": true7360 },7361 "protected": {7362 "description": "Whether the content is protected with a password.",7363 "type": "boolean",7364 "context": [7365 "view",7366 "edit",7367 "embed"7368 ],7369 "readonly": true7370 }7371 },7372 "required": false7373 },7374 "template": {7375 "description": "The theme file to use to display the post.",7376 "type": "string",7377 "required": false7378 }7379 }7380 }7381 ]7382 },7383 "/wp/v2/navigation/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": {7384 "namespace": "wp/v2",7385 "methods": [7386 "GET"7387 ],7388 "endpoints": [7389 {7390 "methods": [7391 "GET"7392 ],7393 "args": {7394 "parent": {7395 "description": "The ID for the parent of the autosave.",7396 "type": "integer",7397 "required": false7398 },7399 "id": {7400 "description": "The ID for the autosave.",7401 "type": "integer",7402 "required": false7403 },7404 "context": {7405 "description": "Scope under which the request is made; determines fields present in response.",7406 "type": "string",7407 "enum": [7408 "view",7409 "embed",7410 "edit"7411 ],7412 "default": "view",7413 "required": false7414 }7415 }7416 }7417 ]7418 },7419 7419 "/wp/v2/types": { 7420 7420 "namespace": "wp/v2", … … 8781 8781 "post": "post", 8782 8782 "page": "page", 8783 "attachment": "attachment",8784 8783 "nav_menu_item": "nav_menu_item", 8785 8784 "wp_block": "wp_block", 8786 8785 "wp_template": "wp_template", 8787 8786 "wp_template_part": "wp_template_part", 8788 "wp_navigation": "wp_navigation" 8787 "wp_navigation": "wp_navigation", 8788 "attachment": "attachment" 8789 8789 } 8790 8790 }, … … 12353 12353 } 12354 12354 }, 12355 "attachment": {12356 "description": "",12357 "hierarchical": false,12358 "has_archive": false,12359 "name": "Media",12360 "slug": "attachment",12361 "icon": "dashicons-admin-media",12362 "taxonomies": [],12363 "rest_base": "media",12364 "rest_namespace": "wp/v2",12365 "_links": {12366 "collection": [12367 {12368 "href": "http://example.org/index.php?rest_route=/wp/v2/types"12369 }12370 ],12371 "wp:items": [12372 {12373 "href": "http://example.org/index.php?rest_route=/wp/v2/media"12374 }12375 ],12376 "curies": [12377 {12378 "name": "wp",12379 "href": "https://api.w.org/{rel}",12380 "templated": true12381 }12382 ]12383 }12384 },12385 12355 "nav_menu_item": { 12386 12356 "description": "", … … 12526 12496 { 12527 12497 "href": "http://example.org/index.php?rest_route=/wp/v2/navigation" 12498 } 12499 ], 12500 "curies": [ 12501 { 12502 "name": "wp", 12503 "href": "https://api.w.org/{rel}", 12504 "templated": true 12505 } 12506 ] 12507 } 12508 }, 12509 "attachment": { 12510 "description": "", 12511 "hierarchical": false, 12512 "has_archive": false, 12513 "name": "Media", 12514 "slug": "attachment", 12515 "icon": "dashicons-admin-media", 12516 "taxonomies": [], 12517 "rest_base": "media", 12518 "rest_namespace": "wp/v2", 12519 "_links": { 12520 "collection": [ 12521 { 12522 "href": "http://example.org/index.php?rest_route=/wp/v2/types" 12523 } 12524 ], 12525 "wp:items": [ 12526 { 12527 "href": "http://example.org/index.php?rest_route=/wp/v2/media" 12528 12528 } 12529 12529 ],
Note: See TracChangeset
for help on using the changeset viewer.