[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/blocks/ -> tabs.php (summary)

Tabs Block

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

Defines 4 functions

  block_core_tabs_generate_tabs_list()
  block_core_tabs_provide_context()
  block_core_tabs_render_block_callback()
  register_block_core_tabs()

Functions
Functions that are not part of a class:

block_core_tabs_generate_tabs_list( array $innerblocks = array()   X-Ref
Extract tabs list from tab-panel innerblocks.

param: array  $innerblocks Parsed inner blocks of tabs block.
param: string $tabs_id     Unique ID for the tabs instance, used to generate tab IDs.
return: array List of tab IDs.

block_core_tabs_provide_context( array $context, array $parsed_block )   X-Ref
Filter to provide tabs list context to core/tabs and core/tab-list blocks.
It is more performant to do this here, once, rather than in the tabs render and tabs context filters.
In this way core/tabs is both a provider and a consumer of the core/tabs-list context.

param: array $context      Default block context.
param: array $parsed_block The block being rendered.
return: array Modified context.

block_core_tabs_render_block_callback( array $attributes, string $content, \WP_Block $block )   X-Ref
Render callback for core/tabs.

param: array     $attributes Block attributes.
param: string    $content    Block content.
param: \WP_Block $block      WP_Block instance.
return: string Updated HTML.

register_block_core_tabs()   X-Ref
Registers the `core/tabs` block on the server.




Generated : Wed Jul 15 08:20:16 2026 Cross-referenced by PHPXref