# team-section/trunk/includes/rootPlugin/BlockCategory.php

Team Section Block – Showcase Team Members with Layout Options, version trunk. 29 lines.

- Page: https://pluginprobe.com/plugins/team-section/trunk/code/includes/rootPlugin/BlockCategory.php
- Raw: https://pluginprobe.com/plugins/team-section/trunk/raw/includes/rootPlugin/BlockCategory.php
- Modified: 2026-09-05T09:17:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/team-section/trunk/code/includes/rootPlugin/BlockCategory.php#L10-L20`.

```php
<?php
namespace TSB;

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

class BlockCategory {

    public function __construct() {
        add_filter( 'block_categories_all', [ $this, 'register_category' ], 10, 2 );
    }

    public function register_category( $categories, $context ) {
        if ( ! is_array( $categories ) ) {
            $categories = [];
        }


        array_unshift( $categories, [
            'slug'  => 'team-section',
            'title' => __( 'Team Blocks', 'team-section' ),
            'icon'  => null,
        ] );

        return $categories;
    }
}

```
