Completed
Push — master ( 201c1b...d51ce1 )
by Dwain
04:57
created
templates/globals/wrapper-start.php 3 patches
Spacing   +2 added lines, -2 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 wrappers
5 5
  *
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 $template = get_option('template');
13 13
 
14
-switch( $template ) {
14
+switch ($template) {
15 15
 
16 16
 	// IF Twenty Eleven
17 17
 	case 'twentyeleven' :
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * Content wrappers
5
- *
6
- * @author 		Automattic
7
- * @package 	Sensei
8
- * @category    Templates
9
- * @version     1.9.0
10
- */
4
+	 * Content wrappers
5
+	 *
6
+	 * @author 		Automattic
7
+	 * @package 	Sensei
8
+	 * @category    Templates
9
+	 * @version     1.9.0
10
+	 */
11 11
 
12 12
 $template = get_option('template');
13 13
 
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
 		echo '<div id="main-content" class="main-content"><div id="primary" class="content-area"><div id="content" class="site-content" role="main"><div class="entry-content">';
29 29
 		break;
30 30
 
31
-    // IF Twenty Fifteen
32
-    case 'twentyfifteen':
33
-        echo '<div id="primary" class="content-area">'
34
-            .'<main id="main" class="site-main" role="main">';
35
-            ?>
31
+	// IF Twenty Fifteen
32
+	case 'twentyfifteen':
33
+		echo '<div id="primary" class="content-area">'
34
+			.'<main id="main" class="site-main" role="main">';
35
+			?>
36 36
             <style>
37 37
                 @media screen and (min-width: 59.6875em){
38 38
                     #main article.lesson,
@@ -61,19 +61,19 @@  discard block
 block discarded – undo
61 61
                 }
62 62
             </style>
63 63
             <?php
64
-        break;
64
+		break;
65 65
 
66
-    // IF Twenty Sixteen
67
-    case 'twentysixteen' :
68
-        echo '<div id="primary" class="content-area">'
69
-	        .'<main id="main" class="site-main" role="main">';
70
-        break;
66
+	// IF Twenty Sixteen
67
+	case 'twentysixteen' :
68
+		echo '<div id="primary" class="content-area">'
69
+			.'<main id="main" class="site-main" role="main">';
70
+		break;
71 71
 
72
-    // IF Storefront
73
-    case 'storefront' :
74
-        echo '<div id="primary" class="content-area">'
75
-            .'<main id="main" class="site-main" role="main">';
76
-        break;
72
+	// IF Storefront
73
+	case 'storefront' :
74
+		echo '<div id="primary" class="content-area">'
75
+			.'<main id="main" class="site-main" role="main">';
76
+		break;
77 77
 
78 78
 	// Default
79 79
 	default :
Please login to merge, or discard this patch.
templates/globals/pagination-posts.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
  * @version     1.1.0
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) exit;
10
+if ( ! defined('ABSPATH')) exit;
11 11
 
12 12
 ?>
13 13
 <nav id="post-entries" class="post-entries fix">
14
-    <div class="nav-prev fl"><?php previous_post_link( '%link', '<span class="meta-nav"></span> %title' ); ?></div>
15
-    <div class="nav-next fr"><?php next_post_link( '%link', '%title <span class="meta-nav"></span>' ); ?></div>
14
+    <div class="nav-prev fl"><?php previous_post_link('%link', '<span class="meta-nav"></span> %title'); ?></div>
15
+    <div class="nav-next fr"><?php next_post_link('%link', '%title <span class="meta-nav"></span>'); ?></div>
16 16
 </nav><!-- #post-entries -->
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Pagination - Posts
4
- *
5
- * @author 		WooThemes
6
- * @package 	Sensei/Templates
7
- * @version     1.1.0
8
- */
3
+	 * Pagination - Posts
4
+	 *
5
+	 * @author 		WooThemes
6
+	 * @package 	Sensei/Templates
7
+	 * @version     1.1.0
8
+	 */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) exit;
11 11
 
