@@ -321,9 +321,9 @@ function test_get_block_editor_settings_deprecated_filter_post_editor() {
321321 /**
322322 * @ticket 52920
323323 */
324- function test_block_editor_preload_api_requests_no_paths () {
324+ function test_block_editor_rest_api_preload_no_paths () {
325325 $ context = new WP_Block_Editor_Context ();
326- block_editor_preload_api_requests ( array (), $ context );
326+ block_editor_rest_api_preload ( array (), $ context );
327327
328328 $ after = implode ( '' , wp_scripts ()->registered ['wp-api-fetch ' ]->extra ['after ' ] );
329329 $ this ->assertNotContains ( 'wp.apiFetch.createPreloadingMiddleware ' , $ after );
@@ -333,7 +333,7 @@ function test_block_editor_preload_api_requests_no_paths() {
333333 * @ticket 52920
334334 * @expectedDeprecated block_editor_preload_paths
335335 */
336- function test_block_editor_preload_api_requests_deprecated_filter_post_editor () {
336+ function test_block_editor_rest_api_preload_deprecated_filter_post_editor () {
337337 function filter_remove_preload_paths ( $ preload_paths , $ post ) {
338338 if ( empty ( $ post ) ) {
339339 return $ preload_paths ;
@@ -343,7 +343,7 @@ function filter_remove_preload_paths( $preload_paths, $post ) {
343343 add_filter ( 'block_editor_preload_paths ' , 'filter_remove_preload_paths ' , 10 , 2 );
344344
345345 $ context = new WP_Block_Editor_Context ( array ( 'post ' => get_post () ) );
346- block_editor_preload_api_requests (
346+ block_editor_rest_api_preload (
347347 array (
348348 array ( '/wp/v2/blocks ' , 'OPTIONS ' ),
349349 ),
@@ -359,25 +359,25 @@ function filter_remove_preload_paths( $preload_paths, $post ) {
359359 /**
360360 * @ticket 52920
361361 */
362- function test_block_editor_preload_api_requests_filter_all () {
362+ function test_block_editor_rest_api_preload_filter_all () {
363363 function filter_add_preload_paths ( $ preload_paths , WP_Block_Editor_Context $ context ) {
364364 if ( empty ( $ context ->post ) ) {
365365 array_push ( $ preload_paths , array ( '/wp/v2/types ' , 'OPTIONS ' ) );
366366 }
367367
368368 return $ preload_paths ;
369369 }
370- add_filter ( 'block_editor_preload_paths_all ' , 'filter_add_preload_paths ' , 10 , 2 );
370+ add_filter ( 'block_editor_rest_api_preload_paths ' , 'filter_add_preload_paths ' , 10 , 2 );
371371
372372 $ context = new WP_Block_Editor_Context ();
373- block_editor_preload_api_requests (
373+ block_editor_rest_api_preload (
374374 array (
375375 array ( '/wp/v2/blocks ' , 'OPTIONS ' ),
376376 ),
377377 $ context
378378 );
379379
380- remove_filter ( 'block_editor_preload_paths_all ' , 'filter_add_preload_paths ' );
380+ remove_filter ( 'block_editor_rest_api_preload_paths ' , 'filter_add_preload_paths ' );
381381
382382 $ after = implode ( '' , wp_scripts ()->registered ['wp-api-fetch ' ]->extra ['after ' ] );
383383 $ this ->assertContains ( 'wp.apiFetch.createPreloadingMiddleware ' , $ after );
0 commit comments