Completed
Push — master ( b09b8b...45e17f )
by Dwain
07:46
created
templates/emails/footer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@  discard block
 block discarded – undo
7 7
  * @version     1.6.0
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
10
+if ( ! defined('ABSPATH')) exit; // Exit if accessed directly
11 11
 
12 12
 global $sensei_email_data;
13
-extract( $sensei_email_data );
13
+extract($sensei_email_data);
14 14
 
15 15
 // Load colours
16 16
 $base = '#557da1';
17
-if( isset( Sensei()->settings->settings['email_base_color'] ) && '' != Sensei()->settings->settings['email_base_color'] ) {
17
+if (isset(Sensei()->settings->settings['email_base_color']) && '' != Sensei()->settings->settings['email_base_color']) {
18 18
     $base = Sensei()->settings->settings['email_base_color'];
19 19
 }
20 20
 
21
-$base_lighter_40 = sensei_hex_lighter( $base, 40 );
21
+$base_lighter_40 = sensei_hex_lighter($base, 40);
22 22
 
23
-$footer_text = sprintf( __( '%1$s - Powered by Sensei', 'woothemes-sensei' ), get_bloginfo( 'name' ) );
24
-if( isset( Sensei()->settings->settings['email_footer_text'] ) ) {
23
+$footer_text = sprintf(__('%1$s - Powered by Sensei', 'woothemes-sensei'), get_bloginfo('name'));
24
+if (isset(Sensei()->settings->settings['email_footer_text'])) {
25 25
     $footer_text = Sensei()->settings->settings['email_footer_text'];
26 26
 }
27 27
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                                                 <table border="0" cellpadding="10" cellspacing="0" width="100%">
61 61
                                                     <tr>
62 62
                                                         <td colspan="2" valign="middle" id="credit" style="<?php echo $credit; ?>">
63
-                                                        	<?php echo wpautop( wp_kses_post( wptexturize( apply_filters( 'sensei_email_footer_text', $footer_text ) ) ) ); ?>
63
+                                                        	<?php echo wpautop(wp_kses_post(wptexturize(apply_filters('sensei_email_footer_text', $footer_text)))); ?>
64 64
                                                         </td>
65 65
                                                     </tr>
66 66
                                                 </table>
Please login to merge, or discard this patch.
templates/single-course/modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * List the Course Modules and Lesson in these modules
5 5
  *
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 
31 31
 ?>
32 32
 
33
-<?php if( sensei_have_modules() ): ?>
33
+<?php if (sensei_have_modules()): ?>
34 34
 
35
-    <?php while ( sensei_have_modules() ): sensei_setup_module(); ?>
36
-        <?php if( sensei_module_has_lessons() ): ?>
35
+    <?php while (sensei_have_modules()): sensei_setup_module(); ?>
36
+        <?php if (sensei_module_has_lessons()): ?>
37 37
 
38 38
             <article class="module">
39 39
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
                     <h2>
59 59
 
60
-                        <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute();?>">
60
+                        <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute(); ?>">
61 61
 
62 62
                             <?php sensei_the_module_title(); ?>
63 63
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
                         <ul class="lessons-list" >
81 81
 
82
-                            <?php while( sensei_module_has_lessons() ): the_post(); ?>
82
+                            <?php while (sensei_module_has_lessons()): the_post(); ?>
83 83
 
84 84
                                 <li class="' . $status . '">
85 85
 
Please login to merge, or discard this patch.
templates/archive-course.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 ?>
13 13
 
14
-<?php  get_sensei_header();  ?>
14
+<?php  get_sensei_header(); ?>
15 15
 
16 16
     <?php
17 17
 
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
          * @hooked Sensei_Course::course_archive_filters 20
26 26
          * @hooked Sensei_Templates::deprecated_archive_hook 80
27 27
          */
28
-        do_action( 'sensei_archive_before_course_loop' );
28
+        do_action('sensei_archive_before_course_loop');
29 29
 
30 30
     ?>
31 31
 
32
-    <?php if ( have_posts() ): ?>
32
+    <?php if (have_posts()): ?>
33 33
 
34
-        <?php sensei_load_template( 'loop-course.php' ); ?>
34
+        <?php sensei_load_template('loop-course.php'); ?>
35 35
 
36 36
     <?php else: ?>
37 37
 
38
-        <p><?php _e( 'No courses found that match your selection.', 'woothemes-sensei' ); ?></p>
38
+        <p><?php _e('No courses found that match your selection.', 'woothemes-sensei'); ?></p>
39 39
 
40 40
     <?php  endif; // End If Statement ?>
41 41
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
          *
48 48
          * @since 1.9.0
49 49
          */
50
-        do_action( 'sensei_archive_after_course_loop' );
50
+        do_action('sensei_archive_after_course_loop');
51 51
 
52 52
     ?>
53 53
 
Please login to merge, or discard this patch.
templates/content-message.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * Content-message.php template file
5 5
  *
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  */
15 15
 ?>
16 16
 
17
-<article <?php post_class( array( 'post','sensei_message'), get_the_ID() ); ?>>
17
+<article <?php post_class(array('post', 'sensei_message'), get_the_ID()); ?>>
18 18
 
19 19
     <section class="message-content">
20 20
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
          * @hooked Sensei_Messages::the_message_title - 10
30 30
          * @hooked Sensei_Messages::the_message_sender - 20
31 31
          */
32
-        do_action( 'sensei_content_message_before', get_the_ID() );
32
+        do_action('sensei_content_message_before', get_the_ID());
33 33
         ?>
34 34
 
35 35
         <section class="entry">
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
             <p class="message-excerpt">
49 49
 
50
-                <?php the_excerpt();?>
50
+                <?php the_excerpt(); ?>
51 51
 
52 52
             </p>
53 53
 
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
          * @since 1.9
73 73
          * @param string $post_id
74 74
          */
75
-        do_action( 'sensei_content_message_after', get_the_ID() );
75
+        do_action('sensei_content_message_after', get_the_ID());
76 76
         ?>
77 77
 
78 78
     </section> <!-- article .message-content -->
79 79
 
80
-</article> <!-- article .(<?php esc_attr_e( join( ' ', get_post_class( array( 'sensei_message', 'post' ) ) ) ); ?>  -->
80
+</article> <!-- article .(<?php esc_attr_e(join(' ', get_post_class(array('sensei_message', 'post')))); ?>  -->
Please login to merge, or discard this patch.
templates/single-quiz/question_type-gap-fill.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying Gap Fill Line Questions.
5 5
  *
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * Get the question data with the current quiz id
19 19
      * All data is loaded in this array to keep the template clean.
20 20
      */
21
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
21
+    $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID());
22 22
 
23 23
 ?>
24 24
 
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
 
27 27
     <span class="gapfill-answer-pre">
28 28
 
29
-        <?php echo apply_filters( 'sensei_answer_text', esc_html( $question_data[ 'gapfill_pre' ] ) ); ?>
29
+        <?php echo apply_filters('sensei_answer_text', esc_html($question_data['gapfill_pre'])); ?>
30 30
 
31
-        <input type="text" id="<?php echo esc_attr( 'question_' .  $question_data[ 'ID' ]  ); ?>"
32
-               name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ] . ']' ); ?>"
33
-               value="<?php echo esc_attr( $question_data[ 'user_answer_entry' ]  ); ?>"
31
+        <input type="text" id="<?php echo esc_attr('question_'.$question_data['ID']); ?>"
32
+               name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>"
33
+               value="<?php echo esc_attr($question_data['user_answer_entry']); ?>"
34 34
                class="gapfill-answer-gap" />
35 35
 
36 36
         <span class="gapfill-answer-post">
37 37
 
38
-            <?php echo apply_filters( 'sensei_answer_text', esc_html(  $question_data[ 'gapfill_post' ]  ) ); ?>
38
+            <?php echo apply_filters('sensei_answer_text', esc_html($question_data['gapfill_post'])); ?>
39 39
 
40 40
         </span>
41 41
 
Please login to merge, or discard this patch.
templates/single-quiz/question_type-boolean.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying True/False ( Boolean ) Question type.
5 5
  *
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      * Get the question data with the current quiz id
17 17
      * All data is loaded in this array to keep the template clean.
18 18
      */
19
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
20
-    $boolean_options = array( 'true', 'false' );
19
+    $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID());
20
+    $boolean_options = array('true', 'false');
21 21
 
