@@ -5619,11 +5619,8 @@ public function is_learning_area(): bool {
56195619 if ( is_single () && ! empty ( $ current_post_type ) ) {
56205620 if ( in_array ( $ current_post_type , $ post_types , true ) ) {
56215621 return true ;
5622- } elseif ( tutor ()->course_post_type === $ current_post_type ) {
5623- // Check if the subpage is belongs to learning area.
5624- $ learning_subpage = Input::get ( 'subpage ' );
5625- $ allowed_subpages = array_keys ( Template::make_learning_area_sub_page_nav_items () );
5626- return in_array ( $ learning_subpage , $ allowed_subpages , true );
5622+ } elseif ( tutor ()->course_post_type === $ current_post_type && Input::has ( 'subpage ' ) ) {
5623+ return true ;
56275624 }
56285625 }
56295626
@@ -8542,7 +8539,7 @@ public function is_tutor_dashboard( $subpage = null ) {
85428539 *
85438540 * @since 1.9.4
85448541 * @since 4.0.0 Subpage check support added.
8545- * Example: assignments/submitted
8542+ * Example: assignments/submitted
85468543 *
85478544 * @param string $subpage subpage.
85488545 *
@@ -9521,7 +9518,7 @@ public function not_found_text(): string {
95219518 */
95229519 public function instructor_menus (): array {
95239520 $ menus = array (
9524- 'index ' => array (
9521+ 'index ' => array (
95259522 'title ' => __ ( 'Home ' , 'tutor ' ),
95269523 'icon ' => Icon::HOME ,
95279524 ),
@@ -9558,9 +9555,8 @@ public function instructor_menus(): array {
95589555 ),
95599556 );
95609557
9561-
95629558 if ( $ this ->should_show_dicussion_menu () ) {
9563- $ other_menus ['discussions ' ] = array (
9559+ $ other_menus ['discussions ' ] = array (
95649560 'title ' => __ ( 'Discussions ' , 'tutor ' ),
95659561 'auth_cap ' => tutor ()->instructor_role ,
95669562 'icon ' => Icon::QA ,
@@ -9606,10 +9602,10 @@ public function default_menus(): array {
96069602 'title ' => __ ( 'Courses ' , 'tutor ' ),
96079603 'icon ' => Icon::COURSES ,
96089604 ),
9609- 'account ' => array (
9610- 'label ' => __ ( 'Account ' , 'tutor ' ),
9611- 'show_ui ' => false
9612- )
9605+ 'account ' => array (
9606+ 'label ' => __ ( 'Account ' , 'tutor ' ),
9607+ 'show_ui ' => false ,
9608+ ),
96139609 );
96149610
96159611 if ( $ this ->should_show_dicussion_menu () ) {
0 commit comments