wphooks.info - block_editor_settings

block_editor_settings

(trunk - 5.1-alpha-44286)

*** New in trunk ***

The hook occurs in the following file:

wp-admin/edit-form-blocks.php:
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
}

/**
 * Filters the settings to pass to the block editor.
 *
 * @since 5.0.0
 *
 * @param array   $editor_settings Default editor settings.
 * @param WP_Post $post            Post being edited.
 */
$editor_settings = apply_filters( 'block_editor_settings', $editor_settings, $post );

$init_script = <<<JS
( function() {
	window._wpLoadBlockEditor = new Promise( function( resolve ) {
		wp.domReady( function() {
			resolve( wp.editPost.initializeEditor( 'editor', "%s", %d, %s, %s ) );
		} );
	} );
} )();