1 | <?php |
||
13 | trait Instruction |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | public $metaboxes = []; |
||
19 | |||
20 | /** |
||
21 | * @return void |
||
22 | */ |
||
23 | protected function addInstructions() |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | protected function generateInstructions() |
||
60 | |||
61 | /** |
||
62 | * @return array |
||
63 | */ |
||
64 | protected function getInstructions() |
||
71 | |||
72 | /** |
||
73 | * @return bool |
||
74 | */ |
||
75 | protected function showInstructions() |
||
81 | |||
82 | /** |
||
83 | * @return bool |
||
84 | * @filter rwmb_show |
||
85 | */ |
||
86 | abstract public function show( $bool, array $metabox ); |
||
87 | |||
88 | /** |
||
89 | * @return bool |
||
90 | */ |
||
91 | abstract public function validate( array $conditions ); |
||
92 | |||
93 | /** |
||
94 | * @return array |
||
95 | */ |
||
96 | abstract protected function getPostTypes(); |
||
97 | |||
98 | /** |
||
99 | * @return bool |
||
100 | */ |
||
101 | abstract protected function hasPostType( array $metabox ); |
||
102 | |||
103 | /** |
||
104 | * @return void |
||
105 | */ |
||
106 | abstract protected function normalize( array $metaboxes, array $defaults = [] ); |
||
107 | } |
||
108 |