From 9c4e9c8353a135487f1759a38746148028475ee4 Mon Sep 17 00:00:00 2001 From: PranavAwasthi Date: Mon, 9 Sep 2024 19:20:27 +0530 Subject: [PATCH] Added User Roles to Ultimate --- mlw_quizmaster2.php | 2 +- php/admin/quiz-options-page.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mlw_quizmaster2.php b/mlw_quizmaster2.php index f25ec8545..d69532ce1 100644 --- a/mlw_quizmaster2.php +++ b/mlw_quizmaster2.php @@ -729,7 +729,7 @@ public function setup_admin_menu() { $enabled = get_option( 'qsm_multiple_category_enabled' ); $menu_position = self::get_free_menu_position(26.1, 0.3); $settings = (array) get_option( 'qmn-settings' ); - if ( ! class_exists('QSM_User_Role') ) { + if ( ! class_exists('QSM_Ultimate') ) { $user = wp_get_current_user(); if ( in_array( 'subscriber', (array) $user->roles, true ) ) { $role_capabilities = get_role( 'subscriber' ); diff --git a/php/admin/quiz-options-page.php b/php/admin/quiz-options-page.php index dd79dadc2..ca90d60ee 100644 --- a/php/admin/quiz-options-page.php +++ b/php/admin/quiz-options-page.php @@ -26,7 +26,7 @@ function qsm_generate_quiz_options() { //user role addon is active apply_filters('qsm_user_role_permission_page',true); // Check user capability - if ( ! class_exists('QSM_User_Role') ) { + if ( ! class_exists('QSM_Ultimate') ) { $user = wp_get_current_user(); if ( in_array( 'author', (array) $user->roles, true ) ) { $user_id = sanitize_text_field( $user->ID );