1 | <?php |
||
12 | trait Instruction |
||
13 | { |
||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | public $metaboxes = []; |
||
18 | |||
19 | /** |
||
20 | * @return void |
||
21 | */ |
||
22 | protected function addInstructions() |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | protected function generateInstructions() |
||
57 | |||
58 | /** |
||
59 | * @return array |
||
60 | */ |
||
61 | protected function getInstructions() |
||
68 | |||
69 | /** |
||
70 | * @return bool |
||
71 | * @filter rwmb_show |
||
72 | */ |
||
73 | abstract public function show( $bool, array $metabox ); |
||
74 | |||
75 | /** |
||
76 | * @return bool |
||
77 | */ |
||
78 | abstract public function validate( array $conditions ); |
||
79 | |||
80 | /** |
||
81 | * @param bool $toLowerCase |
||
82 | * @return string |
||
83 | */ |
||
84 | abstract protected function getClassname( $toLowerCase = true ); |
||
85 | |||
86 | /** |
||
87 | * @return array |
||
88 | */ |
||
89 | abstract protected function getPostTypes(); |
||
90 | |||
91 | /** |
||
92 | * @return bool |
||
93 | */ |
||
94 | abstract protected function hasPostType( array $metabox ); |
||
95 | } |
||
96 |