Changeset 61029
- Timestamp:
- 10/21/2025 01:40:28 PM (7 weeks ago)
- Location:
- trunk
- Files:
-
- 14 edited
-
src/wp-admin/site-editor.php (modified) (2 diffs)
-
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) (2 diffs)
-
src/wp-includes/option.php (modified) (1 diff)
-
src/wp-includes/post.php (modified) (3 diffs)
-
src/wp-includes/rest-api.php (modified) (2 diffs)
-
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) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/site-editor.php
r60681 r61029 183 183 array( rest_get_route_for_post_type_items( 'page' ), 'OPTIONS' ), 184 184 '/wp/v2/types?context=view', 185 '/wp/v2/wp_registered_template?context=edit', 185 186 '/wp/v2/types/wp_template?context=edit', 186 187 '/wp/v2/types/wp_template_part?context=edit', … … 245 246 } 246 247 } 247 } else { 248 } elseif ( isset( $_GET['p'] ) && '/' !== $_GET['p'] ) { 249 // Only prefetch for the root. If we preload it for all pages and it's not 250 // used it won't be possible to invalidate. 248 251 $preload_paths[] = '/wp/v2/templates/lookup?slug=front-page'; 249 252 $preload_paths[] = '/wp/v2/templates/lookup?slug=home'; -
trunk/src/wp-includes/block-template-utils.php
r60688 r61029 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 the 1096 // 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 1077 1117 /** 1078 1118 * Retrieves a list of unified template objects based on a query. … … 1153 1193 } 1154 1194 1195 $active_templates = get_option( 'active_templates', array() ); 1196 1155 1197 $template_query = new WP_Query( $wp_query_args ); 1156 1198 $query_result = array(); … … 1174 1216 } 1175 1217 1176 $query_result[] = $template; 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 } 1177 1226 } 1178 1227 … … 1297 1346 } 1298 1347 list( $theme, $slug ) = $parts; 1299 $wp_query_args = array( 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 } elseif ( false === $active_templates[ $slug ] ) { 1362 return null; 1363 } 1364 } 1365 1366 $wp_query_args = array( 1300 1367 'post_name__in' => array( $slug ), 1301 1368 'post_type' => $template_type, … … 1311 1378 ), 1312 1379 ); 1313 $template_query = new WP_Query( $wp_query_args );1314 $posts = $template_query->posts;1380 $template_query = new WP_Query( $wp_query_args ); 1381 $posts = $template_query->posts; 1315 1382 1316 1383 if ( count( $posts ) > 0 ) { 1317 1384 $template = _build_block_template_result_from_post( $posts[0] ); 1385 1386 // Custom templates don't need to be activated, so if it's a custom 1387 // template, return it. 1388 if ( ! is_wp_error( $template ) && $template->is_custom ) { 1389 return $template; 1390 } 1318 1391 1319 1392 if ( ! is_wp_error( $template ) ) { … … 1780 1853 return $changes; 1781 1854 } 1855 1856 function wp_assign_new_template_to_theme( $changes, $request ) { 1857 // Do not run this for templates created through the old enpoint. 1858 $template = $request['id'] ? get_block_template( $request['id'], 'wp_template' ) : null; 1859 if ( $template ) { 1860 return $changes; 1861 } 1862 if ( ! isset( $changes->tax_input ) ) { 1863 $changes->tax_input = array(); 1864 } 1865 $changes->tax_input['wp_theme'] = isset( $request['theme'] ) ? $request['theme'] : get_stylesheet(); 1866 // All new templates saved will receive meta so we can distinguish between 1867 // templates created the old way as edits and templates created the new way. 1868 if ( ! isset( $changes->meta_input ) ) { 1869 $changes->meta_input = array(); 1870 } 1871 $changes->meta_input['is_inactive_by_default'] = true; 1872 return $changes; 1873 } 1874 1875 function wp_maybe_activate_template( $post_id ) { 1876 $post = get_post( $post_id ); 1877 $is_inactive_by_default = get_post_meta( $post_id, 'is_inactive_by_default', true ); 1878 if ( $is_inactive_by_default ) { 1879 return; 1880 } 1881 $active_templates = get_option( 'active_templates', array() ); 1882 $active_templates[ $post->post_name ] = $post->ID; 1883 update_option( 'active_templates', $active_templates ); 1884 } -
trunk/src/wp-includes/block-template.php
r60275 r61029 165 165 ); 166 166 167 // Find all potential templates 'wp_template' post matching the hierarchy. 167 $object = get_queried_object(); 168 $specific_template = $object ? get_page_template_slug( $object ) : null; 169 $active_templates = (array) get_option( 'active_templates', array() ); 170 171 // Remove templates slugs that are deactivated, except if it's the specific 172 // template or index. 173 $slugs = array_filter( 174 $slugs, 175 function ( $slug ) use ( $specific_template, $active_templates ) { 176 $should_ignore = $slug === $specific_template || 'index' === $slug; 177 return $should_ignore || ( ! isset( $active_templates[ $slug ] ) || false !== $active_templates[ $slug ] ); 178 } 179 ); 180 181 // We expect one template for each slug. Use the active template if it is 182 // set and exists. Otherwise use the static template. 183 $templates = array(); 184 $remaining_slugs = array(); 185 186 foreach ( $slugs as $slug ) { 187 if ( $slug === $specific_template || empty( $active_templates[ $slug ] ) ) { 188 $remaining_slugs[] = $slug; 189 continue; 190 } 191 192 // TODO: it need to be possible to set a static template as active. 193 $post = get_post( $active_templates[ $slug ] ); 194 if ( ! $post || 'publish' !== $post->post_status ) { 195 $remaining_slugs[] = $slug; 196 continue; 197 } 198 199 $template = _build_block_template_result_from_post( $post ); 200 201 // Ensure the active templates are associated with the active theme. 202 // See _build_block_template_object_from_post_object. 203 if ( get_stylesheet() !== $template->theme ) { 204 $remaining_slugs[] = $slug; 205 continue; 206 } 207 208 $templates[] = $template; 209 } 210 211 // Apply the filter to the active templates for backward compatibility. 212 /** This filter is documented in wp-includes/block-template-utils.php */ 213 if ( ! empty( $templates ) ) { 214 $templates = apply_filters( 215 'get_block_templates', 216 $templates, 217 array( 218 'slug__in' => array_map( 219 function ( $template ) { 220 return $template->slug; 221 }, 222 $templates 223 ), 224 ), 225 'wp_template' 226 ); 227 } 228 229 // For any remaining slugs, use the static template. 168 230 $query = array( 169 'slug__in' => $ slugs,231 'slug__in' => $remaining_slugs, 170 232 ); 171 $templates = get_block_templates( $query ); 233 $templates = array_merge( $templates, get_registered_block_templates( $query ) ); 234 235 if ( $specific_template ) { 236 $templates = array_merge( $templates, get_block_templates( array( 'slug__in' => array( $specific_template ) ) ) ); 237 } 172 238 173 239 // Order these templates per slug priority. -
trunk/src/wp-includes/default-filters.php
r61022 r61029 741 741 add_filter( 'render_block_context', '_block_template_render_without_post_block_context' ); 742 742 add_filter( 'pre_wp_unique_post_slug', 'wp_filter_wp_template_unique_post_slug', 10, 5 ); 743 add_action( 'save_post_wp_template', 'wp_maybe_activate_template' ); 743 744 add_action( 'save_post_wp_template_part', 'wp_set_unique_slug_on_create_template_part' ); 744 745 add_action( 'wp_enqueue_scripts', 'wp_enqueue_block_template_skip_link' ); … … 781 782 add_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes' ); 782 783 784 // Assign the wp_theme term to any newly created wp_template with the new endpoint. 785 // Must run before `inject_ignored_hooked_blocks_metadata_attributes`. 786 add_action( 'rest_pre_insert_wp_template', 'wp_assign_new_template_to_theme', 9, 2 ); 787 783 788 // Update ignoredHookedBlocks postmeta for some post types. 784 789 add_filter( 'rest_pre_insert_page', 'update_ignored_hooked_blocks_postmeta' ); -
trunk/src/wp-includes/option.php
r60978 r61029 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 reason 2969 // 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 false 2974 // (deactivated). 2975 'additionalProperties' => true, 2976 ), 2977 ), 2978 'label' => 'Active Templates', 2979 ) 2980 ); 2962 2981 } 2963 2982 -
trunk/src/wp-includes/post.php
r60987 r61029 399 399 'show_in_rest' => true, 400 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', 401 'rest_base' => 'wp_template', 402 'rest_controller_class' => 'WP_REST_Posts_Controller', 405 403 'late_route_registration' => true, 406 404 'capability_type' => array( 'template', 'templates' ), … … 427 425 'revisions', 428 426 'author', 427 'custom-fields', 429 428 ), 430 429 ) … … 8630 8629 ) 8631 8630 ); 8632 } 8631 8632 // Allow setting the is_wp_suggestion meta field, which partly determines if 8633 // a template is a custom template. 8634 register_post_meta( 8635 'wp_template', 8636 'is_wp_suggestion', 8637 array( 8638 'type' => 'boolean', 8639 'show_in_rest' => true, 8640 'single' => true, 8641 ) 8642 ); 8643 } -
trunk/src/wp-includes/rest-api.php
r60104 r61029 264 264 */ 265 265 function create_initial_rest_routes() { 266 global $wp_post_types; 267 268 // Register the registered templates endpoint. For that we need to copy the 269 // wp_template post type so that it's available as an entity in core-data. 270 $wp_post_types['wp_registered_template'] = clone $wp_post_types['wp_template']; 271 $wp_post_types['wp_registered_template']->name = 'wp_registered_template'; 272 $wp_post_types['wp_registered_template']->rest_base = 'wp_registered_template'; 273 $wp_post_types['wp_registered_template']->rest_controller_class = 'WP_REST_Registered_Templates_Controller'; 274 266 275 foreach ( get_post_types( array( 'show_in_rest' => true ), 'objects' ) as $post_type ) { 267 276 $controller = $post_type->get_rest_controller(); … … 289 298 } 290 299 } 300 301 // Register the old templates endpoints. The WP_REST_Templates_Controller 302 // and sub-controllers used linked to the wp_template post type, but are no 303 // longer. They still require a post type object when contructing the class. 304 // To maintain backward and changes to these controller classes, we make use 305 // that the wp_template post type has the right information it needs. 306 $wp_post_types['wp_template']->rest_base = 'templates'; 307 // Store the classes so they can be restored. 308 $original_rest_controller_class = $wp_post_types['wp_template']->rest_controller_class; 309 $original_autosave_rest_controller_class = $wp_post_types['wp_template']->autosave_rest_controller_class; 310 $original_revisions_rest_controller_class = $wp_post_types['wp_template']->revisions_rest_controller_class; 311 // Temporarily set the old classes. 312 $wp_post_types['wp_template']->rest_controller_class = 'WP_REST_Templates_Controller'; 313 $wp_post_types['wp_template']->autosave_rest_controller_class = 'WP_REST_Template_Autosaves_Controller'; 314 $wp_post_types['wp_template']->revisions_rest_controller_class = 'WP_REST_Template_Revisions_Controller'; 315 // Initialize the controllers. The order is important: the autosave 316 // controller needs both the templates and revisions controllers. 317 $controller = new WP_REST_Templates_Controller( 'wp_template' ); 318 $wp_post_types['wp_template']->rest_controller = $controller; 319 $revisions_controller = new WP_REST_Template_Revisions_Controller( 'wp_template' ); 320 $wp_post_types['wp_template']->revisions_rest_controller = $revisions_controller; 321 $autosaves_controller = new WP_REST_Template_Autosaves_Controller( 'wp_template' ); 322 // Unset the controller cache, it will be re-initialized when 323 // get_rest_controller is called. 324 $wp_post_types['wp_template']->rest_controller = null; 325 $wp_post_types['wp_template']->revisions_rest_controller = null; 326 // Restore the original classes. 327 $wp_post_types['wp_template']->rest_controller_class = $original_rest_controller_class; 328 $wp_post_types['wp_template']->autosave_rest_controller_class = $original_autosave_rest_controller_class; 329 $wp_post_types['wp_template']->revisions_rest_controller_class = $original_revisions_rest_controller_class; 330 // Restore the original base. 331 $wp_post_types['wp_template']->rest_base = 'wp_template'; 332 333 // Register the old routes. 334 $autosaves_controller->register_routes(); 335 $revisions_controller->register_routes(); 336 $controller->register_routes(); 337 338 register_rest_field( 339 'wp_template', 340 'theme', 341 array( 342 'get_callback' => function ( $post_arr ) { 343 // add_additional_fields_to_object is also called for the old 344 // templates controller, so we need to check if the id is an 345 // integer to make sure it's the proper post type endpoint. 346 if ( ! is_int( $post_arr['id'] ) ) { 347 $template = get_block_template( $post_arr['id'], 'wp_template' ); 348 return $template ? $template->theme : null; 349 } 350 $terms = get_the_terms( $post_arr['id'], 'wp_theme' ); 351 if ( is_wp_error( $terms ) || empty( $terms ) ) { 352 return null; 353 } 354 return $terms[0]->slug; 355 }, 356 ) 357 ); 291 358 292 359 // Post types. -
trunk/src/wp-includes/theme-templates.php
r59832 r61029 47 47 function wp_filter_wp_template_unique_post_slug( $override_slug, $slug, $post_id, $post_status, $post_type ) { 48 48 if ( 'wp_template' !== $post_type && 'wp_template_part' !== $post_type ) { 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 ) { 49 54 return $override_slug; 50 55 } -
trunk/src/wp-settings.php
r61014 r61029 326 326 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widgets-controller.php'; 327 327 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-templates-controller.php'; 328 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-registered-templates-controller.php'; 328 329 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-url-details-controller.php'; 329 330 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-navigation-fallback-controller.php'; -
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r60359 r61029 158 158 '/wp/v2/templates/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions', 159 159 '/wp/v2/templates/(?P<parent>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)/revisions/(?P<id>[\d]+)', 160 '/wp/v2/wp_registered_template', 161 '/wp/v2/wp_registered_template/(?P<id>([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w%-]+)', 162 '/wp/v2/wp_template', 163 '/wp/v2/wp_template/(?P<id>[\d]+)', 164 '/wp/v2/wp_template/(?P<id>[\d]+)/autosaves', 165 '/wp/v2/wp_template/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)', 166 '/wp/v2/wp_template/(?P<parent>[\d]+)/revisions', 167 '/wp/v2/wp_template/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)', 160 168 '/wp/v2/templates/lookup', 161 169 '/wp/v2/themes', -
trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php
r60357 r61029 120 120 'default_comment_status', 121 121 'site_icon', // Registered in wp-includes/blocks/site-logo.php 122 'active_templates', 122 123 ); 123 124 -
trunk/tests/phpunit/tests/rest-api/wpRestTemplateAutosavesController.php
r59970 r61029 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 $controller = new WP_REST_Template_Autosaves_Controller( $parent_post->post_type ); 593 $response = $controller->prepare_item_for_response( $autosave_db_post, $request ); 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 ); 594 607 $this->assertInstanceOf( 595 608 WP_REST_Response::class, -
trunk/tests/phpunit/tests/rest-api/wpRestTemplateRevisionsController.php
r59985 r61029 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 $controller = new WP_REST_Template_Revisions_Controller( $parent_post->post_type ); 834 $response = $controller->prepare_item_for_response( $post, $request ); 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 ); 835 844 $this->assertInstanceOf( 836 845 WP_REST_Response::class, -
trunk/tests/qunit/fixtures/wp-api-generated.js
r60917 r61029 5508 5508 ] 5509 5509 }, 5510 "/wp/v2/ templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": {5510 "/wp/v2/wp_template/(?P<parent>[\\d]+)/revisions": { 5511 5511 "namespace": "wp/v2", 5512 5512 "methods": [ … … 5520 5520 "args": { 5521 5521 "parent": { 5522 "description": "The id of a template",5523 "type": " string",5522 "description": "The ID for the parent of the revision.", 5523 "type": "integer", 5524 5524 "required": false 5525 5525 }, … … 5606 5606 ] 5607 5607 }, 5608 "/wp/v2/ templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": {5608 "/wp/v2/wp_template/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 5609 5609 "namespace": "wp/v2", 5610 5610 "methods": [ … … 5619 5619 "args": { 5620 5620 "parent": { 5621 "description": "The id of a template",5622 "type": " string",5621 "description": "The ID for the parent of the revision.", 5622 "type": "integer", 5623 5623 "required": false 5624 5624 }, … … 5647 5647 "args": { 5648 5648 "parent": { 5649 "description": "The id of a template",5650 "type": " string",5649 "description": "The ID for the parent of the revision.", 5650 "type": "integer", 5651 5651 "required": false 5652 5652 }, … … 5666 5666 ] 5667 5667 }, 5668 "/wp/v2/ templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": {5668 "/wp/v2/wp_template/(?P<id>[\\d]+)/autosaves": { 5669 5669 "namespace": "wp/v2", 5670 5670 "methods": [ … … 5678 5678 ], 5679 5679 "args": { 5680 " id": {5681 "description": "The id of a template",5682 "type": " string",5680 "parent": { 5681 "description": "The ID for the parent of the autosave.", 5682 "type": "integer", 5683 5683 "required": false 5684 5684 }, … … 5701 5701 ], 5702 5702 "args": { 5703 "id": { 5704 "description": "The id of a template", 5705 "type": "string", 5703 "parent": { 5704 "description": "The ID for the parent of the autosave.", 5705 "type": "integer", 5706 "required": false 5707 }, 5708 "date": { 5709 "description": "The date the post was published, in the site's timezone.", 5710 "type": [ 5711 "string", 5712 "null" 5713 ], 5714 "format": "date-time", 5715 "required": false 5716 }, 5717 "date_gmt": { 5718 "description": "The date the post was published, as GMT.", 5719 "type": [ 5720 "string", 5721 "null" 5722 ], 5723 "format": "date-time", 5706 5724 "required": false 5707 5725 }, 5708 5726 "slug": { 5709 "description": "Unique slug identifying the template.", 5710 "type": "string", 5711 "minLength": 1, 5712 "pattern": "[a-zA-Z0-9_\\%-]+", 5713 "required": false 5714 }, 5715 "theme": { 5716 "description": "Theme identifier for the template.", 5717 "type": "string", 5718 "required": false 5719 }, 5720 "type": { 5721 "description": "Type of template.", 5722 "type": "string", 5723 "required": false 5724 }, 5725 "content": { 5726 "description": "Content of template.", 5727 "type": [ 5728 "object", 5729 "string" 5730 ], 5727 "description": "An alphanumeric identifier for the post unique to its type.", 5728 "type": "string", 5729 "required": false 5730 }, 5731 "status": { 5732 "description": "A named status for the post.", 5733 "type": "string", 5734 "enum": [ 5735 "publish", 5736 "future", 5737 "draft", 5738 "pending", 5739 "private" 5740 ], 5741 "required": false 5742 }, 5743 "password": { 5744 "description": "A password to protect access to the content and excerpt.", 5745 "type": "string", 5746 "required": false 5747 }, 5748 "title": { 5749 "description": "The title for the post.", 5750 "type": "object", 5731 5751 "properties": { 5732 5752 "raw": { 5733 "description": " Content for the template, as it exists in the database.",5753 "description": "Title for the post, as it exists in the database.", 5734 5754 "type": "string", 5735 5755 "context": [ 5736 "view",5737 5756 "edit" 5738 5757 ] 5739 5758 }, 5740 "block_version": {5741 "description": "Version of the content block format used by the template.",5742 "type": "integer",5743 "context": [5744 "edit"5745 ],5746 "readonly": true5747 }5748 },5749 "required": false5750 },5751 "title": {5752 "description": "Title of template.",5753 "type": [5754 "object",5755 "string"5756 ],5757 "properties": {5758 "raw": {5759 "description": "Title for the template, as it exists in the database.",5760 "type": "string",5761 "context": [5762 "view",5763 "edit",5764 "embed"5765 ]5766 },5767 5759 "rendered": { 5768 "description": "HTML title for the template, transformed for display.",5760 "description": "HTML title for the post, transformed for display.", 5769 5761 "type": "string", 5770 5762 "context": [ … … 5778 5770 "required": false 5779 5771 }, 5780 "description": {5781 "description": "Description of template.",5782 "type": "string",5783 "required": false5784 },5785 "status": {5786 "description": "Status of template.",5787 "type": "string",5788 "enum": [5789 "publish",5790 "future",5791 "draft",5792 "pending",5793 "private"5794 ],5795 "required": false5796 },5797 "author": {5798 "description": "The ID for the author of the template.",5799 "type": "integer",5800 "required": false5801 }5802 }5803 }5804 ]5805 },5806 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": {5807 "namespace": "wp/v2",5808 "methods": [5809 "GET"5810 ],5811 "endpoints": [5812 {5813 "methods": [5814 "GET"5815 ],5816 "args": {5817 "parent": {5818 "description": "The id of a template",5819 "type": "string",5820 "required": false5821 },5822 "id": {5823 "description": "The ID for the autosave.",5824 "type": "integer",5825 "required": false5826 },5827 "context": {5828 "description": "Scope under which the request is made; determines fields present in response.",5829 "type": "string",5830 "enum": [5831 "view",5832 "embed",5833 "edit"5834 ],5835 "default": "view",5836 "required": false5837 }5838 }5839 }5840 ]5841 },5842 "/wp/v2/templates": {5843 "namespace": "wp/v2",5844 "methods": [5845 "GET",5846 "POST"5847 ],5848 "endpoints": [5849 {5850 "methods": [5851 "GET"5852 ],5853 "args": {5854 "context": {5855 "description": "Scope under which the request is made; determines fields present in response.",5856 "type": "string",5857 "enum": [5858 "view",5859 "embed",5860 "edit"5861 ],5862 "default": "view",5863 "required": false5864 },5865 "wp_id": {5866 "description": "Limit to the specified post id.",5867 "type": "integer",5868 "required": false5869 },5870 "area": {5871 "description": "Limit to the specified template part area.",5872 "type": "string",5873 "required": false5874 },5875 "post_type": {5876 "description": "Post type to get the templates for.",5877 "type": "string",5878 "required": false5879 }5880 }5881 },5882 {5883 "methods": [5884 "POST"5885 ],5886 "args": {5887 "slug": {5888 "description": "Unique slug identifying the template.",5889 "type": "string",5890 "minLength": 1,5891 "pattern": "[a-zA-Z0-9_\\%-]+",5892 "required": true5893 },5894 "theme": {5895 "description": "Theme identifier for the template.",5896 "type": "string",5897 "required": false5898 },5899 "type": {5900 "description": "Type of template.",5901 "type": "string",5902 "required": false5903 },5904 5772 "content": { 5905 "default": "", 5906 "description": "Content of template.", 5907 "type": [ 5908 "object", 5909 "string" 5910 ], 5773 "description": "The content for the post.", 5774 "type": "object", 5911 5775 "properties": { 5912 5776 "raw": { 5913 "description": "Content for the template, as it exists in the database.",5777 "description": "Content for the post, as it exists in the database.", 5914 5778 "type": "string", 5915 5779 "context": [ 5916 "view",5917 5780 "edit" 5918 5781 ] 5919 5782 }, 5920 "block_version": { 5921 "description": "Version of the content block format used by the template.", 5922 "type": "integer", 5923 "context": [ 5783 "rendered": { 5784 "description": "HTML content for the post, transformed for display.", 5785 "type": "string", 5786 "context": [ 5787 "view", 5924 5788 "edit" 5925 5789 ], 5926 5790 "readonly": true 5927 }5928 },5929 "required": false5930 },5931 "title": {5932 "default": "",5933 "description": "Title of template.",5934 "type": [5935 "object",5936 "string"5937 ],5938 "properties": {5939 "raw": {5940 "description": "Title for the template, as it exists in the database.",5941 "type": "string",5942 "context": [5943 "view",5944 "edit",5945 "embed"5946 ]5947 5791 }, 5948 "rendered": { 5949 "description": "HTML title for the template, transformed for display.", 5950 "type": "string", 5792 "block_version": { 5793 "description": "Version of the content block format used by the post.", 5794 "type": "integer", 5795 "context": [ 5796 "edit" 5797 ], 5798 "readonly": true 5799 }, 5800 "protected": { 5801 "description": "Whether the content is protected with a password.", 5802 "type": "boolean", 5951 5803 "context": [ 5952 5804 "view", … … 5959 5811 "required": false 5960 5812 }, 5961 "description": {5962 "default": "",5963 "description": "Description of template.",5964 "type": "string",5965 "required": false5966 },5967 "status": {5968 "default": "publish",5969 "description": "Status of template.",5970 "type": "string",5971 "enum": [5972 "publish",5973 "future",5974 "draft",5975 "pending",5976 "private"5977 ],5978 "required": false5979 },5980 5813 "author": { 5981 "description": "The ID for the author of the template.", 5982 "type": "integer", 5983 "required": false 5984 } 5985 } 5986 } 5987 ], 5988 "_links": { 5989 "self": [ 5990 { 5991 "href": "http://example.org/index.php?rest_route=/wp/v2/templates" 5992 } 5993 ] 5994 } 5995 }, 5996 "/wp/v2/templates/lookup": { 5997 "namespace": "wp/v2", 5998 "methods": [ 5999 "GET" 6000 ], 6001 "endpoints": [ 6002 { 6003 "methods": [ 6004 "GET" 6005 ], 6006 "args": { 6007 "slug": { 6008 "description": "The slug of the template to get the fallback for", 6009 "type": "string", 6010 "required": true 6011 }, 6012 "is_custom": { 6013 "description": "Indicates if a template is custom or part of the template hierarchy", 6014 "type": "boolean", 6015 "required": false 6016 }, 6017 "template_prefix": { 6018 "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`", 6019 "type": "string", 6020 "required": false 6021 } 6022 } 6023 } 6024 ], 6025 "_links": { 6026 "self": [ 6027 { 6028 "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" 6029 } 6030 ] 6031 } 6032 }, 6033 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 6034 "namespace": "wp/v2", 6035 "methods": [ 6036 "GET", 6037 "POST", 6038 "PUT", 6039 "PATCH", 6040 "DELETE" 6041 ], 6042 "endpoints": [ 6043 { 6044 "methods": [ 6045 "GET" 6046 ], 6047 "args": { 6048 "id": { 6049 "description": "The id of a template", 6050 "type": "string", 6051 "required": false 6052 }, 6053 "context": { 6054 "description": "Scope under which the request is made; determines fields present in response.", 6055 "type": "string", 6056 "enum": [ 6057 "view", 6058 "embed", 6059 "edit" 6060 ], 6061 "default": "view", 6062 "required": false 6063 } 6064 } 6065 }, 6066 { 6067 "methods": [ 6068 "POST", 6069 "PUT", 6070 "PATCH" 6071 ], 6072 "args": { 6073 "id": { 6074 "description": "The id of a template", 6075 "type": "string", 6076 "required": false 6077 }, 6078 "slug": { 6079 "description": "Unique slug identifying the template.", 6080 "type": "string", 6081 "minLength": 1, 6082 "pattern": "[a-zA-Z0-9_\\%-]+", 6083 "required": false 6084 }, 6085 "theme": { 6086 "description": "Theme identifier for the template.", 6087 "type": "string", 6088 "required": false 6089 }, 6090 "type": { 6091 "description": "Type of template.", 6092 "type": "string", 6093 "required": false 6094 }, 6095 "content": { 6096 "description": "Content of template.", 6097 "type": [ 6098 "object", 6099 "string" 6100 ], 5814 "description": "The ID for the author of the post.", 5815 "type": "integer", 5816 "required": false 5817 }, 5818 "excerpt": { 5819 "description": "The excerpt for the post.", 5820 "type": "object", 6101 5821 "properties": { 6102 5822 "raw": { 6103 "description": " Content for the template, as it exists in the database.",5823 "description": "Excerpt for the post, as it exists in the database.", 6104 5824 "type": "string", 6105 5825 "context": [ 6106 "view",6107 5826 "edit" 6108 5827 ] 6109 5828 }, 6110 "block_version": { 6111 "description": "Version of the content block format used by the template.", 6112 "type": "integer", 6113 "context": [ 6114 "edit" 6115 ], 6116 "readonly": true 6117 } 6118 }, 6119 "required": false 6120 }, 6121 "title": { 6122 "description": "Title of template.", 6123 "type": [ 6124 "object", 6125 "string" 6126 ], 6127 "properties": { 6128 "raw": { 6129 "description": "Title for the template, as it exists in the database.", 5829 "rendered": { 5830 "description": "HTML excerpt for the post, transformed for display.", 6130 5831 "type": "string", 6131 5832 "context": [ … … 6133 5834 "edit", 6134 5835 "embed" 6135 ] 5836 ], 5837 "readonly": true 6136 5838 }, 6137 " rendered": {6138 "description": " HTML title for the template, transformed for display.",6139 "type": " string",5839 "protected": { 5840 "description": "Whether the excerpt is protected with a password.", 5841 "type": "boolean", 6140 5842 "context": [ 6141 5843 "view", … … 6148 5850 "required": false 6149 5851 }, 6150 "description": { 6151 "description": "Description of template.", 6152 "type": "string", 6153 "required": false 6154 }, 6155 "status": { 6156 "description": "Status of template.", 6157 "type": "string", 6158 "enum": [ 6159 "publish", 6160 "future", 6161 "draft", 6162 "pending", 6163 "private" 6164 ], 6165 "required": false 6166 }, 6167 "author": { 6168 "description": "The ID for the author of the template.", 6169 "type": "integer", 6170 "required": false 6171 } 6172 } 6173 }, 6174 { 6175 "methods": [ 6176 "DELETE" 6177 ], 6178 "args": { 6179 "id": { 6180 "description": "The id of a template", 6181 "type": "string", 6182 "required": false 6183 }, 6184 "force": { 6185 "type": "boolean", 6186 "default": false, 6187 "description": "Whether to bypass Trash and force deletion.", 5852 "meta": { 5853 "description": "Meta fields.", 5854 "type": "object", 5855 "properties": [], 5856 "required": false 5857 }, 5858 "template": { 5859 "description": "The theme file to use to display the post.", 5860 "type": "string", 6188 5861 "required": false 6189 5862 } … … 6192 5865 ] 6193 5866 }, 6194 "/wp/v2/ template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": {5867 "/wp/v2/wp_template/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)": { 6195 5868 "namespace": "wp/v2", 6196 5869 "methods": [ … … 6204 5877 "args": { 6205 5878 "parent": { 6206 "description": "The id of a template", 6207 "type": "string", 5879 "description": "The ID for the parent of the autosave.", 5880 "type": "integer", 5881 "required": false 5882 }, 5883 "id": { 5884 "description": "The ID for the autosave.", 5885 "type": "integer", 6208 5886 "required": false 6209 5887 }, … … 6218 5896 "default": "view", 6219 5897 "required": false 6220 },6221 "page": {6222 "description": "Current page of the collection.",6223 "type": "integer",6224 "default": 1,6225 "minimum": 1,6226 "required": false6227 },6228 "per_page": {6229 "description": "Maximum number of items to be returned in result set.",6230 "type": "integer",6231 "minimum": 1,6232 "maximum": 100,6233 "required": false6234 },6235 "search": {6236 "description": "Limit results to those matching a string.",6237 "type": "string",6238 "required": false6239 },6240 "exclude": {6241 "description": "Ensure result set excludes specific IDs.",6242 "type": "array",6243 "items": {6244 "type": "integer"6245 },6246 "default": [],6247 "required": false6248 },6249 "include": {6250 "description": "Limit result set to specific IDs.",6251 "type": "array",6252 "items": {6253 "type": "integer"6254 },6255 "default": [],6256 "required": false6257 },6258 "offset": {6259 "description": "Offset the result set by a specific number of items.",6260 "type": "integer",6261 "required": false6262 },6263 "order": {6264 "description": "Order sort attribute ascending or descending.",6265 "type": "string",6266 "default": "desc",6267 "enum": [6268 "asc",6269 "desc"6270 ],6271 "required": false6272 },6273 "orderby": {6274 "description": "Sort collection by object attribute.",6275 "type": "string",6276 "default": "date",6277 "enum": [6278 "date",6279 "id",6280 "include",6281 "relevance",6282 "slug",6283 "include_slugs",6284 "title"6285 ],6286 "required": false6287 5898 } 6288 5899 } … … 6290 5901 ] 6291 5902 }, 6292 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": { 6293 "namespace": "wp/v2", 6294 "methods": [ 6295 "GET", 6296 "DELETE" 6297 ], 6298 "endpoints": [ 6299 { 6300 "methods": [ 6301 "GET" 6302 ], 6303 "args": { 6304 "parent": { 6305 "description": "The id of a template", 6306 "type": "string", 6307 "required": false 6308 }, 6309 "id": { 6310 "description": "Unique identifier for the revision.", 6311 "type": "integer", 6312 "required": false 6313 }, 6314 "context": { 6315 "description": "Scope under which the request is made; determines fields present in response.", 6316 "type": "string", 6317 "enum": [ 6318 "view", 6319 "embed", 6320 "edit" 6321 ], 6322 "default": "view", 6323 "required": false 6324 } 6325 } 6326 }, 6327 { 6328 "methods": [ 6329 "DELETE" 6330 ], 6331 "args": { 6332 "parent": { 6333 "description": "The id of a template", 6334 "type": "string", 6335 "required": false 6336 }, 6337 "id": { 6338 "description": "Unique identifier for the revision.", 6339 "type": "integer", 6340 "required": false 6341 }, 6342 "force": { 6343 "type": "boolean", 6344 "default": false, 6345 "description": "Required to be true, as revisions do not support trashing.", 6346 "required": false 6347 } 6348 } 6349 } 6350 ] 6351 }, 6352 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { 5903 "/wp/v2/wp_template": { 6353 5904 "namespace": "wp/v2", 6354 5905 "methods": [ … … 6361 5912 "GET" 6362 5913 ], 6363 "args": { 6364 "id": { 6365 "description": "The id of a template", 6366 "type": "string", 6367 "required": false 6368 }, 5914 "allow_batch": { 5915 "v1": true 5916 }, 5917 "args": { 6369 5918 "context": { 6370 5919 "description": "Scope under which the request is made; determines fields present in response.", … … 6377 5926 "default": "view", 6378 5927 "required": false 6379 }6380 }6381 },6382 {6383 "methods": [6384 "POST"6385 ],6386 "args": {6387 "id": {6388 "description": "The id of a template",6389 "type": "string",6390 "required": false6391 },6392 "slug": {6393 "description": "Unique slug identifying the template.",6394 "type": "string",6395 "minLength": 1,6396 "pattern": "[a-zA-Z0-9_\\%-]+",6397 "required": false6398 },6399 "theme": {6400 "description": "Theme identifier for the template.",6401 "type": "string",6402 "required": false6403 },6404 "type": {6405 "description": "Type of template.",6406 "type": "string",6407 "required": false6408 },6409 "content": {6410 "description": "Content of template.",6411 "type": [6412 "object",6413 "string"6414 ],6415 "properties": {6416 "raw": {6417 "description": "Content for the template, as it exists in the database.",6418 "type": "string",6419 "context": [6420 "view",6421 "edit"6422 ]6423 },6424 "block_version": {6425 "description": "Version of the content block format used by the template.",6426 "type": "integer",6427 "context": [6428 "edit"6429 ],6430 "readonly": true6431 }6432 },6433 "required": false6434 },6435 "title": {6436 "description": "Title of template.",6437 "type": [6438 "object",6439 "string"6440 ],6441 "properties": {6442 "raw": {6443 "description": "Title for the template, as it exists in the database.",6444 "type": "string",6445 "context": [6446 "view",6447 "edit",6448 "embed"6449 ]6450 },6451 "rendered": {6452 "description": "HTML title for the template, transformed for display.",6453 "type": "string",6454 "context": [6455 "view",6456 "edit",6457 "embed"6458 ],6459 "readonly": true6460 }6461 },6462 "required": false6463 },6464 "description": {6465 "description": "Description of template.",6466 "type": "string",6467 "required": false6468 },6469 "status": {6470 "description": "Status of template.",6471 "type": "string",6472 "enum": [6473 "publish",6474 "future",6475 "draft",6476 "pending",6477 "private"6478 ],6479 "required": false6480 },6481 "author": {6482 "description": "The ID for the author of the template.",6483 "type": "integer",6484 "required": false6485 },6486 "area": {6487 "description": "Where the template part is intended for use (header, footer, etc.)",6488 "type": "string",6489 "required": false6490 }6491 }6492 }6493 ]6494 },6495 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": {6496 "namespace": "wp/v2",6497 "methods": [6498 "GET"6499 ],6500 "endpoints": [6501 {6502 "methods": [6503 "GET"6504 ],6505 "args": {6506 "parent": {6507 "description": "The id of a template",6508 "type": "string",6509 "required": false6510 },6511 "id": {6512 "description": "The ID for the autosave.",6513 "type": "integer",6514 "required": false6515 },6516 "context": {6517 "description": "Scope under which the request is made; determines fields present in response.",6518 "type": "string",6519 "enum": [6520 "view",6521 "embed",6522 "edit"6523 ],6524 "default": "view",6525 "required": false6526 }6527 }6528 }6529 ]6530 },6531 "/wp/v2/template-parts": {6532 "namespace": "wp/v2",6533 "methods": [6534 "GET",6535 "POST"6536 ],6537 "endpoints": [6538 {6539 "methods": [6540 "GET"6541 ],6542 "args": {6543 "context": {6544 "description": "Scope under which the request is made; determines fields present in response.",6545 "type": "string",6546 "enum": [6547 "view",6548 "embed",6549 "edit"6550 ],6551 "default": "view",6552 "required": false6553 },6554 "wp_id": {6555 "description": "Limit to the specified post id.",6556 "type": "integer",6557 "required": false6558 },6559 "area": {6560 "description": "Limit to the specified template part area.",6561 "type": "string",6562 "required": false6563 },6564 "post_type": {6565 "description": "Post type to get the templates for.",6566 "type": "string",6567 "required": false6568 }6569 }6570 },6571 {6572 "methods": [6573 "POST"6574 ],6575 "args": {6576 "slug": {6577 "description": "Unique slug identifying the template.",6578 "type": "string",6579 "minLength": 1,6580 "pattern": "[a-zA-Z0-9_\\%-]+",6581 "required": true6582 },6583 "theme": {6584 "description": "Theme identifier for the template.",6585 "type": "string",6586 "required": false6587 },6588 "type": {6589 "description": "Type of template.",6590 "type": "string",6591 "required": false6592 },6593 "content": {6594 "default": "",6595 "description": "Content of template.",6596 "type": [6597 "object",6598 "string"6599 ],6600 "properties": {6601 "raw": {6602 "description": "Content for the template, as it exists in the database.",6603 "type": "string",6604 "context": [6605 "view",6606 "edit"6607 ]6608 },6609 "block_version": {6610 "description": "Version of the content block format used by the template.",6611 "type": "integer",6612 "context": [6613 "edit"6614 ],6615 "readonly": true6616 }6617 },6618 "required": false6619 },6620 "title": {6621 "default": "",6622 "description": "Title of template.",6623 "type": [6624 "object",6625 "string"6626 ],6627 "properties": {6628 "raw": {6629 "description": "Title for the template, as it exists in the database.",6630 "type": "string",6631 "context": [6632 "view",6633 "edit",6634 "embed"6635 ]6636 },6637 "rendered": {6638 "description": "HTML title for the template, transformed for display.",6639 "type": "string",6640 "context": [6641 "view",6642 "edit",6643 "embed"6644 ],6645 "readonly": true6646 }6647 },6648 "required": false6649 },6650 "description": {6651 "default": "",6652 "description": "Description of template.",6653 "type": "string",6654 "required": false6655 },6656 "status": {6657 "default": "publish",6658 "description": "Status of template.",6659 "type": "string",6660 "enum": [6661 "publish",6662 "future",6663 "draft",6664 "pending",6665 "private"6666 ],6667 "required": false6668 },6669 "author": {6670 "description": "The ID for the author of the template.",6671 "type": "integer",6672 "required": false6673 },6674 "area": {6675 "description": "Where the template part is intended for use (header, footer, etc.)",6676 "type": "string",6677 "required": false6678 }6679 }6680 }6681 ],6682 "_links": {6683 "self": [6684 {6685 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts"6686 }6687 ]6688 }6689 },6690 "/wp/v2/template-parts/lookup": {6691 "namespace": "wp/v2",6692 "methods": [6693 "GET"6694 ],6695 "endpoints": [6696 {6697 "methods": [6698 "GET"6699 ],6700 "args": {6701 "slug": {6702 "description": "The slug of the template to get the fallback for",6703 "type": "string",6704 "required": true6705 },6706 "is_custom": {6707 "description": "Indicates if a template is custom or part of the template hierarchy",6708 "type": "boolean",6709 "required": false6710 },6711 "template_prefix": {6712 "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`",6713 "type": "string",6714 "required": false6715 }6716 }6717 }6718 ],6719 "_links": {6720 "self": [6721 {6722 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup"6723 }6724 ]6725 }6726 },6727 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": {6728 "namespace": "wp/v2",6729 "methods": [6730 "GET",6731 "POST",6732 "PUT",6733 "PATCH",6734 "DELETE"6735 ],6736 "endpoints": [6737 {6738 "methods": [6739 "GET"6740 ],6741 "args": {6742 "id": {6743 "description": "The id of a template",6744 "type": "string",6745 "required": false6746 },6747 "context": {6748 "description": "Scope under which the request is made; determines fields present in response.",6749 "type": "string",6750 "enum": [6751 "view",6752 "embed",6753 "edit"6754 ],6755 "default": "view",6756 "required": false6757 }6758 }6759 },6760 {6761 "methods": [6762 "POST",6763 "PUT",6764 "PATCH"6765 ],6766 "args": {6767 "id": {6768 "description": "The id of a template",6769 "type": "string",6770 "required": false6771 },6772 "slug": {6773 "description": "Unique slug identifying the template.",6774 "type": "string",6775 "minLength": 1,6776 "pattern": "[a-zA-Z0-9_\\%-]+",6777 "required": false6778 },6779 "theme": {6780 "description": "Theme identifier for the template.",6781 "type": "string",6782 "required": false6783 },6784 "type": {6785 "description": "Type of template.",6786 "type": "string",6787 "required": false6788 },6789 "content": {6790 "description": "Content of template.",6791 "type": [6792 "object",6793 "string"6794 ],6795 "properties": {6796 "raw": {6797 "description": "Content for the template, as it exists in the database.",6798 "type": "string",6799 "context": [6800 "view",6801 "edit"6802 ]6803 },6804 "block_version": {6805 "description": "Version of the content block format used by the template.",6806 "type": "integer",6807 "context": [6808 "edit"6809 ],6810 "readonly": true6811 }6812 },6813 "required": false6814 },6815 "title": {6816 "description": "Title of template.",6817 "type": [6818 "object",6819 "string"6820 ],6821 "properties": {6822 "raw": {6823 "description": "Title for the template, as it exists in the database.",6824 "type": "string",6825 "context": [6826 "view",6827 "edit",6828 "embed"6829 ]6830 },6831 "rendered": {6832 "description": "HTML title for the template, transformed for display.",6833 "type": "string",6834 "context": [6835 "view",6836 "edit",6837 "embed"6838 ],6839 "readonly": true6840 }6841 },6842 "required": false6843 },6844 "description": {6845 "description": "Description of template.",6846 "type": "string",6847 "required": false6848 },6849 "status": {6850 "description": "Status of template.",6851 "type": "string",6852 "enum": [6853 "publish",6854 "future",6855 "draft",6856 "pending",6857 "private"6858 ],6859 "required": false6860 },6861 "author": {6862 "description": "The ID for the author of the template.",6863 "type": "integer",6864 "required": false6865 },6866 "area": {6867 "description": "Where the template part is intended for use (header, footer, etc.)",6868 "type": "string",6869 "required": false6870 }6871 }6872 },6873 {6874 "methods": [6875 "DELETE"6876 ],6877 "args": {6878 "id": {6879 "description": "The id of a template",6880 "type": "string",6881 "required": false6882 },6883 "force": {6884 "type": "boolean",6885 "default": false,6886 "description": "Whether to bypass Trash and force deletion.",6887 "required": false6888 }6889 }6890 }6891 ]6892 },6893 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions": {6894 "namespace": "wp/v2",6895 "methods": [6896 "GET"6897 ],6898 "endpoints": [6899 {6900 "methods": [6901 "GET"6902 ],6903 "args": {6904 "parent": {6905 "description": "The ID for the parent of the revision.",6906 "type": "integer",6907 "required": false6908 },6909 "context": {6910 "description": "Scope under which the request is made; determines fields present in response.",6911 "type": "string",6912 "enum": [6913 "view",6914 "embed",6915 "edit"6916 ],6917 "default": "view",6918 "required": false6919 },6920 "page": {6921 "description": "Current page of the collection.",6922 "type": "integer",6923 "default": 1,6924 "minimum": 1,6925 "required": false6926 },6927 "per_page": {6928 "description": "Maximum number of items to be returned in result set.",6929 "type": "integer",6930 "minimum": 1,6931 "maximum": 100,6932 "required": false6933 },6934 "offset": {6935 "description": "Offset the result set by a specific number of items.",6936 "type": "integer",6937 "required": false6938 }6939 }6940 }6941 ]6942 },6943 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": {6944 "namespace": "wp/v2",6945 "methods": [6946 "GET"6947 ],6948 "endpoints": [6949 {6950 "methods": [6951 "GET"6952 ],6953 "args": {6954 "parent": {6955 "description": "The ID for the parent of the global styles revision.",6956 "type": "integer",6957 "required": false6958 },6959 "id": {6960 "description": "Unique identifier for the global styles revision.",6961 "type": "integer",6962 "required": false6963 },6964 "context": {6965 "description": "Scope under which the request is made; determines fields present in response.",6966 "type": "string",6967 "enum": [6968 "view",6969 "embed",6970 "edit"6971 ],6972 "default": "view",6973 "required": false6974 }6975 }6976 }6977 ]6978 },6979 "/wp/v2/global-styles/themes/(?P<stylesheet>[\\/\\s%\\w\\.\\(\\)\\[\\]\\@_\\-]+)/variations": {6980 "namespace": "wp/v2",6981 "methods": [6982 "GET"6983 ],6984 "endpoints": [6985 {6986 "methods": [6987 "GET"6988 ],6989 "allow_batch": {6990 "v1": false6991 },6992 "args": {6993 "stylesheet": {6994 "description": "The theme identifier",6995 "type": "string",6996 "required": false6997 }6998 }6999 }7000 ]7001 },7002 "/wp/v2/global-styles/themes/(?P<stylesheet>[^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)": {7003 "namespace": "wp/v2",7004 "methods": [7005 "GET"7006 ],7007 "endpoints": [7008 {7009 "methods": [7010 "GET"7011 ],7012 "allow_batch": {7013 "v1": false7014 },7015 "args": {7016 "stylesheet": {7017 "description": "The theme identifier",7018 "type": "string",7019 "required": false7020 }7021 }7022 }7023 ]7024 },7025 "/wp/v2/global-styles/(?P<id>[\\/\\d+]+)": {7026 "namespace": "wp/v2",7027 "methods": [7028 "GET",7029 "POST",7030 "PUT",7031 "PATCH"7032 ],7033 "endpoints": [7034 {7035 "methods": [7036 "GET"7037 ],7038 "allow_batch": {7039 "v1": false7040 },7041 "args": {7042 "id": {7043 "description": "ID of global styles config.",7044 "type": "integer",7045 "required": false7046 }7047 }7048 },7049 {7050 "methods": [7051 "POST",7052 "PUT",7053 "PATCH"7054 ],7055 "allow_batch": {7056 "v1": false7057 },7058 "args": {7059 "styles": {7060 "description": "Global styles.",7061 "type": [7062 "object"7063 ],7064 "required": false7065 },7066 "settings": {7067 "description": "Global settings.",7068 "type": [7069 "object"7070 ],7071 "required": false7072 },7073 "title": {7074 "description": "Title of the global styles variation.",7075 "type": [7076 "object",7077 "string"7078 ],7079 "properties": {7080 "raw": {7081 "description": "Title for the global styles variation, as it exists in the database.",7082 "type": "string",7083 "context": [7084 "view",7085 "edit",7086 "embed"7087 ]7088 },7089 "rendered": {7090 "description": "HTML title for the post, transformed for display.",7091 "type": "string",7092 "context": [7093 "view",7094 "edit",7095 "embed"7096 ],7097 "readonly": true7098 }7099 },7100 "required": false7101 }7102 }7103 }7104 ]7105 },7106 "/wp/v2/navigation": {7107 "namespace": "wp/v2",7108 "methods": [7109 "GET",7110 "POST"7111 ],7112 "endpoints": [7113 {7114 "methods": [7115 "GET"7116 ],7117 "allow_batch": {7118 "v1": true7119 },7120 "args": {7121 "context": {7122 "description": "Scope under which the request is made; determines fields present in response.",7123 "type": "string",7124 "enum": [7125 "view",7126 "embed",7127 "edit"7128 ],7129 "default": "view",7130 "required": false7131 5928 }, 7132 5929 "page": { … … 7160 5957 "type": "string", 7161 5958 "format": "date-time", 5959 "required": false 5960 }, 5961 "author": { 5962 "description": "Limit result set to posts assigned to specific authors.", 5963 "type": "array", 5964 "items": { 5965 "type": "integer" 5966 }, 5967 "default": [], 5968 "required": false 5969 }, 5970 "author_exclude": { 5971 "description": "Ensure result set excludes posts assigned to specific authors.", 5972 "type": "array", 5973 "items": { 5974 "type": "integer" 5975 }, 5976 "default": [], 7162 5977 "required": false 7163 5978 }, … … 7337 6152 "type": "string", 7338 6153 "context": [ 6154 "edit" 6155 ] 6156 }, 6157 "rendered": { 6158 "description": "HTML title for the post, transformed for display.", 6159 "type": "string", 6160 "context": [ 6161 "view", 6162 "edit", 6163 "embed" 6164 ], 6165 "readonly": true 6166 } 6167 }, 6168 "required": false 6169 }, 6170 "content": { 6171 "description": "The content for the post.", 6172 "type": "object", 6173 "properties": { 6174 "raw": { 6175 "description": "Content for the post, as it exists in the database.", 6176 "type": "string", 6177 "context": [ 6178 "edit" 6179 ] 6180 }, 6181 "rendered": { 6182 "description": "HTML content for the post, transformed for display.", 6183 "type": "string", 6184 "context": [ 6185 "view", 6186 "edit" 6187 ], 6188 "readonly": true 6189 }, 6190 "block_version": { 6191 "description": "Version of the content block format used by the post.", 6192 "type": "integer", 6193 "context": [ 6194 "edit" 6195 ], 6196 "readonly": true 6197 }, 6198 "protected": { 6199 "description": "Whether the content is protected with a password.", 6200 "type": "boolean", 6201 "context": [ 6202 "view", 6203 "edit", 6204 "embed" 6205 ], 6206 "readonly": true 6207 } 6208 }, 6209 "required": false 6210 }, 6211 "author": { 6212 "description": "The ID for the author of the post.", 6213 "type": "integer", 6214 "required": false 6215 }, 6216 "excerpt": { 6217 "description": "The excerpt for the post.", 6218 "type": "object", 6219 "properties": { 6220 "raw": { 6221 "description": "Excerpt for the post, as it exists in the database.", 6222 "type": "string", 6223 "context": [ 6224 "edit" 6225 ] 6226 }, 6227 "rendered": { 6228 "description": "HTML excerpt for the post, transformed for display.", 6229 "type": "string", 6230 "context": [ 6231 "view", 6232 "edit", 6233 "embed" 6234 ], 6235 "readonly": true 6236 }, 6237 "protected": { 6238 "description": "Whether the excerpt is protected with a password.", 6239 "type": "boolean", 6240 "context": [ 6241 "view", 6242 "edit", 6243 "embed" 6244 ], 6245 "readonly": true 6246 } 6247 }, 6248 "required": false 6249 }, 6250 "meta": { 6251 "description": "Meta fields.", 6252 "type": "object", 6253 "properties": [], 6254 "required": false 6255 }, 6256 "template": { 6257 "description": "The theme file to use to display the post.", 6258 "type": "string", 6259 "required": false 6260 } 6261 } 6262 } 6263 ], 6264 "_links": { 6265 "self": [ 6266 { 6267 "href": "http://example.org/index.php?rest_route=/wp/v2/wp_template" 6268 } 6269 ] 6270 } 6271 }, 6272 "/wp/v2/wp_template/(?P<id>[\\d]+)": { 6273 "namespace": "wp/v2", 6274 "methods": [ 6275 "GET", 6276 "POST", 6277 "PUT", 6278 "PATCH", 6279 "DELETE" 6280 ], 6281 "endpoints": [ 6282 { 6283 "methods": [ 6284 "GET" 6285 ], 6286 "allow_batch": { 6287 "v1": true 6288 }, 6289 "args": { 6290 "id": { 6291 "description": "Unique identifier for the post.", 6292 "type": "integer", 6293 "required": false 6294 }, 6295 "context": { 6296 "description": "Scope under which the request is made; determines fields present in response.", 6297 "type": "string", 6298 "enum": [ 6299 "view", 6300 "embed", 6301 "edit" 6302 ], 6303 "default": "view", 6304 "required": false 6305 }, 6306 "excerpt_length": { 6307 "description": "Override the default excerpt length.", 6308 "type": "integer", 6309 "required": false 6310 }, 6311 "password": { 6312 "description": "The password for the post if it is password protected.", 6313 "type": "string", 6314 "required": false 6315 } 6316 } 6317 }, 6318 { 6319 "methods": [ 6320 "POST", 6321 "PUT", 6322 "PATCH" 6323 ], 6324 "allow_batch": { 6325 "v1": true 6326 }, 6327 "args": { 6328 "id": { 6329 "description": "Unique identifier for the post.", 6330 "type": "integer", 6331 "required": false 6332 }, 6333 "date": { 6334 "description": "The date the post was published, in the site's timezone.", 6335 "type": [ 6336 "string", 6337 "null" 6338 ], 6339 "format": "date-time", 6340 "required": false 6341 }, 6342 "date_gmt": { 6343 "description": "The date the post was published, as GMT.", 6344 "type": [ 6345 "string", 6346 "null" 6347 ], 6348 "format": "date-time", 6349 "required": false 6350 }, 6351 "slug": { 6352 "description": "An alphanumeric identifier for the post unique to its type.", 6353 "type": "string", 6354 "required": false 6355 }, 6356 "status": { 6357 "description": "A named status for the post.", 6358 "type": "string", 6359 "enum": [ 6360 "publish", 6361 "future", 6362 "draft", 6363 "pending", 6364 "private" 6365 ], 6366 "required": false 6367 }, 6368 "password": { 6369 "description": "A password to protect access to the content and excerpt.", 6370 "type": "string", 6371 "required": false 6372 }, 6373 "title": { 6374 "description": "The title for the post.", 6375 "type": "object", 6376 "properties": { 6377 "raw": { 6378 "description": "Title for the post, as it exists in the database.", 6379 "type": "string", 6380 "context": [ 6381 "edit" 6382 ] 6383 }, 6384 "rendered": { 6385 "description": "HTML title for the post, transformed for display.", 6386 "type": "string", 6387 "context": [ 6388 "view", 6389 "edit", 6390 "embed" 6391 ], 6392 "readonly": true 6393 } 6394 }, 6395 "required": false 6396 }, 6397 "content": { 6398 "description": "The content for the post.", 6399 "type": "object", 6400 "properties": { 6401 "raw": { 6402 "description": "Content for the post, as it exists in the database.", 6403 "type": "string", 6404 "context": [ 6405 "edit" 6406 ] 6407 }, 6408 "rendered": { 6409 "description": "HTML content for the post, transformed for display.", 6410 "type": "string", 6411 "context": [ 6412 "view", 6413 "edit" 6414 ], 6415 "readonly": true 6416 }, 6417 "block_version": { 6418 "description": "Version of the content block format used by the post.", 6419 "type": "integer", 6420 "context": [ 6421 "edit" 6422 ], 6423 "readonly": true 6424 }, 6425 "protected": { 6426 "description": "Whether the content is protected with a password.", 6427 "type": "boolean", 6428 "context": [ 6429 "view", 6430 "edit", 6431 "embed" 6432 ], 6433 "readonly": true 6434 } 6435 }, 6436 "required": false 6437 }, 6438 "author": { 6439 "description": "The ID for the author of the post.", 6440 "type": "integer", 6441 "required": false 6442 }, 6443 "excerpt": { 6444 "description": "The excerpt for the post.", 6445 "type": "object", 6446 "properties": { 6447 "raw": { 6448 "description": "Excerpt for the post, as it exists in the database.", 6449 "type": "string", 6450 "context": [ 6451 "edit" 6452 ] 6453 }, 6454 "rendered": { 6455 "description": "HTML excerpt for the post, transformed for display.", 6456 "type": "string", 6457 "context": [ 6458 "view", 6459 "edit", 6460 "embed" 6461 ], 6462 "readonly": true 6463 }, 6464 "protected": { 6465 "description": "Whether the excerpt is protected with a password.", 6466 "type": "boolean", 6467 "context": [ 6468 "view", 6469 "edit", 6470 "embed" 6471 ], 6472 "readonly": true 6473 } 6474 }, 6475 "required": false 6476 }, 6477 "meta": { 6478 "description": "Meta fields.", 6479 "type": "object", 6480 "properties": [], 6481 "required": false 6482 }, 6483 "template": { 6484 "description": "The theme file to use to display the post.", 6485 "type": "string", 6486 "required": false 6487 } 6488 } 6489 }, 6490 { 6491 "methods": [ 6492 "DELETE" 6493 ], 6494 "allow_batch": { 6495 "v1": true 6496 }, 6497 "args": { 6498 "id": { 6499 "description": "Unique identifier for the post.", 6500 "type": "integer", 6501 "required": false 6502 }, 6503 "force": { 6504 "type": "boolean", 6505 "default": false, 6506 "description": "Whether to bypass Trash and force deletion.", 6507 "required": false 6508 } 6509 } 6510 } 6511 ] 6512 }, 6513 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { 6514 "namespace": "wp/v2", 6515 "methods": [ 6516 "GET" 6517 ], 6518 "endpoints": [ 6519 { 6520 "methods": [ 6521 "GET" 6522 ], 6523 "args": { 6524 "parent": { 6525 "description": "The id of a template", 6526 "type": "string", 6527 "required": false 6528 }, 6529 "context": { 6530 "description": "Scope under which the request is made; determines fields present in response.", 6531 "type": "string", 6532 "enum": [ 6533 "view", 6534 "embed", 6535 "edit" 6536 ], 6537 "default": "view", 6538 "required": false 6539 }, 6540 "page": { 6541 "description": "Current page of the collection.", 6542 "type": "integer", 6543 "default": 1, 6544 "minimum": 1, 6545 "required": false 6546 }, 6547 "per_page": { 6548 "description": "Maximum number of items to be returned in result set.", 6549 "type": "integer", 6550 "minimum": 1, 6551 "maximum": 100, 6552 "required": false 6553 }, 6554 "search": { 6555 "description": "Limit results to those matching a string.", 6556 "type": "string", 6557 "required": false 6558 }, 6559 "exclude": { 6560 "description": "Ensure result set excludes specific IDs.", 6561 "type": "array", 6562 "items": { 6563 "type": "integer" 6564 }, 6565 "default": [], 6566 "required": false 6567 }, 6568 "include": { 6569 "description": "Limit result set to specific IDs.", 6570 "type": "array", 6571 "items": { 6572 "type": "integer" 6573 }, 6574 "default": [], 6575 "required": false 6576 }, 6577 "offset": { 6578 "description": "Offset the result set by a specific number of items.", 6579 "type": "integer", 6580 "required": false 6581 }, 6582 "order": { 6583 "description": "Order sort attribute ascending or descending.", 6584 "type": "string", 6585 "default": "desc", 6586 "enum": [ 6587 "asc", 6588 "desc" 6589 ], 6590 "required": false 6591 }, 6592 "orderby": { 6593 "description": "Sort collection by object attribute.", 6594 "type": "string", 6595 "default": "date", 6596 "enum": [ 6597 "date", 6598 "id", 6599 "include", 6600 "relevance", 6601 "slug", 6602 "include_slugs", 6603 "title" 6604 ], 6605 "required": false 6606 } 6607 } 6608 } 6609 ] 6610 }, 6611 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": { 6612 "namespace": "wp/v2", 6613 "methods": [ 6614 "GET", 6615 "DELETE" 6616 ], 6617 "endpoints": [ 6618 { 6619 "methods": [ 6620 "GET" 6621 ], 6622 "args": { 6623 "parent": { 6624 "description": "The id of a template", 6625 "type": "string", 6626 "required": false 6627 }, 6628 "id": { 6629 "description": "Unique identifier for the revision.", 6630 "type": "integer", 6631 "required": false 6632 }, 6633 "context": { 6634 "description": "Scope under which the request is made; determines fields present in response.", 6635 "type": "string", 6636 "enum": [ 6637 "view", 6638 "embed", 6639 "edit" 6640 ], 6641 "default": "view", 6642 "required": false 6643 } 6644 } 6645 }, 6646 { 6647 "methods": [ 6648 "DELETE" 6649 ], 6650 "args": { 6651 "parent": { 6652 "description": "The id of a template", 6653 "type": "string", 6654 "required": false 6655 }, 6656 "id": { 6657 "description": "Unique identifier for the revision.", 6658 "type": "integer", 6659 "required": false 6660 }, 6661 "force": { 6662 "type": "boolean", 6663 "default": false, 6664 "description": "Required to be true, as revisions do not support trashing.", 6665 "required": false 6666 } 6667 } 6668 } 6669 ] 6670 }, 6671 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { 6672 "namespace": "wp/v2", 6673 "methods": [ 6674 "GET", 6675 "POST" 6676 ], 6677 "endpoints": [ 6678 { 6679 "methods": [ 6680 "GET" 6681 ], 6682 "args": { 6683 "id": { 6684 "description": "The id of a template", 6685 "type": "string", 6686 "required": false 6687 }, 6688 "context": { 6689 "description": "Scope under which the request is made; determines fields present in response.", 6690 "type": "string", 6691 "enum": [ 6692 "view", 6693 "embed", 6694 "edit" 6695 ], 6696 "default": "view", 6697 "required": false 6698 } 6699 } 6700 }, 6701 { 6702 "methods": [ 6703 "POST" 6704 ], 6705 "args": { 6706 "id": { 6707 "description": "The id of a template", 6708 "type": "string", 6709 "required": false 6710 }, 6711 "slug": { 6712 "description": "Unique slug identifying the template.", 6713 "type": "string", 6714 "minLength": 1, 6715 "pattern": "[a-zA-Z0-9_\\%-]+", 6716 "required": false 6717 }, 6718 "theme": { 6719 "description": "Theme identifier for the template.", 6720 "type": "string", 6721 "required": false 6722 }, 6723 "type": { 6724 "description": "Type of template.", 6725 "type": "string", 6726 "required": false 6727 }, 6728 "content": { 6729 "description": "Content of template.", 6730 "type": [ 6731 "object", 6732 "string" 6733 ], 6734 "properties": { 6735 "raw": { 6736 "description": "Content for the template, as it exists in the database.", 6737 "type": "string", 6738 "context": [ 6739 "view", 6740 "edit" 6741 ] 6742 }, 6743 "block_version": { 6744 "description": "Version of the content block format used by the template.", 6745 "type": "integer", 6746 "context": [ 6747 "edit" 6748 ], 6749 "readonly": true 6750 } 6751 }, 6752 "required": false 6753 }, 6754 "title": { 6755 "description": "Title of template.", 6756 "type": [ 6757 "object", 6758 "string" 6759 ], 6760 "properties": { 6761 "raw": { 6762 "description": "Title for the template, as it exists in the database.", 6763 "type": "string", 6764 "context": [ 6765 "view", 6766 "edit", 6767 "embed" 6768 ] 6769 }, 6770 "rendered": { 6771 "description": "HTML title for the template, transformed for display.", 6772 "type": "string", 6773 "context": [ 6774 "view", 6775 "edit", 6776 "embed" 6777 ], 6778 "readonly": true 6779 } 6780 }, 6781 "required": false 6782 }, 6783 "description": { 6784 "description": "Description of template.", 6785 "type": "string", 6786 "required": false 6787 }, 6788 "status": { 6789 "description": "Status of template.", 6790 "type": "string", 6791 "enum": [ 6792 "publish", 6793 "future", 6794 "draft", 6795 "pending", 6796 "private" 6797 ], 6798 "required": false 6799 }, 6800 "author": { 6801 "description": "The ID for the author of the template.", 6802 "type": "integer", 6803 "required": false 6804 }, 6805 "area": { 6806 "description": "Where the template part is intended for use (header, footer, etc.)", 6807 "type": "string", 6808 "required": false 6809 } 6810 } 6811 } 6812 ] 6813 }, 6814 "/wp/v2/template-parts/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": { 6815 "namespace": "wp/v2", 6816 "methods": [ 6817 "GET" 6818 ], 6819 "endpoints": [ 6820 { 6821 "methods": [ 6822 "GET" 6823 ], 6824 "args": { 6825 "parent": { 6826 "description": "The id of a template", 6827 "type": "string", 6828 "required": false 6829 }, 6830 "id": { 6831 "description": "The ID for the autosave.", 6832 "type": "integer", 6833 "required": false 6834 }, 6835 "context": { 6836 "description": "Scope under which the request is made; determines fields present in response.", 6837 "type": "string", 6838 "enum": [ 6839 "view", 6840 "embed", 6841 "edit" 6842 ], 6843 "default": "view", 6844 "required": false 6845 } 6846 } 6847 } 6848 ] 6849 }, 6850 "/wp/v2/template-parts": { 6851 "namespace": "wp/v2", 6852 "methods": [ 6853 "GET", 6854 "POST" 6855 ], 6856 "endpoints": [ 6857 { 6858 "methods": [ 6859 "GET" 6860 ], 6861 "args": { 6862 "context": { 6863 "description": "Scope under which the request is made; determines fields present in response.", 6864 "type": "string", 6865 "enum": [ 6866 "view", 6867 "embed", 6868 "edit" 6869 ], 6870 "default": "view", 6871 "required": false 6872 }, 6873 "wp_id": { 6874 "description": "Limit to the specified post id.", 6875 "type": "integer", 6876 "required": false 6877 }, 6878 "area": { 6879 "description": "Limit to the specified template part area.", 6880 "type": "string", 6881 "required": false 6882 }, 6883 "post_type": { 6884 "description": "Post type to get the templates for.", 6885 "type": "string", 6886 "required": false 6887 } 6888 } 6889 }, 6890 { 6891 "methods": [ 6892 "POST" 6893 ], 6894 "args": { 6895 "slug": { 6896 "description": "Unique slug identifying the template.", 6897 "type": "string", 6898 "minLength": 1, 6899 "pattern": "[a-zA-Z0-9_\\%-]+", 6900 "required": true 6901 }, 6902 "theme": { 6903 "description": "Theme identifier for the template.", 6904 "type": "string", 6905 "required": false 6906 }, 6907 "type": { 6908 "description": "Type of template.", 6909 "type": "string", 6910 "required": false 6911 }, 6912 "content": { 6913 "default": "", 6914 "description": "Content of template.", 6915 "type": [ 6916 "object", 6917 "string" 6918 ], 6919 "properties": { 6920 "raw": { 6921 "description": "Content for the template, as it exists in the database.", 6922 "type": "string", 6923 "context": [ 6924 "view", 6925 "edit" 6926 ] 6927 }, 6928 "block_version": { 6929 "description": "Version of the content block format used by the template.", 6930 "type": "integer", 6931 "context": [ 6932 "edit" 6933 ], 6934 "readonly": true 6935 } 6936 }, 6937 "required": false 6938 }, 6939 "title": { 6940 "default": "", 6941 "description": "Title of template.", 6942 "type": [ 6943 "object", 6944 "string" 6945 ], 6946 "properties": { 6947 "raw": { 6948 "description": "Title for the template, as it exists in the database.", 6949 "type": "string", 6950 "context": [ 6951 "view", 6952 "edit", 6953 "embed" 6954 ] 6955 }, 6956 "rendered": { 6957 "description": "HTML title for the template, transformed for display.", 6958 "type": "string", 6959 "context": [ 6960 "view", 6961 "edit", 6962 "embed" 6963 ], 6964 "readonly": true 6965 } 6966 }, 6967 "required": false 6968 }, 6969 "description": { 6970 "default": "", 6971 "description": "Description of template.", 6972 "type": "string", 6973 "required": false 6974 }, 6975 "status": { 6976 "default": "publish", 6977 "description": "Status of template.", 6978 "type": "string", 6979 "enum": [ 6980 "publish", 6981 "future", 6982 "draft", 6983 "pending", 6984 "private" 6985 ], 6986 "required": false 6987 }, 6988 "author": { 6989 "description": "The ID for the author of the template.", 6990 "type": "integer", 6991 "required": false 6992 }, 6993 "area": { 6994 "description": "Where the template part is intended for use (header, footer, etc.)", 6995 "type": "string", 6996 "required": false 6997 } 6998 } 6999 } 7000 ], 7001 "_links": { 7002 "self": [ 7003 { 7004 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts" 7005 } 7006 ] 7007 } 7008 }, 7009 "/wp/v2/template-parts/lookup": { 7010 "namespace": "wp/v2", 7011 "methods": [ 7012 "GET" 7013 ], 7014 "endpoints": [ 7015 { 7016 "methods": [ 7017 "GET" 7018 ], 7019 "args": { 7020 "slug": { 7021 "description": "The slug of the template to get the fallback for", 7022 "type": "string", 7023 "required": true 7024 }, 7025 "is_custom": { 7026 "description": "Indicates if a template is custom or part of the template hierarchy", 7027 "type": "boolean", 7028 "required": false 7029 }, 7030 "template_prefix": { 7031 "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`", 7032 "type": "string", 7033 "required": false 7034 } 7035 } 7036 } 7037 ], 7038 "_links": { 7039 "self": [ 7040 { 7041 "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup" 7042 } 7043 ] 7044 } 7045 }, 7046 "/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 7047 "namespace": "wp/v2", 7048 "methods": [ 7049 "GET", 7050 "POST", 7051 "PUT", 7052 "PATCH", 7053 "DELETE" 7054 ], 7055 "endpoints": [ 7056 { 7057 "methods": [ 7058 "GET" 7059 ], 7060 "args": { 7061 "id": { 7062 "description": "The id of a template", 7063 "type": "string", 7064 "required": false 7065 }, 7066 "context": { 7067 "description": "Scope under which the request is made; determines fields present in response.", 7068 "type": "string", 7069 "enum": [ 7070 "view", 7071 "embed", 7072 "edit" 7073 ], 7074 "default": "view", 7075 "required": false 7076 } 7077 } 7078 }, 7079 { 7080 "methods": [ 7081 "POST", 7082 "PUT", 7083 "PATCH" 7084 ], 7085 "args": { 7086 "id": { 7087 "description": "The id of a template", 7088 "type": "string", 7089 "required": false 7090 }, 7091 "slug": { 7092 "description": "Unique slug identifying the template.", 7093 "type": "string", 7094 "minLength": 1, 7095 "pattern": "[a-zA-Z0-9_\\%-]+", 7096 "required": false 7097 }, 7098 "theme": { 7099 "description": "Theme identifier for the template.", 7100 "type": "string", 7101 "required": false 7102 }, 7103 "type": { 7104 "description": "Type of template.", 7105 "type": "string", 7106 "required": false 7107 }, 7108 "content": { 7109 "description": "Content of template.", 7110 "type": [ 7111 "object", 7112 "string" 7113 ], 7114 "properties": { 7115 "raw": { 7116 "description": "Content for the template, as it exists in the database.", 7117 "type": "string", 7118 "context": [ 7119 "view", 7120 "edit" 7121 ] 7122 }, 7123 "block_version": { 7124 "description": "Version of the content block format used by the template.", 7125 "type": "integer", 7126 "context": [ 7127 "edit" 7128 ], 7129 "readonly": true 7130 } 7131 }, 7132 "required": false 7133 }, 7134 "title": { 7135 "description": "Title of template.", 7136 "type": [ 7137 "object", 7138 "string" 7139 ], 7140 "properties": { 7141 "raw": { 7142 "description": "Title for the template, as it exists in the database.", 7143 "type": "string", 7144 "context": [ 7145 "view", 7146 "edit", 7147 "embed" 7148 ] 7149 }, 7150 "rendered": { 7151 "description": "HTML title for the template, transformed for display.", 7152 "type": "string", 7153 "context": [ 7154 "view", 7155 "edit", 7156 "embed" 7157 ], 7158 "readonly": true 7159 } 7160 }, 7161 "required": false 7162 }, 7163 "description": { 7164 "description": "Description of template.", 7165 "type": "string", 7166 "required": false 7167 }, 7168 "status": { 7169 "description": "Status of template.", 7170 "type": "string", 7171 "enum": [ 7172 "publish", 7173 "future", 7174 "draft", 7175 "pending", 7176 "private" 7177 ], 7178 "required": false 7179 }, 7180 "author": { 7181 "description": "The ID for the author of the template.", 7182 "type": "integer", 7183 "required": false 7184 }, 7185 "area": { 7186 "description": "Where the template part is intended for use (header, footer, etc.)", 7187 "type": "string", 7188 "required": false 7189 } 7190 } 7191 }, 7192 { 7193 "methods": [ 7194 "DELETE" 7195 ], 7196 "args": { 7197 "id": { 7198 "description": "The id of a template", 7199 "type": "string", 7200 "required": false 7201 }, 7202 "force": { 7203 "type": "boolean", 7204 "default": false, 7205 "description": "Whether to bypass Trash and force deletion.", 7206 "required": false 7207 } 7208 } 7209 } 7210 ] 7211 }, 7212 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions": { 7213 "namespace": "wp/v2", 7214 "methods": [ 7215 "GET" 7216 ], 7217 "endpoints": [ 7218 { 7219 "methods": [ 7220 "GET" 7221 ], 7222 "args": { 7223 "parent": { 7224 "description": "The ID for the parent of the revision.", 7225 "type": "integer", 7226 "required": false 7227 }, 7228 "context": { 7229 "description": "Scope under which the request is made; determines fields present in response.", 7230 "type": "string", 7231 "enum": [ 7232 "view", 7233 "embed", 7234 "edit" 7235 ], 7236 "default": "view", 7237 "required": false 7238 }, 7239 "page": { 7240 "description": "Current page of the collection.", 7241 "type": "integer", 7242 "default": 1, 7243 "minimum": 1, 7244 "required": false 7245 }, 7246 "per_page": { 7247 "description": "Maximum number of items to be returned in result set.", 7248 "type": "integer", 7249 "minimum": 1, 7250 "maximum": 100, 7251 "required": false 7252 }, 7253 "offset": { 7254 "description": "Offset the result set by a specific number of items.", 7255 "type": "integer", 7256 "required": false 7257 } 7258 } 7259 } 7260 ] 7261 }, 7262 "/wp/v2/global-styles/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 7263 "namespace": "wp/v2", 7264 "methods": [ 7265 "GET" 7266 ], 7267 "endpoints": [ 7268 { 7269 "methods": [ 7270 "GET" 7271 ], 7272 "args": { 7273 "parent": { 7274 "description": "The ID for the parent of the global styles revision.", 7275 "type": "integer", 7276 "required": false 7277 }, 7278 "id": { 7279 "description": "Unique identifier for the global styles revision.", 7280 "type": "integer", 7281 "required": false 7282 }, 7283 "context": { 7284 "description": "Scope under which the request is made; determines fields present in response.", 7285 "type": "string", 7286 "enum": [ 7287 "view", 7288 "embed", 7289 "edit" 7290 ], 7291 "default": "view", 7292 "required": false 7293 } 7294 } 7295 } 7296 ] 7297 }, 7298 "/wp/v2/global-styles/themes/(?P<stylesheet>[\\/\\s%\\w\\.\\(\\)\\[\\]\\@_\\-]+)/variations": { 7299 "namespace": "wp/v2", 7300 "methods": [ 7301 "GET" 7302 ], 7303 "endpoints": [ 7304 { 7305 "methods": [ 7306 "GET" 7307 ], 7308 "allow_batch": { 7309 "v1": false 7310 }, 7311 "args": { 7312 "stylesheet": { 7313 "description": "The theme identifier", 7314 "type": "string", 7315 "required": false 7316 } 7317 } 7318 } 7319 ] 7320 }, 7321 "/wp/v2/global-styles/themes/(?P<stylesheet>[^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)": { 7322 "namespace": "wp/v2", 7323 "methods": [ 7324 "GET" 7325 ], 7326 "endpoints": [ 7327 { 7328 "methods": [ 7329 "GET" 7330 ], 7331 "allow_batch": { 7332 "v1": false 7333 }, 7334 "args": { 7335 "stylesheet": { 7336 "description": "The theme identifier", 7337 "type": "string", 7338 "required": false 7339 } 7340 } 7341 } 7342 ] 7343 }, 7344 "/wp/v2/global-styles/(?P<id>[\\/\\d+]+)": { 7345 "namespace": "wp/v2", 7346 "methods": [ 7347 "GET", 7348 "POST", 7349 "PUT", 7350 "PATCH" 7351 ], 7352 "endpoints": [ 7353 { 7354 "methods": [ 7355 "GET" 7356 ], 7357 "allow_batch": { 7358 "v1": false 7359 }, 7360 "args": { 7361 "id": { 7362 "description": "ID of global styles config.", 7363 "type": "integer", 7364 "required": false 7365 } 7366 } 7367 }, 7368 { 7369 "methods": [ 7370 "POST", 7371 "PUT", 7372 "PATCH" 7373 ], 7374 "allow_batch": { 7375 "v1": false 7376 }, 7377 "args": { 7378 "styles": { 7379 "description": "Global styles.", 7380 "type": [ 7381 "object" 7382 ], 7383 "required": false 7384 }, 7385 "settings": { 7386 "description": "Global settings.", 7387 "type": [ 7388 "object" 7389 ], 7390 "required": false 7391 }, 7392 "title": { 7393 "description": "Title of the global styles variation.", 7394 "type": [ 7395 "object", 7396 "string" 7397 ], 7398 "properties": { 7399 "raw": { 7400 "description": "Title for the global styles variation, as it exists in the database.", 7401 "type": "string", 7402 "context": [ 7403 "view", 7404 "edit", 7405 "embed" 7406 ] 7407 }, 7408 "rendered": { 7409 "description": "HTML title for the post, transformed for display.", 7410 "type": "string", 7411 "context": [ 7412 "view", 7413 "edit", 7414 "embed" 7415 ], 7416 "readonly": true 7417 } 7418 }, 7419 "required": false 7420 } 7421 } 7422 } 7423 ] 7424 }, 7425 "/wp/v2/navigation": { 7426 "namespace": "wp/v2", 7427 "methods": [ 7428 "GET", 7429 "POST" 7430 ], 7431 "endpoints": [ 7432 { 7433 "methods": [ 7434 "GET" 7435 ], 7436 "allow_batch": { 7437 "v1": true 7438 }, 7439 "args": { 7440 "context": { 7441 "description": "Scope under which the request is made; determines fields present in response.", 7442 "type": "string", 7443 "enum": [ 7444 "view", 7445 "embed", 7446 "edit" 7447 ], 7448 "default": "view", 7449 "required": false 7450 }, 7451 "page": { 7452 "description": "Current page of the collection.", 7453 "type": "integer", 7454 "default": 1, 7455 "minimum": 1, 7456 "required": false 7457 }, 7458 "per_page": { 7459 "description": "Maximum number of items to be returned in result set.", 7460 "type": "integer", 7461 "default": 10, 7462 "minimum": 1, 7463 "maximum": 100, 7464 "required": false 7465 }, 7466 "search": { 7467 "description": "Limit results to those matching a string.", 7468 "type": "string", 7469 "required": false 7470 }, 7471 "after": { 7472 "description": "Limit response to posts published after a given ISO8601 compliant date.", 7473 "type": "string", 7474 "format": "date-time", 7475 "required": false 7476 }, 7477 "modified_after": { 7478 "description": "Limit response to posts modified after a given ISO8601 compliant date.", 7479 "type": "string", 7480 "format": "date-time", 7481 "required": false 7482 }, 7483 "before": { 7484 "description": "Limit response to posts published before a given ISO8601 compliant date.", 7485 "type": "string", 7486 "format": "date-time", 7487 "required": false 7488 }, 7489 "modified_before": { 7490 "description": "Limit response to posts modified before a given ISO8601 compliant date.", 7491 "type": "string", 7492 "format": "date-time", 7493 "required": false 7494 }, 7495 "exclude": { 7496 "description": "Ensure result set excludes specific IDs.", 7497 "type": "array", 7498 "items": { 7499 "type": "integer" 7500 }, 7501 "default": [], 7502 "required": false 7503 }, 7504 "include": { 7505 "description": "Limit result set to specific IDs.", 7506 "type": "array", 7507 "items": { 7508 "type": "integer" 7509 }, 7510 "default": [], 7511 "required": false 7512 }, 7513 "search_semantics": { 7514 "description": "How to interpret the search input.", 7515 "type": "string", 7516 "enum": [ 7517 "exact" 7518 ], 7519 "required": false 7520 }, 7521 "offset": { 7522 "description": "Offset the result set by a specific number of items.", 7523 "type": "integer", 7524 "required": false 7525 }, 7526 "order": { 7527 "description": "Order sort attribute ascending or descending.", 7528 "type": "string", 7529 "default": "desc", 7530 "enum": [ 7531 "asc", 7532 "desc" 7533 ], 7534 "required": false 7535 }, 7536 "orderby": { 7537 "description": "Sort collection by post attribute.", 7538 "type": "string", 7539 "default": "date", 7540 "enum": [ 7541 "author", 7542 "date", 7543 "id", 7544 "include", 7545 "modified", 7546 "parent", 7547 "relevance", 7548 "slug", 7549 "include_slugs", 7550 "title" 7551 ], 7552 "required": false 7553 }, 7554 "search_columns": { 7555 "default": [], 7556 "description": "Array of column names to be searched.", 7557 "type": "array", 7558 "items": { 7559 "enum": [ 7560 "post_title", 7561 "post_content", 7562 "post_excerpt" 7563 ], 7564 "type": "string" 7565 }, 7566 "required": false 7567 }, 7568 "slug": { 7569 "description": "Limit result set to posts with one or more specific slugs.", 7570 "type": "array", 7571 "items": { 7572 "type": "string" 7573 }, 7574 "required": false 7575 }, 7576 "status": { 7577 "default": "publish", 7578 "description": "Limit result set to posts assigned one or more statuses.", 7579 "type": "array", 7580 "items": { 7581 "enum": [ 7582 "publish", 7583 "future", 7584 "draft", 7585 "pending", 7586 "private", 7587 "trash", 7588 "auto-draft", 7589 "inherit", 7590 "request-pending", 7591 "request-confirmed", 7592 "request-failed", 7593 "request-completed", 7594 "any" 7595 ], 7596 "type": "string" 7597 }, 7598 "required": false 7599 } 7600 } 7601 }, 7602 { 7603 "methods": [ 7604 "POST" 7605 ], 7606 "allow_batch": { 7607 "v1": true 7608 }, 7609 "args": { 7610 "date": { 7611 "description": "The date the post was published, in the site's timezone.", 7612 "type": [ 7613 "string", 7614 "null" 7615 ], 7616 "format": "date-time", 7617 "required": false 7618 }, 7619 "date_gmt": { 7620 "description": "The date the post was published, as GMT.", 7621 "type": [ 7622 "string", 7623 "null" 7624 ], 7625 "format": "date-time", 7626 "required": false 7627 }, 7628 "slug": { 7629 "description": "An alphanumeric identifier for the post unique to its type.", 7630 "type": "string", 7631 "required": false 7632 }, 7633 "status": { 7634 "description": "A named status for the post.", 7635 "type": "string", 7636 "enum": [ 7637 "publish", 7638 "future", 7639 "draft", 7640 "pending", 7641 "private" 7642 ], 7643 "required": false 7644 }, 7645 "password": { 7646 "description": "A password to protect access to the content and excerpt.", 7647 "type": "string", 7648 "required": false 7649 }, 7650 "title": { 7651 "description": "The title for the post.", 7652 "type": "object", 7653 "properties": { 7654 "raw": { 7655 "description": "Title for the post, as it exists in the database.", 7656 "type": "string", 7657 "context": [ 7339 7658 "edit", 7340 7659 "embed" … … 8341 8660 "type": "integer", 8342 8661 "required": true 8662 }, 8663 "force": { 8664 "type": "boolean", 8665 "default": false, 8666 "description": "Whether to bypass Trash and force deletion.", 8667 "required": false 8668 } 8669 } 8670 } 8671 ] 8672 }, 8673 "/wp/v2/wp_registered_template": { 8674 "namespace": "wp/v2", 8675 "methods": [ 8676 "GET" 8677 ], 8678 "endpoints": [ 8679 { 8680 "methods": [ 8681 "GET" 8682 ], 8683 "args": { 8684 "context": { 8685 "description": "Scope under which the request is made; determines fields present in response.", 8686 "type": "string", 8687 "enum": [ 8688 "view", 8689 "embed", 8690 "edit" 8691 ], 8692 "default": "view", 8693 "required": false 8694 }, 8695 "wp_id": { 8696 "description": "Limit to the specified post id.", 8697 "type": "integer", 8698 "required": false 8699 }, 8700 "area": { 8701 "description": "Limit to the specified template part area.", 8702 "type": "string", 8703 "required": false 8704 }, 8705 "post_type": { 8706 "description": "Post type to get the templates for.", 8707 "type": "string", 8708 "required": false 8709 } 8710 } 8711 } 8712 ], 8713 "_links": { 8714 "self": [ 8715 { 8716 "href": "http://example.org/index.php?rest_route=/wp/v2/wp_registered_template" 8717 } 8718 ] 8719 } 8720 }, 8721 "/wp/v2/wp_registered_template/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 8722 "namespace": "wp/v2", 8723 "methods": [ 8724 "GET" 8725 ], 8726 "endpoints": [ 8727 { 8728 "methods": [ 8729 "GET" 8730 ], 8731 "args": { 8732 "id": { 8733 "description": "The id of a template", 8734 "type": "string", 8735 "required": false 8736 }, 8737 "context": { 8738 "description": "Scope under which the request is made; determines fields present in response.", 8739 "type": "string", 8740 "enum": [ 8741 "view", 8742 "embed", 8743 "edit" 8744 ], 8745 "default": "view", 8746 "required": false 8747 } 8748 } 8749 } 8750 ] 8751 }, 8752 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { 8753 "namespace": "wp/v2", 8754 "methods": [ 8755 "GET", 8756 "POST" 8757 ], 8758 "endpoints": [ 8759 { 8760 "methods": [ 8761 "GET" 8762 ], 8763 "args": { 8764 "id": { 8765 "description": "The id of a template", 8766 "type": "string", 8767 "required": false 8768 }, 8769 "context": { 8770 "description": "Scope under which the request is made; determines fields present in response.", 8771 "type": "string", 8772 "enum": [ 8773 "view", 8774 "embed", 8775 "edit" 8776 ], 8777 "default": "view", 8778 "required": false 8779 } 8780 } 8781 }, 8782 { 8783 "methods": [ 8784 "POST" 8785 ], 8786 "args": { 8787 "id": { 8788 "description": "The id of a template", 8789 "type": "string", 8790 "required": false 8791 }, 8792 "slug": { 8793 "description": "Unique slug identifying the template.", 8794 "type": "string", 8795 "minLength": 1, 8796 "pattern": "[a-zA-Z0-9_\\%-]+", 8797 "required": false 8798 }, 8799 "theme": { 8800 "description": "Theme identifier for the template.", 8801 "type": "string", 8802 "required": false 8803 }, 8804 "type": { 8805 "description": "Type of template.", 8806 "type": "string", 8807 "required": false 8808 }, 8809 "content": { 8810 "description": "Content of template.", 8811 "type": [ 8812 "object", 8813 "string" 8814 ], 8815 "properties": { 8816 "raw": { 8817 "description": "Content for the template, as it exists in the database.", 8818 "type": "string", 8819 "context": [ 8820 "view", 8821 "edit" 8822 ] 8823 }, 8824 "block_version": { 8825 "description": "Version of the content block format used by the template.", 8826 "type": "integer", 8827 "context": [ 8828 "edit" 8829 ], 8830 "readonly": true 8831 } 8832 }, 8833 "required": false 8834 }, 8835 "title": { 8836 "description": "Title of template.", 8837 "type": [ 8838 "object", 8839 "string" 8840 ], 8841 "properties": { 8842 "raw": { 8843 "description": "Title for the template, as it exists in the database.", 8844 "type": "string", 8845 "context": [ 8846 "view", 8847 "edit", 8848 "embed" 8849 ] 8850 }, 8851 "rendered": { 8852 "description": "HTML title for the template, transformed for display.", 8853 "type": "string", 8854 "context": [ 8855 "view", 8856 "edit", 8857 "embed" 8858 ], 8859 "readonly": true 8860 } 8861 }, 8862 "required": false 8863 }, 8864 "description": { 8865 "description": "Description of template.", 8866 "type": "string", 8867 "required": false 8868 }, 8869 "status": { 8870 "description": "Status of template.", 8871 "type": "string", 8872 "enum": [ 8873 "publish", 8874 "future", 8875 "draft", 8876 "pending", 8877 "private" 8878 ], 8879 "required": false 8880 }, 8881 "author": { 8882 "description": "The ID for the author of the template.", 8883 "type": "integer", 8884 "required": false 8885 } 8886 } 8887 } 8888 ] 8889 }, 8890 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P<id>[\\d]+)": { 8891 "namespace": "wp/v2", 8892 "methods": [ 8893 "GET" 8894 ], 8895 "endpoints": [ 8896 { 8897 "methods": [ 8898 "GET" 8899 ], 8900 "args": { 8901 "parent": { 8902 "description": "The id of a template", 8903 "type": "string", 8904 "required": false 8905 }, 8906 "id": { 8907 "description": "The ID for the autosave.", 8908 "type": "integer", 8909 "required": false 8910 }, 8911 "context": { 8912 "description": "Scope under which the request is made; determines fields present in response.", 8913 "type": "string", 8914 "enum": [ 8915 "view", 8916 "embed", 8917 "edit" 8918 ], 8919 "default": "view", 8920 "required": false 8921 } 8922 } 8923 } 8924 ] 8925 }, 8926 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { 8927 "namespace": "wp/v2", 8928 "methods": [ 8929 "GET" 8930 ], 8931 "endpoints": [ 8932 { 8933 "methods": [ 8934 "GET" 8935 ], 8936 "args": { 8937 "parent": { 8938 "description": "The id of a template", 8939 "type": "string", 8940 "required": false 8941 }, 8942 "context": { 8943 "description": "Scope under which the request is made; determines fields present in response.", 8944 "type": "string", 8945 "enum": [ 8946 "view", 8947 "embed", 8948 "edit" 8949 ], 8950 "default": "view", 8951 "required": false 8952 }, 8953 "page": { 8954 "description": "Current page of the collection.", 8955 "type": "integer", 8956 "default": 1, 8957 "minimum": 1, 8958 "required": false 8959 }, 8960 "per_page": { 8961 "description": "Maximum number of items to be returned in result set.", 8962 "type": "integer", 8963 "minimum": 1, 8964 "maximum": 100, 8965 "required": false 8966 }, 8967 "search": { 8968 "description": "Limit results to those matching a string.", 8969 "type": "string", 8970 "required": false 8971 }, 8972 "exclude": { 8973 "description": "Ensure result set excludes specific IDs.", 8974 "type": "array", 8975 "items": { 8976 "type": "integer" 8977 }, 8978 "default": [], 8979 "required": false 8980 }, 8981 "include": { 8982 "description": "Limit result set to specific IDs.", 8983 "type": "array", 8984 "items": { 8985 "type": "integer" 8986 }, 8987 "default": [], 8988 "required": false 8989 }, 8990 "offset": { 8991 "description": "Offset the result set by a specific number of items.", 8992 "type": "integer", 8993 "required": false 8994 }, 8995 "order": { 8996 "description": "Order sort attribute ascending or descending.", 8997 "type": "string", 8998 "default": "desc", 8999 "enum": [ 9000 "asc", 9001 "desc" 9002 ], 9003 "required": false 9004 }, 9005 "orderby": { 9006 "description": "Sort collection by object attribute.", 9007 "type": "string", 9008 "default": "date", 9009 "enum": [ 9010 "date", 9011 "id", 9012 "include", 9013 "relevance", 9014 "slug", 9015 "include_slugs", 9016 "title" 9017 ], 9018 "required": false 9019 } 9020 } 9021 } 9022 ] 9023 }, 9024 "/wp/v2/templates/(?P<parent>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P<id>[\\d]+)": { 9025 "namespace": "wp/v2", 9026 "methods": [ 9027 "GET", 9028 "DELETE" 9029 ], 9030 "endpoints": [ 9031 { 9032 "methods": [ 9033 "GET" 9034 ], 9035 "args": { 9036 "parent": { 9037 "description": "The id of a template", 9038 "type": "string", 9039 "required": false 9040 }, 9041 "id": { 9042 "description": "Unique identifier for the revision.", 9043 "type": "integer", 9044 "required": false 9045 }, 9046 "context": { 9047 "description": "Scope under which the request is made; determines fields present in response.", 9048 "type": "string", 9049 "enum": [ 9050 "view", 9051 "embed", 9052 "edit" 9053 ], 9054 "default": "view", 9055 "required": false 9056 } 9057 } 9058 }, 9059 { 9060 "methods": [ 9061 "DELETE" 9062 ], 9063 "args": { 9064 "parent": { 9065 "description": "The id of a template", 9066 "type": "string", 9067 "required": false 9068 }, 9069 "id": { 9070 "description": "Unique identifier for the revision.", 9071 "type": "integer", 9072 "required": false 9073 }, 9074 "force": { 9075 "type": "boolean", 9076 "default": false, 9077 "description": "Required to be true, as revisions do not support trashing.", 9078 "required": false 9079 } 9080 } 9081 } 9082 ] 9083 }, 9084 "/wp/v2/templates": { 9085 "namespace": "wp/v2", 9086 "methods": [ 9087 "GET", 9088 "POST" 9089 ], 9090 "endpoints": [ 9091 { 9092 "methods": [ 9093 "GET" 9094 ], 9095 "args": { 9096 "context": { 9097 "description": "Scope under which the request is made; determines fields present in response.", 9098 "type": "string", 9099 "enum": [ 9100 "view", 9101 "embed", 9102 "edit" 9103 ], 9104 "default": "view", 9105 "required": false 9106 }, 9107 "wp_id": { 9108 "description": "Limit to the specified post id.", 9109 "type": "integer", 9110 "required": false 9111 }, 9112 "area": { 9113 "description": "Limit to the specified template part area.", 9114 "type": "string", 9115 "required": false 9116 }, 9117 "post_type": { 9118 "description": "Post type to get the templates for.", 9119 "type": "string", 9120 "required": false 9121 } 9122 } 9123 }, 9124 { 9125 "methods": [ 9126 "POST" 9127 ], 9128 "args": { 9129 "slug": { 9130 "description": "Unique slug identifying the template.", 9131 "type": "string", 9132 "minLength": 1, 9133 "pattern": "[a-zA-Z0-9_\\%-]+", 9134 "required": true 9135 }, 9136 "theme": { 9137 "description": "Theme identifier for the template.", 9138 "type": "string", 9139 "required": false 9140 }, 9141 "type": { 9142 "description": "Type of template.", 9143 "type": "string", 9144 "required": false 9145 }, 9146 "content": { 9147 "default": "", 9148 "description": "Content of template.", 9149 "type": [ 9150 "object", 9151 "string" 9152 ], 9153 "properties": { 9154 "raw": { 9155 "description": "Content for the template, as it exists in the database.", 9156 "type": "string", 9157 "context": [ 9158 "view", 9159 "edit" 9160 ] 9161 }, 9162 "block_version": { 9163 "description": "Version of the content block format used by the template.", 9164 "type": "integer", 9165 "context": [ 9166 "edit" 9167 ], 9168 "readonly": true 9169 } 9170 }, 9171 "required": false 9172 }, 9173 "title": { 9174 "default": "", 9175 "description": "Title of template.", 9176 "type": [ 9177 "object", 9178 "string" 9179 ], 9180 "properties": { 9181 "raw": { 9182 "description": "Title for the template, as it exists in the database.", 9183 "type": "string", 9184 "context": [ 9185 "view", 9186 "edit", 9187 "embed" 9188 ] 9189 }, 9190 "rendered": { 9191 "description": "HTML title for the template, transformed for display.", 9192 "type": "string", 9193 "context": [ 9194 "view", 9195 "edit", 9196 "embed" 9197 ], 9198 "readonly": true 9199 } 9200 }, 9201 "required": false 9202 }, 9203 "description": { 9204 "default": "", 9205 "description": "Description of template.", 9206 "type": "string", 9207 "required": false 9208 }, 9209 "status": { 9210 "default": "publish", 9211 "description": "Status of template.", 9212 "type": "string", 9213 "enum": [ 9214 "publish", 9215 "future", 9216 "draft", 9217 "pending", 9218 "private" 9219 ], 9220 "required": false 9221 }, 9222 "author": { 9223 "description": "The ID for the author of the template.", 9224 "type": "integer", 9225 "required": false 9226 } 9227 } 9228 } 9229 ], 9230 "_links": { 9231 "self": [ 9232 { 9233 "href": "http://example.org/index.php?rest_route=/wp/v2/templates" 9234 } 9235 ] 9236 } 9237 }, 9238 "/wp/v2/templates/lookup": { 9239 "namespace": "wp/v2", 9240 "methods": [ 9241 "GET" 9242 ], 9243 "endpoints": [ 9244 { 9245 "methods": [ 9246 "GET" 9247 ], 9248 "args": { 9249 "slug": { 9250 "description": "The slug of the template to get the fallback for", 9251 "type": "string", 9252 "required": true 9253 }, 9254 "is_custom": { 9255 "description": "Indicates if a template is custom or part of the template hierarchy", 9256 "type": "boolean", 9257 "required": false 9258 }, 9259 "template_prefix": { 9260 "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`", 9261 "type": "string", 9262 "required": false 9263 } 9264 } 9265 } 9266 ], 9267 "_links": { 9268 "self": [ 9269 { 9270 "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" 9271 } 9272 ] 9273 } 9274 }, 9275 "/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { 9276 "namespace": "wp/v2", 9277 "methods": [ 9278 "GET", 9279 "POST", 9280 "PUT", 9281 "PATCH", 9282 "DELETE" 9283 ], 9284 "endpoints": [ 9285 { 9286 "methods": [ 9287 "GET" 9288 ], 9289 "args": { 9290 "id": { 9291 "description": "The id of a template", 9292 "type": "string", 9293 "required": false 9294 }, 9295 "context": { 9296 "description": "Scope under which the request is made; determines fields present in response.", 9297 "type": "string", 9298 "enum": [ 9299 "view", 9300 "embed", 9301 "edit" 9302 ], 9303 "default": "view", 9304 "required": false 9305 } 9306 } 9307 }, 9308 { 9309 "methods": [ 9310 "POST", 9311 "PUT", 9312 "PATCH" 9313 ], 9314 "args": { 9315 "id": { 9316 "description": "The id of a template", 9317 "type": "string", 9318 "required": false 9319 }, 9320 "slug": { 9321 "description": "Unique slug identifying the template.", 9322 "type": "string", 9323 "minLength": 1, 9324 "pattern": "[a-zA-Z0-9_\\%-]+", 9325 "required": false 9326 }, 9327 "theme": { 9328 "description": "Theme identifier for the template.", 9329 "type": "string", 9330 "required": false 9331 }, 9332 "type": { 9333 "description": "Type of template.", 9334 "type": "string", 9335 "required": false 9336 }, 9337 "content": { 9338 "description": "Content of template.", 9339 "type": [ 9340 "object", 9341 "string" 9342 ], 9343 "properties": { 9344 "raw": { 9345 "description": "Content for the template, as it exists in the database.", 9346 "type": "string", 9347 "context": [ 9348 "view", 9349 "edit" 9350 ] 9351 }, 9352 "block_version": { 9353 "description": "Version of the content block format used by the template.", 9354 "type": "integer", 9355 "context": [ 9356 "edit" 9357 ], 9358 "readonly": true 9359 } 9360 }, 9361 "required": false 9362 }, 9363 "title": { 9364 "description": "Title of template.", 9365 "type": [ 9366 "object", 9367 "string" 9368 ], 9369 "properties": { 9370 "raw": { 9371 "description": "Title for the template, as it exists in the database.", 9372 "type": "string", 9373 "context": [ 9374 "view", 9375 "edit", 9376 "embed" 9377 ] 9378 }, 9379 "rendered": { 9380 "description": "HTML title for the template, transformed for display.", 9381 "type": "string", 9382 "context": [ 9383 "view", 9384 "edit", 9385 "embed" 9386 ], 9387 "readonly": true 9388 } 9389 }, 9390 "required": false 9391 }, 9392 "description": { 9393 "description": "Description of template.", 9394 "type": "string", 9395 "required": false 9396 }, 9397 "status": { 9398 "description": "Status of template.", 9399 "type": "string", 9400 "enum": [ 9401 "publish", 9402 "future", 9403 "draft", 9404 "pending", 9405 "private" 9406 ], 9407 "required": false 9408 }, 9409 "author": { 9410 "description": "The ID for the author of the template.", 9411 "type": "integer", 9412 "required": false 9413 } 9414 } 9415 }, 9416 { 9417 "methods": [ 9418 "DELETE" 9419 ], 9420 "args": { 9421 "id": { 9422 "description": "The id of a template", 9423 "type": "string", 9424 "required": false 8343 9425 }, 8344 9426 "force": { … … 9727 10809 "wp_navigation": "wp_navigation", 9728 10810 "wp_font_family": "wp_font_family", 9729 "wp_font_face": "wp_font_face" 10811 "wp_font_face": "wp_font_face", 10812 "wp_registered_template": "wp_registered_template" 9730 10813 } 9731 10814 }, … … 11127 12210 "closed" 11128 12211 ], 12212 "required": false 12213 }, 12214 "active_templates": { 12215 "title": "Active Templates", 12216 "description": "", 12217 "type": "object", 12218 "additionalProperties": true, 11129 12219 "required": false 11130 12220 }, … … 13462 14552 "icon": null, 13463 14553 "taxonomies": [], 13464 "rest_base": " templates",14554 "rest_base": "wp_template", 13465 14555 "rest_namespace": "wp/v2", 13466 14556 "template": [], … … 13474 14564 "wp:items": [ 13475 14565 { 13476 "href": "http://example.org/index.php?rest_route=/wp/v2/ templates"14566 "href": "http://example.org/index.php?rest_route=/wp/v2/wp_template" 13477 14567 } 13478 14568 ], … … 13635 14725 { 13636 14726 "href": "http://example.org/index.php?rest_route=/wp/v2/font-families/(?P<font_family_id>[\\d]+)/font-faces" 14727 } 14728 ], 14729 "curies": [ 14730 { 14731 "name": "wp", 14732 "href": "https://api.w.org/{rel}", 14733 "templated": true 14734 } 14735 ] 14736 } 14737 }, 14738 "wp_registered_template": { 14739 "description": "Templates to include in your theme.", 14740 "hierarchical": false, 14741 "has_archive": false, 14742 "name": "Templates", 14743 "slug": "wp_registered_template", 14744 "icon": null, 14745 "taxonomies": [], 14746 "rest_base": "wp_registered_template", 14747 "rest_namespace": "wp/v2", 14748 "template": [], 14749 "template_lock": false, 14750 "_links": { 14751 "collection": [ 14752 { 14753 "href": "http://example.org/index.php?rest_route=/wp/v2/types" 14754 } 14755 ], 14756 "wp:items": [ 14757 { 14758 "href": "http://example.org/index.php?rest_route=/wp/v2/wp_registered_template" 13637 14759 } 13638 14760 ], … … 14252 15374 "default_ping_status": "open", 14253 15375 "default_comment_status": "open", 15376 "active_templates": null, 14254 15377 "site_logo": null, 14255 15378 "site_icon": 0
Note: See TracChangeset
for help on using the changeset viewer.