PluginProbe
Genesis Blocks / trunk
Genesis Blocks vtrunk
3.1.11 trunk 1.0.0 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 3.0.0 3.0.1 3.1.0 3.1.1 3.1.10 All 32 releases
genesis-blocks / lib / BlockLoader / Module.php

Module.php in Genesis Blocks trunk, at lib/BlockLoader/Module.php

55 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Block Loader Module
4 *
5 * Loads all the block related code.
6 *
7 * @package Genesis\Blocks\BlockLoader
8 * @since 1.0.0
9 * @author StudioPress
10 * @license GPL-2.0-or-later
11 * @link https://github.com/studiopress/genesis-blocks/
12 */
13
14 declare(strict_types=1);
15 namespace Genesis\Blocks\BlockLoader;
16
17 use Genesis\Blocks\Interfaces\ModuleInterface;
18
19 /**
20 * Module class
21 * Allow Genesis Blocks to initiate this module.
22 *
23 * @since 1.0.0
24 * @uses \Genesis\Blocks\Interface\ModuleInterface
25 */
26 final class Module implements ModuleInterface {
27 /**
28 * Checks if this module is enabled.
29 *
30 * Modules can specify conditions when they should be disabled (other plugin
31 * is active, or in response to a user preference). Can also be used to
32 * quickly disable a module manually by editing the is_enabled return value.
33 *
34 * @since 1.0.0
35 * @return bool
36 */
37 public function is_enabled(): bool {
38 return true;
39 }
40
41 /**
42 * Module Activation
43 * Logic to be run when this module is activated.
44 *
45 * @since 1.0.0
46 * @uses Genesis\Blocks\BlockLoader;
47 * @param array $context Current environment information.
48 *
49 * @return void
50 */
51 public function activate( array $context ): void {
52 ( new ManualRequire( $context ) )->init();
53 }
54 }
55