Skip to content

Commit 8b5c6c7

Browse files
committed
moved down to access globals
1 parent 40d3787 commit 8b5c6c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

templates/learning-area/index.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
wp_head();
1818

19-
$current_user_id = get_current_user_id();
20-
$subpages = Template::make_learning_area_sub_page_nav_items();
21-
2219
// Tutor global variable for using inside learning area.
2320
$tutor_current_post_type = get_post_type();
2421
$tutor_current_post = get_post();
@@ -29,7 +26,9 @@
2926
$tutor_is_enrolled = tutor_utils()->is_enrolled( $tutor_course_id );
3027
$tutor_is_public_course = Course_List::is_public( $tutor_course_id );
3128
$tutor_is_course_instructor = tutor_utils()->has_user_course_content_access( $current_user_id, $tutor_course_id );
29+
$current_user_id = get_current_user_id();
3230

31+
$subpages = Template::make_learning_area_sub_page_nav_items();
3332
?>
3433
<meta name="viewport" content="width=device-width, initial-scale=1" />
3534
<body class="tutor-learning-area<?php echo esc_attr( is_admin_bar_showing() ? ' tutor-has-admin-bar' : '' ); ?>">

0 commit comments

Comments
 (0)