From 794bfc9363453781c80a231e344bc425d8d3e40a Mon Sep 17 00:00:00 2001 From: PranavAwasthi Date: Tue, 26 Nov 2024 16:03:11 +0530 Subject: [PATCH] Fixed coflict with User Role Plugin --- mlw_quizmaster2.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mlw_quizmaster2.php b/mlw_quizmaster2.php index d164893e..b2499128 100644 --- a/mlw_quizmaster2.php +++ b/mlw_quizmaster2.php @@ -771,12 +771,6 @@ public function qsm_add_user_capabilities() { if ( ! $role ) { return; } - // Remove all capabilities first. - foreach ( $administrator_capabilities as $cap ) { - if ( $role->has_cap( $cap ) ) { - $role->remove_cap( $cap ); - } - } // Dynamically determine the capabilities to add based on the current user role. $capabilities_to_add = isset(${$rolename . '_capabilities'}) ? ${$rolename . '_capabilities'} : array();