PluginProbe
FileBird – WordPress Media Library Folders & File Manager / 5.6
FileBird – WordPress Media Library Folders & File Manager v5.6
6.5.8 6.5.7 6.5.5 6.5.4 trunk 4.3.1 5.1.6 5.3 5.3.2 5.4.3 5.4.4 5.4.5 5.5 5.5.3 5.5.5 5.5.8 5.5.8.1 5.6 5.6.1 5.6.2 5.6.3 5.6.4 6.2.3 6.2.5 6.3 All 36 releases
filebird / includes / Blocks / BlockController.php

BlockController.php in FileBird – WordPress Media Library Folders & File Manager 5.6, at includes/Blocks/BlockController.php

31 lines 656 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FileBird\Blocks;
4
5 defined( 'ABSPATH' ) || exit;
6
7 final class BlockController {
8 public function __construct() {
9 if ( function_exists( 'register_block_type' ) ) {
10 add_action( 'init', array( $this, 'register_blocks' ) );
11 }
12 }
13
14 public function get_blocks() {
15 $blocks = apply_filters(
16 'fbv_blocks',
17 array()
18 );
19
20 return $blocks;
21 }
22
23 public function register_blocks() {
24 $blocks = $this->get_blocks();
25
26 foreach ( $blocks as $block ) {
27 $block_class = __NAMESPACE__ . "\\{$block}";
28 new $block_class();
29 }
30 }
31 }