-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathModule.php
More file actions
43 lines (37 loc) · 852 Bytes
/
Module.php
File metadata and controls
43 lines (37 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Module
*
* @package TenupFramework
*/
declare(strict_types = 1);
namespace TenupFramework;
/**
* Module is any feature that conditionally activates based on the current context.
*/
trait Module {
/**
* Used to alter the order in which classes are initialized.
*
* Lower number will be initialized first.
*
* @note This has no correlation to the `init` priority. It's just a way to allow certain classes to be initialized before others.
*
* @return int The priority of the module.
*/
public function load_order() {
return 10;
}
/**
* Checks whether the Module should run within the current context.
*
* @return bool
*/
abstract public function can_register();
/**
* Connects the Module with WordPress using Hooks and/or Filters.
*
* @return void
*/
abstract public function register();
}