get_default_block_categories() – Returns the list of default categories for block types.

You appear to be a bot. Output may be restricted

Description

Returns the list of default categories for block types.

Usage

$array[] = get_default_block_categories();

Parameters

Returns

array[] Array of categories for block types.

Source

File name: wordpress/wp-includes/block-editor.php
Lines:

1 to 39 of 39
function get_default_block_categories() {
  return array(
    array(
      'slug'  => 'text',
      'title' => _x( 'Text', 'block category' ),
      'icon'  => null,
    ),
    array(
      'slug'  => 'media',
      'title' => _x( 'Media', 'block category' ),
      'icon'  => null,
    ),
    array(
      'slug'  => 'design',
      'title' => _x( 'Design', 'block category' ),
      'icon'  => null,
    ),
    array(
      'slug'  => 'widgets',
      'title' => _x( 'Widgets', 'block category' ),
      'icon'  => null,
    ),
    array(
      'slug'  => 'theme',
      'title' => _x( 'Theme', 'block category' ),
      'icon'  => null,
    ),
    array(
      'slug'  => 'embed',
      'title' => _x( 'Embeds', 'block category' ),
      'icon'  => null,
    ),
    array(
      'slug'  => 'reusable',
      'title' => _x( 'Reusable Blocks', 'block category' ),
      'icon'  => null,
    ),
  );
}
 

 View on GitHub View on Trac