Completed
Branch EDTR/master (8c09db)
by
unknown
09:27 queued 29s
created
libraries/messages/message_type/EE_Payment_Refund_message_type.class.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -15,50 +15,50 @@
 block discarded – undo
15 15
 class EE_Payment_Refund_message_type extends EE_Payment_Base_message_type
16 16
 {
17 17
 
18
-    public function __construct()
19
-    {
18
+	public function __construct()
19
+	{
20 20
 
21
-        // setup type details for reference
22
-        $this->name = 'payment_refund';
23
-        $this->description = __('This message type is used for all payment notification messages that go out for refunds.', 'event_espresso');
24
-        $this->label = array(
25
-            'singular' => __('refund issued', 'event_espresso'),
26
-            'plural' => __('refunds issued', 'event_espresso')
27
-            );
21
+		// setup type details for reference
22
+		$this->name = 'payment_refund';
23
+		$this->description = __('This message type is used for all payment notification messages that go out for refunds.', 'event_espresso');
24
+		$this->label = array(
25
+			'singular' => __('refund issued', 'event_espresso'),
26
+			'plural' => __('refunds issued', 'event_espresso')
27
+			);
28 28
 
29
-        $this->_master_templates = array(
30
-            'email' => 'payment'
31
-            );
29
+		$this->_master_templates = array(
30
+			'email' => 'payment'
31
+			);
32 32
 
33
-        parent::__construct();
34
-    }
33
+		parent::__construct();
34
+	}
35 35
 
36 36
 
37 37
 
38
-    /**
39
-     * _set_contexts
40
-     * This sets up the contexts associated with the message_type
41
-     *
42
-     * @access  protected
43
-     * @return  void
44
-     */
45
-    protected function _set_contexts()
46
-    {
47
-        $this->_context_label = array(
48
-            'label' => __('recipient', 'event_espresso'),
49
-            'plural' => __('recipients', 'event_espresso'),
50
-            'description' => __('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
51
-            );
38
+	/**
39
+	 * _set_contexts
40
+	 * This sets up the contexts associated with the message_type
41
+	 *
42
+	 * @access  protected
43
+	 * @return  void
44
+	 */
45
+	protected function _set_contexts()
46
+	{
47
+		$this->_context_label = array(
48
+			'label' => __('recipient', 'event_espresso'),
49
+			'plural' => __('recipients', 'event_espresso'),
50
+			'description' => __('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
51
+			);
52 52
 
53
-        $this->_contexts = array(
54
-            'admin' => array(
55
-                'label' => __('Event Admin', 'event_espresso'),
56
-                'description' => __('This template is what event administrators will receive on a successful refund.', 'event_espresso')
57
-                ),
58
-            'primary_attendee' => array(
59
-                'label' => __('Primary Registrant', 'event_espresso'),
60
-                'description' => __('This template is what the primary registrant (the person who made the main registration) will receive on successful refund.', 'event_espresso')
61
-                )
62
-            );
63
-    }
53
+		$this->_contexts = array(
54
+			'admin' => array(
55
+				'label' => __('Event Admin', 'event_espresso'),
56
+				'description' => __('This template is what event administrators will receive on a successful refund.', 'event_espresso')
57
+				),
58
+			'primary_attendee' => array(
59
+				'label' => __('Primary Registrant', 'event_espresso'),
60
+				'description' => __('This template is what the primary registrant (the person who made the main registration) will receive on successful refund.', 'event_espresso')
61
+				)
62
+			);
63
+	}
64 64
 }
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Registration_message_type.class.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -14,48 +14,48 @@
 block discarded – undo
14 14
 class EE_Registration_message_type extends EE_Registration_Base_message_type
15 15
 {
16 16
 
17
-    public function __construct()
18
-    {
19
-        $this->name = 'registration';
20
-        $this->description = __('This message type is for messages sent to attendees when their registration is approved.', 'event_espresso');
21
-        $this->label = array(
22
-            'singular' => __('registration approved', 'event_espresso'),
23
-            'plural' => __('registrations approved', 'event_espresso')
24
-            );
17
+	public function __construct()
18
+	{
19
+		$this->name = 'registration';
20
+		$this->description = __('This message type is for messages sent to attendees when their registration is approved.', 'event_espresso');
21
+		$this->label = array(
22
+			'singular' => __('registration approved', 'event_espresso'),
23
+			'plural' => __('registrations approved', 'event_espresso')
24
+			);
25 25
 
26
-        parent::__construct();
27
-    }
26
+		parent::__construct();
27
+	}
28 28
 
29 29
 
30 30
 
31
-    /**
32
-     * _set_contexts
33
-     * This sets up the contexts associated with the message_type
34
-     *
35
-     * @access  protected
36
-     * @return  void
37
-     */
38
-    protected function _set_contexts()
39
-    {
40
-        $this->_context_label = array(
41
-            'label' => __('recipient', 'event_espresso'),
42
-            'plural' => __('recipients', 'event_espresso'),
43
-            'description' => __('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', 'event_espresso')
44
-            );
31
+	/**
32
+	 * _set_contexts
33
+	 * This sets up the contexts associated with the message_type
34
+	 *
35
+	 * @access  protected
36
+	 * @return  void
37
+	 */
38
+	protected function _set_contexts()
39
+	{
40
+		$this->_context_label = array(
41
+			'label' => __('recipient', 'event_espresso'),
42
+			'plural' => __('recipients', 'event_espresso'),
43
+			'description' => __('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', 'event_espresso')
44
+			);
45 45
 
46
-        $this->_contexts = array(
47
-            'admin' => array(
48
-                'label' => __('Event Admin', 'event_espresso'),
49
-                'description' => __('This template is what event administrators will receive with an approved registration', 'event_espresso')
50
-                ),
51
-            'primary_attendee' => array(
52
-                'label' => __('Primary Registrant', 'event_espresso'),
53
-                'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive with approved registration', 'event_espresso')
54
-                ),
55
-            'attendee' => array(
56
-                'label' => __('Registrant', 'event_espresso'),
57
-                'description' => __('This template is what each registrant for the event will receive when their registration is approved.', 'event_espresso')
58
-                )
59
-            );
60
-    }
46
+		$this->_contexts = array(
47
+			'admin' => array(
48
+				'label' => __('Event Admin', 'event_espresso'),
49
+				'description' => __('This template is what event administrators will receive with an approved registration', 'event_espresso')
50
+				),
51
+			'primary_attendee' => array(
52
+				'label' => __('Primary Registrant', 'event_espresso'),
53
+				'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive with approved registration', 'event_espresso')
54
+				),
55
+			'attendee' => array(
56
+				'label' => __('Registrant', 'event_espresso'),
57
+				'description' => __('This template is what each registrant for the event will receive when their registration is approved.', 'event_espresso')
58
+				)
59
+			);
60
+	}
61 61
 }
