1 | <?php |
||
13 | abstract class CMB2_Hookup_Base { |
||
|
|||
14 | |||
15 | /** |
||
16 | * @var CMB2 object |
||
17 | * @since 2.0.2 |
||
18 | */ |
||
19 | protected $cmb; |
||
20 | |||
21 | /** |
||
22 | * The object type we are performing the hookup for |
||
23 | * @var string |
||
24 | * @since 2.0.9 |
||
25 | */ |
||
26 | protected $object_type = 'post'; |
||
27 | |||
28 | /** |
||
29 | * Constructor |
||
30 | * @since 2.0.0 |
||
31 | * @param CMB2 $cmb The CMB2 object to hookup |
||
32 | */ |
||
33 | public function __construct( CMB2 $cmb ) { |
||
37 | |||
38 | abstract public function universal_hooks(); |
||
39 | |||
40 | /** |
||
41 | * Ensures WordPress hook only gets fired once per object. |
||
42 | * @since 2.0.0 |
||
43 | * @param string $action The name of the filter to hook the $hook callback to. |
||
44 | * @param callback $hook The callback to be run when the filter is applied. |
||
45 | * @param integer $priority Order the functions are executed |
||
46 | * @param int $accepted_args The number of arguments the function accepts. |
||
47 | */ |
||
48 | 38 | public function once( $action, $hook, $priority = 10, $accepted_args = 1 ) { |
|
67 | |||
68 | } |
||
69 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.