3232
3333?>
3434<meta name="viewport" content="width=device-width, initial-scale=1" />
35- <div class="tutor-learning-area<?php echo esc_attr ( is_admin_bar_showing () ? ' tutor-has-admin-bar ' : '' ); ?> " x-data="{ sidebarOpen: false, isFullScreen: false }" :class="{ 'is-fullscreen': isFullScreen }">
36- <?php tutor_load_template ( 'learning-area.components.header ' ); ?>
37- <div class="tutor-learning-area-body">
38- <?php tutor_load_template ( 'learning-area.components.sidebar ' ); ?>
39- <div class="tutor-learning-area-content">
40- <div class="tutor-learning-area-container">
41- <?php
42- // Get requested page from query string and sanitize.
43- $ subpage = Input::get ( 'subpage ' );
35+ <body class="tutor-learning-area<?php echo esc_attr ( is_admin_bar_showing () ? ' tutor-has-admin-bar ' : '' ); ?> ">
36+ <div x-data="{ sidebarOpen: false, isFullScreen: false }" :class="{ 'is-fullscreen': isFullScreen }">
37+ <?php tutor_load_template ( 'learning-area.components.header ' ); ?>
38+ <div class="tutor-learning-area-body">
39+ <?php tutor_load_template ( 'learning-area.components.sidebar ' ); ?>
40+ <div class="tutor-learning-area-content">
41+ <div class="tutor-learning-area-container">
42+ <?php
43+ // Get requested page from query string and sanitize.
44+ $ subpage = Input::get ( 'subpage ' );
4445
45- if ( $ subpage ) {
46- $ template = $ subpages [ $ subpage ]['template ' ] ?? '' ;
47- if ( file_exists ( $ template ) ) {
48- tutor_load_template_from_custom_path ( $ template );
46+ if ( $ subpage ) {
47+ $ template = $ subpages [ $ subpage ]['template ' ] ?? '' ;
48+ if ( file_exists ( $ template ) ) {
49+ tutor_load_template_from_custom_path ( $ template );
50+ } else {
51+ do_action ( 'tutor_single_content_ ' . $ tutor_current_post_type );
52+ }
4953 } else {
50- do_action ( 'tutor_single_content_ ' . $ tutor_current_post_type );
54+ do_action ( 'tutor_single_content_ ' . $ tutor_current_post_type, $ tutor_current_post );
5155 }
52- } else {
53- do_action ( 'tutor_single_content_ ' . $ tutor_current_post_type , $ tutor_current_post );
54- }
55- ?>
56+ ?>
57+ </div>
5658 </div>
57- </div>
58- <button
59- class="tutor-btn tutor-btn-outline tutor-btn-small tutor-btn-icon tutor-expand-btn"
60- @click="isFullScreen = !isFullScreen"
61- >
62- <template x-if="!isFullScreen">
63- <?php tutor_utils ()->render_svg_icon ( Icon::EXPAND ); ?>
64- </template>
59+ <button
60+ class="tutor-btn tutor-btn-outline tutor-btn-small tutor-btn-icon tutor-expand-btn"
61+ @click="isFullScreen = !isFullScreen"
62+ >
63+ <template x-if="!isFullScreen">
64+ <?php tutor_utils ()->render_svg_icon ( Icon::EXPAND ); ?>
65+ </template>
6566
66- <template x-if="isFullScreen">
67- <?php tutor_utils ()->render_svg_icon ( Icon::COLLAPSED ); ?>
68- </template>
69- </button>
67+ <template x-if="isFullScreen">
68+ <?php tutor_utils ()->render_svg_icon ( Icon::COLLAPSED ); ?>
69+ </template>
70+ </button>
71+ </div>
7072 </div>
71- </div >
72- <?php wp_footer (); ? >
73+ <?php wp_footer (); ? >
74+ </body >
0 commit comments