Skip to content

Commit

Permalink
Don't load learning mode styles on course pages
Browse files Browse the repository at this point in the history
  • Loading branch information
renatho committed Nov 6, 2024
1 parent afc74b1 commit 502391a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/3rd-party/themes/astra.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function sensei_load_learning_mode_styles_for_astra_theme() {
$course_id = Sensei_Utils::get_current_course();
$is_target_theme = 'astra' === strtolower( wp_get_theme()->get_template() );

if ( empty( $course_id ) || ! $is_target_theme ) {
if ( empty( $course_id ) || ! $is_target_theme || 'course' === get_post_type() ) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/3rd-party/themes/course.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function sensei_load_learning_mode_style_for_course_theme() {
$course_id = Sensei_Utils::get_current_course();
$is_course_theme = 'course' === wp_get_theme()->get_template();

if ( empty( $course_id ) || ! $is_course_theme ) {
if ( empty( $course_id ) || ! $is_course_theme || 'course' === get_post_type() ) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/3rd-party/themes/divi.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function sensei_load_learning_mode_style_for_divi_theme() {
$course_id = Sensei_Utils::get_current_course();
$is_target_theme = 'divi' === strtolower( wp_get_theme()->get_template() );

if ( empty( $course_id ) || ! $is_target_theme ) {
if ( empty( $course_id ) || ! $is_target_theme || 'course' === get_post_type() ) {
return false;
}

Expand Down

0 comments on commit 502391a

Please sign in to comment.