Changeset 61178
- Timestamp:
- 11/07/2025 12:41:01 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 14 edited
-
src/wp-admin/site-editor.php (modified) (1 diff)
-
src/wp-includes/block-template-utils.php (modified) (6 diffs)
-
src/wp-includes/block-template.php (modified) (1 diff)
-
src/wp-includes/default-filters.php (modified) (3 diffs)
-
src/wp-includes/option.php (modified) (1 diff)
-
src/wp-includes/post.php (modified) (5 diffs)
-
src/wp-includes/rest-api.php (modified) (1 diff)
-
src/wp-includes/rest-api/endpoints/class-wp-rest-registered-templates-controller.php (deleted)
-
src/wp-includes/theme-templates.php (modified) (1 diff)
-
src/wp-settings.php (modified) (1 diff)
-
tests/phpunit/tests/rest-api/rest-schema-setup.php (modified) (1 diff)
-
tests/phpunit/tests/rest-api/rest-settings-controller.php (modified) (1 diff)
-
tests/phpunit/tests/rest-api/wpRestTemplateAutosavesController.php (modified) (1 diff)
-
tests/phpunit/tests/rest-api/wpRestTemplateRevisionsController.php (modified) (1 diff)
-
tests/qunit/fixtures/wp-api-generated.js (modified) (24 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/site-editor.php
r61078 r61178 245 245 } 246 246 } 247 } elseif ( isset( $_GET['p'] ) && '/' !== $_GET['p'] ) { 248 // Only prefetch for the root. If we preload it for all pages and it's not 249 // used it won't be possible to invalidate. 247 } else { 250 248 $preload_paths[] = '/wp/v2/templates/lookup?slug=front-page'; 251 249 $preload_paths[] = '/wp/v2/templates/lookup?slug=home'; -
trunk/src/wp-includes/block-template-utils.php
r61078 r61178 1075 1075 } 1076 1076 1077 function get_registered_block_templates( $query ) {1078 $template_files = _get_block_templates_files( 'wp_template', $query );1079 $query_result = array();1080 1081 // _get_block_templates_files seems broken, it does not obey the query.1082 if ( isset( $query['slug__in'] ) && is_array( $query['slug__in'] ) ) {1083 $template_files = array_filter(1084 $template_files,1085 function ( $template_file ) use ( $query ) {1086 return in_array( $template_file['slug'], $query['slug__in'], true );1087 }1088 );1089 }1090 1091 foreach ( $template_files as $template_file ) {1092 $query_result[] = _build_block_template_result_from_file( $template_file, 'wp_template' );1093 }1094 1095 // Add templates registered through the template registry. Filtering out the1096 // ones which have a theme file.1097 $registered_templates = WP_Block_Templates_Registry::get_instance()->get_by_query( $query );1098 $matching_registered_templates = array_filter(1099 $registered_templates,1100 function ( $registered_template ) use ( $template_files ) {1101 foreach ( $template_files as $template_file ) {1102 if ( $template_file['slug'] === $registered_template->slug ) {1103 return false;1104 }1105 }1106 return true;1107 }1108 );1109 1110 $query_result = array_merge( $query_result, $matching_registered_templates );1111 1112 // Templates added by PHP filter also count as registered templates.1113 /** This filter is documented in wp-includes/block-template-utils.php */1114 return apply_filters( 'get_block_templates', $query_result, $query, 'wp_template' );1115 }1116 1117 1077 /** 1118 1078 * Retrieves a list of unified template objects based on a query. … … 1193 1153 } 1194 1154 1195 $active_templates = get_option( 'active_templates', array() );1196 1197 1155 $template_query = new WP_Query( $wp_query_args ); 1198 1156 $query_result = array(); … … 1216 1174 } 1217 1175 1218 if ( $template->is_custom || isset( $query['wp_id'] ) ) { 1219 // Custom templates don't need to be activated, leave them be. 1220 // Also don't filter out templates when querying by wp_id. 1221 $query_result[] = $template; 1222 } elseif ( isset( $active_templates[ $template->slug ] ) && $active_templates[ $template->slug ] === $post->ID ) { 1223 // Only include active templates. 1224 $query_result[] = $template; 1225 } 1176 $query_result[] = $template; 1226 1177 } 1227 1178 … … 1346 1297 } 1347 1298 list( $theme, $slug ) = $parts; 1348 1349 $active_templates = get_option( 'active_templates', array() ); 1350 1351 if ( ! empty( $active_templates[ $slug ] ) ) { 1352 if ( is_int( $active_templates[ $slug ] ) ) { 1353 $post = get_post( $active_templates[ $slug ] ); 1354 if ( $post && 'publish' === $post->post_status ) { 1355 $template = _build_block_template_result_from_post( $post ); 1356 1357 if ( ! is_wp_error( $template ) && $theme === $template->theme ) { 1358 return $template; 1359 } 1360 } 1361 } 1362 } 1363 1364 $wp_query_args = array( 1299 $wp_query_args = array( 1365 1300 'post_name__in' => array( $slug ), 1366 1301 'post_type' => $template_type, … … 1376 1311 ), 1377 1312 ); 1378 $template_query = new WP_Query( $wp_query_args );1379 $posts = $template_query->posts;1313 $template_query = new WP_Query( $wp_query_args ); 1314 $posts = $template_query->posts; 1380 1315 1381 1316 if ( count( $posts ) > 0 ) { 1382 1317 $template = _build_block_template_result_from_post( $posts[0] ); 1383 1384 // Custom templates don't need to be activated, so if it's a custom1385 // template, return it.1386 if ( ! is_wp_error( $template ) && $template->is_custom ) {1387 return $template;1388 }1389 1318 1390 1319 if ( ! is_wp_error( $template ) ) { … … 1851 1780 return $changes; 1852 1781 } 1853 1854 function wp_assign_new_template_to_theme( $changes, $request ) {1855 // Do not run this for templates created through the old enpoint.1856 $template = $request['id'] ? get_block_template( $request['id'], 'wp_template' ) : null;1857 if ( $template ) {1858 return $changes;1859 }1860 if ( ! isset( $changes->tax_input ) ) {1861 $changes->tax_input = array();1862 }1863 $changes->tax_input['wp_theme'] = isset( $request['theme'] ) ? $request['theme'] : get_stylesheet();1864 // All new templates saved will receive meta so we can distinguish between1865 // templates created the old way as edits and templates created the new way.1866 if ( ! isset( $changes->meta_input ) ) {1867 $changes->meta_input = array();1868 }1869 $changes->meta_input['is_inactive_by_default'] = true;1870 return $changes;1871 }1872 1873 function wp_maybe_activate_template( $post_id ) {1874 $post = get_post( $post_id );1875 $is_inactive_by_default = get_post_meta( $post_id, 'is_inactive_by_default', true );1876 if ( $is_inactive_by_default ) {1877 return;1878 }1879 $active_templates = get_option( 'active_templates', array() );1880 $active_templates[ $post->post_name ] = $post->ID;1881 update_option( 'active_templates', $active_templates );1882 }1883 1884 function _wp_migrate_active_templates() {1885 // Do not run during installation when the database is not yet available.1886 if ( wp_installing() ) {1887 return;1888 }1889 1890 $active_templates = get_option( 'active_templates', false );1891 1892 if ( false !== $active_templates ) {1893 return;1894 }1895 1896 // Query all templates in the database. See `get_block_templates`.1897 $wp_query_args = array(1898 'post_status' => 'publish',1899 'post_type' => 'wp_template',1900 'posts_per_page' => -1,1901 'no_found_rows' => true,1902 'lazy_load_term_meta' => false,1903 'tax_query' => array(1904 array(1905 'taxonomy' => 'wp_theme',1906 'field' => 'name',1907 'terms' => get_stylesheet(),1908 ),1909 ),1910 // Only get templates that are not inactive by default. We check these1911 // meta to make sure we don't fill the option with inactive templates1912 // created after the 6.9 release when for some reason the option is1913 // deleted.1914 'meta_query' => array(1915 'relation' => 'OR',1916 array(1917 'key' => 'is_inactive_by_default',1918 'compare' => 'NOT EXISTS',1919 ),1920 array(1921 'key' => 'is_inactive_by_default',1922 'value' => false,1923 'compare' => '=',1924 ),1925 ),1926 );1927 1928 $template_query = new WP_Query( $wp_query_args );1929 $active_templates = array();1930 1931 foreach ( $template_query->posts as $post ) {1932 $active_templates[ $post->post_name ] = $post->ID;1933 }1934 1935 update_option( 'active_templates', $active_templates );1936 } -
trunk/src/wp-includes/block-template.php
r61078 r61178 165 165 ); 166 166 167 $object_id = get_queried_object_id(); 168 $specific_template = $object_id && get_post( $object_id ) ? get_page_template_slug( $object_id ) : null; 169 $active_templates = (array) get_option( 'active_templates', array() ); 170 171 // We expect one template for each slug. Use the active template if it is 172 // set and exists. Otherwise use the static template. 173 $templates = array(); 174 $remaining_slugs = array(); 175 176 foreach ( $slugs as $slug ) { 177 if ( $slug === $specific_template || empty( $active_templates[ $slug ] ) ) { 178 $remaining_slugs[] = $slug; 179 continue; 180 } 181 182 // TODO: it need to be possible to set a static template as active. 183 $post = get_post( $active_templates[ $slug ] ); 184 if ( ! $post || 'publish' !== $post->post_status ) { 185 $remaining_slugs[] = $slug; 186 continue; 187 } 188 189 $template = _build_block_template_result_from_post( $post ); 190 191 // Ensure the active templates are associated with the active theme. 192 // See _build_block_template_object_from_post_object. 193 if ( get_stylesheet() !== $template->theme ) { 194 $remaining_slugs[] = $slug; 195 continue; 196 } 197 198 $templates[] = $template; 199 } 200 201 // Apply the filter to the active templates for backward compatibility. 202 /** This filter is documented in wp-includes/block-template-utils.php */ 203 if ( ! empty( $templates ) ) { 204 $templates = apply_filters( 205 'get_block_templates', 206 $templates, 207 array( 208 'slug__in' => array_map( 209 function ( $template ) { 210 return $template->slug; 211 }, 212 $templates 213 ), 214 ), 215 'wp_template' 216 ); 217 } 218 219 // For any remaining slugs, use the static template. 167 // Find all potential templates 'wp_template' post matching the hierarchy. 220 168 $query = array( 221 'slug__in' => $ remaining_slugs,169 'slug__in' => $slugs, 222 170 ); 223 $templates = array_merge( $templates, get_registered_block_templates( $query ) ); 224 225 if ( $specific_template && in_array( $specific_template, $remaining_slugs, true ) ) { 226 $templates = array_merge( $templates, get_block_templates( array( 'slug__in' => array( $specific_template ) ) ) ); 227 } 171 $templates = get_block_templates( $query ); 228 172 229 173 // Order these templates per slug priority. -
trunk/src/wp-includes/default-filters.php
r61119 r61178 572 572 // Post. 573 573 add_action( 'init', 'create_initial_post_types', 0 ); // Highest priority. 574 add_action( 'init', '_wp_migrate_active_templates', 0 ); // Highest priority.575 574 add_action( 'admin_menu', '_add_post_type_submenus' ); 576 575 add_action( 'before_delete_post', '_reset_front_page_settings_for_post' ); … … 748 747 add_filter( 'render_block_context', '_block_template_render_without_post_block_context' ); 749 748 add_filter( 'pre_wp_unique_post_slug', 'wp_filter_wp_template_unique_post_slug', 10, 5 ); 750 add_action( 'save_post_wp_template', 'wp_maybe_activate_template' );751 749 add_action( 'save_post_wp_template_part', 'wp_set_unique_slug_on_create_template_part' ); 752 750 add_action( 'wp_enqueue_scripts', 'wp_enqueue_block_template_skip_link' ); … … 789 787 add_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes' ); 790 788 791 // Assign the wp_theme term to any newly created wp_template with the new endpoint.792 // Must run before `inject_ignored_hooked_blocks_metadata_attributes`.793 add_action( 'rest_pre_insert_wp_template', 'wp_assign_new_template_to_theme', 9, 2 );794 795 789 // Update ignoredHookedBlocks postmeta for some post types. 796 790 add_filter( 'rest_pre_insert_page', 'update_ignored_hooked_blocks_postmeta' ); -
trunk/src/wp-includes/option.php
r61029 r61178 2960 2960 ) 2961 2961 ); 2962 2963 register_setting(2964 'reading',2965 'active_templates',2966 array(2967 'type' => 'object',2968 // Do not set the default value to an empty array! For some reason2969 // that will prevent the option from being set to an empty array.2970 'show_in_rest' => array(2971 'schema' => array(2972 'type' => 'object',2973 // Properties can be integers, strings, or false2974 // (deactivated).2975 'additionalProperties' => true,2976 ),2977 ),2978 'label' => 'Active Templates',2979 )2980 );2981 2962 } 2982 2963 -
trunk/src/wp-includes/post.php
r61172 r61178 369 369 'wp_template', 370 370 array( 371 'labels' => array(371 'labels' => array( 372 372 'name' => _x( 'Templates', 'post type general name' ), 373 373 'singular_name' => _x( 'Template', 'post type singular name' ), … … 390 390 'item_updated' => __( 'Template updated.' ), 391 391 ), 392 'description' => __( 'Templates to include in your theme.' ), 393 'public' => false, 394 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 395 '_edit_link' => $template_edit_link, /* internal use only. don't use this when registering your own post type. */ 396 'has_archive' => false, 397 'show_ui' => false, 398 'show_in_menu' => false, 399 'show_in_rest' => true, 400 'rewrite' => false, 401 'rest_base' => 'created-templates', 402 'rest_controller_class' => 'WP_REST_Posts_Controller', 403 'late_route_registration' => true, 404 'capability_type' => array( 'template', 'templates' ), 405 'capabilities' => array( 392 'description' => __( 'Templates to include in your theme.' ), 393 'public' => false, 394 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 395 '_edit_link' => $template_edit_link, /* internal use only. don't use this when registering your own post type. */ 396 'has_archive' => false, 397 'show_ui' => false, 398 'show_in_menu' => false, 399 'show_in_rest' => true, 400 'rewrite' => false, 401 'rest_base' => 'templates', 402 'rest_controller_class' => 'WP_REST_Templates_Controller', 403 'autosave_rest_controller_class' => 'WP_REST_Template_Autosaves_Controller', 404 'revisions_rest_controller_class' => 'WP_REST_Template_Revisions_Controller', 405 'late_route_registration' => true, 406 'capability_type' => array( 'template', 'templates' ), 407 'capabilities' => array( 406 408 'create_posts' => 'edit_theme_options', 407 409 'delete_posts' => 'edit_theme_options', … … 417 419 'read_private_posts' => 'edit_theme_options', 418 420 ), 419 'map_meta_cap' => true,420 'supports' => array(421 'map_meta_cap' => true, 422 'supports' => array( 421 423 'title', 422 424 'slug', … … 425 427 'revisions', 426 428 'author', 427 'custom-fields',428 429 ), 429 430 ) … … 8636 8637 ) 8637 8638 ); 8638 8639 // Allow setting the is_wp_suggestion meta field, which partly determines if 8640 // a template is a custom template. 8641 register_post_meta( 8642 'wp_template', 8643 'is_wp_suggestion', 8644 array( 8645 'type' => 'boolean', 8646 'show_in_rest' => true, 8647 'single' => true, 8648 ) 8649 ); 8650 } 8639 } -
trunk/src/wp-includes/rest-api.php
r61078 r61178 290 290 } 291 291 292 global $wp_post_types;293 294 // Register the old templates endpoints. The WP_REST_Templates_Controller295 // and sub-controllers used linked to the wp_template post type, but are no296 // longer. They still require a post type object when contructing the class.297 // To maintain backward and changes to these controller classes, we make use298 // that the wp_template post type has the right information it needs.299 $current_wp_template_rest_base = $wp_post_types['wp_template']->rest_base;300 $wp_post_types['wp_template']->rest_base = 'templates';301 // Store the classes so they can be restored.302 $original_rest_controller_class = $wp_post_types['wp_template']->rest_controller_class;303 $original_autosave_rest_controller_class = $wp_post_types['wp_template']->autosave_rest_controller_class;304 $original_revisions_rest_controller_class = $wp_post_types['wp_template']->revisions_rest_controller_class;305 // Temporarily set the old classes.306 $wp_post_types['wp_template']->rest_controller_class = 'WP_REST_Templates_Controller';307 $wp_post_types['wp_template']->autosave_rest_controller_class = 'WP_REST_Template_Autosaves_Controller';308 $wp_post_types['wp_template']->revisions_rest_controller_class = 'WP_REST_Template_Revisions_Controller';309 // Initialize the controllers. The order is important: the autosave310 // controller needs both the templates and revisions controllers.311 $controller = new WP_REST_Templates_Controller( 'wp_template' );312 $wp_post_types['wp_template']->rest_controller = $controller;313 $revisions_controller = new WP_REST_Template_Revisions_Controller( 'wp_template' );314 $wp_post_types['wp_template']->revisions_rest_controller = $revisions_controller;315 $autosaves_controller = new WP_REST_Template_Autosaves_Controller( 'wp_template' );316 // Unset the controller cache, it will be re-initialized when317 // get_rest_controller is called.318 $wp_post_types['wp_template']->rest_controller = null;319 $wp_post_types['wp_template']->revisions_rest_controller = null;320 // Restore the original classes.321 $wp_post_types['wp_template']->rest_controller_class = $original_rest_controller_class;322 $wp_post_types['wp_template']->autosave_rest_controller_class = $original_autosave_rest_controller_class;323 $wp_post_types['wp_template']->revisions_rest_controller_class = $original_revisions_rest_controller_class;324 // Restore the original base.325 $wp_post_types['wp_template']->rest_base = $current_wp_template_rest_base;326 327 // Register the old routes.328 $autosaves_controller->register_routes();329 $revisions_controller->register_routes();330 $controller->register_routes();331 332 register_rest_field(333 'wp_template',334 'theme',335 array(336 'get_callback' => function ( $post_arr ) {337 // add_additional_fields_to_object is also called for the old338 // templates controller, so we need to check if the id is an339 // integer to make sure it's the proper post type endpoint.340 if ( ! is_int( $post_arr['id'] ) ) {341 $template = get_block_template( $post_arr['id'], 'wp_template' );342 return $template ? $template->theme : null;343 }344 $terms = get_the_terms( $post_arr['id'], 'wp_theme' );345 if ( is_wp_error( $terms ) || empty( $terms ) ) {346 return null;347 }348 return $terms[0]->slug;349 },350 )351 );352 353 // Registered templates.354 $controller = new WP_REST_Registered_Templates_Controller();355 $controller->register_routes();356 357 292 // Post types. 358 293 $controller = new WP_REST_Post_Types_Controller(); -
trunk/src/wp-includes/theme-templates.php
r61054 r61178 48 48 if ( 'wp_template' !== $post_type && 'wp_template_part' !== $post_type ) { 49 49 return $override_slug; 50 }51 52 // For wp_template, slugs no longer have to be unique within the same theme.53 if ( 'wp_template' === $post_type ) {54 return $slug;55 50 } 56 51 -
trunk/src/wp-settings.php
r61068 r61178 332 332 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widgets-controller.php'; 333 333 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-templates-controller.php'; 334 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-registered-templates-controller.php';335 334 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-url-details-controller.php'; 336 335 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-navigation-fallback-controller.php'; -
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r61078 r61178 158 158 '/wp/v2/templates/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions', 159 159 '/wp/v2/templates/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions/(?P<id>[\d]+)', 160 '/wp/v2/registered-templates',161 '/wp/v2/registered-templates/(?P<id>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)',162 '/wp/v2/created-templates',163 '/wp/v2/created-templates/(?P<id>[\d]+)',164 '/wp/v2/created-templates/(?P<id>[\d]+)/autosaves',165 '/wp/v2/created-templates/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)',166 '/wp/v2/created-templates/(?P<parent>[\d]+)/revisions',167 '/wp/v2/created-templates/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)',168 160 '/wp/v2/templates/lookup', 169 161 '/wp/v2/themes', -
trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php
r61029 r61178 120 120 'default_comment_status', 121 121 'site_icon', // Registered in wp-includes/blocks/site-logo.php 122 'active_templates',123 122 ); 124 123 -
trunk/tests/phpunit/tests/rest-api/wpRestTemplateAutosavesController.php
r61029 r61178 590 590 $autosave_db_post = get_post( $autosave_post_id ); 591 591 $request = new WP_REST_Request( 'GET', '/wp/v2/' . $rest_base . '/' . $template_id . '/autosaves/' . $autosave_db_post->ID ); 592 // See create_initial_rest_routes. The controller need the post type 593 // with adjusted settings to initialize. 594 global $wp_post_types; 595 $wp_post_types['wp_template']->rest_base = 'templates'; 596 $original_rest_controller_class = $wp_post_types['wp_template']->rest_controller_class; 597 $original_revisions_rest_controller_class = $wp_post_types['wp_template']->revisions_rest_controller_class; 598 $wp_post_types['wp_template']->rest_controller_class = 'WP_REST_Templates_Controller'; 599 $wp_post_types['wp_template']->revisions_rest_controller_class = 'WP_REST_Template_Revisions_Controller'; 600 $wp_post_types['wp_template']->rest_controller = null; 601 $wp_post_types['wp_template']->revisions_rest_controller = null; 602 $controller = new WP_REST_Template_Autosaves_Controller( $parent_post->post_type ); 603 $wp_post_types['wp_template']->rest_controller_class = $original_rest_controller_class; 604 $wp_post_types['wp_template']->revisions_rest_controller_class = $original_revisions_rest_controller_class; 605 $wp_post_types['wp_template']->rest_base = 'wp_template'; 606 $response = $controller->prepare_item_for_response( $autosave_db_post, $request ); 592 $controller = new WP_REST_Template_Autosaves_Controller( $parent_post->post_type ); 593 $response = $controller->prepare_item_for_response( $autosave_db_post, $request ); 607 594 $this->assertInstanceOf( 608 595 WP_REST_Response::class, -
trunk/tests/phpunit/tests/rest-api/wpRestTemplateRevisionsController.php
r61029 r61178 831 831 $post = get_post( $revision_id ); 832 832 $request = new WP_REST_Request( 'GET', '/wp/v2/' . $rest_base . '/' . $template_id . '/revisions/' . $revision_id ); 833 // See create_initial_rest_routes. The controller need the post type 834 // with adjusted settings to initialize. 835 global $wp_post_types; 836 $wp_post_types['wp_template']->rest_base = 'templates'; 837 $original_rest_controller_class = $wp_post_types['wp_template']->rest_controller_class; 838 $wp_post_types['wp_template']->rest_controller_class = 'WP_REST_Templates_Controller'; 839 $wp_post_types['wp_template']->rest_controller = null; 840 $controller = new WP_REST_Template_Revisions_Controller( $parent_post->post_type ); 841 $wp_post_types['wp_template']->rest_controller_class = $original_rest_controller_class; 842 $wp_post_types['wp_template']->rest_base = 'wp_template'; 843 $response = $controller->prepare_item_for_response( $post, $request ); 833 $controller = new WP_REST_Template_Revisions_Controller( $parent_post->post_type ); 834 $response = $controller->prepare_item_for_response( $post, $request ); 844 835 $this->assertInstanceOf( 845 836 WP_REST_Response::class, -
trunk/tests/qunit/fixtures/wp-api-generated.js
r61078 r61178 5509 5509 ] 5510 5510 }, 5511 "/wp/v2/ created-templates/(?P<parent>[\\d]+)/revisions": {5511 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { 5512 5512 "namespace": "wp/v2", 5513 5513 "methods": [ … … 5521 5521 "args": { 5522 5522 "parent": { 5523 "description": "The ID for the parent of the revision.",5524 "type": " integer",5523 "description": "The id of a template", 5524 "type": "string", 5525 5525 "required": false 5526 5526 }, … … 5607 5607 ] 5608 5608 }, 5609 "/wp/v2/ created-templates/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": {5609 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": { 5610 5610 "namespace": "wp/v2", 5611 5611 "methods": [ … … 5620 5620 "args": { 5621 5621 "parent": { 5622 "description": "The ID for the parent of the revision.",5623 "type": " integer",5622 "description": "The id of a template", 5623 "type": "string", 5624 5624 "required": false 5625 5625 }, … … 5648 5648 "args": { 5649 5649 "parent": { 5650 "description": "The ID for the parent of the revision.",5651 "type": " integer",5650 "description": "The id of a template", 5651 "type": "string", 5652 5652 "required": false 5653 5653 }, … … 5667 5667 ] 5668 5668 }, 5669 "/wp/v2/ created-templates/(?P<id>[\\d]+)/autosaves": {5669 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { 5670 5670 "namespace": "wp/v2", 5671 5671 "methods": [ … … 5679 5679 ], 5680 5680 "args": { 5681 " parent": {5682 "description": "The ID for the parent of the autosave.",5683 "type": " integer",5681 "id": { 5682 "description": "The id of a template", 5683 "type": "string", 5684 5684 "required": false 5685 5685 }, … … 5702 5702 ], 5703 5703 "args": { 5704 "parent": { 5705 "description": "The ID for the parent of the autosave.", 5706 "type": "integer", 5707 "required": false 5708 }, 5709 "date": { 5710 "description": "The date the post was published, in the site's timezone.", 5704 "id": { 5705 "description": "The id of a template", 5706 "type": "string", 5707 "required": false 5708 }, 5709 "slug": { 5710 "description": "Unique slug identifying the template.", 5711 "type": "string", 5712 "minLength": 1, 5713 "pattern": "[a-zA-Z0-9_\\%-]+", 5714 "required": false 5715 }, 5716 "theme": { 5717 "description": "Theme identifier for the template.", 5718 "type": "string", 5719 "required": false 5720 }, 5721 "type": { 5722 "description": "Type of template.", 5723 "type": "string", 5724 "required": false 5725 }, 5726 "content": { 5727 "description": "Content of template.", 5711 5728 "type": [ 5712 "string", 5713 "null" 5714 ], 5715 "format": "date-time", 5716 "required": false 5717 }, 5718 "date_gmt": { 5719 "description": "The date the post was published, as GMT.", 5720 "type": [ 5721 "string", 5722 "null" 5723 ], 5724 "format": "date-time", 5725 "required": false 5726 }, 5727 "slug": { 5728 "description": "An alphanumeric identifier for the post unique to its type.", 5729 "type": "string", 5730 "required": false 5731 }, 5732 "status": { 5733 "description": "A named status for the post.", 5734 "type": "string", 5735 "enum": [ 5736 "publish", 5737 "future", 5738 "draft", 5739 "pending", 5740 "private" 5741 ], 5742 "required": false 5743 }, 5744 "password": { 5745 "description": "A password to protect access to the content and excerpt.", 5746 "type": "string", 5747 "required": false 5748 }, 5749 "title": { 5750 "description": "The title for the post.", 5751 "type": "object", 5729 "object", 5730 "string" 5731 ], 5752 5732 "properties": { 5753 5733 "raw": { 5754 "description": " Title for the post, as it exists in the database.",5734 "description": "Content for the template, as it exists in the database.", 5755 5735 "type": "string", 5756 5736 "context": [ 5737 "view", 5757 5738 "edit" 5758 5739 ] 5759 5740 }, 5741 "block_version": { 5742 "description": "Version of the content block format used by the template.", 5743 "type": "integer", 5744 "context": [ 5745 "edit" 5746 ], 5747 "readonly": true 5748 } 5749 }, 5750 "required": false 5751 }, 5752 "title": { 5753 "description": "Title of template.", 5754 "type": [ 5755 "object", 5756 "string" 5757 ], 5758 "properties": { 5759 "raw": { 5760 "description": "Title for the template, as it exists in the database.", 5761 "type": "string", 5762 "context": [ 5763 "view", 5764 "edit", 5765 "embed" 5766 ] 5767 }, 5760 5768 "rendered": { 5761 "description": "HTML title for the post, transformed for display.",5769 "description": "HTML title for the template, transformed for display.", 5762 5770 "type": "string", 5763 5771 "context": [ … … 5771 5779 "required": false 5772 5780 }, 5781 "description": { 5782 "description": "Description of template.", 5783 "type": "string", 5784 "required": false 5785 }, 5786 "status": { 5787 "description": "Status of template.", 5788 "type": "string", 5789 "enum": [ 5790 "publish", 5791 "future", 5792 "draft", 5793 "pending", 5794 "private" 5795 ], 5796 "required": false 5797 }, 5798 "author": { 5799 "description": "The ID for the author of the template.", 5800 "type": "integer", 5801 "required": false 5802 } 5803 } 5804 } 5805 ] 5806 }, 5807 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": { 5808 "namespace": "wp/v2", 5809 "methods": [ 5810 "GET" 5811 ], 5812 "endpoints": [ 5813 { 5814 "methods": [ 5815 "GET" 5816 ], 5817 "args": { 5818 "parent": { 5819 "description": "The id of a template", 5820 "type": "string", 5821 "required": false 5822 }, 5823 "id": { 5824 "description": "The ID for the autosave.", 5825 "type": "integer", 5826 "required": false 5827 }, 5828 "context": { 5829 "description": "Scope under which the request is made; determines fields present in response.", 5830 "type": "string", 5831 "enum": [ 5832 "view", 5833 "embed", 5834 "edit" 5835 ], 5836 "default": "view", 5837 "required": false 5838 } 5839 } 5840 } 5841 ] 5842 }, 5843 "/wp/v2/templates": { 5844 "namespace": "wp/v2", 5845 "methods": [ 5846 "GET", 5847 "POST" 5848 ], 5849 "endpoints": [ 5850 { 5851 "methods": [ 5852 "GET" 5853 ], 5854 "args": { 5855 "context": { 5856 "description": "Scope under which the request is made; determines fields present in response.", 5857 "type": "string", 5858 "enum": [ 5859 "view", 5860 "embed", 5861 "edit" 5862 ], 5863 "default": "view", 5864 "required": false 5865 }, 5866 "wp_id": { 5867 "description": "Limit to the specified post id.", 5868 "type": "integer", 5869 "required": false 5870 }, 5871 "area": { 5872 "description": "Limit to the specified template part area.", 5873 "type": "string", 5874 "required": false 5875 }, 5876 "post_type": { 5877 "description": "Post type to get the templates for.", 5878 "type": "string", 5879 "required": false 5880 } 5881 } 5882 }, 5883 { 5884 "methods": [ 5885 "POST" 5886 ], 5887 "args": { 5888 "slug": { 5889 "description": "Unique slug identifying the template.", 5890 "type": "string", 5891 "minLength": 1, 5892 "pattern": "[a-zA-Z0-9_\\%-]+", 5893 "required": true 5894 }, 5895 "theme": { 5896 "description": "Theme identifier for the template.", 5897 "type": "string", 5898 "required": false 5899 }, 5900 "type": { 5901 "description": "Type of template.", 5902 "type": "string", 5903 "required": false 5904 }, 5773 5905 "content": { 5774 "description": "The content for the post.", 5775 "type": "object", 5906 "default": "", 5907 "description": "Content of template.", 5908 "type": [ 5909 "object", 5910 "string" 5911 ], 5776 5912 "properties": { 5777 5913 "raw": { 5778 "description": "Content for the post, as it exists in the database.",5914 "description": "Content for the template, as it exists in the database.", 5779 5915 "type": "string", 5780 5916 "context": [ 5917 "view", 5781 5918 "edit" 5782 5919 ] 5783 5920 }, 5784 "rendered": { 5785 "description": "HTML content for the post, transformed for display.", 5786 "type": "string", 5787 "context": [ 5788 "view", 5921 "block_version": { 5922 "description": "Version of the content block format used by the template.", 5923 "type": "integer", 5924 "context": [ 5789 5925 "edit" 5790 5926 ], 5791 5927 "readonly": true 5928 } 5929 }, 5930 "required": false 5931 }, 5932 "title": { 5933 "default": "", 5934 "description": "Title of template.", 5935 "type": [ 5936 "object", 5937 "string" 5938 ], 5939 "properties": { 5940 "raw": { 5941 "description": "Title for the template, as it exists in the database.", 5942 "type": "string", 5943 "context": [ 5944 "view", 5945 "edit", 5946 "embed" 5947 ] 5792 5948 }, 5793 "block_version": { 5794 "description": "Version of the content block format used by the post.", 5795 "type": "integer", 5796 "context": [ 5797 "edit" 5798 ], 5799 "readonly": true 5800 }, 5801 "protected": { 5802 "description": "Whether the content is protected with a password.", 5803 "type": "boolean", 5949 "rendered": { 5950 "description": "HTML title for the template, transformed for display.", 5951 "type": "string", 5804 5952 "context": [ 5805 5953 "view", … … 5812 5960 "required": false 5813 5961 }, 5962 "description": { 5963 "default": "", 5964 "description": "Description of template.", 5965 "type": "string", 5966 "required": false 5967 }, 5968 "status": { 5969 "default": "publish", 5970 "description": "Status of template.", 5971 "type": "string", 5972 "enum": [ 5973 "publish", 5974 "future", 5975 "draft", 5976 "pending", 5977 "private" 5978 ], 5979 "required": false 5980 }, 5814 5981 "author": { 5815 "description": "The ID for the author of the post.", 5816 "type": "integer", 5817 "required": false 5818 }, 5819 "excerpt": { 5820 "description": "The excerpt for the post.", 5821 "type": "object", 5982 "description": "The ID for the author of the template.", 5983 "type": "integer", 5984 "required": false 5985 } 5986 } 5987 } 5988 ], 5989 "_links": { 5990 "self": [ 5991 { 5992 "href": "http://example.org/index.php?rest_route=/wp/v2/templates" 5993 } 5994 ] 5995 } 5996 }, 5997 "/wp/v2/templates/lookup": { 5998 "namespace": "wp/v2", 5999 "methods": [ 6000 "GET" 6001 ], 6002 "endpoints": [ 6003 { 6004 "methods": [ 6005 "GET" 6006 ], 6007 "args": { 6008 "slug": { 6009 "description": "The slug of the template to get the fallback for", 6010 "type": "string", 6011 "required": true 6012 }, 6013 "is_custom": { 6014 "description": "Indicates if a template is custom or part of the template hierarchy", 6015 "type": "boolean", 6016 "required": false 6017 }, 6018 "template_prefix": { 6019 "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`", 6020 "type": "string", 6021 "required": false 6022 } 6023 } 6024 } 6025 ], 6026 "_links": { 6027 "self": [ 6028 { 6029 "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" 6030 } 6031 ] 6032 } 6033 }, 6034 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 6035 "namespace": "wp/v2", 6036 "methods": [ 6037 "GET", 6038 "POST", 6039 "PUT", 6040 "PATCH", 6041 "DELETE" 6042 ], 6043 "endpoints": [ 6044 { 6045 "methods": [ 6046 "GET" 6047 ], 6048 "args": { 6049 "id": { 6050 "description": "The id of a template", 6051 "type": "string", 6052 "required": false 6053 }, 6054 "context": { 6055 "description": "Scope under which the request is made; determines fields present in response.", 6056 "type": "string", 6057 "enum": [ 6058 "view", 6059 "embed", 6060 "edit" 6061 ], 6062 "default": "view", 6063 "required": false 6064 } 6065 } 6066 }, 6067 { 6068 "methods": [ 6069 "POST", 6070 "PUT", 6071 "PATCH" 6072 ], 6073 "args": { 6074 "id": { 6075 "description": "The id of a template", 6076 "type": "string", 6077 "required": false 6078 }, 6079 "slug": { 6080 "description": "Unique slug identifying the template.", 6081 "type": "string", 6082 "minLength": 1, 6083 "pattern": "[a-zA-Z0-9_\\%-]+", 6084 "required": false 6085 }, 6086 "theme": { 6087 "description": "Theme identifier for the template.", 6088 "type": "string", 6089 "required": false 6090 }, 6091 "type": { 6092 "description": "Type of template.", 6093 "type": "string", 6094 "required": false 6095 }, 6096 "content": { 6097 "description": "Content of template.", 6098 "type": [ 6099 "object", 6100 "string" 6101 ], 5822 6102 "properties": { 5823 6103 "raw": { 5824 "description": " Excerpt for the post, as it exists in the database.",6104 "description": "Content for the template, as it exists in the database.", 5825 6105 "type": "string", 5826 6106 "context": [ 6107 "view", 5827 6108 "edit" 5828 6109 ] 5829 6110 }, 5830 "rendered": { 5831 "description": "HTML excerpt for the post, transformed for display.", 6111 "block_version": { 6112 "description": "Version of the content block format used by the template.", 6113 "type": "integer", 6114 "context": [ 6115 "edit" 6116 ], 6117 "readonly": true 6118 } 6119 }, 6120 "required": false 6121 }, 6122 "title": { 6123 "description": "Title of template.", 6124 "type": [ 6125 "object", 6126 "string" 6127 ], 6128 "properties": { 6129 "raw": { 6130 "description": "Title for the template, as it exists in the database.", 5832 6131 "type": "string", 5833 6132 "context": [ … … 5835 6134 "edit", 5836 6135 "embed" 5837 ], 5838 "readonly": true 6136 ] 5839 6137 }, 5840 " protected": {5841 "description": " Whether the excerpt is protected with a password.",5842 "type": " boolean",6138 "rendered": { 6139 "description": "HTML title for the template, transformed for display.", 6140 "type": "string", 5843 6141 "context": [ 5844 6142 "view", … … 5851 6149 "required": false 5852 6150 }, 5853 "meta": { 5854 "description": "Meta fields.", 5855 "type": "object", 5856 "properties": [], 5857 "required": false 5858 }, 5859 "template": { 5860 "description": "The theme file to use to display the post.", 5861 "type": "string", 6151 "description": { 6152 "description": "Description of template.", 6153 "type": "string", 6154 "required": false 6155 }, 6156 "status": { 6157 "description": "Status of template.", 6158 "type": "string", 6159 "enum": [ 6160 "publish", 6161 "future", 6162 "draft", 6163 "pending", 6164 "private" 6165 ], 6166 "required": false 6167 }, 6168 "author": { 6169 "description": "The ID for the author of the template.", 6170 "type": "integer", 6171 "required": false 6172 } 6173 } 6174 }, 6175 { 6176 "methods": [ 6177 "DELETE" 6178 ], 6179 "args": { 6180 "id": { 6181 "description": "The id of a template", 6182 "type": "string", 6183 "required": false 6184 }, 6185 "force": { 6186 "type": "boolean", 6187 "default": false, 6188 "description": "Whether to bypass Trash and force deletion.", 5862 6189 "required": false 5863 6190 } … … 5866 6193 ] 5867 6194 }, 5868 "/wp/v2/ created-templates/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": {6195 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { 5869 6196 "namespace": "wp/v2", 5870 6197 "methods": [ … … 5878 6205 "args": { 5879 6206 "parent": { 5880 "description": "The ID for the parent of the autosave.", 5881 "type": "integer", 5882 "required": false 5883 }, 5884 "id": { 5885 "description": "The ID for the autosave.", 5886 "type": "integer", 6207 "description": "The id of a template", 6208 "type": "string", 5887 6209 "required": false 5888 6210 }, … … 5897 6219 "default": "view", 5898 6220 "required": false 6221 }, 6222 "page": { 6223 "description": "Current page of the collection.", 6224 "type": "integer", 6225 "default": 1, 6226 "minimum": 1, 6227 "required": false 6228 }, 6229 "per_page": { 6230 "description": "Maximum number of items to be returned in result set.", 6231 "type": "integer", 6232 "minimum": 1, 6233 "maximum": 100, 6234 "required": false 6235 }, 6236 "search": { 6237 "description": "Limit results to those matching a string.", 6238 "type": "string", 6239 "required": false 6240 }, 6241 "exclude": { 6242 "description": "Ensure result set excludes specific IDs.", 6243 "type": "array", 6244 "items": { 6245 "type": "integer" 6246 }, 6247 "default": [], 6248 "required": false 6249 }, 6250 "include": { 6251 "description": "Limit result set to specific IDs.", 6252 "type": "array", 6253 "items": { 6254 "type": "integer" 6255 }, 6256 "default": [], 6257 "required": false 6258 }, 6259 "offset": { 6260 "description": "Offset the result set by a specific number of items.", 6261 "type": "integer", 6262 "required": false 6263 }, 6264 "order": { 6265 "description": "Order sort attribute ascending or descending.", 6266 "type": "string", 6267 "default": "desc", 6268 "enum": [ 6269 "asc", 6270 "desc" 6271 ], 6272 "required": false 6273 }, 6274 "orderby": { 6275 "description": "Sort collection by object attribute.", 6276 "type": "string", 6277 "default": "date", 6278 "enum": [ 6279 "date", 6280 "id", 6281 "include", 6282 "relevance", 6283 "slug", 6284 "include_slugs", 6285 "title" 6286 ], 6287 "required": false 5899 6288 } 5900 6289 } … … 5902 6291 ] 5903 6292 }, 5904 "/wp/v2/created-templates": { 6293 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": { 6294 "namespace": "wp/v2", 6295 "methods": [ 6296 "GET", 6297 "DELETE" 6298 ], 6299 "endpoints": [ 6300 { 6301 "methods": [ 6302 "GET" 6303 ], 6304 "args": { 6305 "parent": { 6306 "description": "The id of a template", 6307 "type": "string", 6308 "required": false 6309 }, 6310 "id": { 6311 "description": "Unique identifier for the revision.", 6312 "type": "integer", 6313 "required": false 6314 }, 6315 "context": { 6316 "description": "Scope under which the request is made; determines fields present in response.", 6317 "type": "string", 6318 "enum": [ 6319 "view", 6320 "embed", 6321 "edit" 6322 ], 6323 "default": "view", 6324 "required": false 6325 } 6326 } 6327 }, 6328 { 6329 "methods": [ 6330 "DELETE" 6331 ], 6332 "args": { 6333 "parent": { 6334 "description": "The id of a template", 6335 "type": "string", 6336 "required": false 6337 }, 6338 "id": { 6339 "description": "Unique identifier for the revision.", 6340 "type": "integer", 6341 "required": false 6342 }, 6343 "force": { 6344 "type": "boolean", 6345 "default": false, 6346 "description": "Required to be true, as revisions do not support trashing.", 6347 "required": false 6348 } 6349 } 6350 } 6351 ] 6352 }, 6353 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { 5905 6354 "namespace": "wp/v2", 5906 6355 "methods": [ … … 5913 6362 "GET" 5914 6363 ], 6364 "args": { 6365 "id": { 6366 "description": "The id of a template", 6367 "type": "string", 6368 "required": false 6369 }, 6370 "context": { 6371 "description": "Scope under which the request is made; determines fields present in response.", 6372 "type": "string", 6373 "enum": [ 6374 "view", 6375 "embed", 6376 "edit" 6377 ], 6378 "default": "view", 6379 "required": false 6380 } 6381 } 6382 }, 6383 { 6384 "methods": [ 6385 "POST" 6386 ], 6387 "args": { 6388 "id": { 6389 "description": "The id of a template", 6390 "type": "string", 6391 "required": false 6392 }, 6393 "slug": { 6394 "description": "Unique slug identifying the template.", 6395 "type": "string", 6396 "minLength": 1, 6397 "pattern": "[a-zA-Z0-9_\\%-]+", 6398 "required": false 6399 }, 6400 "theme": { 6401 "description": "Theme identifier for the template.", 6402 "type": "string", 6403 "required": false 6404 }, 6405 "type": { 6406 "description": "Type of template.", 6407 "type": "string", 6408 "required": false 6409 }, 6410 "content": { 6411 "description": "Content of template.", 6412 "type": [ 6413 "object", 6414 "string" 6415 ], 6416 "properties": { 6417 "raw": { 6418 "description": "Content for the template, as it exists in the database.", 6419 "type": "string", 6420 "context": [ 6421 "view", 6422 "edit" 6423 ] 6424 }, 6425 "block_version": { 6426 "description": "Version of the content block format used by the template.", 6427 "type": "integer", 6428 "context": [ 6429 "edit" 6430 ], 6431 "readonly": true 6432 } 6433 }, 6434 "required": false 6435 }, 6436 "title": { 6437 "description": "Title of template.", 6438 "type": [ 6439 "object", 6440 "string" 6441 ], 6442 "properties": { 6443 "raw": { 6444 "description": "Title for the template, as it exists in the database.", 6445 "type": "string", 6446 "context": [ 6447 "view", 6448 "edit", 6449 "embed" 6450 ] 6451 }, 6452 "rendered": { 6453 "description": "HTML title for the template, transformed for display.", 6454 "type": "string", 6455 "context": [ 6456 "view", 6457 "edit", 6458 "embed" 6459 ], 6460 "readonly": true 6461 } 6462 }, 6463 "required": false 6464 }, 6465 "description": { 6466 "description": "Description of template.", 6467 "type": "string", 6468 "required": false 6469 }, 6470 "status": { 6471 "description": "Status of template.", 6472 "type": "string", 6473 "enum": [ 6474 "publish", 6475 "future", 6476 "draft", 6477 "pending", 6478 "private" 6479 ], 6480 "required": false 6481 }, 6482 "author": { 6483 "description": "The ID for the author of the template.", 6484 "type": "integer", 6485 "required": false 6486 }, 6487 "area": { 6488 "description": "Where the template part is intended for use (header, footer, etc.)", 6489 "type": "string", 6490 "required": false 6491 } 6492 } 6493 } 6494 ] 6495 }, 6496 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": { 6497 "namespace": "wp/v2", 6498 "methods": [ 6499 "GET" 6500 ], 6501 "endpoints": [ 6502 { 6503 "methods": [ 6504 "GET" 6505 ], 6506 "args": { 6507 "parent": { 6508 "description": "The id of a template", 6509 "type": "string", 6510 "required": false 6511 }, 6512 "id": { 6513 "description": "The ID for the autosave.", 6514 "type": "integer", 6515 "required": false 6516 }, 6517 "context": { 6518 "description": "Scope under which the request is made; determines fields present in response.", 6519 "type": "string", 6520 "enum": [ 6521 "view", 6522 "embed", 6523 "edit" 6524 ], 6525 "default": "view", 6526 "required": false 6527 } 6528 } 6529 } 6530 ] 6531 }, 6532 "/wp/v2/template-parts": { 6533 "namespace": "wp/v2", 6534 "methods": [ 6535 "GET", 6536 "POST" 6537 ], 6538 "endpoints": [ 6539 { 6540 "methods": [ 6541 "GET" 6542 ], 6543 "args": { 6544 "context": { 6545 "description": "Scope under which the request is made; determines fields present in response.", 6546 "type": "string", 6547 "enum": [ 6548 "view", 6549 "embed", 6550 "edit" 6551 ], 6552 "default": "view", 6553 "required": false 6554 }, 6555 "wp_id": { 6556 "description": "Limit to the specified post id.", 6557 "type": "integer", 6558 "required": false 6559 }, 6560 "area": { 6561 "description": "Limit to the specified template part area.", 6562 "type": "string", 6563 "required": false 6564 }, 6565 "post_type": { 6566 "description": "Post type to get the templates for.", 6567 "type": "string", 6568 "required": false 6569 } 6570 } 6571 }, 6572 { 6573 "methods": [ 6574 "POST" 6575 ], 6576 "args": { 6577 "slug": { 6578 "description": "Unique slug identifying the template.", 6579 "type": "string", 6580 "minLength": 1, 6581 "pattern": "[a-zA-Z0-9_\\%-]+", 6582 "required": true 6583 }, 6584 "theme": { 6585 "description": "Theme identifier for the template.", 6586 "type": "string", 6587 "required": false 6588 }, 6589 "type": { 6590 "description": "Type of template.", 6591 "type": "string", 6592 "required": false 6593 }, 6594 "content": { 6595 "default": "", 6596 "description": "Content of template.", 6597 "type": [ 6598 "object", 6599 "string" 6600 ], 6601 "properties": { 6602 "raw": { 6603 "description": "Content for the template, as it exists in the database.", 6604 "type": "string", 6605 "context": [ 6606 "view", 6607 "edit" 6608 ] 6609 }, 6610 "block_version": { 6611 "description": "Version of the content block format used by the template.", 6612 "type": "integer", 6613 "context": [ 6614 "edit" 6615 ], 6616 "readonly": true 6617 } 6618 }, 6619 "required": false 6620 }, 6621 "title": { 6622 "default": "", 6623 "description": "Title of template.", 6624 "type": [ 6625 "object", 6626 "string" 6627 ], 6628 "properties": { 6629 "raw": { 6630 "description": "Title for the template, as it exists in the database.", 6631 "type": "string", 6632 "context": [ 6633 "view", 6634 "edit", 6635 "embed" 6636 ] 6637 }, 6638 "rendered": { 6639 "description": "HTML title for the template, transformed for display.", 6640 "type": "string", 6641 "context": [ 6642 "view", 6643 "edit", 6644 "embed" 6645 ], 6646 "readonly": true 6647 } 6648 }, 6649 "required": false 6650 }, 6651 "description": { 6652 "default": "", 6653 "description": "Description of template.", 6654 "type": "string", 6655 "required": false 6656 }, 6657 "status": { 6658 "default": "publish", 6659 "description": "Status of template.", 6660 "type": "string", 6661 "enum": [ 6662 "publish", 6663 "future", 6664 "draft", 6665 "pending", 6666 "private" 6667 ], 6668 "required": false 6669 }, 6670 "author": { 6671 "description": "The ID for the author of the template.", 6672 "type": "integer", 6673 "required": false 6674 }, 6675 "area": { 6676 "description": "Where the template part is intended for use (header, footer, etc.)", 6677 "type": "string", 6678 "required": false 6679 } 6680 } 6681 } 6682 ], 6683 "_links": { 6684 "self": [ 6685 { 6686 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts" 6687 } 6688 ] 6689 } 6690 }, 6691 "/wp/v2/template-parts/lookup": { 6692 "namespace": "wp/v2", 6693 "methods": [ 6694 "GET" 6695 ], 6696 "endpoints": [ 6697 { 6698 "methods": [ 6699 "GET" 6700 ], 6701 "args": { 6702 "slug": { 6703 "description": "The slug of the template to get the fallback for", 6704 "type": "string", 6705 "required": true 6706 }, 6707 "is_custom": { 6708 "description": "Indicates if a template is custom or part of the template hierarchy", 6709 "type": "boolean", 6710 "required": false 6711 }, 6712 "template_prefix": { 6713 "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`", 6714 "type": "string", 6715 "required": false 6716 } 6717 } 6718 } 6719 ], 6720 "_links": { 6721 "self": [ 6722 { 6723 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup" 6724 } 6725 ] 6726 } 6727 }, 6728 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 6729 "namespace": "wp/v2", 6730 "methods": [ 6731 "GET", 6732 "POST", 6733 "PUT", 6734 "PATCH", 6735 "DELETE" 6736 ], 6737 "endpoints": [ 6738 { 6739 "methods": [ 6740 "GET" 6741 ], 6742 "args": { 6743 "id": { 6744 "description": "The id of a template", 6745 "type": "string", 6746 "required": false 6747 }, 6748 "context": { 6749 "description": "Scope under which the request is made; determines fields present in response.", 6750 "type": "string", 6751 "enum": [ 6752 "view", 6753 "embed", 6754 "edit" 6755 ], 6756 "default": "view", 6757 "required": false 6758 } 6759 } 6760 }, 6761 { 6762 "methods": [ 6763 "POST", 6764 "PUT", 6765 "PATCH" 6766 ], 6767 "args": { 6768 "id": { 6769 "description": "The id of a template", 6770 "type": "string", 6771 "required": false 6772 }, 6773 "slug": { 6774 "description": "Unique slug identifying the template.", 6775 "type": "string", 6776 "minLength": 1, 6777 "pattern": "[a-zA-Z0-9_\\%-]+", 6778 "required": false 6779 }, 6780 "theme": { 6781 "description": "Theme identifier for the template.", 6782 "type": "string", 6783 "required": false 6784 }, 6785 "type": { 6786 "description": "Type of template.", 6787 "type": "string", 6788 "required": false 6789 }, 6790 "content": { 6791 "description": "Content of template.", 6792 "type": [ 6793 "object", 6794 "string" 6795 ], 6796 "properties": { 6797 "raw": { 6798 "description": "Content for the template, as it exists in the database.", 6799 "type": "string", 6800 "context": [ 6801 "view", 6802 "edit" 6803 ] 6804 }, 6805 "block_version": { 6806 "description": "Version of the content block format used by the template.", 6807 "type": "integer", 6808 "context": [ 6809 "edit" 6810 ], 6811 "readonly": true 6812 } 6813 }, 6814 "required": false 6815 }, 6816 "title": { 6817 "description": "Title of template.", 6818 "type": [ 6819 "object", 6820 "string" 6821 ], 6822 "properties": { 6823 "raw": { 6824 "description": "Title for the template, as it exists in the database.", 6825 "type": "string", 6826 "context": [ 6827 "view", 6828 "edit", 6829 "embed" 6830 ] 6831 }, 6832 "rendered": { 6833 "description": "HTML title for the template, transformed for display.", 6834 "type": "string", 6835 "context": [ 6836 "view", 6837 "edit", 6838 "embed" 6839 ], 6840 "readonly": true 6841 } 6842 }, 6843 "required": false 6844 }, 6845 "description": { 6846 "description": "Description of template.", 6847 "type": "string", 6848 "required": false 6849 }, 6850 "status": { 6851 "description": "Status of template.", 6852 "type": "string", 6853 "enum": [ 6854 "publish", 6855 "future", 6856 "draft", 6857 "pending", 6858 "private" 6859 ], 6860 "required": false 6861 }, 6862 "author": { 6863 "description": "The ID for the author of the template.", 6864 "type": "integer", 6865 "required": false 6866 }, 6867 "area": { 6868 "description": "Where the template part is intended for use (header, footer, etc.)", 6869 "type": "string", 6870 "required": false 6871 } 6872 } 6873 }, 6874 { 6875 "methods": [ 6876 "DELETE" 6877 ], 6878 "args": { 6879 "id": { 6880 "description": "The id of a template", 6881 "type": "string", 6882 "required": false 6883 }, 6884 "force": { 6885 "type": "boolean", 6886 "default": false, 6887 "description": "Whether to bypass Trash and force deletion.", 6888 "required": false 6889 } 6890 } 6891 } 6892 ] 6893 }, 6894 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions": { 6895 "namespace": "wp/v2", 6896 "methods": [ 6897 "GET" 6898 ], 6899 "endpoints": [ 6900 { 6901 "methods": [ 6902 "GET" 6903 ], 6904 "args": { 6905 "parent": { 6906 "description": "The ID for the parent of the revision.", 6907 "type": "integer", 6908 "required": false 6909 }, 6910 "context": { 6911 "description": "Scope under which the request is made; determines fields present in response.", 6912 "type": "string", 6913 "enum": [ 6914 "view", 6915 "embed", 6916 "edit" 6917 ], 6918 "default": "view", 6919 "required": false 6920 }, 6921 "page": { 6922 "description": "Current page of the collection.", 6923 "type": "integer", 6924 "default": 1, 6925 "minimum": 1, 6926 "required": false 6927 }, 6928 "per_page": { 6929 "description": "Maximum number of items to be returned in result set.", 6930 "type": "integer", 6931 "minimum": 1, 6932 "maximum": 100, 6933 "required": false 6934 }, 6935 "offset": { 6936 "description": "Offset the result set by a specific number of items.", 6937 "type": "integer", 6938 "required": false 6939 } 6940 } 6941 } 6942 ] 6943 }, 6944 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 6945 "namespace": "wp/v2", 6946 "methods": [ 6947 "GET" 6948 ], 6949 "endpoints": [ 6950 { 6951 "methods": [ 6952 "GET" 6953 ], 6954 "args": { 6955 "parent": { 6956 "description": "The ID for the parent of the global styles revision.", 6957 "type": "integer", 6958 "required": false 6959 }, 6960 "id": { 6961 "description": "Unique identifier for the global styles revision.", 6962 "type": "integer", 6963 "required": false 6964 }, 6965 "context": { 6966 "description": "Scope under which the request is made; determines fields present in response.", 6967 "type": "string", 6968 "enum": [ 6969 "view", 6970 "embed", 6971 "edit" 6972 ], 6973 "default": "view", 6974 "required": false 6975 } 6976 } 6977 } 6978 ] 6979 }, 6980 "/wp/v2/global-styles/themes/(?P<stylesheet>[\\/\\s%\\w\\.\\(\\)\\[\\]\\@_\\-]+)/variations": { 6981 "namespace": "wp/v2", 6982 "methods": [ 6983 "GET" 6984 ], 6985 "endpoints": [ 6986 { 6987 "methods": [ 6988 "GET" 6989 ], 6990 "allow_batch": { 6991 "v1": false 6992 }, 6993 "args": { 6994 "stylesheet": { 6995 "description": "The theme identifier", 6996 "type": "string", 6997 "required": false 6998 } 6999 } 7000 } 7001 ] 7002 }, 7003 "/wp/v2/global-styles/themes/(?P<stylesheet>[^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)": { 7004 "namespace": "wp/v2", 7005 "methods": [ 7006 "GET" 7007 ], 7008 "endpoints": [ 7009 { 7010 "methods": [ 7011 "GET" 7012 ], 7013 "allow_batch": { 7014 "v1": false 7015 }, 7016 "args": { 7017 "stylesheet": { 7018 "description": "The theme identifier", 7019 "type": "string", 7020 "required": false 7021 } 7022 } 7023 } 7024 ] 7025 }, 7026 "/wp/v2/global-styles/(?P<id>[\\/\\d+]+)": { 7027 "namespace": "wp/v2", 7028 "methods": [ 7029 "GET", 7030 "POST", 7031 "PUT", 7032 "PATCH" 7033 ], 7034 "endpoints": [ 7035 { 7036 "methods": [ 7037 "GET" 7038 ], 7039 "allow_batch": { 7040 "v1": false 7041 }, 7042 "args": { 7043 "id": { 7044 "description": "ID of global styles config.", 7045 "type": "integer", 7046 "required": false 7047 } 7048 } 7049 }, 7050 { 7051 "methods": [ 7052 "POST", 7053 "PUT", 7054 "PATCH" 7055 ], 7056 "allow_batch": { 7057 "v1": false 7058 }, 7059 "args": { 7060 "styles": { 7061 "description": "Global styles.", 7062 "type": [ 7063 "object" 7064 ], 7065 "required": false 7066 }, 7067 "settings": { 7068 "description": "Global settings.", 7069 "type": [ 7070 "object" 7071 ], 7072 "required": false 7073 }, 7074 "title": { 7075 "description": "Title of the global styles variation.", 7076 "type": [ 7077 "object", 7078 "string" 7079 ], 7080 "properties": { 7081 "raw": { 7082 "description": "Title for the global styles variation, as it exists in the database.", 7083 "type": "string", 7084 "context": [ 7085 "view", 7086 "edit", 7087 "embed" 7088 ] 7089 }, 7090 "rendered": { 7091 "description": "HTML title for the post, transformed for display.", 7092 "type": "string", 7093 "context": [ 7094 "view", 7095 "edit", 7096 "embed" 7097 ], 7098 "readonly": true 7099 } 7100 }, 7101 "required": false 7102 } 7103 } 7104 } 7105 ] 7106 }, 7107 "/wp/v2/navigation": { 7108 "namespace": "wp/v2", 7109 "methods": [ 7110 "GET", 7111 "POST" 7112 ], 7113 "endpoints": [ 7114 { 7115 "methods": [ 7116 "GET" 7117 ], 5915 7118 "allow_batch": { 5916 7119 "v1": true … … 5958 7161 "type": "string", 5959 7162 "format": "date-time", 5960 "required": false5961 },5962 "author": {5963 "description": "Limit result set to posts assigned to specific authors.",5964 "type": "array",5965 "items": {5966 "type": "integer"5967 },5968 "default": [],5969 "required": false5970 },5971 "author_exclude": {5972 "description": "Ensure result set excludes posts assigned to specific authors.",5973 "type": "array",5974 "items": {5975 "type": "integer"5976 },5977 "default": [],5978 7163 "required": false 5979 7164 }, … … 6153 7338 "type": "string", 6154 7339 "context": [ 6155 "edit"6156 ]6157 },6158 "rendered": {6159 "description": "HTML title for the post, transformed for display.",6160 "type": "string",6161 "context": [6162 "view",6163 "edit",6164 "embed"6165 ],6166 "readonly": true6167 }6168 },6169 "required": false6170 },6171 "content": {6172 "description": "The content for the post.",6173 "type": "object",6174 "properties": {6175 "raw": {6176 "description": "Content for the post, as it exists in the database.",6177 "type": "string",6178 "context": [6179 "edit"6180 ]6181 },6182 "rendered": {6183 "description": "HTML content for the post, transformed for display.",6184 "type": "string",6185 "context": [6186 "view",6187 "edit"6188 ],6189 "readonly": true6190 },6191 "block_version": {6192 "description": "Version of the content block format used by the post.",6193 "type": "integer",6194 "context": [6195 "edit"6196 ],6197 "readonly": true6198 },6199 "protected": {6200 "description": "Whether the content is protected with a password.",6201 "type": "boolean",6202 "context": [6203 "view",6204 "edit",6205 "embed"6206 ],6207 "readonly": true6208 }6209 },6210 "required": false6211 },6212 "author": {6213 "description": "The ID for the author of the post.",6214 "type": "integer",6215 "required": false6216 },6217 "excerpt": {6218 "description": "The excerpt for the post.",6219 "type": "object",6220 "properties": {6221 "raw": {6222 "description": "Excerpt for the post, as it exists in the database.",6223 "type": "string",6224 "context": [6225 "edit"6226 ]6227 },6228 "rendered": {6229 "description": "HTML excerpt for the post, transformed for display.",6230 "type": "string",6231 "context": [6232 "view",6233 "edit",6234 "embed"6235 ],6236 "readonly": true6237 },6238 "protected": {6239 "description": "Whether the excerpt is protected with a password.",6240 "type": "boolean",6241 "context": [6242 "view",6243 "edit",6244 "embed"6245 ],6246 "readonly": true6247 }6248 },6249 "required": false6250 },6251 "meta": {6252 "description": "Meta fields.",6253 "type": "object",6254 "properties": [],6255 "required": false6256 },6257 "template": {6258 "description": "The theme file to use to display the post.",6259 "type": "string",6260 "required": false6261 }6262 }6263 }6264 ],6265 "_links": {6266 "self": [6267 {6268 "href": "http://example.org/index.php?rest_route=/wp/v2/created-templates"6269 }6270 ]6271 }6272 },6273 "/wp/v2/created-templates/(?P<id>[\\d]+)": {6274 "namespace": "wp/v2",6275 "methods": [6276 "GET",6277 "POST",6278 "PUT",6279 "PATCH",6280 "DELETE"6281 ],6282 "endpoints": [6283 {6284 "methods": [6285 "GET"6286 ],6287 "allow_batch": {6288 "v1": true6289 },6290 "args": {6291 "id": {6292 "description": "Unique identifier for the post.",6293 "type": "integer",6294 "required": false6295 },6296 "context": {6297 "description": "Scope under which the request is made; determines fields present in response.",6298 "type": "string",6299 "enum": [6300 "view",6301 "embed",6302 "edit"6303 ],6304 "default": "view",6305 "required": false6306 },6307 "excerpt_length": {6308 "description": "Override the default excerpt length.",6309 "type": "integer",6310 "required": false6311 },6312 "password": {6313 "description": "The password for the post if it is password protected.",6314 "type": "string",6315 "required": false6316 }6317 }6318 },6319 {6320 "methods": [6321 "POST",6322 "PUT",6323 "PATCH"6324 ],6325 "allow_batch": {6326 "v1": true6327 },6328 "args": {6329 "id": {6330 "description": "Unique identifier for the post.",6331 "type": "integer",6332 "required": false6333 },6334 "date": {6335 "description": "The date the post was published, in the site's timezone.",6336 "type": [6337 "string",6338 "null"6339 ],6340 "format": "date-time",6341 "required": false6342 },6343 "date_gmt": {6344 "description": "The date the post was published, as GMT.",6345 "type": [6346 "string",6347 "null"6348 ],6349 "format": "date-time",6350 "required": false6351 },6352 "slug": {6353 "description": "An alphanumeric identifier for the post unique to its type.",6354 "type": "string",6355 "required": false6356 },6357 "status": {6358 "description": "A named status for the post.",6359 "type": "string",6360 "enum": [6361 "publish",6362 "future",6363 "draft",6364 "pending",6365 "private"6366 ],6367 "required": false6368 },6369 "password": {6370 "description": "A password to protect access to the content and excerpt.",6371 "type": "string",6372 "required": false6373 },6374 "title": {6375 "description": "The title for the post.",6376 "type": "object",6377 "properties": {6378 "raw": {6379 "description": "Title for the post, as it exists in the database.",6380 "type": "string",6381 "context": [6382 "edit"6383 ]6384 },6385 "rendered": {6386 "description": "HTML title for the post, transformed for display.",6387 "type": "string",6388 "context": [6389 "view",6390 "edit",6391 "embed"6392 ],6393 "readonly": true6394 }6395 },6396 "required": false6397 },6398 "content": {6399 "description": "The content for the post.",6400 "type": "object",6401 "properties": {6402 "raw": {6403 "description": "Content for the post, as it exists in the database.",6404 "type": "string",6405 "context": [6406 "edit"6407 ]6408 },6409 "rendered": {6410 "description": "HTML content for the post, transformed for display.",6411 "type": "string",6412 "context": [6413 "view",6414 "edit"6415 ],6416 "readonly": true6417 },6418 "block_version": {6419 "description": "Version of the content block format used by the post.",6420 "type": "integer",6421 "context": [6422 "edit"6423 ],6424 "readonly": true6425 },6426 "protected": {6427 "description": "Whether the content is protected with a password.",6428 "type": "boolean",6429 "context": [6430 "view",6431 "edit",6432 "embed"6433 ],6434 "readonly": true6435 }6436 },6437 "required": false6438 },6439 "author": {6440 "description": "The ID for the author of the post.",6441 "type": "integer",6442 "required": false6443 },6444 "excerpt": {6445 "description": "The excerpt for the post.",6446 "type": "object",6447 "properties": {6448 "raw": {6449 "description": "Excerpt for the post, as it exists in the database.",6450 "type": "string",6451 "context": [6452 "edit"6453 ]6454 },6455 "rendered": {6456 "description": "HTML excerpt for the post, transformed for display.",6457 "type": "string",6458 "context": [6459 "view",6460 "edit",6461 "embed"6462 ],6463 "readonly": true6464 },6465 "protected": {6466 "description": "Whether the excerpt is protected with a password.",6467 "type": "boolean",6468 "context": [6469 "view",6470 "edit",6471 "embed"6472 ],6473 "readonly": true6474 }6475 },6476 "required": false6477 },6478 "meta": {6479 "description": "Meta fields.",6480 "type": "object",6481 "properties": [],6482 "required": false6483 },6484 "template": {6485 "description": "The theme file to use to display the post.",6486 "type": "string",6487 "required": false6488 }6489 }6490 },6491 {6492 "methods": [6493 "DELETE"6494 ],6495 "allow_batch": {6496 "v1": true6497 },6498 "args": {6499 "id": {6500 "description": "Unique identifier for the post.",6501 "type": "integer",6502 "required": false6503 },6504 "force": {6505 "type": "boolean",6506 "default": false,6507 "description": "Whether to bypass Trash and force deletion.",6508 "required": false6509 }6510 }6511 }6512 ]6513 },6514 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": {6515 "namespace": "wp/v2",6516 "methods": [6517 "GET"6518 ],6519 "endpoints": [6520 {6521 "methods": [6522 "GET"6523 ],6524 "args": {6525 "parent": {6526 "description": "The id of a template",6527 "type": "string",6528 "required": false6529 },6530 "context": {6531 "description": "Scope under which the request is made; determines fields present in response.",6532 "type": "string",6533 "enum": [6534 "view",6535 "embed",6536 "edit"6537 ],6538 "default": "view",6539 "required": false6540 },6541 "page": {6542 "description": "Current page of the collection.",6543 "type": "integer",6544 "default": 1,6545 "minimum": 1,6546 "required": false6547 },6548 "per_page": {6549 "description": "Maximum number of items to be returned in result set.",6550 "type": "integer",6551 "minimum": 1,6552 "maximum": 100,6553 "required": false6554 },6555 "search": {6556 "description": "Limit results to those matching a string.",6557 "type": "string",6558 "required": false6559 },6560 "exclude": {6561 "description": "Ensure result set excludes specific IDs.",6562 "type": "array",6563 "items": {6564 "type": "integer"6565 },6566 "default": [],6567 "required": false6568 },6569 "include": {6570 "description": "Limit result set to specific IDs.",6571 "type": "array",6572 "items": {6573 "type": "integer"6574 },6575 "default": [],6576 "required": false6577 },6578 "offset": {6579 "description": "Offset the result set by a specific number of items.",6580 "type": "integer",6581 "required": false6582 },6583 "order": {6584 "description": "Order sort attribute ascending or descending.",6585 "type": "string",6586 "default": "desc",6587 "enum": [6588 "asc",6589 "desc"6590 ],6591 "required": false6592 },6593 "orderby": {6594 "description": "Sort collection by object attribute.",6595 "type": "string",6596 "default": "date",6597 "enum": [6598 "date",6599 "id",6600 "include",6601 "relevance",6602 "slug",6603 "include_slugs",6604 "title"6605 ],6606 "required": false6607 }6608 }6609 }6610 ]6611 },6612 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": {6613 "namespace": "wp/v2",6614 "methods": [6615 "GET",6616 "DELETE"6617 ],6618 "endpoints": [6619 {6620 "methods": [6621 "GET"6622 ],6623 "args": {6624 "parent": {6625 "description": "The id of a template",6626 "type": "string",6627 "required": false6628 },6629 "id": {6630 "description": "Unique identifier for the revision.",6631 "type": "integer",6632 "required": false6633 },6634 "context": {6635 "description": "Scope under which the request is made; determines fields present in response.",6636 "type": "string",6637 "enum": [6638 "view",6639 "embed",6640 "edit"6641 ],6642 "default": "view",6643 "required": false6644 }6645 }6646 },6647 {6648 "methods": [6649 "DELETE"6650 ],6651 "args": {6652 "parent": {6653 "description": "The id of a template",6654 "type": "string",6655 "required": false6656 },6657 "id": {6658 "description": "Unique identifier for the revision.",6659 "type": "integer",6660 "required": false6661 },6662 "force": {6663 "type": "boolean",6664 "default": false,6665 "description": "Required to be true, as revisions do not support trashing.",6666 "required": false6667 }6668 }6669 }6670 ]6671 },6672 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": {6673 "namespace": "wp/v2",6674 "methods": [6675 "GET",6676 "POST"6677 ],6678 "endpoints": [6679 {6680 "methods": [6681 "GET"6682 ],6683 "args": {6684 "id": {6685 "description": "The id of a template",6686 "type": "string",6687 "required": false6688 },6689 "context": {6690 "description": "Scope under which the request is made; determines fields present in response.",6691 "type": "string",6692 "enum": [6693 "view",6694 "embed",6695 "edit"6696 ],6697 "default": "view",6698 "required": false6699 }6700 }6701 },6702 {6703 "methods": [6704 "POST"6705 ],6706 "args": {6707 "id": {6708 "description": "The id of a template",6709 "type": "string",6710 "required": false6711 },6712 "slug": {6713 "description": "Unique slug identifying the template.",6714 "type": "string",6715 "minLength": 1,6716 "pattern": "[a-zA-Z0-9_\\%-]+",6717 "required": false6718 },6719 "theme": {6720 "description": "Theme identifier for the template.",6721 "type": "string",6722 "required": false6723 },6724 "type": {6725 "description": "Type of template.",6726 "type": "string",6727 "required": false6728 },6729 "content": {6730 "description": "Content of template.",6731 "type": [6732 "object",6733 "string"6734 ],6735 "properties": {6736 "raw": {6737 "description": "Content for the template, as it exists in the database.",6738 "type": "string",6739 "context": [6740 "view",6741 "edit"6742 ]6743 },6744 "block_version": {6745 "description": "Version of the content block format used by the template.",6746 "type": "integer",6747 "context": [6748 "edit"6749 ],6750 "readonly": true6751 }6752 },6753 "required": false6754 },6755 "title": {6756 "description": "Title of template.",6757 "type": [6758 "object",6759 "string"6760 ],6761 "properties": {6762 "raw": {6763 "description": "Title for the template, as it exists in the database.",6764 "type": "string",6765 "context": [6766 "view",6767 "edit",6768 "embed"6769 ]6770 },6771 "rendered": {6772 "description": "HTML title for the template, transformed for display.",6773 "type": "string",6774 "context": [6775 "view",6776 "edit",6777 "embed"6778 ],6779 "readonly": true6780 }6781 },6782 "required": false6783 },6784 "description": {6785 "description": "Description of template.",6786 "type": "string",6787 "required": false6788 },6789 "status": {6790 "description": "Status of template.",6791 "type": "string",6792 "enum": [6793 "publish",6794 "future",6795 "draft",6796 "pending",6797 "private"6798 ],6799 "required": false6800 },6801 "author": {6802 "description": "The ID for the author of the template.",6803 "type": "integer",6804 "required": false6805 },6806 "area": {6807 "description": "Where the template part is intended for use (header, footer, etc.)",6808 "type": "string",6809 "required": false6810 }6811 }6812 }6813 ]6814 },6815 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": {6816 "namespace": "wp/v2",6817 "methods": [6818 "GET"6819 ],6820 "endpoints": [6821 {6822 "methods": [6823 "GET"6824 ],6825 "args": {6826 "parent": {6827 "description": "The id of a template",6828 "type": "string",6829 "required": false6830 },6831 "id": {6832 "description": "The ID for the autosave.",6833 "type": "integer",6834 "required": false6835 },6836 "context": {6837 "description": "Scope under which the request is made; determines fields present in response.",6838 "type": "string",6839 "enum": [6840 "view",6841 "embed",6842 "edit"6843 ],6844 "default": "view",6845 "required": false6846 }6847 }6848 }6849 ]6850 },6851 "/wp/v2/template-parts": {6852 "namespace": "wp/v2",6853 "methods": [6854 "GET",6855 "POST"6856 ],6857 "endpoints": [6858 {6859 "methods": [6860 "GET"6861 ],6862 "args": {6863 "context": {6864 "description": "Scope under which the request is made; determines fields present in response.",6865 "type": "string",6866 "enum": [6867 "view",6868 "embed",6869 "edit"6870 ],6871 "default": "view",6872 "required": false6873 },6874 "wp_id": {6875 "description": "Limit to the specified post id.",6876 "type": "integer",6877 "required": false6878 },6879 "area": {6880 "description": "Limit to the specified template part area.",6881 "type": "string",6882 "required": false6883 },6884 "post_type": {6885 "description": "Post type to get the templates for.",6886 "type": "string",6887 "required": false6888 }6889 }6890 },6891 {6892 "methods": [6893 "POST"6894 ],6895 "args": {6896 "slug": {6897 "description": "Unique slug identifying the template.",6898 "type": "string",6899 "minLength": 1,6900 "pattern": "[a-zA-Z0-9_\\%-]+",6901 "required": true6902 },6903 "theme": {6904 "description": "Theme identifier for the template.",6905 "type": "string",6906 "required": false6907 },6908 "type": {6909 "description": "Type of template.",6910 "type": "string",6911 "required": false6912 },6913 "content": {6914 "default": "",6915 "description": "Content of template.",6916 "type": [6917 "object",6918 "string"6919 ],6920 "properties": {6921 "raw": {6922 "description": "Content for the template, as it exists in the database.",6923 "type": "string",6924 "context": [6925 "view",6926 "edit"6927 ]6928 },6929 "block_version": {6930 "description": "Version of the content block format used by the template.",6931 "type": "integer",6932 "context": [6933 "edit"6934 ],6935 "readonly": true6936 }6937 },6938 "required": false6939 },6940 "title": {6941 "default": "",6942 "description": "Title of template.",6943 "type": [6944 "object",6945 "string"6946 ],6947 "properties": {6948 "raw": {6949 "description": "Title for the template, as it exists in the database.",6950 "type": "string",6951 "context": [6952 "view",6953 "edit",6954 "embed"6955 ]6956 },6957 "rendered": {6958 "description": "HTML title for the template, transformed for display.",6959 "type": "string",6960 "context": [6961 "view",6962 "edit",6963 "embed"6964 ],6965 "readonly": true6966 }6967 },6968 "required": false6969 },6970 "description": {6971 "default": "",6972 "description": "Description of template.",6973 "type": "string",6974 "required": false6975 },6976 "status": {6977 "default": "publish",6978 "description": "Status of template.",6979 "type": "string",6980 "enum": [6981 "publish",6982 "future",6983 "draft",6984 "pending",6985 "private"6986 ],6987 "required": false6988 },6989 "author": {6990 "description": "The ID for the author of the template.",6991 "type": "integer",6992 "required": false6993 },6994 "area": {6995 "description": "Where the template part is intended for use (header, footer, etc.)",6996 "type": "string",6997 "required": false6998 }6999 }7000 }7001 ],7002 "_links": {7003 "self": [7004 {7005 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts"7006 }7007 ]7008 }7009 },7010 "/wp/v2/template-parts/lookup": {7011 "namespace": "wp/v2",7012 "methods": [7013 "GET"7014 ],7015 "endpoints": [7016 {7017 "methods": [7018 "GET"7019 ],7020 "args": {7021 "slug": {7022 "description": "The slug of the template to get the fallback for",7023 "type": "string",7024 "required": true7025 },7026 "is_custom": {7027 "description": "Indicates if a template is custom or part of the template hierarchy",7028 "type": "boolean",7029 "required": false7030 },7031 "template_prefix": {7032 "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`",7033 "type": "string",7034 "required": false7035 }7036 }7037 }7038 ],7039 "_links": {7040 "self": [7041 {7042 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup"7043 }7044 ]7045 }7046 },7047 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": {7048 "namespace": "wp/v2",7049 "methods": [7050 "GET",7051 "POST",7052 "PUT",7053 "PATCH",7054 "DELETE"7055 ],7056 "endpoints": [7057 {7058 "methods": [7059 "GET"7060 ],7061 "args": {7062 "id": {7063 "description": "The id of a template",7064 "type": "string",7065 "required": false7066 },7067 "context": {7068 "description": "Scope under which the request is made; determines fields present in response.",7069 "type": "string",7070 "enum": [7071 "view",7072 "embed",7073 "edit"7074 ],7075 "default": "view",7076 "required": false7077 }7078 }7079 },7080 {7081 "methods": [7082 "POST",7083 "PUT",7084 "PATCH"7085 ],7086 "args": {7087 "id": {7088 "description": "The id of a template",7089 "type": "string",7090 "required": false7091 },7092 "slug": {7093 "description": "Unique slug identifying the template.",7094 "type": "string",7095 "minLength": 1,7096 "pattern": "[a-zA-Z0-9_\\%-]+",7097 "required": false7098 },7099 "theme": {7100 "description": "Theme identifier for the template.",7101 "type": "string",7102 "required": false7103 },7104 "type": {7105 "description": "Type of template.",7106 "type": "string",7107 "required": false7108 },7109 "content": {7110 "description": "Content of template.",7111 "type": [7112 "object",7113 "string"7114 ],7115 "properties": {7116 "raw": {7117 "description": "Content for the template, as it exists in the database.",7118 "type": "string",7119 "context": [7120 "view",7121 "edit"7122 ]7123 },7124 "block_version": {7125 "description": "Version of the content block format used by the template.",7126 "type": "integer",7127 "context": [7128 "edit"7129 ],7130 "readonly": true7131 }7132 },7133 "required": false7134 },7135 "title": {7136 "description": "Title of template.",7137 "type": [7138 "object",7139 "string"7140 ],7141 "properties": {7142 "raw": {7143 "description": "Title for the template, as it exists in the database.",7144 "type": "string",7145 "context": [7146 "view",7147 "edit",7148 "embed"7149 ]7150 },7151 "rendered": {7152 "description": "HTML title for the template, transformed for display.",7153 "type": "string",7154 "context": [7155 "view",7156 "edit",7157 "embed"7158 ],7159 "readonly": true7160 }7161 },7162 "required": false7163 },7164 "description": {7165 "description": "Description of template.",7166 "type": "string",7167 "required": false7168 },7169 "status": {7170 "description": "Status of template.",7171 "type": "string",7172 "enum": [7173 "publish",7174 "future",7175 "draft",7176 "pending",7177 "private"7178 ],7179 "required": false7180 },7181 "author": {7182 "description": "The ID for the author of the template.",7183 "type": "integer",7184 "required": false7185 },7186 "area": {7187 "description": "Where the template part is intended for use (header, footer, etc.)",7188 "type": "string",7189 "required": false7190 }7191 }7192 },7193 {7194 "methods": [7195 "DELETE"7196 ],7197 "args": {7198 "id": {7199 "description": "The id of a template",7200 "type": "string",7201 "required": false7202 },7203 "force": {7204 "type": "boolean",7205 "default": false,7206 "description": "Whether to bypass Trash and force deletion.",7207 "required": false7208 }7209 }7210 }7211 ]7212 },7213 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions": {7214 "namespace": "wp/v2",7215 "methods": [7216 "GET"7217 ],7218 "endpoints": [7219 {7220 "methods": [7221 "GET"7222 ],7223 "args": {7224 "parent": {7225 "description": "The ID for the parent of the revision.",7226 "type": "integer",7227 "required": false7228 },7229 "context": {7230 "description": "Scope under which the request is made; determines fields present in response.",7231 "type": "string",7232 "enum": [7233 "view",7234 "embed",7235 "edit"7236 ],7237 "default": "view",7238 "required": false7239 },7240 "page": {7241 "description": "Current page of the collection.",7242 "type": "integer",7243 "default": 1,7244 "minimum": 1,7245 "required": false7246 },7247 "per_page": {7248 "description": "Maximum number of items to be returned in result set.",7249 "type": "integer",7250 "minimum": 1,7251 "maximum": 100,7252 "required": false7253 },7254 "offset": {7255 "description": "Offset the result set by a specific number of items.",7256 "type": "integer",7257 "required": false7258 }7259 }7260 }7261 ]7262 },7263 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": {7264 "namespace": "wp/v2",7265 "methods": [7266 "GET"7267 ],7268 "endpoints": [7269 {7270 "methods": [7271 "GET"7272 ],7273 "args": {7274 "parent": {7275 "description": "The ID for the parent of the global styles revision.",7276 "type": "integer",7277 "required": false7278 },7279 "id": {7280 "description": "Unique identifier for the global styles revision.",7281 "type": "integer",7282 "required": false7283 },7284 "context": {7285 "description": "Scope under which the request is made; determines fields present in response.",7286 "type": "string",7287 "enum": [7288 "view",7289 "embed",7290 "edit"7291 ],7292 "default": "view",7293 "required": false7294 }7295 }7296 }7297 ]7298 },7299 "/wp/v2/global-styles/themes/(?P<stylesheet>[\\/\\s%\\w\\.\\(\\)\\[\\]\\@_\\-]+)/variations": {7300 "namespace": "wp/v2",7301 "methods": [7302 "GET"7303 ],7304 "endpoints": [7305 {7306 "methods": [7307 "GET"7308 ],7309 "allow_batch": {7310 "v1": false7311 },7312 "args": {7313 "stylesheet": {7314 "description": "The theme identifier",7315 "type": "string",7316 "required": false7317 }7318 }7319 }7320 ]7321 },7322 "/wp/v2/global-styles/themes/(?P<stylesheet>[^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)": {7323 "namespace": "wp/v2",7324 "methods": [7325 "GET"7326 ],7327 "endpoints": [7328 {7329 "methods": [7330 "GET"7331 ],7332 "allow_batch": {7333 "v1": false7334 },7335 "args": {7336 "stylesheet": {7337 "description": "The theme identifier",7338 "type": "string",7339 "required": false7340 }7341 }7342 }7343 ]7344 },7345 "/wp/v2/global-styles/(?P<id>[\\/\\d+]+)": {7346 "namespace": "wp/v2",7347 "methods": [7348 "GET",7349 "POST",7350 "PUT",7351 "PATCH"7352 ],7353 "endpoints": [7354 {7355 "methods": [7356 "GET"7357 ],7358 "allow_batch": {7359 "v1": false7360 },7361 "args": {7362 "id": {7363 "description": "ID of global styles config.",7364 "type": "integer",7365 "required": false7366 }7367 }7368 },7369 {7370 "methods": [7371 "POST",7372 "PUT",7373 "PATCH"7374 ],7375 "allow_batch": {7376 "v1": false7377 },7378 "args": {7379 "styles": {7380 "description": "Global styles.",7381 "type": [7382 "object"7383 ],7384 "required": false7385 },7386 "settings": {7387 "description": "Global settings.",7388 "type": [7389 "object"7390 ],7391 "required": false7392 },7393 "title": {7394 "description": "Title of the global styles variation.",7395 "type": [7396 "object",7397 "string"7398 ],7399 "properties": {7400 "raw": {7401 "description": "Title for the global styles variation, as it exists in the database.",7402 "type": "string",7403 "context": [7404 "view",7405 "edit",7406 "embed"7407 ]7408 },7409 "rendered": {7410 "description": "HTML title for the post, transformed for display.",7411 "type": "string",7412 "context": [7413 "view",7414 "edit",7415 "embed"7416 ],7417 "readonly": true7418 }7419 },7420 "required": false7421 }7422 }7423 }7424 ]7425 },7426 "/wp/v2/navigation": {7427 "namespace": "wp/v2",7428 "methods": [7429 "GET",7430 "POST"7431 ],7432 "endpoints": [7433 {7434 "methods": [7435 "GET"7436 ],7437 "allow_batch": {7438 "v1": true7439 },7440 "args": {7441 "context": {7442 "description": "Scope under which the request is made; determines fields present in response.",7443 "type": "string",7444 "enum": [7445 "view",7446 "embed",7447 "edit"7448 ],7449 "default": "view",7450 "required": false7451 },7452 "page": {7453 "description": "Current page of the collection.",7454 "type": "integer",7455 "default": 1,7456 "minimum": 1,7457 "required": false7458 },7459 "per_page": {7460 "description": "Maximum number of items to be returned in result set.",7461 "type": "integer",7462 "default": 10,7463 "minimum": 1,7464 "maximum": 100,7465 "required": false7466 },7467 "search": {7468 "description": "Limit results to those matching a string.",7469 "type": "string",7470 "required": false7471 },7472 "after": {7473 "description": "Limit response to posts published after a given ISO8601 compliant date.",7474 "type": "string",7475 "format": "date-time",7476 "required": false7477 },7478 "modified_after": {7479 "description": "Limit response to posts modified after a given ISO8601 compliant date.",7480 "type": "string",7481 "format": "date-time",7482 "required": false7483 },7484 "before": {7485 "description": "Limit response to posts published before a given ISO8601 compliant date.",7486 "type": "string",7487 "format": "date-time",7488 "required": false7489 },7490 "modified_before": {7491 "description": "Limit response to posts modified before a given ISO8601 compliant date.",7492 "type": "string",7493 "format": "date-time",7494 "required": false7495 },7496 "exclude": {7497 "description": "Ensure result set excludes specific IDs.",7498 "type": "array",7499 "items": {7500 "type": "integer"7501 },7502 "default": [],7503 "required": false7504 },7505 "include": {7506 "description": "Limit result set to specific IDs.",7507 "type": "array",7508 "items": {7509 "type": "integer"7510 },7511 "default": [],7512 "required": false7513 },7514 "search_semantics": {7515 "description": "How to interpret the search input.",7516 "type": "string",7517 "enum": [7518 "exact"7519 ],7520 "required": false7521 },7522 "offset": {7523 "description": "Offset the result set by a specific number of items.",7524 "type": "integer",7525 "required": false7526 },7527 "order": {7528 "description": "Order sort attribute ascending or descending.",7529 "type": "string",7530 "default": "desc",7531 "enum": [7532 "asc",7533 "desc"7534 ],7535 "required": false7536 },7537 "orderby": {7538 "description": "Sort collection by post attribute.",7539 "type": "string",7540 "default": "date",7541 "enum": [7542 "author",7543 "date",7544 "id",7545 "include",7546 "modified",7547 "parent",7548 "relevance",7549 "slug",7550 "include_slugs",7551 "title"7552 ],7553 "required": false7554 },7555 "search_columns": {7556 "default": [],7557 "description": "Array of column names to be searched.",7558 "type": "array",7559 "items": {7560 "enum": [7561 "post_title",7562 "post_content",7563 "post_excerpt"7564 ],7565 "type": "string"7566 },7567 "required": false7568 },7569 "slug": {7570 "description": "Limit result set to posts with one or more specific slugs.",7571 "type": "array",7572 "items": {7573 "type": "string"7574 },7575 "required": false7576 },7577 "status": {7578 "default": "publish",7579 "description": "Limit result set to posts assigned one or more statuses.",7580 "type": "array",7581 "items": {7582 "enum": [7583 "publish",7584 "future",7585 "draft",7586 "pending",7587 "private",7588 "trash",7589 "auto-draft",7590 "inherit",7591 "request-pending",7592 "request-confirmed",7593 "request-failed",7594 "request-completed",7595 "any"7596 ],7597 "type": "string"7598 },7599 "required": false7600 }7601 }7602 },7603 {7604 "methods": [7605 "POST"7606 ],7607 "allow_batch": {7608 "v1": true7609 },7610 "args": {7611 "date": {7612 "description": "The date the post was published, in the site's timezone.",7613 "type": [7614 "string",7615 "null"7616 ],7617 "format": "date-time",7618 "required": false7619 },7620 "date_gmt": {7621 "description": "The date the post was published, as GMT.",7622 "type": [7623 "string",7624 "null"7625 ],7626 "format": "date-time",7627 "required": false7628 },7629 "slug": {7630 "description": "An alphanumeric identifier for the post unique to its type.",7631 "type": "string",7632 "required": false7633 },7634 "status": {7635 "description": "A named status for the post.",7636 "type": "string",7637 "enum": [7638 "publish",7639 "future",7640 "draft",7641 "pending",7642 "private"7643 ],7644 "required": false7645 },7646 "password": {7647 "description": "A password to protect access to the content and excerpt.",7648 "type": "string",7649 "required": false7650 },7651 "title": {7652 "description": "The title for the post.",7653 "type": "object",7654 "properties": {7655 "raw": {7656 "description": "Title for the post, as it exists in the database.",7657 "type": "string",7658 "context": [7659 7340 "edit", 7660 7341 "embed" … … 8666 8347 "default": false, 8667 8348 "description": "Whether to bypass Trash and force deletion.", 8668 "required": false8669 }8670 }8671 }8672 ]8673 },8674 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": {8675 "namespace": "wp/v2",8676 "methods": [8677 "GET",8678 "POST"8679 ],8680 "endpoints": [8681 {8682 "methods": [8683 "GET"8684 ],8685 "args": {8686 "id": {8687 "description": "The id of a template",8688 "type": "string",8689 "required": false8690 },8691 "context": {8692 "description": "Scope under which the request is made; determines fields present in response.",8693 "type": "string",8694 "enum": [8695 "view",8696 "embed",8697 "edit"8698 ],8699 "default": "view",8700 "required": false8701 }8702 }8703 },8704 {8705 "methods": [8706 "POST"8707 ],8708 "args": {8709 "id": {8710 "description": "The id of a template",8711 "type": "string",8712 "required": false8713 },8714 "slug": {8715 "description": "Unique slug identifying the template.",8716 "type": "string",8717 "minLength": 1,8718 "pattern": "[a-zA-Z0-9_\\%-]+",8719 "required": false8720 },8721 "theme": {8722 "description": "Theme identifier for the template.",8723 "type": "string",8724 "required": false8725 },8726 "type": {8727 "description": "Type of template.",8728 "type": "string",8729 "required": false8730 },8731 "content": {8732 "description": "Content of template.",8733 "type": [8734 "object",8735 "string"8736 ],8737 "properties": {8738 "raw": {8739 "description": "Content for the template, as it exists in the database.",8740 "type": "string",8741 "context": [8742 "view",8743 "edit"8744 ]8745 },8746 "block_version": {8747 "description": "Version of the content block format used by the template.",8748 "type": "integer",8749 "context": [8750 "edit"8751 ],8752 "readonly": true8753 }8754 },8755 "required": false8756 },8757 "title": {8758 "description": "Title of template.",8759 "type": [8760 "object",8761 "string"8762 ],8763 "properties": {8764 "raw": {8765 "description": "Title for the template, as it exists in the database.",8766 "type": "string",8767 "context": [8768 "view",8769 "edit",8770 "embed"8771 ]8772 },8773 "rendered": {8774 "description": "HTML title for the template, transformed for display.",8775 "type": "string",8776 "context": [8777 "view",8778 "edit",8779 "embed"8780 ],8781 "readonly": true8782 }8783 },8784 "required": false8785 },8786 "description": {8787 "description": "Description of template.",8788 "type": "string",8789 "required": false8790 },8791 "status": {8792 "description": "Status of template.",8793 "type": "string",8794 "enum": [8795 "publish",8796 "future",8797 "draft",8798 "pending",8799 "private"8800 ],8801 "required": false8802 },8803 "author": {8804 "description": "The ID for the author of the template.",8805 "type": "integer",8806 "required": false8807 }8808 }8809 }8810 ]8811 },8812 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": {8813 "namespace": "wp/v2",8814 "methods": [8815 "GET"8816 ],8817 "endpoints": [8818 {8819 "methods": [8820 "GET"8821 ],8822 "args": {8823 "parent": {8824 "description": "The id of a template",8825 "type": "string",8826 "required": false8827 },8828 "id": {8829 "description": "The ID for the autosave.",8830 "type": "integer",8831 "required": false8832 },8833 "context": {8834 "description": "Scope under which the request is made; determines fields present in response.",8835 "type": "string",8836 "enum": [8837 "view",8838 "embed",8839 "edit"8840 ],8841 "default": "view",8842 "required": false8843 }8844 }8845 }8846 ]8847 },8848 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": {8849 "namespace": "wp/v2",8850 "methods": [8851 "GET"8852 ],8853 "endpoints": [8854 {8855 "methods": [8856 "GET"8857 ],8858 "args": {8859 "parent": {8860 "description": "The id of a template",8861 "type": "string",8862 "required": false8863 },8864 "context": {8865 "description": "Scope under which the request is made; determines fields present in response.",8866 "type": "string",8867 "enum": [8868 "view",8869 "embed",8870 "edit"8871 ],8872 "default": "view",8873 "required": false8874 },8875 "page": {8876 "description": "Current page of the collection.",8877 "type": "integer",8878 "default": 1,8879 "minimum": 1,8880 "required": false8881 },8882 "per_page": {8883 "description": "Maximum number of items to be returned in result set.",8884 "type": "integer",8885 "minimum": 1,8886 "maximum": 100,8887 "required": false8888 },8889 "search": {8890 "description": "Limit results to those matching a string.",8891 "type": "string",8892 "required": false8893 },8894 "exclude": {8895 "description": "Ensure result set excludes specific IDs.",8896 "type": "array",8897 "items": {8898 "type": "integer"8899 },8900 "default": [],8901 "required": false8902 },8903 "include": {8904 "description": "Limit result set to specific IDs.",8905 "type": "array",8906 "items": {8907 "type": "integer"8908 },8909 "default": [],8910 "required": false8911 },8912 "offset": {8913 "description": "Offset the result set by a specific number of items.",8914 "type": "integer",8915 "required": false8916 },8917 "order": {8918 "description": "Order sort attribute ascending or descending.",8919 "type": "string",8920 "default": "desc",8921 "enum": [8922 "asc",8923 "desc"8924 ],8925 "required": false8926 },8927 "orderby": {8928 "description": "Sort collection by object attribute.",8929 "type": "string",8930 "default": "date",8931 "enum": [8932 "date",8933 "id",8934 "include",8935 "relevance",8936 "slug",8937 "include_slugs",8938 "title"8939 ],8940 "required": false8941 }8942 }8943 }8944 ]8945 },8946 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": {8947 "namespace": "wp/v2",8948 "methods": [8949 "GET",8950 "DELETE"8951 ],8952 "endpoints": [8953 {8954 "methods": [8955 "GET"8956 ],8957 "args": {8958 "parent": {8959 "description": "The id of a template",8960 "type": "string",8961 "required": false8962 },8963 "id": {8964 "description": "Unique identifier for the revision.",8965 "type": "integer",8966 "required": false8967 },8968 "context": {8969 "description": "Scope under which the request is made; determines fields present in response.",8970 "type": "string",8971 "enum": [8972 "view",8973 "embed",8974 "edit"8975 ],8976 "default": "view",8977 "required": false8978 }8979 }8980 },8981 {8982 "methods": [8983 "DELETE"8984 ],8985 "args": {8986 "parent": {8987 "description": "The id of a template",8988 "type": "string",8989 "required": false8990 },8991 "id": {8992 "description": "Unique identifier for the revision.",8993 "type": "integer",8994 "required": false8995 },8996 "force": {8997 "type": "boolean",8998 "default": false,8999 "description": "Required to be true, as revisions do not support trashing.",9000 "required": false9001 }9002 }9003 }9004 ]9005 },9006 "/wp/v2/templates": {9007 "namespace": "wp/v2",9008 "methods": [9009 "GET",9010 "POST"9011 ],9012 "endpoints": [9013 {9014 "methods": [9015 "GET"9016 ],9017 "args": {9018 "context": {9019 "description": "Scope under which the request is made; determines fields present in response.",9020 "type": "string",9021 "enum": [9022 "view",9023 "embed",9024 "edit"9025 ],9026 "default": "view",9027 "required": false9028 },9029 "wp_id": {9030 "description": "Limit to the specified post id.",9031 "type": "integer",9032 "required": false9033 },9034 "area": {9035 "description": "Limit to the specified template part area.",9036 "type": "string",9037 "required": false9038 },9039 "post_type": {9040 "description": "Post type to get the templates for.",9041 "type": "string",9042 "required": false9043 }9044 }9045 },9046 {9047 "methods": [9048 "POST"9049 ],9050 "args": {9051 "slug": {9052 "description": "Unique slug identifying the template.",9053 "type": "string",9054 "minLength": 1,9055 "pattern": "[a-zA-Z0-9_\\%-]+",9056 "required": true9057 },9058 "theme": {9059 "description": "Theme identifier for the template.",9060 "type": "string",9061 "required": false9062 },9063 "type": {9064 "description": "Type of template.",9065 "type": "string",9066 "required": false9067 },9068 "content": {9069 "default": "",9070 "description": "Content of template.",9071 "type": [9072 "object",9073 "string"9074 ],9075 "properties": {9076 "raw": {9077 "description": "Content for the template, as it exists in the database.",9078 "type": "string",9079 "context": [9080 "view",9081 "edit"9082 ]9083 },9084 "block_version": {9085 "description": "Version of the content block format used by the template.",9086 "type": "integer",9087 "context": [9088 "edit"9089 ],9090 "readonly": true9091 }9092 },9093 "required": false9094 },9095 "title": {9096 "default": "",9097 "description": "Title of template.",9098 "type": [9099 "object",9100 "string"9101 ],9102 "properties": {9103 "raw": {9104 "description": "Title for the template, as it exists in the database.",9105 "type": "string",9106 "context": [9107 "view",9108 "edit",9109 "embed"9110 ]9111 },9112 "rendered": {9113 "description": "HTML title for the template, transformed for display.",9114 "type": "string",9115 "context": [9116 "view",9117 "edit",9118 "embed"9119 ],9120 "readonly": true9121 }9122 },9123 "required": false9124 },9125 "description": {9126 "default": "",9127 "description": "Description of template.",9128 "type": "string",9129 "required": false9130 },9131 "status": {9132 "default": "publish",9133 "description": "Status of template.",9134 "type": "string",9135 "enum": [9136 "publish",9137 "future",9138 "draft",9139 "pending",9140 "private"9141 ],9142 "required": false9143 },9144 "author": {9145 "description": "The ID for the author of the template.",9146 "type": "integer",9147 "required": false9148 }9149 }9150 }9151 ],9152 "_links": {9153 "self": [9154 {9155 "href": "http://example.org/index.php?rest_route=/wp/v2/templates"9156 }9157 ]9158 }9159 },9160 "/wp/v2/templates/lookup": {9161 "namespace": "wp/v2",9162 "methods": [9163 "GET"9164 ],9165 "endpoints": [9166 {9167 "methods": [9168 "GET"9169 ],9170 "args": {9171 "slug": {9172 "description": "The slug of the template to get the fallback for",9173 "type": "string",9174 "required": true9175 },9176 "is_custom": {9177 "description": "Indicates if a template is custom or part of the template hierarchy",9178 "type": "boolean",9179 "required": false9180 },9181 "template_prefix": {9182 "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`",9183 "type": "string",9184 "required": false9185 }9186 }9187 }9188 ],9189 "_links": {9190 "self": [9191 {9192 "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup"9193 }9194 ]9195 }9196 },9197 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": {9198 "namespace": "wp/v2",9199 "methods": [9200 "GET",9201 "POST",9202 "PUT",9203 "PATCH",9204 "DELETE"9205 ],9206 "endpoints": [9207 {9208 "methods": [9209 "GET"9210 ],9211 "args": {9212 "id": {9213 "description": "The id of a template",9214 "type": "string",9215 "required": false9216 },9217 "context": {9218 "description": "Scope under which the request is made; determines fields present in response.",9219 "type": "string",9220 "enum": [9221 "view",9222 "embed",9223 "edit"9224 ],9225 "default": "view",9226 "required": false9227 }9228 }9229 },9230 {9231 "methods": [9232 "POST",9233 "PUT",9234 "PATCH"9235 ],9236 "args": {9237 "id": {9238 "description": "The id of a template",9239 "type": "string",9240 "required": false9241 },9242 "slug": {9243 "description": "Unique slug identifying the template.",9244 "type": "string",9245 "minLength": 1,9246 "pattern": "[a-zA-Z0-9_\\%-]+",9247 "required": false9248 },9249 "theme": {9250 "description": "Theme identifier for the template.",9251 "type": "string",9252 "required": false9253 },9254 "type": {9255 "description": "Type of template.",9256 "type": "string",9257 "required": false9258 },9259 "content": {9260 "description": "Content of template.",9261 "type": [9262 "object",9263 "string"9264 ],9265 "properties": {9266 "raw": {9267 "description": "Content for the template, as it exists in the database.",9268 "type": "string",9269 "context": [9270 "view",9271 "edit"9272 ]9273 },9274 "block_version": {9275 "description": "Version of the content block format used by the template.",9276 "type": "integer",9277 "context": [9278 "edit"9279 ],9280 "readonly": true9281 }9282 },9283 "required": false9284 },9285 "title": {9286 "description": "Title of template.",9287 "type": [9288 "object",9289 "string"9290 ],9291 "properties": {9292 "raw": {9293 "description": "Title for the template, as it exists in the database.",9294 "type": "string",9295 "context": [9296 "view",9297 "edit",9298 "embed"9299 ]9300 },9301 "rendered": {9302 "description": "HTML title for the template, transformed for display.",9303 "type": "string",9304 "context": [9305 "view",9306 "edit",9307 "embed"9308 ],9309 "readonly": true9310 }9311 },9312 "required": false9313 },9314 "description": {9315 "description": "Description of template.",9316 "type": "string",9317 "required": false9318 },9319 "status": {9320 "description": "Status of template.",9321 "type": "string",9322 "enum": [9323 "publish",9324 "future",9325 "draft",9326 "pending",9327 "private"9328 ],9329 "required": false9330 },9331 "author": {9332 "description": "The ID for the author of the template.",9333 "type": "integer",9334 "required": false9335 }9336 }9337 },9338 {9339 "methods": [9340 "DELETE"9341 ],9342 "args": {9343 "id": {9344 "description": "The id of a template",9345 "type": "string",9346 "required": false9347 },9348 "force": {9349 "type": "boolean",9350 "default": false,9351 "description": "Whether to bypass Trash and force deletion.",9352 "required": false9353 }9354 }9355 }9356 ]9357 },9358 "/wp/v2/registered-templates": {9359 "namespace": "wp/v2",9360 "methods": [9361 "GET"9362 ],9363 "endpoints": [9364 {9365 "methods": [9366 "GET"9367 ],9368 "args": {9369 "context": {9370 "description": "Scope under which the request is made; determines fields present in response.",9371 "type": "string",9372 "enum": [9373 "view",9374 "embed",9375 "edit"9376 ],9377 "default": "view",9378 "required": false9379 },9380 "wp_id": {9381 "description": "Limit to the specified post id.",9382 "type": "integer",9383 "required": false9384 },9385 "area": {9386 "description": "Limit to the specified template part area.",9387 "type": "string",9388 "required": false9389 },9390 "post_type": {9391 "description": "Post type to get the templates for.",9392 "type": "string",9393 "required": false9394 }9395 }9396 }9397 ],9398 "_links": {9399 "self": [9400 {9401 "href": "http://example.org/index.php?rest_route=/wp/v2/registered-templates"9402 }9403 ]9404 }9405 },9406 "/wp/v2/registered-templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": {9407 "namespace": "wp/v2",9408 "methods": [9409 "GET"9410 ],9411 "endpoints": [9412 {9413 "methods": [9414 "GET"9415 ],9416 "args": {9417 "id": {9418 "description": "The id of a template",9419 "type": "string",9420 "required": false9421 },9422 "context": {9423 "description": "Scope under which the request is made; determines fields present in response.",9424 "type": "string",9425 "enum": [9426 "view",9427 "embed",9428 "edit"9429 ],9430 "default": "view",9431 8349 "required": false 9432 8350 } … … 12210 11128 "closed" 12211 11129 ], 12212 "required": false12213 },12214 "active_templates": {12215 "title": "Active Templates",12216 "description": "",12217 "type": "object",12218 "additionalProperties": true,12219 11130 "required": false 12220 11131 }, … … 14768 13679 "icon": null, 14769 13680 "taxonomies": [], 14770 "rest_base": " created-templates",13681 "rest_base": "templates", 14771 13682 "rest_namespace": "wp/v2", 14772 13683 "template": [], … … 14780 13691 "wp:items": [ 14781 13692 { 14782 "href": "http://example.org/index.php?rest_route=/wp/v2/ created-templates"13693 "href": "http://example.org/index.php?rest_route=/wp/v2/templates" 14783 13694 } 14784 13695 ], … … 15558 14469 "default_ping_status": "open", 15559 14470 "default_comment_status": "open", 15560 "active_templates": [],15561 14471 "site_logo": null, 15562 14472 "site_icon": 0
Note: See TracChangeset
for help on using the changeset viewer.