PluginProbe
Team Section Block – Showcase Team Members with Layout Options / trunk
Team Section Block – Showcase Team Members with Layout Options vtrunk
2.0.4 2.0.3 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 2.0.0 2.0.1 2.0.2
team-section / includes / rootPlugin / BlockCategory.php

BlockCategory.php in Team Section Block – Showcase Team Members with Layout Options trunk, at includes/rootPlugin/BlockCategory.php

29 lines 612 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace TSB;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 class BlockCategory {
9
10 public function __construct() {
11 add_filter( 'block_categories_all', [ $this, 'register_category' ], 10, 2 );
12 }
13
14 public function register_category( $categories, $context ) {
15 if ( ! is_array( $categories ) ) {
16 $categories = [];
17 }
18
19
20 array_unshift( $categories, [
21 'slug' => 'team-section',
22 'title' => __( 'Team Blocks', 'team-section' ),
23 'icon' => null,
24 ] );
25
26 return $categories;
27 }
28 }
29