Please login to merge, or discard this patch.
templates/globals/pagination-quiz.php 2 patches
Spacing   +8 added lines, -8 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
  * Pagination - Lesson
5 5
  *
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 global $post;
12
-$quiz_lesson = absint( get_post_meta( $post->ID, '_quiz_lesson', true ) );
13
-$nav_id_array = sensei_get_prev_next_lessons( $quiz_lesson );
14
-$previous_lesson_id = absint( $nav_id_array['prev_lesson'] );
15
-$next_lesson_id = absint( $nav_id_array['next_lesson'] );
12
+$quiz_lesson = absint(get_post_meta($post->ID, '_quiz_lesson', true));
13
+$nav_id_array = sensei_get_prev_next_lessons($quiz_lesson);
14
+$previous_lesson_id = absint($nav_id_array['prev_lesson']);
15
+$next_lesson_id = absint($nav_id_array['next_lesson']);
16 16
 // Output HTML
17
-if ( ( 0 < $previous_lesson_id ) || ( 0 < $next_lesson_id ) ) { ?>
17
+if ((0 < $previous_lesson_id) || (0 < $next_lesson_id)) { ?>
18 18
     <nav id="post-entries" class="post-entries fix">
19
-        <?php if ( 0 < $previous_lesson_id ) { ?><div class="nav-prev fl"><a href="<?php echo esc_url( get_permalink( $previous_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $previous_lesson_id ); ?></a></div><?php } ?>
20
-        <?php if ( 0 < $next_lesson_id ) { ?><div class="nav-next fr"><a href="<?php echo esc_url( get_permalink( $next_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $next_lesson_id ); ?></a></div><?php } ?>
19
+        <?php if (0 < $previous_lesson_id) { ?><div class="nav-prev fl"><a href="<?php echo esc_url(get_permalink($previous_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($previous_lesson_id); ?></a></div><?php } ?>
20
+        <?php if (0 < $next_lesson_id) { ?><div class="nav-next fr"><a href="<?php echo esc_url(get_permalink($next_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($next_lesson_id); ?></a></div><?php } ?>
21 21
     </nav><!-- #post-entries -->
22 22
 <?php } ?>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
templates/globals/pagination.php 3 patches
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
  * Pagination - Show numbered pagination for sensei archives
5 5
  *
@@ -12,24 +12,24 @@  discard block
 block discarded – undo
12 12
 
13 13
 global $wp_query;
14 14
 
15
-if ( $wp_query->max_num_pages <= 1 ) {
15
+if ($wp_query->max_num_pages <= 1) {
16 16
     return;
17 17
 }
18 18
 
19 19
 ?>
20 20
 <nav class="sensei-pagination">
21 21
     <?php
22
-    echo paginate_links( apply_filters( 'sensei_pagination_args', array(
23
-        'base'         => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ),
22
+    echo paginate_links(apply_filters('sensei_pagination_args', array(
23
+        'base'         => esc_url_raw(str_replace(999999999, '%#%', get_pagenum_link(999999999, false))),
24 24
         'format'       => '',
25 25
         'add_args'     => '',
26
-        'current'      => max( 1, get_query_var( 'paged' ) ),
26
+        'current'      => max(1, get_query_var('paged')),
27 27
         'total'        => $wp_query->max_num_pages,
28 28
         'prev_text'    => '&larr;',
29 29
         'next_text'    => '&rarr;',
30 30
         'type'         => 'list',
31 31
         'end_size'     => 3,
32 32
         'mid_size'     => 3
33
-    ) ) );
33
+    )));
34 34
     ?>
35 35
 </nav>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * Pagination - Show numbered pagination for sensei archives
5
- *
6
- * @author 		Automattic
7
- * @package 	Sensei
8
- * @category    Templates
9
- * @version     1.9.0
10
- */
4
+		 * Pagination - Show numbered pagination for sensei archives
5
+		 *
6
+		 * @author 		Automattic
7
+		 * @package 	Sensei
8
+		 * @category    Templates
9
+		 * @version     1.9.0
10
+		 */
11 11
 // Exit if accessed directly
12 12
 
13 13
 global $wp_query;
14 14
 
15 15
 if ( $wp_query->max_num_pages <= 1 ) {
16
-    return;
16
+	return;
17 17
 }
18 18
 
19 19
 ?>
20 20
 <nav class="sensei-pagination">
21 21
     <?php
22
-    echo paginate_links( apply_filters( 'sensei_pagination_args', array(
23
-        'base'         => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ),
24
-        'format'       => '',
25
-        'add_args'     => '',
26
-        'current'      => max( 1, get_query_var( 'paged' ) ),
27
-        'total'        => $wp_query->max_num_pages,
28
-        'prev_text'    => '&larr;',
29
-        'next_text'    => '&rarr;',
30
-        'type'         => 'list',
31
-        'end_size'     => 3,
32
-        'mid_size'     => 3
33
-    ) ) );
34
-    ?>
22
+	echo paginate_links( apply_filters( 'sensei_pagination_args', array(
23
+		'base'         => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ),
24
+		'format'       => '',
25
+		'add_args'     => '',
26
+		'current'      => max( 1, get_query_var( 'paged' ) ),
27
+		'total'        => $wp_query->max_num_pages,
28
+		'prev_text'    => '&larr;',
29
+		'next_text'    => '&rarr;',
30
+		'type'         => 'list',
31
+		'end_size'     => 3,
32
+		'mid_size'     => 3
33
+	) ) );
34
+	?>
35 35
 </nav>
Please login to merge, or discard this patch.
templates/emails/teacher-quiz-submitted.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined('ABSPATH')) exit; // Exit if accessed directly ?>
10 10
 
11 11
 <?php
12 12
 
13 13
 // Get data for email content
14 14
 global $sensei_email_data;
15
-extract( $sensei_email_data );
15
+extract($sensei_email_data);
16 16
 
17 17
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
18 18
 $small = "text-align: center !important;";
@@ -21,20 +21,20 @@  discard block
 block discarded – undo
21 21
 
22 22
 ?>
23 23
 
24
-<?php do_action( 'sensei_before_email_content', $template ); ?>
24
+<?php do_action('sensei_before_email_content', $template); ?>
25 25
 
26
-<p style="<?php echo esc_attr( $small ); ?>"><?php _e( 'Your student', 'woothemes-sensei' ); ?></p>
26
+<p style="<?php echo esc_attr($small); ?>"><?php _e('Your student', 'woothemes-sensei'); ?></p>
27 27
 
28
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo $learner_name; ?></h2>
28
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo $learner_name; ?></h2>
29 29
 
30
-<p style="<?php echo esc_attr( $small ); ?>"><?php _e( 'has submitted the quiz for lesson', 'woothemes-sensei' ); ?></p>
30
+<p style="<?php echo esc_attr($small); ?>"><?php _e('has submitted the quiz for lesson', 'woothemes-sensei'); ?></p>
31 31
 
32
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo get_the_title( $lesson_id ); ?></h2>
32
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo get_the_title($lesson_id); ?></h2>
33 33
 
34
-<p style="<?php echo esc_attr( $small ); ?>"><?php _e( 'for grading.', 'woothemes-sensei' ); ?></p>
34
+<p style="<?php echo esc_attr($small); ?>"><?php _e('for grading.', 'woothemes-sensei'); ?></p>
35 35
 
36 36
 <hr/>
37 37
 
38
-<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'You can grade this quiz %1$shere%2$s.', 'woothemes-sensei' ), '<a href="' . admin_url( 'admin.php?page=sensei_grading&user=' . $learner_id . '&quiz_id=' . $quiz_id ) . '">', '</a>' ); ?></p>
38
+<p style="<?php echo esc_attr($small); ?>"><?php printf(__('You can grade this quiz %1$shere%2$s.', 'woothemes-sensei'), '<a href="'.admin_url('admin.php?page=sensei_grading&user='.$learner_id.'&quiz_id='.$quiz_id).'">', '</a>'); ?></p>
39 39
 
