[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Block Editor API.

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

Defines 12 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()
  wp_get_first_block()
  wp_get_post_content_block_attributes()
  get_block_editor_settings()
  block_editor_rest_api_preload()
  get_block_editor_theme_styles()
  get_classic_theme_supports_block_editor_settings()

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.

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.
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.
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.

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().

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

return: array {

wp_get_first_block( $blocks, $block_name )   X-Ref
Finds the first occurrence of a specific block in an array of blocks.

return: array Found block, or empty array if none found.
param: array  $blocks     Array of blocks.
param: string $block_name Name of the block to find.

wp_get_post_content_block_attributes()   X-Ref
Retrieves Post Content block attributes from the current post template.

return: array|null Post Content block attributes array or null if Post Content block doesn't exist.

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.
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.

param: (string|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.

get_classic_theme_supports_block_editor_settings()   X-Ref
Returns the classic theme supports settings for block editor.

return: array The classic theme supports settings.



Generated : Wed Apr 24 08:20:01 2024 Cross-referenced by PHPXref