Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function initialize() |
||
27 | { |
||
28 | $current_user = wp_get_current_user(); |
||
29 | $capabilities = []; |
||
30 | $role_capabilities = $current_user->get_role_caps(); |
||
31 | foreach ($role_capabilities as $capability => $you_can_do_it) { |
||
32 | if ($you_can_do_it) { |
||
33 | $capabilities[] = $capability; |
||
34 | } |
||
35 | } |
||
36 | $this->setDataArray($capabilities); |
||
37 | } |
||
38 | } |
||
39 |