40
-<?php do_action( 'sensei_after_email_content', $template ); ?>
41 40
\ No newline at end of file
41
+<?php do_action('sensei_after_email_content', $template); ?>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,10 @@
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined( 'ABSPATH' ) ) {
10
+	exit;
11
+}
12
+// Exit if accessed directly ?>
10 13
 
11 14
 <?php
12 15
 
Please login to merge, or discard this patch.
templates/emails/teacher-completed-course.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined('ABSPATH')) exit; // Exit if accessed directly ?>
10 10
 
11 11
 <?php
12 12
 
13 13
 // Get data for email content
14 14
 global $sensei_email_data;
15
-extract( $sensei_email_data );
15
+extract($sensei_email_data);
16 16
 
17 17
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
18 18
 $small = "text-align: center !important;";
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
 
22 22
 ?>
23 23
 
24
-<?php do_action( 'sensei_before_email_content', $template ); ?>
24
+<?php do_action('sensei_before_email_content', $template); ?>
25 25
 
26
-<p style="<?php echo esc_attr( $small ); ?>"><?php _e( 'Your student', 'woothemes-sensei' ); ?></p>
26
+<p style="<?php echo esc_attr($small); ?>"><?php _e('Your student', 'woothemes-sensei'); ?></p>
27 27
 
