array
( rest_get_route_for_post_type_items( 'wp_block'
), 'OPTIONS'
),
array
( rest_get_route_for_post_type_items( 'wp_template'
), 'OPTIONS'
),
sprintf( '%s/autosaves?context=edit',
$rest_path ),
'/wp/v2/settings',
array
( '/wp/v2/settings', 'OPTIONS'
),
);
block_editor_rest_api_preload( $preload_paths,
$block_editor_context );
wp_add_inline_script( 'wp-blocks',
sprintf( 'wp.blocks.setCategories( %s );',
wp_json_encode( get_block_categories( $post ) ) ),
'after'
);
/*
* Assign initial edits, if applicable. These are not initially assigned to the persisted post,
* but should be included in its save payload.
*/
$initial_edits = array
();
$is_new_post = false;
if ( 'auto-draft' ===
$post->post_status
) { $is_new_post = true;