Please login to merge, or discard this patch.
messages/message_type/EE_Not_Approved_Registration_message_type.class.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -14,60 +14,60 @@
 block discarded – undo
14 14
 class EE_Not_Approved_Registration_message_type extends EE_Registration_Base_message_type
15 15
 {
16 16
 
17
-    public function __construct()
18
-    {
19
-        $this->name = 'not_approved_registration';
20
-        $this->description = __('This message type is for messages sent to registrants when their registration is set to the not approved status.', 'event_espresso');
21
-        $this->label = array(
22
-            'singular' => __('not approved registration', 'event_espresso'),
23
-            'plural' => __('not approved registrations', 'event_espresso')
24
-            );
17
+	public function __construct()
18
+	{
19
+		$this->name = 'not_approved_registration';
20
+		$this->description = __('This message type is for messages sent to registrants when their registration is set to the not approved status.', 'event_espresso');
21
+		$this->label = array(
22
+			'singular' => __('not approved registration', 'event_espresso'),
23
+			'plural' => __('not approved registrations', 'event_espresso')
24
+			);
25 25
 
26
-        $this->_master_templates = array(
27
-            'email' => 'registration'
28
-            );
26
+		$this->_master_templates = array(
27
+			'email' => 'registration'
28
+			);
29 29
 
30
-        parent::__construct();
31
-    }
30
+		parent::__construct();
31
+	}
32 32
 
33 33
 
34 34
 
35 35
 
36
-    /**
37
-     * _set_contexts
38
-     * This sets up the contexts associated with the message_type
39
-     *
40
-     * @access  protected
41
-     * @return  void
42
-     */
43
-    protected function _set_contexts()
44
-    {
45
-        $this->_context_label = array(
46
-            'label' => __('recipient', 'event_espresso'),
47
-            'plural' => __('recipients', 'event_espresso'),
48
-            'description' => __('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', 'event_espresso')
49
-            );
36
+	/**
37
+	 * _set_contexts
38
+	 * This sets up the contexts associated with the message_type
39
+	 *
40
+	 * @access  protected
41
+	 * @return  void
42
+	 */
43
+	protected function _set_contexts()
44
+	{
45
+		$this->_context_label = array(
46
+			'label' => __('recipient', 'event_espresso'),
47
+			'plural' => __('recipients', 'event_espresso'),
48
+			'description' => __('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', 'event_espresso')
49
+			);
50 50
 
51
-        $this->_contexts = array(
52
-            'admin' => array(
53
-                'label' => __('Event Admin', 'event_espresso'),
54
-                'description' => __('This template is what event administrators will receive when registration status is set to not approved.', 'event_espresso')
55
-                ),
56
-            'primary_attendee' => array(
57
-                'label' => __('Primary Registrant', 'event_espresso'),
58
-                'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive when the registration status is not approved.', 'event_espresso')
59
-                )
60
-            );
61
-    }
51
+		$this->_contexts = array(
52
+			'admin' => array(
53
+				'label' => __('Event Admin', 'event_espresso'),
54
+				'description' => __('This template is what event administrators will receive when registration status is set to not approved.', 'event_espresso')
55
+				),
56
+			'primary_attendee' => array(
57
+				'label' => __('Primary Registrant', 'event_espresso'),
58
+				'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive when the registration status is not approved.', 'event_espresso')
59
+				)
60
+			);
61
+	}
62 62
 
63 63
 
64 64
 
65
-    protected function _primary_attendee_addressees()
66
-    {
67
-        $cached = $this->_single_message;
68
-        $this->_single_message = false;
69
-        $addressees = parent::_primary_attendee_addressees();
70
-        $this->_single_message = $cached;
71
-        return $addressees;
72
-    }
65
+	protected function _primary_attendee_addressees()
66
+	{
67
+		$cached = $this->_single_message;
68
+		$this->_single_message = false;
69
+		$addressees = parent::_primary_attendee_addressees();
70
+		$this->_single_message = $cached;
71
+		return $addressees;
72
+	}
73 73
 }
Please login to merge, or discard this patch.
messages/message_type/EE_Registration_Summary_message_type.class.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -16,59 +16,59 @@
 block discarded – undo
16 16
 class EE_Registration_Summary_message_type extends EE_Registration_Base_message_type