28
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo $learner_name; ?></h2>
28
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo $learner_name; ?></h2>
29 29
 
30
-<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'has completed and %1$s the course', 'woothemes-sensei' ), $passed ); ?></p>
30
+<p style="<?php echo esc_attr($small); ?>"><?php printf(__('has completed and %1$s the course', 'woothemes-sensei'), $passed); ?></p>
31 31
 
32
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo get_the_title( $course_id ); ?></h2>
32
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo get_the_title($course_id); ?></h2>
33 33
 
34 34
 <hr/>
35 35
 
36
-<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'Manage this course\'s learners %1$shere%2$s.', 'woothemes-sensei' ), '<a href="' . admin_url( 'admin.php?page=sensei_learners&view=learners&course_id=' . $course_id ) . '">', '</a>' ); ?></p>
36
+<p style="<?php echo esc_attr($small); ?>"><?php printf(__('Manage this course\'s learners %1$shere%2$s.', 'woothemes-sensei'), '<a href="'.admin_url('admin.php?page=sensei_learners&view=learners&course_id='.$course_id).'">', '</a>'); ?></p>
37 37
 
38
-<?php do_action( 'sensei_after_email_content', $template ); ?>
39 38
\ No newline at end of file
39
+<?php do_action('sensei_after_email_content', $template); ?>
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,10 @@
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined( 'ABSPATH' ) ) {
10
+	exit;
11
+}
12
+// Exit if accessed directly ?>
10 13
 
11 14
 <?php
12 15
 
Please login to merge, or discard this patch.
templates/emails/header.php 3 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,41 +7,41 @@  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
 // Get data for email content
13 13
 global $sensei_email_data;
14
-extract( $sensei_email_data );
14
+extract($sensei_email_data);
15 15
 
16 16
 // Load colours
17 17
 $bg = '#f5f5f5';