22 22
 ?>
23 23
 
@@ -27,20 +27,20 @@  discard block
 block discarded – undo
27 27
 
28 28
     // setup the options the right answer set by the admin/teacher
29 29
     // will be compared to.
30
-    $boolean_options = array( 'true', 'false' );
30
+    $boolean_options = array('true', 'false');
31 31
 
32 32
     //loop through the 2 boolean options and compare them with
33 33
     // the selected right answer
34
-    foreach ( $boolean_options as $option ){
34
+    foreach ($boolean_options as $option) {
35 35
 
36 36
         $answer_class = '';
37 37
 
38 38
         // Add classes to indicate correctness, only if there is a grade
39
-        if( isset( $question_data[ 'user_correct' ] ) && 0 < $question_data['question_grade'] ) {
39
+        if (isset($question_data['user_correct']) && 0 < $question_data['question_grade']) {
40 40
 
41
-            if( $question_right_answer == $question_data[ 'question_right_answer' ] ) {
41
+            if ($question_right_answer == $question_data['question_right_answer']) {
42 42
 
43
-                if( $question_data[ 'user_correct' ] ) {
43
+                if ($question_data['user_correct']) {
44 44
 
45 45
                     $answer_class = 'user_right';
46 46
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
             } else {
52 52
 
53
-                if( ! $question_data[ 'user_correct' ] ) {
53
+                if ( ! $question_data['user_correct']) {
54 54
 
55 55
                     $answer_class = 'user_wrong';
56 56
 
@@ -62,25 +62,25 @@  discard block
 block discarded – undo
62 62
 
63 63
     ?>
64 64
 
65
-    <li class="<?php esc_attr_e( $answer_class ); ?>">
65
+    <li class="<?php esc_attr_e($answer_class); ?>">
66 66
 
67 67
         <input type="radio"
68
-               id="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ]  ) . '-option-true'; ?>"
69
-               name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ]  . ']' ); ?>"
68
+               id="<?php echo esc_attr('question_'.$question_data['ID']).'-option-true'; ?>"
69
+               name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>"
70 70
                value="true"
71
-            <?php echo checked( $question_data[ 'user_answer_entry' ], $option, false ); ?>
72
-            <?php if ( !is_user_logged_in() ) { echo ' disabled'; } ?>
71
+            <?php echo checked($question_data['user_answer_entry'], $option, false); ?>
72
+            <?php if ( ! is_user_logged_in()) { echo ' disabled'; } ?>
73 73
 
74
-        <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ]  ) . '-option-'.$option; ?>">
74
+        <label for="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$option; ?>">
75 75
             <?php
76 76
 
77
-            if( 'true' == $option ){
77
+            if ('true' == $option) {
78 78
 
79
-                _e( 'True', 'woothemes-sensei' );
79
+                _e('True', 'woothemes-sensei');
80 80
 
81
-            }else{
81
+            } else {
82 82
 
83
-                _e( 'False', 'woothemes-sensei' );
83
+                _e('False', 'woothemes-sensei');
84 84
 
85 85
             }
86 86
 
Please login to merge, or discard this patch.
templates/single-quiz/question_type-multiple-choice.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying Multiple Choice Questions.
5 5
  *
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      * Get the question data with the current quiz id
17 17
      * All data is loaded in this array to keep the template clean.
18 18
      */
19
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
19
+    $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID());
20 20
 
21 21
 ?>
22 22
 
@@ -24,20 +24,20 @@  discard block
 block discarded – undo
24 24
 
25 25
 <?php
26 26
 $count = 0;
27
-foreach( $question_data[ 'answer_options' ] as $id => $option ) {
27
+foreach ($question_data['answer_options'] as $id => $option) {
28 28
     ?>
29 29
 
30
-    <li class="<?php esc_attr_e( $option[ 'option_class' ] ); ?>">
31
-        <input type="<?php echo $option[ 'type' ]; ?>"
32
-               id="<?php echo esc_attr( 'question_' . $question_data['ID'] ) . '-option-' . $count; ?>"
33
-               name="<?php echo esc_attr( 'sensei_question[' . $question_data['ID'] . ']' ); ?>[]"
34
-               value="<?php echo esc_attr( $option['answer'] ); ?>" <?php echo $option['checked']; ?>
30
+    <li class="<?php esc_attr_e($option['option_class']); ?>">
31
+        <input type="<?php echo $option['type']; ?>"
32
+               id="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$count; ?>"
33
+               name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>[]"
34
+               value="<?php echo esc_attr($option['answer']); ?>" <?php echo $option['checked']; ?>
35 35
                 <?php echo is_user_logged_in() ? '' : ' disabled'; ?>
36 36
             />
37 37
 
38
-        <label for="<?php echo esc_attr( 'question_' . $question_data['ID'] ) . '-option-' . $count; ?>">
38
+        <label for="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$count; ?>">
39 39
 
40
-            <?php echo apply_filters( 'sensei_answer_text', $option['answer'] ); ?>
40
+            <?php echo apply_filters('sensei_answer_text', $option['answer']); ?>
41 41
 
42 42
         </label>
43 43
 
Please login to merge, or discard this patch.
templates/single-quiz/question_type-file-upload.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying File Upload Questions.
5 5
  *
@@ -18,44 +18,44 @@  discard block
 block discarded – undo
18 18
      * Get the question data with the current quiz id
19 19
      * All data is loaded in this array to keep the template clean.
20 20
      */
21
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
21
+    $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID());
22 22
 
23 23
 ?>
24 24
 
25
-<?php if( $question_data[ 'question_helptext' ] ) { ?>
25
+<?php if ($question_data['question_helptext']) { ?>
26 26
 
27
-    <?php echo apply_filters( 'the_content', $question_data[ 'question_helptext' ] ); ?>
27
+    <?php echo apply_filters('the_content', $question_data['question_helptext']); ?>
28 28
 
29 29
 <?php } ?>
30 30
 
31
-<?php if ( $question_data[ 'answer_media_url' ]  &&  $question_data[ 'answer_media_filename' ]  ) { ?>
31
+<?php if ($question_data['answer_media_url'] && $question_data['answer_media_filename']) { ?>
32 32
 
33 33
     <p class="submitted_file">
34 34
 
35 35
         <?php
36 36
 
37
-        printf( __( 'Submitted file: %1$s', 'woothemes-sensei' ), '<a href="' . esc_url(  $question_data[ 'answer_media_url' ] )
37
+        printf(__('Submitted file: %1$s', 'woothemes-sensei'), '<a href="'.esc_url($question_data['answer_media_url'])
38 38
             . '" target="_blank">'
39
-            . esc_html(  $question_data[ 'answer_media_filename' ] ) . '</a>' );
39
+            . esc_html($question_data['answer_media_filename']).'</a>');
40 40
 
41 41
         ?>
42 42
 
43 43
     </p>
44
-    <?php if( !  $question_data[ 'lesson_complete' ]  ) { ?>
44
+    <?php if ( ! $question_data['lesson_complete']) { ?>
45 45
 
46
-        <aside class="reupload_notice"><?php _e( 'Uploading a new file will replace your existing one:', 'woothemes-sensei' ); ?></aside>
46
+        <aside class="reupload_notice"><?php _e('Uploading a new file will replace your existing one:', 'woothemes-sensei'); ?></aside>
47 47
 
48 48
     <?php } ?>
49 49
 
50 50
 <?php } ?>
51 51
 
52
-<?php if( ! $question_data[ 'lesson_complete' ]  ) { ?>
52
+<?php if ( ! $question_data['lesson_complete']) { ?>
53 53
 
54
-    <input type="file" name="file_upload_<?php echo  $question_data[ 'ID' ] ; ?>" />
54
+    <input type="file" name="file_upload_<?php echo  $question_data['ID']; ?>" />
55 55
 
56
-    <input type="hidden" name="sensei_question[<?php echo  $question_data[ 'ID' ]; ?>]"
57
-           value="<?php echo esc_attr(  $question_data[ 'user_answer_entry' ] ); ?>" />
56
+    <input type="hidden" name="sensei_question[<?php echo  $question_data['ID']; ?>]"
57
+           value="<?php echo esc_attr($question_data['user_answer_entry']); ?>" />
58 58
 
59
-    <aside class="max_upload_size"><?php echo  $question_data[ 'max_upload_size' ]; ?></aside>
59
+    <aside class="max_upload_size"><?php echo  $question_data['max_upload_size']; ?></aside>
60 60
 
61 61
 <?php } ?>
Please login to merge, or discard this patch.
templates/single-quiz/question_type-single-line.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying Single Line Questions.
5 5
  *
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
      * Get the question data with the current quiz id
19 19
      * All data is loaded in this array to keep the template clean.
20 20
      */
21
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
21
+    $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID());
22 22
 
23 23
 ?>
24 24
 
25 25
 <div class="answer">
26 26
 
27
-    <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ); ?>">
28
-        <?php _e( 'Answer:', 'woothemes-sensei' ); ?>
27
+    <label for="<?php echo esc_attr('question_'.$question_data['ID']); ?>">
28
+        <?php _e('Answer:', 'woothemes-sensei'); ?>
29 29
     </label>
30 30
 
31
-    <input type="text" id="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ); ?>"
32
-           name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ] . ']' ); ?>"
33
-           value="<?php echo esc_attr( $question_data[ 'user_answer_entry' ] ); ?>" />
31
+    <input type="text" id="<?php echo esc_attr('question_'.$question_data['ID']); ?>"
32
+           name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>"
33
+           value="<?php echo esc_attr($question_data['user_answer_entry']); ?>" />
34 34
 
35 35
 </div>
36 36
\ No newline at end of file
Please login to merge, or discard this patch.