Skip to content

Commit

Permalink
Merge pull request #2660 from QuizandSurveyMaster/CU-85ztkvkek-qsm-ul…
Browse files Browse the repository at this point in the history
…timate-hooks

Cu 85ztkvkek qsm ultimate hooks
  • Loading branch information
pranav-et authored Oct 3, 2024
2 parents a07bfe9 + 8d1bd0e commit 7a31092
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,9 @@ public function qsm_add_user_capabilities() {

// Remove all capabilities first.
foreach ( $administrator_capabilities as $cap ) {
$role->remove_cap( $cap );
if ( $role->has_cap( $cap ) ) {
$role->remove_cap( $cap );
}
}

// Dynamically determine the capabilities to add based on the current user role.
Expand Down

0 comments on commit 7a31092

Please sign in to comment.