Changeset 51962 for trunk/src/wp-admin/edit-form-blocks.php
- Timestamp:
- 10/31/2021 11:15:10 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-blocks.php
r51657 r51962 50 50 wp_enqueue_script( 'wp-edit-post' ); 51 51 52 $rest_ base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;52 $rest_path = rest_get_route_for_post( $post ); 53 53 54 54 // Preload common data. … … 58 58 '/wp/v2/taxonomies?per_page=-1&context=edit', 59 59 '/wp/v2/themes?status=active', 60 sprintf( '/wp/v2/%s/%s?context=edit', $rest_base, $post->ID),60 add_query_arg( 'context', 'edit', $rest_path ), 61 61 sprintf( '/wp/v2/types/%s?context=edit', $post_type ), 62 62 sprintf( '/wp/v2/users/me?post_type=%s&context=edit', $post_type ), 63 array( '/wp/v2/media', 'OPTIONS' ),64 array( '/wp/v2/blocks', 'OPTIONS' ),65 sprintf( ' /wp/v2/%s/%d/autosaves?context=edit', $rest_base, $post->ID),63 array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ), 64 array( rest_get_route_for_post_type_items( 'wp_block' ), 'OPTIONS' ), 65 sprintf( '%s/autosaves?context=edit', $rest_path ), 66 66 ); 67 67
Note: See TracChangeset
for help on using the changeset viewer.