Completed
Pull Request — master (#1233)
by Dan
07:34
created
includes/emails/class-sensei-email-teacher-new-course-assignment.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
7 7
 
8 8
 if (  class_exists( 'Teacher_New_Course_Assignment' ) ){
9
-    return;
9
+	return;
10 10
 }
11 11
 
12 12
 /**
@@ -40,40 +40,40 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	function __construct() {
42 42
 
43
-        $this->template = 'teacher-new-course-assignment';
43
+		$this->template = 'teacher-new-course-assignment';
44 44
 		$this->subject = apply_filters( 'sensei_email_subject', sprintf( __( '[%1$s] You have been assigned to a course', 'woothemes-sensei' ), get_bloginfo( 'name' ) ), $this->template );
45 45
 		$this->heading = apply_filters( 'sensei_email_heading', __( 'Course assigned to you', 'woothemes-sensei' ), $this->template );
46
-        return;
46
+		return;
47 47
 	}
48 48
 
49 49
 	/**
50 50
 	 * trigger function.
51 51
 	 *
52 52
 	 * @access public
53
-     * @param $teacher_id
54
-     * @param $course_id
53
+	 * @param $teacher_id
54
+	 * @param $course_id
55 55
 	 * @return void
56 56
 	 */
57 57
 	function trigger( $teacher_id = 0, $course_id = 0 ) {
58 58
 		global $sensei_email_data;
59 59
 
60 60
 		$this->teacher = new WP_User( $teacher_id );
61
-        $this->recipient = stripslashes( $this->teacher->user_email );
62
-        $this->subject = __( 'New course assigned to you', 'woothemes-sensei' );
61
+		$this->recipient = stripslashes( $this->teacher->user_email );
62
+		$this->subject = __( 'New course assigned to you', 'woothemes-sensei' );
63 63
 
64
-        //course edit link
65
-        $course_edit_link = admin_url('post.php?post=' . $course_id . '&action=edit' );
64
+		//course edit link
65
+		$course_edit_link = admin_url('post.php?post=' . $course_id . '&action=edit' );
66 66
 
67
-        // Course name
68
-        $course = get_post( $course_id);
67
+		// Course name
68
+		$course = get_post( $course_id);
69 69
 		// Construct data array
70 70
 		$sensei_email_data = apply_filters( 'sensei_email_data', array(
71 71
 			'template'			=> $this->template,
72 72
 			'heading'			=> $this->heading,
73 73
 			'teacher_id'		=> $teacher_id,
74 74
 			'course_id'			=> $course_id,
75
-            'course_name'			=> $course->post_title,
76
-            'course_edit_link' => $course_edit_link,
75
+			'course_name'			=> $course->post_title,
76
+			'course_edit_link' => $course_edit_link,
77 77
 		), $this->template );
78 78
 
79 79
 		// Send mail
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
  * This email will be sent to a teacher when a course is assigned to them.
4 4
  */
5 5
 
6
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
6
+if ( ! defined('ABSPATH')) exit; // Exit if accessed directly
7 7
 
8
-if (  class_exists('Sensei_Email_Teacher_New_Course_Assignment') ){
8
+if (class_exists('Sensei_Email_Teacher_New_Course_Assignment')) {
9 9
     return;
10 10
 }
11 11
 
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 	function __construct() {
37 37
 
38 38
         $this->template = 'teacher-new-course-assignment';
39
-		$this->subject = apply_filters( 'sensei_email_subject', sprintf( __( '[%1$s] You have been assigned to a course', 'woothemes-sensei' ), get_bloginfo( 'name' ) ), $this->template );
40
-		$this->heading = apply_filters( 'sensei_email_heading', __( 'Course assigned to you', 'woothemes-sensei' ), $this->template );
39
+		$this->subject = apply_filters('sensei_email_subject', sprintf(__('[%1$s] You have been assigned to a course', 'woothemes-sensei'), get_bloginfo('name')), $this->template);
40
+		$this->heading = apply_filters('sensei_email_heading', __('Course assigned to you', 'woothemes-sensei'), $this->template);
41 41
         return;
42 42
 	}
43 43
 
@@ -49,30 +49,30 @@  discard block
 block discarded – undo
49 49
      * @param $course_id
50 50
 	 * @return void
51 51
 	 */
52
-	function trigger( $teacher_id = 0, $course_id = 0 ) {
52
+	function trigger($teacher_id = 0, $course_id = 0) {
53 53
 		global $sensei_email_data;
54 54
 
55
-		$this->teacher = new WP_User( $teacher_id );
56
-        $this->recipient = stripslashes( $this->teacher->user_email );
57
-        $this->subject = __( 'New course assigned to you', 'woothemes-sensei' );
55
+		$this->teacher = new WP_User($teacher_id);
56
+        $this->recipient = stripslashes($this->teacher->user_email);
57
+        $this->subject = __('New course assigned to you', 'woothemes-sensei');
58 58
 
59 59
         //course edit link
60
-        $course_edit_link = admin_url('post.php?post=' . $course_id . '&action=edit' );
60
+        $course_edit_link = admin_url('post.php?post='.$course_id.'&action=edit');
61 61
 
62 62
         // Course name
63
-        $course = get_post( $course_id);
63
+        $course = get_post($course_id);
64 64
 		// Construct data array
65
-		$sensei_email_data = apply_filters( 'sensei_email_data', array(
65
+		$sensei_email_data = apply_filters('sensei_email_data', array(
66 66
 			'template'			=> $this->template,
67 67
 			'heading'			=> $this->heading,
68 68
 			'teacher_id'		=> $teacher_id,
69 69
 			'course_id'			=> $course_id,
70 70
             'course_name'			=> $course->post_title,
71 71
             'course_edit_link' => $course_edit_link,
72
-		), $this->template );
72
+		), $this->template);
73 73
 
74 74
 		// Send mail
75
-		Sensei()->emails->send( $this->recipient, $this->subject, Sensei()->emails->get_content( $this->template ) );
75
+		Sensei()->emails->send($this->recipient, $this->subject, Sensei()->emails->get_content($this->template));
76 76
 	}
77 77
 }
78 78
 
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.
includes/theme-integrations/storefront.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Class Sensei_Storefront
4
- *
5
- * Responsible for wrapping Storefront theme Sensei content
6
- * with the correct markup
7
- *
8
- * @package Views
9
- * @subpackage Theme-Integration
10
- * @author Automattic
11
- *
12
- * @since 1.9.0
3
+	 * Class Sensei_Storefront
4
+	 *
5
+	 * Responsible for wrapping Storefront theme Sensei content
6
+	 * with the correct markup
7
+	 *
8
+	 * @package Views
9
+	 * @subpackage Theme-Integration
10
+	 * @author Automattic
11
+	 *
12
+	 * @since 1.9.0
13 13
 */
14 14
 Class Sensei_Storefront extends Sensei__S { }
Please login to merge, or discard this patch.