[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Block Editor API.

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

Defines 6 functions

  get_default_block_categories()
  get_block_categories()
  get_allowed_block_types()
  get_default_block_editor_settings()
  get_block_editor_settings()
  block_editor_rest_api_preload()

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.

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.
since: 5.0.0
since: 5.8.0 It is possible to pass the block editor context as param.

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

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.
since: 5.8.0

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_block_editor_settings( array $custom_settings, $block_editor_context )   X-Ref
Returns the contextualized block editor settings settings for a selected editor context.

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.
since: 5.8.0

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.

param: array                   $preload_paths        List of paths to preload.
param: WP_Block_Editor_Context $block_editor_context The current block editor context.
return: void
since: 5.8.0



Generated: Sun Jun 13 01:00:04 2021 Cross-referenced by PHPXref 0.7.1