1 | <?php |
||
10 | class Archive extends Settings |
||
11 | { |
||
12 | CONST ID = 'archives'; |
||
13 | |||
14 | const CAPABILITY = 'edit_others_posts'; |
||
15 | const DEPENDENCY = ''; |
||
16 | |||
17 | public static $current; |
||
18 | |||
19 | public $hooks = []; |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | public function init() |
||
35 | |||
36 | public function canProceed() |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | * @filter pollux/{static::ID}/before/instructions |
||
45 | */ |
||
46 | public function filterBeforeInstructions() |
||
54 | |||
55 | /** |
||
56 | * @param string $instruction |
||
57 | * @return string |
||
58 | * @action pollux/{static::ID}/instruction |
||
59 | */ |
||
60 | public function filterInstruction( $instruction, array $field, array $metabox ) |
||
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | * @action pollux/{static::ID}/metabox/submit |
||
68 | */ |
||
69 | public function filterSubmitMetaBox( array $args ) |
||
74 | |||
75 | /** |
||
76 | * @todo: Use gatekeeper to check capability, wp_die(-1) on fail; |
||
|
|||
77 | * @return string|null |
||
78 | * @action wp_ajax_pollux/archives/featured/html |
||
79 | */ |
||
80 | public function getFeaturedImageHtml() |
||
88 | |||
89 | /** |
||
90 | * @param string $key |
||
91 | * @param mixed $fallback |
||
92 | * @param string $group |
||
93 | * @return string|array |
||
94 | */ |
||
95 | public function getMetaValue( $key, $fallback = '', $group = '' ) |
||
99 | |||
100 | /** |
||
101 | * @return void |
||
102 | * @action current_screen |
||
103 | */ |
||
104 | public function register() |
||
112 | |||
113 | /** |
||
114 | * @return void |
||
115 | * @action pollux/archives/init |
||
116 | */ |
||
117 | public function registerFeaturedImageMetaBox() |
||
122 | |||
123 | /** |
||
124 | * @return void |
||
125 | * @action admin_menu |
||
126 | */ |
||
127 | public function registerPage() |
||
141 | |||
142 | /** |
||
143 | * @return void |
||
144 | * @action pollux/archives/editor |
||
145 | */ |
||
146 | public function renderEditor( $content, $type ) |
||
161 | |||
162 | /** |
||
163 | * @return void |
||
164 | * @callback add_meta_box |
||
165 | */ |
||
166 | public function renderFeaturedImageMetaBox( $imageId = null ) |
||
187 | |||
188 | /** |
||
189 | * @return void |
||
190 | * @callback add_submenu_page |
||
191 | */ |
||
192 | public function renderPage() |
||
206 | |||
207 | /** |
||
208 | * @return array |
||
209 | */ |
||
210 | protected function getDefaults() |
||
214 | |||
215 | /** |
||
216 | * @return string |
||
217 | */ |
||
218 | protected function getPostType() |
||
226 | |||
227 | /** |
||
228 | * @return array |
||
229 | */ |
||
230 | protected function getPostTypesWithArchive() |
||
237 | |||
238 | /** |
||
239 | * @return array |
||
240 | */ |
||
241 | protected function getSettings() |
||
245 | } |
||
246 |
This check looks
TODO
comments that have been left in the code.``TODO``s show that something is left unfinished and should be attended to.