t( $all_nav_items[ $nav_key ] ); } } } return $all_nav_items; } /** * Check role * * @return bool */ public static function is_user_priviledged() { $user_is_priviledged = false; $current_user = wp_get_current_user(); $predefined_roles = apply_filters( 'tutor_user_is_priviledged', array( 'administrator', 'tutor_instructor', ) ); if ( array_intersect( $current_user->roles, $predefined_roles ) ) { $user_is_priviledged = true; } else { $user_is_priviledged = false; } return $user_is_priviledged; } /** * Default Menus */ public static function default_menus() { return array( '' => array( 'title' => __( 'Dashboard', 'tutorstarter' ), 'icon' => 'tutor-icon-dashboard', ), 'my-profile' => array( 'title' => __( 'My profile', 'tutorstarter' ), 'icon' => 'tutor-icon-user-bold', ), 'settings' => array( 'title' => __( 'Account Settings', 'tutorstarter' ), 'icon' => 'tutor-icon-gear', ), 'logout' => array( 'title' => __( 'Logout', 'tutorstarter' ), 'icon' => 'tutor-icon-signout', ), ); } }
Fatal error: Trait "Tutor_Starter\Traits\Header_Components" not found in /htdocs/surfshop.ma/wp-content/themes/tutorstarter/inc/Custom/Component_Handler.php on line 17