[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> block-editor.php (summary)

Block Editor API.

File Size: 656 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions

  get_default_block_categories()
  get_block_categories()
  get_allowed_block_types()
  get_default_block_editor_settings()
  get_legacy_widget_block_editor_settings()
  _wp_get_iframed_editor_assets()
  get_block_editor_settings()
  block_editor_rest_api_preload()
  get_block_editor_theme_styles()

Functions
Functions that are not part of a class:

get_default_block_categories()   X-Ref
Returns the list of default categories for block types.

return: array[] Array of categories for block types.
since: 5.8.0

get_block_categories( $post_or_block_editor_context )   X-Ref
Returns all the categories for block types that will be shown in the block editor.

return: array[] Array of categories for block types.
since: 5.0.0
since: 5.8.0 It is possible to pass the block editor context as param.
param: WP_Post|WP_Block_Editor_Context $post_or_block_editor_context The current post object or

get_allowed_block_types( $block_editor_context )   X-Ref
Gets the list of allowed block types to use in the block editor.

return: bool|string[] Array of block type slugs, or boolean to enable/disable all.
since: 5.8.0
param: WP_Block_Editor_Context $block_editor_context The current block editor context.

get_default_block_editor_settings()   X-Ref
Returns the default block editor settings.

return: array The default block editor settings.
since: 5.8.0

get_legacy_widget_block_editor_settings()   X-Ref
Returns the block editor settings needed to use the Legacy Widget block which
is not registered by default.

return: array Settings to be used with get_block_editor_settings().
since: 5.8.0

_wp_get_iframed_editor_assets()   X-Ref
Collect the block editor assets that need to be loaded into the editor's iframe.

return: array {
since: 6.0.0

get_block_editor_settings( array $custom_settings, $block_editor_context )   X-Ref
Returns the contextualized block editor settings for a selected editor context.

return: array The contextualized block editor settings.
since: 5.8.0
param: array                   $custom_settings      Custom settings to use with the given editor type.
param: WP_Block_Editor_Context $block_editor_context The current block editor context.

block_editor_rest_api_preload( array $preload_paths, $block_editor_context )   X-Ref
Preloads common data used with the block editor by specifying an array of
REST API paths that will be preloaded for a given block editor context.

since: 5.8.0
param: string[]                $preload_paths        List of paths to preload.
param: WP_Block_Editor_Context $block_editor_context The current block editor context.

get_block_editor_theme_styles()   X-Ref
Creates an array of theme styles to load into the block editor.

return: array An array of theme styles for the block editor.
since: 5.8.0



Generated: Sun Jun 26 01:00:03 2022 Cross-referenced by PHPXref 0.7.1