PluginProbe
TableKit – WordPress Table Builder for Data Tables, WooCommerce Product Tables & Post Tables / trunk
TableKit – WordPress Table Builder for Data Tables, WooCommerce Product Tables & Post Tables vtrunk
2.2.13 2.2.12 2.2.11 2.2.10 2.2.9 2.2.8 2.2.7 2.2.6 2.2.5 2.2.4 2.2.3 trunk 1.0.0 1.0.1 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2
table-builder-block / includes / Config / BlockList.php

BlockList.php in TableKit – WordPress Table Builder for Data Tables, WooCommerce Product Tables & Post Tables trunk, at includes/Config/BlockList.php

81 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Registry of the blocks TableKit provides
4 *
5 * @package TableKit
6 */
7
8 namespace TableBuilder\Config;
9
10 defined( 'ABSPATH' ) || exit;
11
12 /**
13 * Provides the filterable list of block definitions TableKit registers.
14 */
15 class BlockList {
16
17
18 /**
19 * Gets the list of blocks TableKit registers, filterable so the Pro
20 * add-on (and third parties) can extend it with additional block definitions.
21 *
22 * @return array<string, array{slug:string,title:string,package:string,category:string,status:string,parent?:string,badge?:string[]}>
23 * Block definitions keyed by block key.
24 */
25 public static function get_block_list() {
26 /**
27 * Filters the list of block definitions TableKit registers.
28 *
29 * @since Unknown
30 *
31 * @param array $list Block definitions keyed by block key; see get_block_list() for the shape.
32 */
33 $list = apply_filters(
34 // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores -- slash-namespaced hook name is this plugin's established public API (used by the Pro add-on); renaming would be a breaking change.
35 'tablebuilder/blocks/list',
36 array(
37 'table-builder' => array(
38 'slug' => 'table-builder',
39 'title' => 'Table Builder',
40 'package' => 'free',
41 'category' => 'general',
42 'status' => 'active',
43 'badge' => array( 'freemium', 'new', 'beta' ),
44 ),
45 'table-builder-row' => array(
46 'slug' => 'table-builder-row',
47 'title' => 'Table Row',
48 'package' => 'free',
49 'category' => 'general',
50 'parent' => 'table-builder',
51 'status' => 'active',
52 ),
53 'table-builder-item' => array(
54 'slug' => 'table-builder-item',
55 'title' => 'Table Column',
56 'package' => 'free',
57 'category' => 'general',
58 'parent' => 'table-builder-row',
59 'status' => 'active',
60 ),
61 'data-table' => array(
62 'slug' => 'data-table',
63 'title' => 'Data Table',
64 'package' => 'pro',
65 'category' => 'general',
66 'status' => 'active',
67 ),
68 'post-table' => array(
69 'slug' => 'post-table',
70 'title' => 'Post Table',
71 'package' => 'pro',
72 'category' => 'general',
73 'status' => 'active',
74 ),
75 )
76 );
77
78 return $list;
79 }
80 }
81