1 | <?php |
||
10 | class Archive extends Settings |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | CONST ID = 'archives'; |
||
16 | |||
17 | public $hooks = []; |
||
18 | |||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | public function init() |
||
31 | |||
32 | /** |
||
33 | * @return void |
||
34 | * @action admin_menu |
||
35 | */ |
||
36 | public function addPage() |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | * @filter pollux/{static::ID}/before/instructions |
||
54 | */ |
||
55 | public function filterBeforeInstructions() |
||
63 | |||
64 | /** |
||
65 | * @param string $instruction |
||
66 | * @return string |
||
67 | * @action pollux/{static::ID}/instruction |
||
68 | */ |
||
69 | public function filterInstruction( $instruction, array $field, array $metabox ) |
||
73 | |||
74 | /** |
||
75 | * @return array |
||
76 | * @action pollux/{static::ID}/metabox/submit |
||
77 | */ |
||
78 | public function filterSubmitMetaBox( array $args ) |
||
83 | |||
84 | /** |
||
85 | * @return void |
||
86 | * @action current_screen |
||
87 | */ |
||
88 | public function register() |
||
96 | |||
97 | /** |
||
98 | * @return void |
||
99 | * @action pollux/archives/init |
||
100 | */ |
||
101 | public function registerFeaturedImageMetaBox() |
||
106 | |||
107 | /** |
||
108 | * @return void |
||
109 | * @action pollux/archives/editor |
||
110 | */ |
||
111 | public function renderEditor( $content, $type ) |
||
126 | |||
127 | /** |
||
128 | * @return void |
||
129 | * @callback add_meta_box |
||
130 | */ |
||
131 | public function renderFeaturedImageMetaBox() |
||
151 | |||
152 | /** |
||
153 | * @return void |
||
154 | * @callback add_menu_page |
||
155 | */ |
||
156 | public function renderPage() |
||
170 | |||
171 | /** |
||
172 | * @return array |
||
173 | */ |
||
174 | protected function getDefaults() |
||
178 | |||
179 | /** |
||
180 | * @return string |
||
|
|||
181 | */ |
||
182 | protected function getPostType() |
||
189 | |||
190 | /** |
||
191 | * @return array |
||
192 | */ |
||
193 | protected function getPostTypesWithArchive() |
||
200 | |||
201 | /** |
||
202 | * @return array |
||
203 | */ |
||
204 | protected function getSettings() |
||
208 | |||
209 | /** |
||
210 | * @return string|array |
||
211 | */ |
||
212 | protected function getValue( $key, $group ) |
||
216 | } |
||
217 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.