@@ -1,5 +1,8 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // security check, don't load file outside WP |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// security check, don't load file outside WP |
|
3 | 6 | /** |
4 | 7 | * Sensei Autoloader Class |
5 | 8 | * |
@@ -210,7 +210,9 @@ |
||
210 | 210 | function load_template( $template = '' ) { |
211 | 211 | global $email_template; |
212 | 212 | |
213 | - if( ! $template ) return; |
|
213 | + if( ! $template ) { |
|
214 | + return; |
|
215 | + } |
|
214 | 216 | |
215 | 217 | $email_template = $template . '.php'; |
216 | 218 | $template = Sensei_Templates::template_loader( '' ); |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Sensei Post Types Class |
@@ -146,7 +149,7 @@ discard block |
||
146 | 149 | |
147 | 150 | return get_page_uri( $settings_course_page->ID ); |
148 | 151 | |
149 | - }else{ |
|
152 | + } else{ |
|
150 | 153 | |
151 | 154 | return 'courses'; |
152 | 155 |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Sensei Grading Class |
@@ -130,8 +133,7 @@ discard block |
||
130 | 133 | $object_name = 'WooThemes_Sensei_Grading_' . $name; |
131 | 134 | if ( is_null($optional_data) ) { |
132 | 135 | $sensei_grading_object = new $object_name( $data ); |
133 | - } |
|
134 | - else { |
|
136 | + } else { |
|
135 | 137 | $sensei_grading_object = new $object_name( $data, $optional_data ); |
136 | 138 | } // End If Statement |
137 | 139 | if ( 'Main' == $name ) { |
@@ -150,8 +152,7 @@ discard block |
||
150 | 152 | |
151 | 153 | if ( isset( $_GET['quiz_id'] ) && 0 < intval( $_GET['quiz_id'] ) && isset( $_GET['user'] ) && 0 < intval( $_GET['user'] ) ) { |
152 | 154 | $this->grading_user_quiz_view(); |
153 | - } |
|
154 | - else { |
|
155 | + } else { |
|
155 | 156 | $this->grading_default_view(); |
156 | 157 | } // End If Statement |
157 | 158 | } // End grading_page() |
@@ -273,8 +274,7 @@ discard block |
||
273 | 274 | if ( version_compare($wp_version, '4.1', '>=') ) { |
274 | 275 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ); |
275 | 276 | $title .= sprintf( ' <span class="course-title">> <a href="%s">%s</a></span>', esc_url( $url ), get_the_title( $course_id ) ); |
276 | - } |
|
277 | - else { |
|
277 | + } else { |
|
278 | 278 | $title .= sprintf( ' <span class="course-title">> %s</span>', get_the_title( $course_id ) ); |
279 | 279 | } |
280 | 280 | } |
@@ -309,8 +309,7 @@ discard block |
||
309 | 309 | if ( version_compare($wp_version, '4.1', '>=') ) { |
310 | 310 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ); |
311 | 311 | $title .= sprintf( ' <span class="course-title">> <a href="%s">%s</a></span>', esc_url( $url ), get_the_title( $course_id ) ); |
312 | - } |
|
313 | - else { |
|
312 | + } else { |
|
314 | 313 | $title .= sprintf( ' <span class="course-title">> %s</span>', get_the_title( $course_id ) ); |
315 | 314 | } |
316 | 315 | $url = add_query_arg( array( 'page' => $this->page_slug, 'lesson_id' => $lesson_id ), admin_url( 'admin.php' ) ); |
@@ -379,8 +378,7 @@ discard block |
||
379 | 378 | |
380 | 379 | if ( 'course' == $args['type'] ) { |
381 | 380 | $type = 'sensei_course_status'; |
382 | - } |
|
383 | - else { |
|
381 | + } else { |
|
384 | 382 | $type = 'sensei_lesson_status'; |
385 | 383 | } |
386 | 384 | $cache_key = 'sensei-' . $args['type'] . '-statuses'; |
@@ -390,15 +388,13 @@ discard block |
||
390 | 388 | // Restrict to specific posts |
391 | 389 | if ( isset( $args['post__in'] ) && !empty( $args['post__in'] ) && is_array( $args['post__in'] ) ) { |
392 | 390 | $query .= ' AND comment_post_ID IN (' . implode( ',', array_map( 'absint', $args['post__in'] ) ) . ')'; |
393 | - } |
|
394 | - elseif ( !empty( $args['post_id'] ) ) { |
|
391 | + } elseif ( !empty( $args['post_id'] ) ) { |
|
395 | 392 | $query .= $wpdb->prepare( ' AND comment_post_ID = %d', $args['post_id'] ); |
396 | 393 | } |
397 | 394 | // Restrict to specific users |
398 | 395 | if ( isset( $args['user_id'] ) && is_array( $args['user_id'] ) ) { |
399 | 396 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'absint', $args['user_id'] ) ) . ')'; |
400 | - } |
|
401 | - elseif ( !empty( $args['user_id'] ) ) { |
|
397 | + } elseif ( !empty( $args['user_id'] ) ) { |
|
402 | 398 | $query .= $wpdb->prepare( ' AND user_id = %d', $args['user_id'] ); |
403 | 399 | } |
404 | 400 | $query .= ' GROUP BY comment_approved'; |
@@ -601,8 +597,7 @@ discard block |
||
601 | 597 | // set the users total quiz grade |
602 | 598 | if ( 0 < intval( $quiz_grade_total ) ) { |
603 | 599 | $grade = abs( round( ( doubleval( $quiz_grade ) * 100 ) / ( $quiz_grade_total ), 2 ) ); |
604 | - } |
|
605 | - else { |
|
600 | + } else { |
|
606 | 601 | $grade = 0; |
607 | 602 | } |
608 | 603 | WooThemes_Sensei_Utils::sensei_grade_quiz( $quiz_id, $grade, $user_id ); |
@@ -615,8 +610,7 @@ discard block |
||
615 | 610 | // Student has reached the pass mark and lesson is complete |
616 | 611 | if ( $quiz_passmark <= $grade ) { |
617 | 612 | $lesson_status = 'passed'; |
618 | - } |
|
619 | - else { |
|
613 | + } else { |
|
620 | 614 | $lesson_status = 'failed'; |
621 | 615 | } // End If Statement |
622 | 616 | } |
@@ -761,8 +755,7 @@ discard block |
||
761 | 755 | // Question has a zero grade, so skip grading |
762 | 756 | if ( 0 == $achievable_grade ) { |
763 | 757 | $all_question_grades[ $question_id ] = $achievable_grade; |
764 | - } |
|
765 | - elseif ( in_array( $question_type, $autogradable_question_types ) ) { |
|
758 | + } elseif ( in_array( $question_type, $autogradable_question_types ) ) { |
|
766 | 759 | // Get user question grade |
767 | 760 | $question_grade = WooThemes_Sensei_Utils::sensei_grade_question_auto( $question_id, $question_type, $answer, $user_id ); |
768 | 761 | $all_question_grades[ $question_id ] = $question_grade; |
@@ -784,8 +777,7 @@ discard block |
||
784 | 777 | // Check for zero total from grades |
785 | 778 | if ( 0 < $quiz_total ) { |
786 | 779 | $grade = abs( round( ( doubleval( $grade_total ) * 100 ) / ( $quiz_total ), 2 ) ); |
787 | - } |
|
788 | - else { |
|
780 | + } else { |
|
789 | 781 | $grade = 0; |
790 | 782 | } |
791 | 783 | WooThemes_Sensei_Utils::sensei_grade_quiz( $quiz_id, $grade, $user_id, $quiz_grade_type ); |
@@ -945,19 +937,19 @@ discard block |
||
945 | 937 | |
946 | 938 | return Sensei()->question->get_question_grade($question_id); |
947 | 939 | |
948 | - }else{ |
|
940 | + } else{ |
|
949 | 941 | |
950 | 942 | return false; |
951 | 943 | |
952 | 944 | } |
953 | 945 | |
954 | - }else{ |
|
946 | + } else{ |
|
955 | 947 | |
956 | 948 | return false; |
957 | 949 | |
958 | 950 | } |
959 | 951 | |
960 | - }else{ |
|
952 | + } else{ |
|
961 | 953 | |
962 | 954 | // Case Sensitive Check that the 'gap' is "exactly" equal to the given answer |
963 | 955 | if ( trim(strtolower($gapfill_array[1])) == trim(strtolower( $user_answer )) ) { |
@@ -970,13 +962,13 @@ discard block |
||
970 | 962 | |
971 | 963 | return Sensei()->question->get_question_grade( $question_id ); |
972 | 964 | |
973 | - }else{ |
|
965 | + } else{ |
|
974 | 966 | |
975 | 967 | return false; |
976 | 968 | |
977 | 969 | } |
978 | 970 | |
979 | - }else{ |
|
971 | + } else{ |
|
980 | 972 | |
981 | 973 | return false; |
982 | 974 |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Sensei Analysis Class |
@@ -153,24 +156,19 @@ discard block |
||
153 | 156 | if ( 0 < $lesson_id ) { |
154 | 157 | // Viewing a specific Lesson and all its Learners |
155 | 158 | $this->analysis_lesson_users_view( $lesson_id ); |
156 | - } |
|
157 | - elseif ( 0 < $course_id && !$user_id && 'user' == $type ) { |
|
159 | + } elseif ( 0 < $course_id && !$user_id && 'user' == $type ) { |
|
158 | 160 | // Viewing a specific Course and all its Learners |
159 | 161 | $this->analysis_course_users_view( $course_id ); |
160 | - } |
|
161 | - elseif ( 0 < $course_id && 0 < $user_id ) { |
|
162 | + } elseif ( 0 < $course_id && 0 < $user_id ) { |
|
162 | 163 | // Viewing a specific Learner on a specific Course, showing their Lessons |
163 | 164 | $this->analysis_user_course_view( $course_id, $user_id ); |
164 | - } |
|
165 | - elseif( 0 < $course_id ) { |
|
165 | + } elseif( 0 < $course_id ) { |
|
166 | 166 | // Viewing a specific Course and all it's Lessons |
167 | 167 | $this->analysis_course_view( $course_id ); |
168 | - } |
|
169 | - elseif ( 0 < $user_id ) { |
|
168 | + } elseif ( 0 < $user_id ) { |
|
170 | 169 | // Viewing a specific Learner, and their Courses |
171 | 170 | $this->analysis_user_profile_view( $user_id ); |
172 | - } |
|
173 | - else { |
|
171 | + } else { |
|
174 | 172 | // Overview of all Learners, all Courses, or all Lessons |
175 | 173 | $this->analysis_default_view( $type ); |
176 | 174 | } // End If Statement |
@@ -569,20 +567,16 @@ discard block |
||
569 | 567 | if ( 0 < $lesson_id ) { |
570 | 568 | // Viewing a specific Lesson and all its Learners |
571 | 569 | $sensei_analysis_report_object = $this->load_report_object( 'Lesson', $lesson_id ); |
572 | - } |
|
573 | - elseif ( 0 < $course_id && 0 < $user_id ) { |
|
570 | + } elseif ( 0 < $course_id && 0 < $user_id ) { |
|
574 | 571 | // Viewing a specific User on a specific Course |
575 | 572 | $sensei_analysis_report_object = $this->load_report_object( 'Course', $course_id, $user_id ); |
576 | - } |
|
577 | - elseif( 0 < $course_id ) { |
|
573 | + } elseif( 0 < $course_id ) { |
|
578 | 574 | // Viewing a specific Course and all it's Lessons, or it's Learners |
579 | 575 | $sensei_analysis_report_object = $this->load_report_object( 'Course', $course_id ); |
580 | - } |
|
581 | - elseif ( 0 < $user_id ) { |
|
576 | + } elseif ( 0 < $user_id ) { |
|
582 | 577 | // Viewing a specific Learner, and their Courses |
583 | 578 | $sensei_analysis_report_object = $this->load_report_object( 'User_Profile', $user_id ); |
584 | - } |
|
585 | - else { |
|
579 | + } else { |
|
586 | 580 | // Overview of all Learners, all Courses, or all Lessons |
587 | 581 | $sensei_analysis_report_object = $this->load_report_object( 'Overview', $type ); |
588 | 582 | } // End If Statement |
@@ -7,8 +7,9 @@ discard block |
||
7 | 7 | function woothemes_queue_update( $file, $file_id, $product_id ) { |
8 | 8 | global $woothemes_queued_updates; |
9 | 9 | |
10 | - if ( ! isset( $woothemes_queued_updates ) ) |
|
11 | - $woothemes_queued_updates = array(); |
|
10 | + if ( ! isset( $woothemes_queued_updates ) ) { |
|
11 | + $woothemes_queued_updates = array(); |
|
12 | + } |
|
12 | 13 | |
13 | 14 | $plugin = new stdClass(); |
14 | 15 | $plugin->file = $file; |
@@ -31,7 +32,9 @@ discard block |
||
31 | 32 | false !== $api || |
32 | 33 | ! isset( $args->slug ) || |
33 | 34 | 'woothemes-updater' != $args->slug |
34 | - ) return $api; |
|
35 | + ) { |
|
36 | + return $api; |
|
37 | + } |
|
35 | 38 | |
36 | 39 | $api = new stdClass(); |
37 | 40 | $api->name = 'WooThemes Updater'; |
@@ -54,7 +57,9 @@ discard block |
||
54 | 57 | */ |
55 | 58 | function woothemes_updater_notice() { |
56 | 59 | $active_plugins = apply_filters( 'active_plugins', get_option('active_plugins' ) ); |
57 | - if ( in_array( 'woothemes-updater/woothemes-updater.php', $active_plugins ) ) return; |
|
60 | + if ( in_array( 'woothemes-updater/woothemes-updater.php', $active_plugins ) ) { |
|
61 | + return; |
|
62 | + } |
|
58 | 63 | |
59 | 64 | $slug = 'woothemes-updater'; |
60 | 65 | $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $slug ), 'install-plugin_' . $slug ); |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Sensei Analysis Lesson List Table Class |
@@ -204,31 +207,26 @@ discard block |
||
204 | 207 | $status_class = 'graded'; |
205 | 208 | |
206 | 209 | $grade = __( 'No Grade', 'woothemes-sensei' ); |
207 | - } |
|
208 | - elseif( 'graded' == $item->comment_approved ) { |
|
210 | + } elseif( 'graded' == $item->comment_approved ) { |
|
209 | 211 | $status = __( 'Graded', 'woothemes-sensei' ) ; |
210 | 212 | $status_class = 'graded'; |
211 | 213 | |
212 | 214 | $grade = get_comment_meta( $item->comment_ID, 'grade', true); |
213 | - } |
|
214 | - elseif( 'passed' == $item->comment_approved ) { |
|
215 | + } elseif( 'passed' == $item->comment_approved ) { |
|
215 | 216 | $status = __( 'Passed', 'woothemes-sensei' ); |
216 | 217 | $status_class = 'graded'; |
217 | 218 | |
218 | 219 | $grade = get_comment_meta( $item->comment_ID, 'grade', true); |
219 | - } |
|
220 | - elseif( 'failed' == $item->comment_approved ) { |
|
220 | + } elseif( 'failed' == $item->comment_approved ) { |
|
221 | 221 | $status = __( 'Failed', 'woothemes-sensei' ); |
222 | 222 | $status_class = 'failed'; |
223 | 223 | |
224 | 224 | $grade = get_comment_meta( $item->comment_ID, 'grade', true); |
225 | - } |
|
226 | - elseif( 'ungraded' == $item->comment_approved ) { |
|
225 | + } elseif( 'ungraded' == $item->comment_approved ) { |
|
227 | 226 | $status = __( 'Ungraded', 'woothemes-sensei' ); |
228 | 227 | $status_class = 'ungraded'; |
229 | 228 | |
230 | - } |
|
231 | - else { |
|
229 | + } else { |
|
232 | 230 | $status = __( 'In Progress', 'woothemes-sensei' ); |
233 | 231 | $user_end_date = ''; |
234 | 232 | } |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Sensei Question Class |
@@ -211,7 +214,9 @@ discard block |
||
211 | 214 | |
212 | 215 | $lesson_id = get_post_meta( $quiz, '_quiz_lesson', true ); |
213 | 216 | |
214 | - if( ! $lesson_id ) continue; |
|
217 | + if( ! $lesson_id ) { |
|
218 | + continue; |
|
219 | + } |
|
215 | 220 | |
216 | 221 | $lessons[ $lesson_id ]['title'] = get_the_title( $lesson_id ); |
217 | 222 | $lessons[ $lesson_id ]['link'] = admin_url( 'post.php?post=' . $lesson_id . '&action=edit' ); |
@@ -880,7 +885,7 @@ discard block |
||
880 | 885 | |
881 | 886 | $merged_options = array_merge( $question_data[ 'question_wrong_answers' ], $question_data[ 'question_right_answer' ] ); |
882 | 887 | |
883 | - } else { |
|
888 | + } else { |
|
884 | 889 | |
885 | 890 | array_push( $question_data[ 'question_wrong_answers' ], $question_data[ 'question_right_answer' ] ); |
886 | 891 | $merged_options = $question_data[ 'question_wrong_answers' ]; |
@@ -908,7 +913,7 @@ discard block |
||
908 | 913 | |
909 | 914 | $user_correct = true; |
910 | 915 | |
911 | - } else if( $question_data[ 'user_question_grade' ] > 0 ) { |
|
916 | + } else if( $question_data[ 'user_question_grade' ] > 0 ) { |
|
912 | 917 | |
913 | 918 | $user_correct = true; |
914 | 919 | |
@@ -923,7 +928,7 @@ discard block |
||
923 | 928 | |
924 | 929 | $answer_class .= ' right_answer'; |
925 | 930 | |
926 | - } elseif( !is_array($question_data['question_right_answer']) && $question_data['question_right_answer'] == $answer ) { |
|
931 | + } elseif( !is_array($question_data['question_right_answer']) && $question_data['question_right_answer'] == $answer ) { |
|
927 | 932 | |
928 | 933 | $answer_class .= ' right_answer'; |
929 | 934 | |
@@ -1006,13 +1011,13 @@ discard block |
||
1006 | 1011 | } |
1007 | 1012 | } |
1008 | 1013 | |
1009 | - }else{ |
|
1014 | + } else{ |
|
1010 | 1015 | |
1011 | 1016 | $answer_options_sorted = $question_answers_options; |
1012 | 1017 | |
1013 | 1018 | } |
1014 | 1019 | |
1015 | - }else{ |
|
1020 | + } else{ |
|
1016 | 1021 | |
1017 | 1022 | $answer_options_sorted = $question_answers_options; |
1018 | 1023 | |
@@ -1075,12 +1080,12 @@ discard block |
||
1075 | 1080 | |
1076 | 1081 | $right_answer = ucfirst($right_answer); |
1077 | 1082 | |
1078 | - }elseif( 'multiple-choice' == $type ) { |
|
1083 | + } elseif( 'multiple-choice' == $type ) { |
|
1079 | 1084 | |
1080 | 1085 | $right_answer = (array) $right_answer; |
1081 | 1086 | $right_answer = implode( ', ', $right_answer ); |
1082 | 1087 | |
1083 | - }elseif( 'gap-fill' == $type ) { |
|
1088 | + } elseif( 'gap-fill' == $type ) { |
|
1084 | 1089 | |
1085 | 1090 | $right_answer_array = explode( '||', $right_answer ); |
1086 | 1091 | if ( isset( $right_answer_array[0] ) ) { $gapfill_pre = $right_answer_array[0]; } else { $gapfill_pre = ''; } |
@@ -1089,7 +1094,7 @@ discard block |
||
1089 | 1094 | |
1090 | 1095 | $right_answer = $gapfill_pre . ' <span class="highlight">' . $gapfill_gap . '</span> ' . $gapfill_post; |
1091 | 1096 | |
1092 | - }else{ |
|
1097 | + } else{ |
|
1093 | 1098 | |
1094 | 1099 | // for non auto gradable question types no answer should be returned. |
1095 | 1100 | $right_answer = ''; |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // security check, don't load file outside WP |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// security check, don't load file outside WP |
|
3 | 6 | /** |
4 | 7 | * Sensei Template Class |
5 | 8 | * |
@@ -69,8 +72,9 @@ discard block |
||
69 | 72 | */ |
70 | 73 | public static function get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { |
71 | 74 | |
72 | - if ( $args && is_array($args) ) |
|
73 | - extract( $args ); |
|
75 | + if ( $args && is_array($args) ) { |
|
76 | + extract( $args ); |
|
77 | + } |
|
74 | 78 | |
75 | 79 | $located = self::locate_template( $template_name, $template_path, $default_path ); |
76 | 80 | |
@@ -99,8 +103,12 @@ discard block |
||
99 | 103 | */ |
100 | 104 | public static function locate_template( $template_name, $template_path = '', $default_path = '' ) { |
101 | 105 | |
102 | - if ( ! $template_path ) $template_path = Sensei()->template_url; |
|
103 | - if ( ! $default_path ) $default_path = Sensei()->plugin_path() . '/templates/'; |
|
106 | + if ( ! $template_path ) { |
|
107 | + $template_path = Sensei()->template_url; |
|
108 | + } |
|
109 | + if ( ! $default_path ) { |
|
110 | + $default_path = Sensei()->plugin_path() . '/templates/'; |
|
111 | + } |
|
104 | 112 | |
105 | 113 | // Look within passed path within the theme - this is priority |
106 | 114 | $template = locate_template( |
@@ -261,7 +269,7 @@ discard block |
||
261 | 269 | $find[] = $file; |
262 | 270 | $find[] = Sensei()->template_url . $file; |
263 | 271 | |
264 | - }elseif( is_author() |
|
272 | + } elseif( is_author() |
|
265 | 273 | && Sensei_Teacher::is_a_teacher( get_query_var('author') ) |
266 | 274 | && ! user_can( get_query_var('author'), 'manage_options' ) ){ |
267 | 275 | |
@@ -274,7 +282,9 @@ discard block |
||
274 | 282 | if ( $file ) { |
275 | 283 | |
276 | 284 | $template = locate_template( $find ); |
277 | - if ( ! $template ) $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
285 | + if ( ! $template ) { |
|
286 | + $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
287 | + } |
|
278 | 288 | |
279 | 289 | } // End If Statement |
280 | 290 | |
@@ -305,7 +315,9 @@ discard block |
||
305 | 315 | $find[] = Sensei()->template_url . $file; |
306 | 316 | |
307 | 317 | $template = locate_template( $find ); |
308 | - if ( ! $template ) $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
318 | + if ( ! $template ) { |
|
319 | + $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
320 | + } |
|
309 | 321 | |
310 | 322 | return $template; |
311 | 323 | |
@@ -335,7 +347,7 @@ discard block |
||
335 | 347 | include( $found_template ); |
336 | 348 | get_sensei_footer(); |
337 | 349 | |
338 | - }else{ |
|
350 | + } else{ |
|
339 | 351 | |
340 | 352 | include( $found_template ); |
341 | 353 |