18
-if( isset( Sensei()->settings->settings['email_background_color'] ) && '' != Sensei()->settings->settings['email_background_color'] ) {
18
+if (isset(Sensei()->settings->settings['email_background_color']) && '' != Sensei()->settings->settings['email_background_color']) {
19 19
 	$bg = Sensei()->settings->settings['email_background_color'];
20 20
 }
21 21
 
22 22
 $body = '#fdfdfd';
23
-if( isset( Sensei()->settings->settings['email_body_background_color'] ) && '' != Sensei()->settings->settings['email_body_background_color'] ) {
23
+if (isset(Sensei()->settings->settings['email_body_background_color']) && '' != Sensei()->settings->settings['email_body_background_color']) {
24 24
 	$body = Sensei()->settings->settings['email_body_background_color'];
25 25
 }
26 26
 
27 27
 $base = '#557da1';
28
-if( isset( Sensei()->settings->settings['email_base_color'] ) && '' != Sensei()->settings->settings['email_base_color'] ) {
28
+if (isset(Sensei()->settings->settings['email_base_color']) && '' != Sensei()->settings->settings['email_base_color']) {
29 29
 	$base = Sensei()->settings->settings['email_base_color'];
30 30
 }
31
-$base_text 	= sensei_light_or_dark( $base, '#202020', '#ffffff' );
31
+$base_text = sensei_light_or_dark($base, '#202020', '#ffffff');
32 32
 
33 33
 $text = '#505050';
34
-if( isset( Sensei()->settings->settings['email_text_color'] ) && '' != Sensei()->settings->settings['email_text_color'] ) {
34
+if (isset(Sensei()->settings->settings['email_text_color']) && '' != Sensei()->settings->settings['email_text_color']) {
35 35
 	$text = Sensei()->settings->settings['email_text_color'];
36 36
 }
37 37
 
38
-$bg_darker_10 = sensei_hex_darker( $bg, 10 );
39
-$base_lighter_20 = sensei_hex_lighter( $base, 20 );
40
-$text_lighter_20 = sensei_hex_lighter( $text, 20 );
38
+$bg_darker_10 = sensei_hex_darker($bg, 10);
39
+$base_lighter_20 = sensei_hex_lighter($base, 20);
40
+$text_lighter_20 = sensei_hex_lighter($text, 20);
41 41
 
42 42
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
43 43
 $wrapper = "
44
-	background-color: " . esc_attr( $bg ) . ";
44
+	background-color: " . esc_attr($bg).";
45 45
 	width:100%;
46 46
 	-webkit-text-size-adjust:none !important;
47 47
 	margin:0;
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
 	box-shadow:0 0 0 3px rgba(0,0,0,0.025) !important;
53 53
 	-webkit-border-radius:6px !important;
54 54
 	border-radius:6px !important;
55
-	background-color: " . esc_attr( $body ) . ";
55
+	background-color: " . esc_attr($body).";
56 56
 	border: 1px solid $bg_darker_10;
57 57
 	-webkit-border-radius:6px !important;
58 58
 	border-radius:6px !important;
59 59
 ";
60 60
 $template_header = "
61
-	background-color: " . esc_attr( $base ) .";
61
+	background-color: " . esc_attr($base).";
62 62
 	color: $base_text;
63 63
 	-webkit-border-top-left-radius:6px !important;
64 64
 	-webkit-border-top-right-radius:6px !important;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	vertical-align:middle;
72 72
 ";
73 73
 $body_content = "
74
-	background-color: " . esc_attr( $body ) . ";
74
+	background-color: " . esc_attr($body).";
75 75
 	-webkit-border-radius:6px !important;
76 76
 	border-radius:6px !important;
77 77
 ";
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	text-align:left;
84 84
 ";
85 85
 $header_content_h1 = "
86
-	color: " . esc_attr( $base_text ) . ";
86
+	color: " . esc_attr($base_text).";
87 87
 	margin:0;
88 88
 	padding: 28px 24px;
89 89
 	text-shadow: 0 1px 0 $base_lighter_20;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 <html>
100 100
     <head>
101 101
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
102
-        <title><?php echo get_bloginfo( 'name' ); ?></title>
102
+        <title><?php echo get_bloginfo('name'); ?></title>
103 103
 	</head>
104 104
     <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
105 105
     	<div style="<?php echo $wrapper; ?>">
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
             	<tr>
108 108
                 	<td align="center" valign="top">
109 109
                 		<?php
110
-                			if ( isset( Sensei()->settings->settings['email_header_image'] ) && '' != Sensei()->settings->settings['email_header_image'] ) {
110
+                			if (isset(Sensei()->settings->settings['email_header_image']) && '' != Sensei()->settings->settings['email_header_image']) {
111 111
                 				$img = Sensei()->settings->settings['email_header_image'];
112
-                				echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>';
112
+                				echo '<p style="margin-top:0;"><img src="'.esc_url($img).'" alt="'.get_bloginfo('name').'" /></p>';
113 113
                 			}
114 114
                 		?>
115 115
                     	<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container" style="<?php echo $template_container; ?>">
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
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 User Profile List Table Class
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Email Header
4
- *
5
- * @author 		WooThemes
6
- * @package 	Sensei/Templates/Emails
7
- * @version     1.6.0
8
- */
3
+	 * Email Header
4
+	 *
5
+	 * @author 		WooThemes
6
+	 * @package 	Sensei/Templates/Emails
7
+	 * @version     1.6.0
8
+	 */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11 11
 
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
             	<tr>
108 108
                 	<td align="center" valign="top">
109 109
                 		<?php
110
-                			if ( isset( Sensei()->settings->settings['email_header_image'] ) && '' != Sensei()->settings->settings['email_header_image'] ) {
111
-                				$img = Sensei()->settings->settings['email_header_image'];
112
-                				echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>';
113
-                			}
114
-                		?>
110
+							if ( isset( Sensei()->settings->settings['email_header_image'] ) && '' != Sensei()->settings->settings['email_header_image'] ) {
111
+								$img = Sensei()->settings->settings['email_header_image'];
112
+								echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>';
113
+							}
114
+						?>
115 115
                     	<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container" style="<?php echo $template_container; ?>">
116 116
                         	<tr>
117 117
                             	<td align="center" valign="top">
Please login to merge, or discard this patch.
templates/emails/learner-graded-quiz.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined('ABSPATH')) exit; // Exit if accessed directly ?>
10 10
 
11 11
 <?php
12 12
 
13 13
 // Get data for email content
14 14
 global $sensei_email_data;
15
-extract( $sensei_email_data );
15
+extract($sensei_email_data);
16 16
 
17 17
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
18 18
 $small = "text-align: center !important;";
@@ -21,20 +21,20 @@  discard block
 block discarded – undo
21 21
 
22 22
 ?>
23 23
 
24
-<?php do_action( 'sensei_before_email_content', $template ); ?>
24
+<?php do_action('sensei_before_email_content', $template); ?>
25 25
 
26
-<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'You %1$s the lesson', 'woothemes-sensei' ), $passed ); ?></p>
26
+<p style="<?php echo esc_attr($small); ?>"><?php printf(__('You %1$s the lesson', 'woothemes-sensei'), $passed); ?></p>
27 27
 
28
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo get_the_title( $lesson_id ); ?></h2>
28
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo get_the_title($lesson_id); ?></h2>
29 29
 
30
-<p style="<?php echo esc_attr( $small ); ?>"><?php _e( 'with a grade of', 'woothemes-sensei' ); ?></p>
30
+<p style="<?php echo esc_attr($small); ?>"><?php _e('with a grade of', 'woothemes-sensei'); ?></p>
31 31
 
32
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo $grade . '%'; ?></h2>
32
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo $grade.'%'; ?></h2>
33 33
 
34
-<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'The pass mark is %1$s', 'woothemes-sensei' ), $passmark . '%' ); ?></p>
34
+<p style="<?php echo esc_attr($small); ?>"><?php printf(__('The pass mark is %1$s', 'woothemes-sensei'), $passmark.'%'); ?></p>
35 35
 
