diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php
index 7e335fa49b..3853527868 100644
|
a
|
b
|
wp_add_inline_script( |
| 77 | 77 | * Assign initial edits, if applicable. These are not initially assigned to the persisted post, |
| 78 | 78 | * but should be included in its save payload. |
| 79 | 79 | */ |
| 80 | | $initial_edits = null; |
| | 80 | $initial_edits = array(); |
| 81 | 81 | $is_new_post = false; |
| 82 | 82 | if ( 'auto-draft' === $post->post_status ) { |
| 83 | 83 | $is_new_post = true; |
| 84 | 84 | // Override "(Auto Draft)" new post default title with empty string, or filtered value. |
| 85 | | $initial_edits = array( |
| 86 | | 'title' => $post->post_title, |
| 87 | | 'content' => $post->post_content, |
| 88 | | 'excerpt' => $post->post_excerpt, |
| 89 | | ); |
| | 85 | if ( post_type_supports( $post->post_type, 'title' ) ) { |
| | 86 | $initial_edits['title'] = $post->post_title; |
| | 87 | } |
| | 88 | |
| | 89 | if ( post_type_supports( $post->post_type, 'content' ) ) { |
| | 90 | $initial_edits['content'] = $post->post_content; |
| | 91 | } |
| | 92 | |
| | 93 | if ( post_type_supports( $post->post_type, 'excerpt' ) ) { |
| | 94 | $initial_edits['excerpt'] = $post->post_excerpt; |
| | 95 | } |
| | 96 | |
| 90 | 97 | } |
| 91 | 98 | |
| 92 | 99 | // Preload server-registered block schemas. |