17 17
 {
18 18
 
19
-    public function __construct()
20
-    {
21
-        $this->name = 'registration_summary';
22
-        $this->description = __('This message type provides a summary notification to Primary Registrants and Admin recipients when there are multiple registrations in a transaction with different statuses.', 'event_espresso');
23
-        $this->label = array(
24
-            'singular' => __('registration multi-status summary', 'event_espresso'),
25
-            'plural' => __('registrations multi-status summary', 'event_espresso')
26
-            );
19
+	public function __construct()
20
+	{
21
+		$this->name = 'registration_summary';
22
+		$this->description = __('This message type provides a summary notification to Primary Registrants and Admin recipients when there are multiple registrations in a transaction with different statuses.', 'event_espresso');
23
+		$this->label = array(
24
+			'singular' => __('registration multi-status summary', 'event_espresso'),
25
+			'plural' => __('registrations multi-status summary', 'event_espresso')
26
+			);
27 27
 
28
-        $this->_master_templates = array(
29
-            'email' => 'registration'
30
-            );
28
+		$this->_master_templates = array(
29
+			'email' => 'registration'
30
+			);
31 31
 
32
-        parent::__construct();
33
-    }
32
+		parent::__construct();
33
+	}
34 34
 
35 35
 
36 36
 
37
-    /**
38
-     * _set_contexts
39
-     * This sets up the contexts associated with the message_type
40
-     *
41
-     * @access  protected
42
-     * @return  void
43
-     */
44
-    protected function _set_contexts()
45
-    {
46
-        $this->_context_label = array(
47
-            'label' => __('recipient', 'event_espresso'),
48
-            'plural' => __('recipients', 'event_espresso'),
49
-            'description' => __('Recipient\'s are who will receive the template.  You may want different details sent out depending on who the recipient is.  To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso')
50
-            );
37
+	/**
38
+	 * _set_contexts
39
+	 * This sets up the contexts associated with the message_type
40
+	 *
41
+	 * @access  protected
42
+	 * @return  void
43
+	 */
44
+	protected function _set_contexts()
45
+	{
46
+		$this->_context_label = array(
47
+			'label' => __('recipient', 'event_espresso'),
48
+			'plural' => __('recipients', 'event_espresso'),
49
+			'description' => __('Recipient\'s are who will receive the template.  You may want different details sent out depending on who the recipient is.  To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso')
50
+			);
51 51
 
52
-        $this->_contexts = array(
53
-            'admin' => array(
54
-                'label' => __('Event Admin', 'event_espresso'),
55
-                'description' => __('This template is what event administrators will receive when a transaction is finalized that has registrations with multiple different statuses.', 'event_espresso')
56
-                ),
57
-            'primary_attendee' => array(
58
-                'label' => __('Primary Registrant', 'event_espresso'),
59
-                'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive when the transaction completed has registrations with different statuses.  By default it is a summary email of all registrations for all events on the transaction and their status.', 'event_espresso')
60
-                )
61
-            );
62
-    }
52
+		$this->_contexts = array(
53
+			'admin' => array(
54
+				'label' => __('Event Admin', 'event_espresso'),
55
+				'description' => __('This template is what event administrators will receive when a transaction is finalized that has registrations with multiple different statuses.', 'event_espresso')
56
+				),
57
+			'primary_attendee' => array(
58
+				'label' => __('Primary Registrant', 'event_espresso'),
59
+				'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive when the transaction completed has registrations with different statuses.  By default it is a summary email of all registrations for all events on the transaction and their status.', 'event_espresso')
60
+				)
61
+			);
62
+	}
63 63
 
64 64
 
65 65
 
66
-    protected function _primary_attendee_addressees()
67
-    {
68
-        $cached = $this->_single_message;
69
-        $this->_single_message = false;
70
-        $addressees = parent::_primary_attendee_addressees();
71
-        $this->_single_message = $cached;
72
-        return $addressees;
73
-    }
66
+	protected function _primary_attendee_addressees()
67
+	{
68
+		$cached = $this->_single_message;
69
+		$this->_single_message = false;
70
+		$addressees = parent::_primary_attendee_addressees();
71
+		$this->_single_message = $cached;
72
+		return $addressees;
73
+	}
74 74
 }
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Payment_message_type.class.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -14,44 +14,44 @@
 block discarded – undo
14 14
 class EE_Payment_message_type extends EE_Payment_Base_message_type