36 36
 <hr/>
37 37
 
38
-<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'You can review your grade and your answers %1$shere%2$s.', 'woothemes-sensei' ), '<a href="' . get_permalink( $quiz_id ) . '">', '</a>' ); ?></p>
38
+<p style="<?php echo esc_attr($small); ?>"><?php printf(__('You can review your grade and your answers %1$shere%2$s.', 'woothemes-sensei'), '<a href="'.get_permalink($quiz_id).'">', '</a>'); ?></p>
39 39
 
40
-<?php do_action( 'sensei_after_email_content', $template ); ?>
41 40
\ No newline at end of file
41
+<?php do_action('sensei_after_email_content', $template); ?>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,10 @@
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined( 'ABSPATH' ) ) {
10
+	exit;
11
+}
12
+// Exit if accessed directly ?>
10 13
 
11 14
 <?php
12 15
 
Please login to merge, or discard this patch.
templates/emails/teacher-completed-lesson.php 3 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined('ABSPATH')) exit; // Exit if accessed directly ?>
10 10
 
11 11
 <?php
12 12
 
13 13
 // Get data for email content
14 14
 global $sensei_email_data;
15
-extract( $sensei_email_data );
15
+extract($sensei_email_data);
16 16
 
17 17
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
18 18
 $small = "text-align: center !important;";
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
 
