Skip to content

Commit a63296d

Browse files
committed
use separate variable in caps loop
1 parent 0a848e8 commit a63296d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

inc/class-snitch.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private static function _handle_caps( $role, $action ) {
226226
/* Get role */
227227
$role = get_role( $role );
228228

229-
/* Avaliable caps */
229+
/* Available caps */
230230
$caps = array(
231231
'edit_snitchs',
232232
'edit_snitch',
@@ -241,14 +241,8 @@ private static function _handle_caps( $role, $action ) {
241241
);
242242

243243
/* Loop & set caps */
244-
foreach ( $caps as $caps ) {
245-
call_user_func(
246-
array(
247-
$role,
248-
$action . '_cap',
249-
),
250-
$caps
251-
);
244+
foreach ( $caps as $cap ) {
245+
call_user_func( array( $role, $action . '_cap' ), $cap );
252246
}
253247
}
254248

0 commit comments

Comments
 (0)