15 15
 {
16 16
 
17
-    public function __construct()
18
-    {
17
+	public function __construct()
18
+	{
19 19
 
20
-        // setup type details for reference
21
-        $this->name = 'payment';
22
-        $this->description = __('This message type is used for all payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso');
23
-        $this->label = array(
24
-            'singular' => __('payment received', 'event_espresso'),
25
-            'plural' => __('payments received', 'event_espresso')
26
-            );
20
+		// setup type details for reference
21
+		$this->name = 'payment';
22
+		$this->description = __('This message type is used for all payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso');
23
+		$this->label = array(
24
+			'singular' => __('payment received', 'event_espresso'),
25
+			'plural' => __('payments received', 'event_espresso')
26
+			);
27 27
 
28
-        parent::__construct();
29
-    }
28
+		parent::__construct();
29
+	}
30 30
 
31
-    /**
32
-     * _set_contexts
33
-     * This sets up the contexts associated with the message_type
34
-     *
35
-     * @access  protected
36
-     * @return  void
37
-     */
38
-    protected function _set_contexts()
39
-    {
40
-        $this->_context_label = array(
41
-            'label' => __('recipient', 'event_espresso'),
42
-            'plural' => __('recipients', 'event_espresso'),
43
-            'description' => __('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
44
-            );
31
+	/**
32
+	 * _set_contexts
33
+	 * This sets up the contexts associated with the message_type
34
+	 *
35
+	 * @access  protected
36
+	 * @return  void
37
+	 */
38
+	protected function _set_contexts()
39
+	{
40
+		$this->_context_label = array(
41
+			'label' => __('recipient', 'event_espresso'),
42
+			'plural' => __('recipients', 'event_espresso'),
43
+			'description' => __('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
44
+			);
45 45
 
46
-        $this->_contexts = array(
47
-            'admin' => array(
48
-                'label' => __('Event Admin', 'event_espresso'),
49
-                'description' => __('This template is what event administrators will receive on a successful payment', 'event_espresso')
50
-                ),
51
-            'primary_attendee' => array(
52
-                'label' => __('Primary Registrant', 'event_espresso'),
53
-                'description' => __('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso')
54
-                )
55
-            );
56
-    }
46
+		$this->_contexts = array(
47
+			'admin' => array(
48
+				'label' => __('Event Admin', 'event_espresso'),
49
+				'description' => __('This template is what event administrators will receive on a successful payment', 'event_espresso')
50
+				),
51
+			'primary_attendee' => array(
52
+				'label' => __('Primary Registrant', 'event_espresso'),
53
+				'description' => __('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso')
54
+				)
55
+			);
56
+	}
57 57
 }
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Invoice_message_type.class.php 2 patches
Indentation   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -13,123 +13,123 @@
 block discarded – undo
13 13
 class EE_Invoice_message_type extends EE_message_type
14 14
 {
15 15
 
16
-    public function __construct()
17
-    {
18
-        $this->name = 'invoice';
19
-        $this->description = __('The invoice message type is triggered via a url on the thank you page and via at url generated by the [INVOICE_URL] or [INVOICE_LINK] shortcode.', 'event_espresso');
20
-        $this->label = array(
21
-            'singular' => __('invoice', 'event_espresso'),
22
-            'plural' => __('invoices', 'event_espresso')
23
-        );
24
-        $this->_master_templates = array();
25
-        parent::__construct();
26
-    }
16
+	public function __construct()
17
+	{
18
+		$this->name = 'invoice';
19
+		$this->description = __('The invoice message type is triggered via a url on the thank you page and via at url generated by the [INVOICE_URL] or [INVOICE_LINK] shortcode.', 'event_espresso');
20
+		$this->label = array(
21
+			'singular' => __('invoice', 'event_espresso'),
22
+			'plural' => __('invoices', 'event_espresso')
23
+		);
24
+		$this->_master_templates = array();
25
+		parent::__construct();
26
+	}
27 27
 
28 28
 
29 29
 
30
-    /**
31
-     * @see parent::get_priority() for documentation.
32
-     * @return int
33
-     */
34
-    public function get_priority()
35
-    {
36
-        return EEM_Message::priority_high;
37
-    }
30
+	/**
31
+	 * @see parent::get_priority() for documentation.
32
+	 * @return int
33
+	 */
34
+	public function get_priority()
35
+	{
36
+		return EEM_Message::priority_high;
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * This method returns whether this message type should always generate a new copy
42
-     * when requested, or if links can be to the already generated copy.
43
-     * Note: this does NOT affect viewing/resending already generated messages in the EE_Message list table.
44
-     * Invoices always generate.
45
-     * @return bool     false means can link to generated EE_Message.  true must regenerate.
46
-     */
47
-    public function always_generate()
48
-    {
49
-        return true;
50
-    }
40
+	/**
41
+	 * This method returns whether this message type should always generate a new copy
42
+	 * when requested, or if links can be to the already generated copy.
43
+	 * Note: this does NOT affect viewing/resending already generated messages in the EE_Message list table.
44
+	 * Invoices always generate.
45
+	 * @return bool     false means can link to generated EE_Message.  true must regenerate.
46
+	 */
47
+	public function always_generate()
48
+	{
49
+		return true;
50
+	}
51 51
 
52 52
 
53
-    protected function _set_admin_pages()
54
-    {
55
-        $this->admin_registered_pages = array( 'events_edit' => true );
56
-    }
53
+	protected function _set_admin_pages()
54
+	{
55
+		$this->admin_registered_pages = array( 'events_edit' => true );
56
+	}
57 57
 
58 58
 
59 59
 
60
-    protected function _set_data_handler()
61
-    {
62
-        $this->_data_handler = 'Gateways';
63
-    }
60
+	protected function _set_data_handler()
61
+	{
62
+		$this->_data_handler = 'Gateways';
63
+	}
64 64
 
65 65
 
66 66
 
67
-    protected function _set_with_messengers()
68
-    {
69
-        $this->_with_messengers = array(
70
-            'html' => array( 'pdf' )
71
-            );
72
-    }
67
+	protected function _set_with_messengers()
68
+	{
69
+		$this->_with_messengers = array(
70
+			'html' => array( 'pdf' )
71
+			);
72
+	}
73 73
 
74 74
 
75 75
 
76
-    protected function _get_data_for_context($context, EE_Registration $registration, $id)
77
-    {
78
-        // receipt message type data handler is 'Gateways' and it expects a transaction object.
79
-        $transaction = $registration->transaction();
80
-        if ($transaction instanceof EE_Transaction) {
81
-            return array( $transaction );
82
-        }
83
-        return array();
84
-    }
76
+	protected function _get_data_for_context($context, EE_Registration $registration, $id)
77
+	{
78
+		// receipt message type data handler is 'Gateways' and it expects a transaction object.
79
+		$transaction = $registration->transaction();
80
+		if ($transaction instanceof EE_Transaction) {
81
+			return array( $transaction );
82
+		}
83
+		return array();
84
+	}
85 85
 
86 86
 
87 87
 
88
-    protected function _set_admin_settings_fields()
89
-    {
90
-        $this->_admin_settings_fields = array();
91
-    }
88
+	protected function _set_admin_settings_fields()
89
+	{
90
+		$this->_admin_settings_fields = array();
91
+	}
92 92
 
93 93
 
94 94
 
95
-    protected function _set_contexts()
96
-    {
97
-        $this->_context_label = array(
98
-            'label' => __('recipient', 'event_espresso'),
99
-            'plural' => __('recipients', 'event_espresso'),
100
-            'description' => __('Recipient\'s are who will view the invoice.', 'event_espresso')
101
-        );
95
+	protected function _set_contexts()
96
+	{
97
+		$this->_context_label = array(
98
+			'label' => __('recipient', 'event_espresso'),
99
+			'plural' => __('recipients', 'event_espresso'),
100
+			'description' => __('Recipient\'s are who will view the invoice.', 'event_espresso')
101
+		);
102 102
 
103
-        $this->_contexts = array(
104
-            'purchaser' => array(
105
-                'label' => __('Purchaser', 'event_espresso'),
106
-                'description' => __('This template goes to the person who conducted the transaction.', 'event_espresso')
107
-            )
108
-        );
109
-    }
103
+		$this->_contexts = array(
104
+			'purchaser' => array(
105
+				'label' => __('Purchaser', 'event_espresso'),
106
+				'description' => __('This template goes to the person who conducted the transaction.', 'event_espresso')
107
+			)
108
+		);
109
+	}
110 110
 
111 111
 
112 112
 
113 113
 
114
-    /**
115
-    * used to set the valid shortcodes for the receipt message type
116
-    *
117
-    * @since   4.5.0
118
-    *
119
-    * @return  void
120
-    */
121
-    protected function _set_valid_shortcodes()
122
-    {
123
-        $this->_valid_shortcodes['purchaser'] = array(
124
-            'attendee_list', 'attendee', 'datetime_list', 'datetime', 'event_list', 'event', 'event_meta', 'messenger', 'organization', 'primary_registration_list', 'primary_registration_details', 'ticket_list', 'ticket', 'transaction', 'venue', 'line_item_list', 'payment_list', 'line_item', 'payment'
125
-        );
126
-    }
114
+	/**
115
+	 * used to set the valid shortcodes for the receipt message type
116
+	 *
117
+	 * @since   4.5.0
118
+	 *
119
+	 * @return  void
120
+	 */
121
+	protected function _set_valid_shortcodes()
122
+	{
123
+		$this->_valid_shortcodes['purchaser'] = array(
124
+			'attendee_list', 'attendee', 'datetime_list', 'datetime', 'event_list', 'event', 'event_meta', 'messenger', 'organization', 'primary_registration_list', 'primary_registration_details', 'ticket_list', 'ticket', 'transaction', 'venue', 'line_item_list', 'payment_list', 'line_item', 'payment'
125
+		);
126
+	}
127 127
 
128 128
 
129 129
 
130 130
 
131
-    protected function _purchaser_addressees()
132
-    {
133
-        return parent::_primary_attendee_addressees();
134
-    }
131
+	protected function _purchaser_addressees()
132
+	{
133
+		return parent::_primary_attendee_addressees();
134
+	}
135 135
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     protected function _set_admin_pages()
54 54
     {
55
-        $this->admin_registered_pages = array( 'events_edit' => true );
55
+        $this->admin_registered_pages = array('events_edit' => true);
56 56
     }
57 57
 
58 58
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     protected function _set_with_messengers()
68 68
     {
69 69
         $this->_with_messengers = array(
70
-            'html' => array( 'pdf' )
70
+            'html' => array('pdf')
71 71
             );
72 72
     }
73 73
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         // receipt message type data handler is 'Gateways' and it expects a transaction object.
79 79
         $transaction = $registration->transaction();
80 80
         if ($transaction instanceof EE_Transaction) {
81
-            return array( $transaction );
81
+            return array($transaction);
82 82
         }
83 83
         return array();
84 84
     }
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Receipt_message_type.class.php 2 patches
Indentation   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -13,142 +13,142 @@
 block discarded – undo
13 13
 class EE_Receipt_message_type extends EE_message_type
14 14
 {
15 15
 
16
-    public function __construct()
17
-    {
18
-        $this->name = 'receipt';
19
-        $this->description = __('The receipt message type is triggered via a url on the thank you page and via at url generated by the [RECEIPT_URL] shortcode.', 'event_espresso');
20
-        $this->label = array(
21
-            'singular' => __('receipt', 'event_espresso'),
22
-            'plural' => __('receipts', 'event_espresso')
23
-        );
24
-        $this->_master_templates = array();
25
-        parent::__construct();
26
-    }
16
+	public function __construct()
17
+	{
18
+		$this->name = 'receipt';
19
+		$this->description = __('The receipt message type is triggered via a url on the thank you page and via at url generated by the [RECEIPT_URL] shortcode.', 'event_espresso');
20
+		$this->label = array(
21
+			'singular' => __('receipt', 'event_espresso'),
22
+			'plural' => __('receipts', 'event_espresso')
23
+		);
24
+		$this->_master_templates = array();
25
+		parent::__construct();
26
+	}
27 27
 
28 28
 
29 29
 
30
-    /**
31
-     * @see parent::get_priority() for documentation.
32
-     * @return int
33
-     */
34
-    public function get_priority()
35
-    {
36
-        return EEM_Message::priority_high;
37
-    }
38
-
39
-
40
-
41
-    /**
42
-     * This method returns whether this message type should always generate a new copy
43
-     * when requested, or if links can be to the already generated copy.
44
-     * Note: this does NOT affect viewing/resending already generated messages in the EE_Message list table.
45
-     * Receipts always generate
46
-     * @return bool     false means can link to generated EE_Message.  true must regenerate.
47
-     */
48
-    public function always_generate()
49
-    {
50
-        return true;
51
-    }
52
-
53
-
54
-    protected function _set_admin_pages()
55
-    {
56
-        $this->admin_registered_pages = array( 'events_edit' => true );
57
-    }
58
-
59
-
60
-
61
-    protected function _set_data_handler()
62
-    {
63
-        $this->_data_handler = 'Gateways';
64
-    }
65
-
66
-
67
-
68
-    protected function _set_with_messengers()
69
-    {
70
-        $this->_with_messengers = array(
71
-            'html' => array( 'pdf' )
72
-        );
73
-    }
74
-
75
-
76
-
77
-    protected function _get_data_for_context($context, EE_Registration $registration, $id)
78
-    {
79
-        // receipt message type data handler is 'Gateways' and it expects a transaction object.
80
-        $transaction = $registration->transaction();
81
-        if ($transaction instanceof EE_Transaction) {
82
-            return array( $transaction );
83
-        }
84
-        return array();
85
-    }
86
-
87
-
88
-
89
-    protected function _set_admin_settings_fields()
90
-    {
91
-        $this->_admin_settings_fields = array();
92
-    }
93
-
94
-
95
-
96
-    protected function _set_contexts()
97
-    {
98
-        $this->_context_label = array(
99
-            'label' => __('recipient', 'event_espresso'),
100
-            'plural' => __('recipients', 'event_espresso'),
101
-            'description' => __('Recipient\'s are who will view the receipt.', 'event_espresso')
102
-        );
103
-
104
-        $this->_contexts = array(
105
-            'purchaser' => array(
106
-                'label' => __('Purchaser', 'event_espresso'),
107
-                'description' => __('This template goes to the person who conducted the transaction.', 'event_espresso')
108
-            )
109
-        );
110
-    }
111
-
112
-
113
-
114
-
115
-    /**
116
-    * used to set the valid shortcodes for the receipt message type
117
-    *
118
-    * @since   4.5.0
119
-    *
120
-    * @return  void
121
-    */
122
-    protected function _set_valid_shortcodes()
123
-    {
124
-        $this->_valid_shortcodes['purchaser'] = array(
125
-            'attendee_list',
126
-            'attendee',
127
-            'datetime_list',
128
-            'datetime',
129
-            'event_list',
130
-            'event',
131
-            'event_meta',
132
-            'messenger',
133
-            'organization',
134
-            'primary_registration_list',
135
-            'primary_registration_details',
136
-            'ticket_list',
137
-            'ticket',
138
-            'transaction',
139
-            'venue',
140
-            'line_item_list',
141
-            'payment_list',
142
-            'line_item',
143
-            'payment'
144
-        );
145
-    }
146
-
30
+	/**
31
+	 * @see parent::get_priority() for documentation.
32
+	 * @return int
33
+	 */
34
+	public function get_priority()
35
+	{
36
+		return EEM_Message::priority_high;
37
+	}
38
+
39
+
40
+
41
+	/**
42
+	 * This method returns whether this message type should always generate a new copy
43
+	 * when requested, or if links can be to the already generated copy.
44
+	 * Note: this does NOT affect viewing/resending already generated messages in the EE_Message list table.
45
+	 * Receipts always generate
46
+	 * @return bool     false means can link to generated EE_Message.  true must regenerate.
47
+	 */
48
+	public function always_generate()
49
+	{
50
+		return true;
51
+	}
52
+
53
+
54
+	protected function _set_admin_pages()
55
+	{
56
+		$this->admin_registered_pages = array( 'events_edit' => true );
57
+	}
58
+
59
+
60
+
61
+	protected function _set_data_handler()
62
+	{
63
+		$this->_data_handler = 'Gateways';
64
+	}
65
+
66
+
67
+
68
+	protected function _set_with_messengers()
69
+	{
70
+		$this->_with_messengers = array(
71
+			'html' => array( 'pdf' )
72
+		);
73
+	}
74
+
75
+
76
+
77
+	protected function _get_data_for_context($context, EE_Registration $registration, $id)
78
+	{
79
+		// receipt message type data handler is 'Gateways' and it expects a transaction object.
80
+		$transaction = $registration->transaction();
81
+		if ($transaction instanceof EE_Transaction) {
82
+			return array( $transaction );
83
+		}
84
+		return array();
85
+	}
86
+
87
+
88
+
89
+	protected function _set_admin_settings_fields()
90
+	{
91
+		$this->_admin_settings_fields = array();
92
+	}
93
+
94
+
95
+
96
+	protected function _set_contexts()
97
+	{
98
+		$this->_context_label = array(
99
+			'label' => __('recipient', 'event_espresso'),
100
+			'plural' => __('recipients', 'event_espresso'),
101
+			'description' => __('Recipient\'s are who will view the receipt.', 'event_espresso')
102
+		);
103
+
104
+		$this->_contexts = array(
105
+			'purchaser' => array(
106
+				'label' => __('Purchaser', 'event_espresso'),
107
+				'description' => __('This template goes to the person who conducted the transaction.', 'event_espresso')
108
+			)
109
+		);
110
+	}
111
+
112
+
113
+
114
+
115
+	/**
116
+	 * used to set the valid shortcodes for the receipt message type
117
+	 *
118
+	 * @since   4.5.0
119
+	 *
120
+	 * @return  void
121
+	 */
122
+	protected function _set_valid_shortcodes()
123
+	{
124
+		$this->_valid_shortcodes['purchaser'] = array(
125
+			'attendee_list',
126
+			'attendee',
127
+			'datetime_list',
128
+			'datetime',
129
+			'event_list',
130
+			'event',
131
+			'event_meta',
132
+			'messenger',
133
+			'organization',
134
+			'primary_registration_list',
135
+			'primary_registration_details',
136
+			'ticket_list',
137
+			'ticket',
138
+			'transaction',
139
+			'venue',
140
+			'line_item_list',
141
+			'payment_list',
142
+			'line_item',
143
+			'payment'
144
+		);
145
+	}
146
+
147 147
 
148 148
 
149 149
 
150
-    protected function _purchaser_addressees()
151
-    {
152
-        return parent::_primary_attendee_addressees();
153
-    }
150
+	protected function _purchaser_addressees()
151
+	{
152
+		return parent::_primary_attendee_addressees();
153
+	}
154 154
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     protected function _set_admin_pages()
55 55
     {
56
-        $this->admin_registered_pages = array( 'events_edit' => true );
56
+        $this->admin_registered_pages = array('events_edit' => true);
57 57
     }
58 58
 
59 59
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     protected function _set_with_messengers()
69 69
     {
70 70
         $this->_with_messengers = array(
71
-            'html' => array( 'pdf' )
71
+            'html' => array('pdf')
72 72
         );
73 73
     }
74 74
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         // receipt message type data handler is 'Gateways' and it expects a transaction object.
80 80
         $transaction = $registration->transaction();
81 81
         if ($transaction instanceof EE_Transaction) {
82
-            return array( $transaction );
82
+            return array($transaction);
83 83
         }
84 84
         return array();
85 85
     }
Please login to merge, or discard this patch.
libraries/messages/message_type/EE_Pending_Approval_message_type.class.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -14,59 +14,59 @@
 block discarded – undo
14 14
 class EE_Pending_Approval_message_type extends EE_Registration_Base_message_type
15 15
 {
16 16
 
17
-    public function __construct()
18
-    {
19
-        $this->name = 'pending_approval';
20
-        $this->description = __('This message type is used for recipients who have Pending Payment registration status.', 'event_espresso');
21
-        $this->label = array(
22
-            'singular' => __('registration pending payment', 'event_espresso'),
23
-            'plural' => __('registrations pending payment', 'event_espresso')
24
-            );
17
+	public function __construct()
18
+	{
19
+		$this->name = 'pending_approval';
20
+		$this->description = __('This message type is used for recipients who have Pending Payment registration status.', 'event_espresso');
21
+		$this->label = array(
22
+			'singular' => __('registration pending payment', 'event_espresso'),
23
+			'plural' => __('registrations pending payment', 'event_espresso')
24
+			);
25 25
 
26
-        $this->_master_templates = array(
27
-            'email' => 'registration'
28
-            );
26
+		$this->_master_templates = array(
27
+			'email' => 'registration'
28
+			);
29 29
 
30
-        parent::__construct();
31
-    }
30
+		parent::__construct();
31
+	}
32 32
 
33 33
 
34 34
 
35
-    /**
36
-     * _set_contexts
37
-     * This sets up the contexts associated with the message_type
38
-     *
39
-     * @access  protected
40
-     * @return  void
41
-     */
42
-    protected function _set_contexts()
43
-    {
44
-        $this->_context_label = array(
45
-            'label' => __('recipient', 'event_espresso'),
46
-            'plural' => __('recipients', 'event_espresso'),
47
-            'description' => __('Recipient\'s are who will receive the template.  You may want different pending approval details sent out depending on who the recipient is.  To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso')
48
-            );
35
+	/**
36
+	 * _set_contexts
37
+	 * This sets up the contexts associated with the message_type
38
+	 *
39
+	 * @access  protected
40
+	 * @return  void
41
+	 */
42
+	protected function _set_contexts()
43
+	{
44
+		$this->_context_label = array(
45
+			'label' => __('recipient', 'event_espresso'),
46
+			'plural' => __('recipients', 'event_espresso'),
47
+			'description' => __('Recipient\'s are who will receive the template.  You may want different pending approval details sent out depending on who the recipient is.  To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso')
48
+			);
49 49
 
50
-        $this->_contexts = array(
51
-            'admin' => array(
52
-                'label' => __('Event Admin', 'event_espresso'),
53
-                'description' => __('This template is what event administrators will receive when a message is sent to registrants with the pending payment registration status.', 'event_espresso')
54
-                ),
55
-            'primary_attendee' => array(
56
-                'label' => __('Primary Registrant', 'event_espresso'),
57
-                'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive on when their registration status is pending payment.', 'event_espresso')
58
-                )
59
-            );
60
-    }
50
+		$this->_contexts = array(
51
+			'admin' => array(
52
+				'label' => __('Event Admin', 'event_espresso'),
53
+				'description' => __('This template is what event administrators will receive when a message is sent to registrants with the pending payment registration status.', 'event_espresso')
54
+				),
55
+			'primary_attendee' => array(
56
+				'label' => __('Primary Registrant', 'event_espresso'),
57
+				'description' => __('This template is what the primary registrant (the person who completed the initial transaction) will receive on when their registration status is pending payment.', 'event_espresso')
58
+				)
59
+			);
60
+	}
61 61
 
62 62
 
63 63
 
64
-    protected function _primary_attendee_addressees()
65
-    {
66
-        $cached = $this->_single_message;
67
-        $this->_single_message = false;
68
-        $addressees = parent::_primary_attendee_addressees();
69
-        $this->_single_message = $cached;
70
-        return $addressees;
71
-    }
64
+	protected function _primary_attendee_addressees()
65
+	{
66
+		$cached = $this->_single_message;
67
+		$this->_single_message = false;
68
+		$addressees = parent::_primary_attendee_addressees();
69
+		$this->_single_message = $cached;
70
+		return $addressees;
71
+	}
72 72
 }
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_To_Generate_From_Queue.php 2 patches
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -13,75 +13,75 @@
 block discarded – undo
13 13
 {
14 14
 
15 15
 
16
-    /**
17
-     * Will hold an EE_Messages_Queue object
18
-     * @type EE_Messages_Queue
19
-     */
20
-    public $queue = array();
16
+	/**
17
+	 * Will hold an EE_Messages_Queue object
18
+	 * @type EE_Messages_Queue
19
+	 */
20
+	public $queue = array();
21 21
 
22
-    /**
23
-     * @param string            $messenger_name  The messenger being used to send the message
24
-     * @param string            $message_type_name  The message type being used to grab variations etc.
25
-     * @param EE_Messages_Queue $queue
26
-     * @param string            $custom_subject  Used if a custom subject is desired for the generated aggregate EE_Message object
27
-     */
28
-    public function __construct($messenger_name, $message_type_name, EE_Messages_Queue $queue, $custom_subject = '')
29
-    {
30
-        $this->queue = $queue;
31
-        parent::__construct($messenger_name, $message_type_name, array(), '', false, EEM_Message::status_idle);
32
-        if ($this->valid()) {
33
-            $this->_message->set_content($this->_get_content());
34
-            $this->_message->set_subject($this->_get_subject($custom_subject));
35
-        }
36
-    }
22
+	/**
23
+	 * @param string            $messenger_name  The messenger being used to send the message
24
+	 * @param string            $message_type_name  The message type being used to grab variations etc.
25
+	 * @param EE_Messages_Queue $queue
26
+	 * @param string            $custom_subject  Used if a custom subject is desired for the generated aggregate EE_Message object
27
+	 */
28
+	public function __construct($messenger_name, $message_type_name, EE_Messages_Queue $queue, $custom_subject = '')
29
+	{
30
+		$this->queue = $queue;
31
+		parent::__construct($messenger_name, $message_type_name, array(), '', false, EEM_Message::status_idle);
32
+		if ($this->valid()) {
33
+			$this->_message->set_content($this->_get_content());
34
+			$this->_message->set_subject($this->_get_subject($custom_subject));
35
+		}
36
+	}
37 37
 
38 38
 
39 39
 
40
-    /**
41
-     * Uses the EE_Messages_Queue currently set on this object to generate the content
42
-     * for the single EE_Message aggregate object returned by get_EE_Message
43
-     * @return string;
44
-     */
45
-    protected function _get_content()
46
-    {
47
-        $content = '';
48
-        $this->queue->get_message_repository()->rewind();
49
-        while ($this->queue->get_message_repository()->valid()) {
50
-            $content .= $this->queue->get_message_repository()->current()->content();
51
-            $this->queue->get_message_repository()->next();
52
-        }
53
-        return $content;
54
-    }
40
+	/**
41
+	 * Uses the EE_Messages_Queue currently set on this object to generate the content
42
+	 * for the single EE_Message aggregate object returned by get_EE_Message
43
+	 * @return string;
44
+	 */
45
+	protected function _get_content()
46
+	{
47
+		$content = '';
48
+		$this->queue->get_message_repository()->rewind();
49
+		while ($this->queue->get_message_repository()->valid()) {
50
+			$content .= $this->queue->get_message_repository()->current()->content();
51
+			$this->queue->get_message_repository()->next();
52
+		}
53
+		return $content;
54
+	}
55 55
 
56 56
 
57
-    /**
58
-     * Return a subject string to use for `MSG_Subject` in the aggregate EE_Message object.
59
-     * @param string $custom_subject
60
-     *
61
-     * @return string
62
-     */
63
-    protected function _get_subject($custom_subject = '')
64
-    {
65
-        if (! empty($custom_subject)) {
66
-            return $custom_subject;
67
-        }
68
-        $this->queue->get_message_repository()->rewind();
69
-        $count_of_items = $this->queue->get_message_repository()->count();
57
+	/**
58
+	 * Return a subject string to use for `MSG_Subject` in the aggregate EE_Message object.
59
+	 * @param string $custom_subject
60
+	 *
61
+	 * @return string
62
+	 */
63
+	protected function _get_subject($custom_subject = '')
64
+	{
65
+		if (! empty($custom_subject)) {
66
+			return $custom_subject;
67
+		}
68
+		$this->queue->get_message_repository()->rewind();
69
+		$count_of_items = $this->queue->get_message_repository()->count();
70 70
 
71
-        // if $count of items in queue == 1, then let's just return the subject for that item.
72
-        if ($count_of_items === 1) {
73
-            return $this->queue->get_message_repository()->current()->subject();
74
-        }
75
-        // phpcs:disable WordPress.WP.I18n.MissingSingularPlaceholder
76
-        return sprintf(
77
-            _n(
78
-                'Showing Aggregate output for 1 result',
79
-                'Showing Aggregate output for %d items',
80
-                $count_of_items,
81
-                'event_espresso'
82
-            ),
83
-            $count_of_items
84
-        );
85
-        // phpcs:enable
86
-    }
71
+		// if $count of items in queue == 1, then let's just return the subject for that item.
72
+		if ($count_of_items === 1) {
73
+			return $this->queue->get_message_repository()->current()->subject();
74
+		}
75
+		// phpcs:disable WordPress.WP.I18n.MissingSingularPlaceholder
76
+		return sprintf(
77
+			_n(
78
+				'Showing Aggregate output for 1 result',
79
+				'Showing Aggregate output for %d items',
80
+				$count_of_items,
81
+				'event_espresso'
82
+			),
83
+			$count_of_items
84
+		);
85
+		// phpcs:enable
86
+	}
87 87
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      */
63 63
     protected function _get_subject($custom_subject = '')
64 64
     {
65
-        if (! empty($custom_subject)) {
65
+        if ( ! empty($custom_subject)) {
66 66
             return $custom_subject;
67 67
         }
68 68
         $this->queue->get_message_repository()->rewind();
Please login to merge, or discard this patch.