22 22
 ?>
23 23
 
24
-<?php do_action( 'sensei_before_email_content', $template ); ?>
24
+<?php do_action('sensei_before_email_content', $template); ?>
25 25
 
26
-<p style="<?php echo esc_attr( $small ); ?>"><?php _e( 'Your student', 'woothemes-sensei' ); ?></p>
26
+<p style="<?php echo esc_attr($small); ?>"><?php _e('Your student', 'woothemes-sensei'); ?></p>
27 27
 
28
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo $learner_name; ?></h2>
28
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo $learner_name; ?></h2>
29 29
 
30
-<p style="<?php echo esc_attr( $small ); ?>"><?php echo( __( 'has completed the lesson', 'woothemes-sensei' ) ); ?></p>
30
+<p style="<?php echo esc_attr($small); ?>"><?php echo(__('has completed the lesson', 'woothemes-sensei')); ?></p>
31 31
 
32
-<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo get_the_title( $lesson_id ); ?></h2>
32
+<h2 style="<?php echo esc_attr($large); ?>"><?php echo get_the_title($lesson_id); ?></h2>
33 33
 
34 34
 <hr/>
35 35
 
36
-<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'Manage this lesson\'s learners %1$shere%2$s.', 'woothemes-sensei' ), '<a href="' . admin_url( 'admin.php?page=sensei_learners&view=learners&lesson_id=' . $lesson_id ) . '">', '</a>' ); ?></p>
36
+<p style="<?php echo esc_attr($small); ?>"><?php printf(__('Manage this lesson\'s learners %1$shere%2$s.', 'woothemes-sensei'), '<a href="'.admin_url('admin.php?page=sensei_learners&view=learners&lesson_id='.$lesson_id).'">', '</a>'); ?></p>
37 37
 
38
-<?php do_action( 'sensei_after_email_content', $template ); ?>
39 38
\ No newline at end of file
39
+<?php do_action('sensei_after_email_content', $template); ?>
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,10 @@
 block discarded – undo
6 6
  * @package Sensei/Templates/Emails/HTML
7 7
  * @version 1.6.0
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
9
+if ( ! defined( 'ABSPATH' ) ) {
10
+	exit;
11
+}
12
+// Exit if accessed directly ?>
10 13
 
11 14
 <?php
12 15
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Teacher completed course email
4
- *
5
- * @author WooThemes
6
- * @package Sensei/Templates/Emails/HTML
7
- * @version 1.6.0
8
- */
3
+						 * Teacher completed course email
4
+						 *
5
+						 * @author WooThemes
6
+						 * @package Sensei/Templates/Emails/HTML
7
+						 * @version 1.6.0
8
+						 */
9 9
 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
10 10
 
11 11
 <?php
Please login to merge, or discard this patch.