[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Block Editor API.

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

Defines 8 functions

  get_default_block_categories()
  get_block_categories()
  get_allowed_block_types()
  get_default_block_editor_settings()
  get_legacy_widget_block_editor_settings()
  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.

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

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.

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
return: array[] Array of categories for block types.

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

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

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

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

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.

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

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

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.
return: array The contextualized block editor settings.

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.
return: void

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

since: 5.8.0
return: array An array of theme styles for the block editor. Includes default font family



Generated: Wed Oct 27 01:00:04 2021 Cross-referenced by PHPXref 0.7.1