Completed
Branch ADMIN-REFRESH (dc190e)
by
unknown
06:15 queued 03:47
created
messages/message_type/newsletter/EE_Newsletter_message_type.class.php 2 patches
Indentation   +190 added lines, -190 removed lines patch added patch discarded remove patch
@@ -13,194 +13,194 @@
 block discarded – undo
13 13
 class EE_Newsletter_message_type extends EE_message_type
14 14
 {
15 15
 
16
-    public function __construct()
17
-    {
18
-        $this->name = 'newsletter';
19
-        $this->description = esc_html__(
20
-            'Batch message type messages are triggered manually by the admin for sending notifications to a selected group of recipients. This should only be used for more general notification type messages that contain information specific for the recipients. For "newsletter" type messages we recommend using an email list service like MailChimp, because sending non-related mail-outs to contacts increases the risk of your site domain getting added to spam lists, which will prevent messages getting to users.',
21
-            'event_espresso'
22
-        );
23
-        $this->label = array(
24
-            'singular' => esc_html__('batch', 'event_espresso'),
25
-            'plural'   => esc_html__('batches', 'event_espresso'),
26
-        );
27
-        $this->_master_templates = array(
28
-            'email' => 'registration',
29
-        );
30
-
31
-        parent::__construct();
32
-    }
33
-
34
-
35
-    /**
36
-     * Sets admin_registered_pages property
37
-     */
38
-    protected function _set_admin_pages()
39
-    {
40
-        $this->admin_registered_pages = array(); // no admin pages to register this with.
41
-    }
42
-
43
-
44
-    /**
45
-     * Sets property related to data handler.
46
-     */
47
-    protected function _set_data_handler()
48
-    {
49
-        $this->_data_handler = 'Registrations';
50
-        $this->_single_message = $this->_data instanceof EE_Registration;
51
-    }
52
-
53
-
54
-    /**
55
-     * Returns the data for the given context for this message type.
56
-     * @param string          $context
57
-     * @param EE_Registration $registration
58
-     * @param int             $id
59
-     * @return array|mixed
60
-     */
61
-    protected function _get_data_for_context($context, EE_Registration $registration, $id)
62
-    {
63
-        // newsletter message type data handler is 'Registrations' and it expects an array of EE_Registration objects.
64
-        return array($registration);
65
-    }
66
-
67
-
68
-    /**
69
-     * Sets the admin settings fields property for this message type.
70
-     */
71
-    protected function _set_admin_settings_fields()
72
-    {
73
-        $this->_admin_settings_fields = array();
74
-    }
75
-
76
-
77
-    /**
78
-     * Sets the contexts for this message type.
79
-     */
80
-    protected function _set_contexts()
81
-    {
82
-        $this->_context_label = array(
83
-            'label'       => esc_html__('recipient', 'event_espresso'),
84
-            'plural'      => esc_html__('recipients', 'event_espresso'),
85
-            'description' => esc_html__('Recipient\'s are who will receive the message.', 'event_espresso'),
86
-        );
87
-
88
-        $this->_contexts = array(
89
-            'attendee' => array(
90
-                'label'       => esc_html__('Registrant', 'event_espresso'),
91
-                'description' => esc_html__('This template goes to selected registrants.', 'event_espresso'),
92
-            ),
93
-        );
94
-    }
95
-
96
-
97
-    /**
98
-     * used to set the valid shortcodes.
99
-     * For the newsletter message type we only have two valid shortcode libraries in use, recipient details and
100
-     * organization.  That's it!
101
-     *
102
-     * @since   4.3.0
103
-     * @return  void
104
-     */
105
-    protected function _set_valid_shortcodes()
106
-    {
107
-        parent::_set_valid_shortcodes();
108
-
109
-        $included_shortcodes = array(
110
-            'recipient_details',
111
-            'organization',
112
-            'newsletter',
113
-        );
114
-
115
-        foreach ($this->_valid_shortcodes as $context => $shortcodes) {
116
-            foreach ($shortcodes as $key => $shortcode) {
117
-                if (! in_array($shortcode, $included_shortcodes, true)) {
118
-                    unset($this->_valid_shortcodes[ $context ][ $key ]);
119
-                }
120
-            }
121
-            $this->_valid_shortcodes[ $context ][] = 'newsletter';
122
-        }
123
-    }
124
-
125
-
126
-    /**
127
-     * Override default _attendee_addressees in EE_message_type because we want to loop through the registrations
128
-     * for EE_message_type.
129
-     *
130
-     * @return array
131
-     * @throws EE_Error
132
-     * @throws InvalidArgumentException
133
-     * @throws ReflectionException
134
-     * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
135
-     * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
136
-     */
137
-    protected function _attendee_addressees()
138
-    {
139
-        $addressee = array();
140
-
141
-        // looping through registrations
142
-        foreach ($this->_data->registrations as $reg_id => $details) {
143
-            // set $attendee array to blank on each loop
144
-            $aee = array();
145
-
146
-            // need to get the attendee from this registration.
147
-            $attendee = isset($details['att_obj']) && $details['att_obj'] instanceof EE_Attendee
148
-                ? $details['att_obj']
149
-                : null;
150
-
151
-            if (! $attendee instanceof EE_Attendee) {
152
-                continue;
153
-            }
154
-
155
-            // set $aee from attendee object
156
-            $aee['att_obj'] = $attendee;
157
-            $aee['reg_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['reg_objs'])
158
-                ? $this->_data->attendees[ $attendee->ID() ]['reg_objs']
159
-                : array();
160
-            $aee['attendee_email'] = $attendee->email();
161
-            $aee['tkt_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['tkt_objs'])
162
-                ? $this->_data->attendees[ $attendee->ID() ]['tkt_objs']
163
-                : array();
164
-
165
-            if (isset($this->_data->attendees[ $attendee->ID() ]['evt_objs'])) {
166
-                $aee['evt_objs'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
167
-                $aee['events'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
168
-            } else {
169
-                $aee['evt_objs'] = $aee['events'] = array();
170
-            }
171
-
172
-            $aee['reg_obj'] = isset($details['reg_obj'])
173
-                ? $details['reg_obj']
174
-                : null;
175
-            $aee['attendees'] = $this->_data->attendees;
176
-
177
-            // merge in the primary attendee data
178
-            $aee = array_merge($this->_default_addressee_data, $aee);
179
-
180
-            // make sure txn is set
181
-            if (empty($aee['txn']) && $aee['reg_obj'] instanceof EE_Registration) {
182
-                $aee['txn'] = $aee['reg_obj']->transaction();
183
-            }
184
-
185
-            $addressee[] = new EE_Messages_Addressee($aee);
186
-        }
187
-        return $addressee;
188
-    }
189
-
190
-    /**
191
-     * Allows a message type to specifically exclude template fields for the provided messenger.
192
-     * Filtered so this can be programmatically altered as well.
193
-     *
194
-     * @param string $messenger_name name of messenger
195
-     * @return array
196
-     */
197
-    public function excludedFieldsForMessenger($messenger_name)
198
-    {
199
-        $excluded_fields = array(
200
-            'email' => array('cc')
201
-        );
202
-        return isset($excluded_fields[ $messenger_name ])
203
-            ? $excluded_fields[ $messenger_name ]
204
-            : parent::excludedFieldsForMessenger($messenger_name);
205
-    }
16
+	public function __construct()
17
+	{
18
+		$this->name = 'newsletter';
19
+		$this->description = esc_html__(
20
+			'Batch message type messages are triggered manually by the admin for sending notifications to a selected group of recipients. This should only be used for more general notification type messages that contain information specific for the recipients. For "newsletter" type messages we recommend using an email list service like MailChimp, because sending non-related mail-outs to contacts increases the risk of your site domain getting added to spam lists, which will prevent messages getting to users.',
21
+			'event_espresso'
22
+		);
23
+		$this->label = array(
24
+			'singular' => esc_html__('batch', 'event_espresso'),
25
+			'plural'   => esc_html__('batches', 'event_espresso'),
26
+		);
27
+		$this->_master_templates = array(
28
+			'email' => 'registration',
29
+		);
30
+
31
+		parent::__construct();
32
+	}
33
+
34
+
35
+	/**
36
+	 * Sets admin_registered_pages property
37
+	 */
38
+	protected function _set_admin_pages()
39
+	{
40
+		$this->admin_registered_pages = array(); // no admin pages to register this with.
41
+	}
42
+
43
+
44
+	/**
45
+	 * Sets property related to data handler.
46
+	 */
47
+	protected function _set_data_handler()
48
+	{
49
+		$this->_data_handler = 'Registrations';
50
+		$this->_single_message = $this->_data instanceof EE_Registration;
51
+	}
52
+
53
+
54
+	/**
55
+	 * Returns the data for the given context for this message type.
56
+	 * @param string          $context
57
+	 * @param EE_Registration $registration
58
+	 * @param int             $id
59
+	 * @return array|mixed
60
+	 */
61
+	protected function _get_data_for_context($context, EE_Registration $registration, $id)
62
+	{
63
+		// newsletter message type data handler is 'Registrations' and it expects an array of EE_Registration objects.
64
+		return array($registration);
65
+	}
66
+
67
+
68
+	/**
69
+	 * Sets the admin settings fields property for this message type.
70
+	 */
71
+	protected function _set_admin_settings_fields()
72
+	{
73
+		$this->_admin_settings_fields = array();
74
+	}
75
+
76
+
77
+	/**
78
+	 * Sets the contexts for this message type.
79
+	 */
80
+	protected function _set_contexts()
81
+	{
82
+		$this->_context_label = array(
83
+			'label'       => esc_html__('recipient', 'event_espresso'),
84
+			'plural'      => esc_html__('recipients', 'event_espresso'),
85
+			'description' => esc_html__('Recipient\'s are who will receive the message.', 'event_espresso'),
86
+		);
87
+
88
+		$this->_contexts = array(
89
+			'attendee' => array(
90
+				'label'       => esc_html__('Registrant', 'event_espresso'),
91
+				'description' => esc_html__('This template goes to selected registrants.', 'event_espresso'),
92
+			),
93
+		);
94
+	}
95
+
96
+
97
+	/**
98
+	 * used to set the valid shortcodes.
99
+	 * For the newsletter message type we only have two valid shortcode libraries in use, recipient details and
100
+	 * organization.  That's it!
101
+	 *
102
+	 * @since   4.3.0
103
+	 * @return  void
104
+	 */
105
+	protected function _set_valid_shortcodes()
106
+	{
107
+		parent::_set_valid_shortcodes();
108
+
109
+		$included_shortcodes = array(
110
+			'recipient_details',
111
+			'organization',
112
+			'newsletter',
113
+		);
114
+
115
+		foreach ($this->_valid_shortcodes as $context => $shortcodes) {
116
+			foreach ($shortcodes as $key => $shortcode) {
117
+				if (! in_array($shortcode, $included_shortcodes, true)) {
118
+					unset($this->_valid_shortcodes[ $context ][ $key ]);
119
+				}
120
+			}
121
+			$this->_valid_shortcodes[ $context ][] = 'newsletter';
122
+		}
123
+	}
124
+
125
+
126
+	/**
127
+	 * Override default _attendee_addressees in EE_message_type because we want to loop through the registrations
128
+	 * for EE_message_type.
129
+	 *
130
+	 * @return array
131
+	 * @throws EE_Error
132
+	 * @throws InvalidArgumentException
133
+	 * @throws ReflectionException
134
+	 * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
135
+	 * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
136
+	 */
137
+	protected function _attendee_addressees()
138
+	{
139
+		$addressee = array();
140
+
141
+		// looping through registrations
142
+		foreach ($this->_data->registrations as $reg_id => $details) {
143
+			// set $attendee array to blank on each loop
144
+			$aee = array();
145
+
146
+			// need to get the attendee from this registration.
147
+			$attendee = isset($details['att_obj']) && $details['att_obj'] instanceof EE_Attendee
148
+				? $details['att_obj']
149
+				: null;
150
+
151
+			if (! $attendee instanceof EE_Attendee) {
152
+				continue;
153
+			}
154
+
155
+			// set $aee from attendee object
156
+			$aee['att_obj'] = $attendee;
157
+			$aee['reg_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['reg_objs'])
158
+				? $this->_data->attendees[ $attendee->ID() ]['reg_objs']
159
+				: array();
160
+			$aee['attendee_email'] = $attendee->email();
161
+			$aee['tkt_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['tkt_objs'])
162
+				? $this->_data->attendees[ $attendee->ID() ]['tkt_objs']
163
+				: array();
164
+
165
+			if (isset($this->_data->attendees[ $attendee->ID() ]['evt_objs'])) {
166
+				$aee['evt_objs'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
167
+				$aee['events'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
168
+			} else {
169
+				$aee['evt_objs'] = $aee['events'] = array();
170
+			}
171
+
172
+			$aee['reg_obj'] = isset($details['reg_obj'])
173
+				? $details['reg_obj']
174
+				: null;
175
+			$aee['attendees'] = $this->_data->attendees;
176
+
177
+			// merge in the primary attendee data
178
+			$aee = array_merge($this->_default_addressee_data, $aee);
179
+
180
+			// make sure txn is set
181
+			if (empty($aee['txn']) && $aee['reg_obj'] instanceof EE_Registration) {
182
+				$aee['txn'] = $aee['reg_obj']->transaction();
183
+			}
184
+
185
+			$addressee[] = new EE_Messages_Addressee($aee);
186
+		}
187
+		return $addressee;
188
+	}
189
+
190
+	/**
191
+	 * Allows a message type to specifically exclude template fields for the provided messenger.
192
+	 * Filtered so this can be programmatically altered as well.
193
+	 *
194
+	 * @param string $messenger_name name of messenger
195
+	 * @return array
196
+	 */
197
+	public function excludedFieldsForMessenger($messenger_name)
198
+	{
199
+		$excluded_fields = array(
200
+			'email' => array('cc')
201
+		);
202
+		return isset($excluded_fields[ $messenger_name ])
203
+			? $excluded_fields[ $messenger_name ]
204
+			: parent::excludedFieldsForMessenger($messenger_name);
205
+	}
206 206
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
 
115 115
         foreach ($this->_valid_shortcodes as $context => $shortcodes) {
116 116
             foreach ($shortcodes as $key => $shortcode) {
117
-                if (! in_array($shortcode, $included_shortcodes, true)) {
118
-                    unset($this->_valid_shortcodes[ $context ][ $key ]);
117
+                if ( ! in_array($shortcode, $included_shortcodes, true)) {
118
+                    unset($this->_valid_shortcodes[$context][$key]);
119 119
                 }
120 120
             }
121
-            $this->_valid_shortcodes[ $context ][] = 'newsletter';
121
+            $this->_valid_shortcodes[$context][] = 'newsletter';
122 122
         }
123 123
     }
124 124
 
@@ -148,23 +148,23 @@  discard block
 block discarded – undo
148 148
                 ? $details['att_obj']
149 149
                 : null;
150 150
 
151
-            if (! $attendee instanceof EE_Attendee) {
151
+            if ( ! $attendee instanceof EE_Attendee) {
152 152
                 continue;
153 153
             }
154 154
 
155 155
             // set $aee from attendee object
156 156
             $aee['att_obj'] = $attendee;
157
-            $aee['reg_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['reg_objs'])
158
-                ? $this->_data->attendees[ $attendee->ID() ]['reg_objs']
157
+            $aee['reg_objs'] = isset($this->_data->attendees[$attendee->ID()]['reg_objs'])
158
+                ? $this->_data->attendees[$attendee->ID()]['reg_objs']
159 159
                 : array();
160 160
             $aee['attendee_email'] = $attendee->email();
161
-            $aee['tkt_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['tkt_objs'])
162
-                ? $this->_data->attendees[ $attendee->ID() ]['tkt_objs']
161
+            $aee['tkt_objs'] = isset($this->_data->attendees[$attendee->ID()]['tkt_objs'])
162
+                ? $this->_data->attendees[$attendee->ID()]['tkt_objs']
163 163
                 : array();
164 164
 
165
-            if (isset($this->_data->attendees[ $attendee->ID() ]['evt_objs'])) {
166
-                $aee['evt_objs'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
167
-                $aee['events'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
165
+            if (isset($this->_data->attendees[$attendee->ID()]['evt_objs'])) {
166
+                $aee['evt_objs'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
167
+                $aee['events'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
168 168
             } else {
169 169
                 $aee['evt_objs'] = $aee['events'] = array();
170 170
             }
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
         $excluded_fields = array(
200 200
             'email' => array('cc')
201 201
         );
202
-        return isset($excluded_fields[ $messenger_name ])
203
-            ? $excluded_fields[ $messenger_name ]
202
+        return isset($excluded_fields[$messenger_name])
203
+            ? $excluded_fields[$messenger_name]
204 204
             : parent::excludedFieldsForMessenger($messenger_name);
205 205
     }
206 206
 }
Please login to merge, or discard this patch.
payment_failed/EE_Messages_Email_Payment_Failed_Validator.class.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -16,37 +16,37 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    public function __construct($fields, $context)
20
-    {
21
-        $this->_m_name = 'email';
22
-        $this->_mt_name = 'payment_failed';
23
-
24
-        parent::__construct($fields, $context);
25
-    }
26
-
27
-    /**
28
-     * at this point no custom validation needed for this messenger/message_type combo.
29
-     */
30
-    protected function _modify_validator()
31
-    {
32
-        $new_config = $this->_messenger->get_validator_config();
33
-
34
-        // modify just event_list
35
-        $new_config['event_list'] = array(
36
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
37
-            );
38
-        $new_config['ticket_list'] = array(
39
-            'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
40
-            );
41
-        $new_config['content'] = array(
42
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
43
-            );
44
-        $this->_messenger->set_validator_config($new_config);
45
-
46
-        if ($this->_context != 'admin') {
47
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
48
-        }
49
-
50
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
51
-    }
19
+	public function __construct($fields, $context)
20
+	{
21
+		$this->_m_name = 'email';
22
+		$this->_mt_name = 'payment_failed';
23
+
24
+		parent::__construct($fields, $context);
25
+	}
26
+
27
+	/**
28
+	 * at this point no custom validation needed for this messenger/message_type combo.
29
+	 */
30
+	protected function _modify_validator()
31
+	{
32
+		$new_config = $this->_messenger->get_validator_config();
33
+
34
+		// modify just event_list
35
+		$new_config['event_list'] = array(
36
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
37
+			);
38
+		$new_config['ticket_list'] = array(
39
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
40
+			);
41
+		$new_config['content'] = array(
42
+			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
43
+			);
44
+		$this->_messenger->set_validator_config($new_config);
45
+
46
+		if ($this->_context != 'admin') {
47
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
48
+		}
49
+
50
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
51
+	}
52 52
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
 
33 33
         // modify just event_list
34 34
         $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
35
+            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36 36
             );
37 37
         $new_config['ticket_list'] = array(
38 38
             'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39 39
             );
40 40
         $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
41
+            'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42 42
             );
43 43
         $this->_messenger->set_validator_config($new_config);
44 44
 
45 45
         if ($this->_context != 'admin') {
46
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
46
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47 47
         }
48 48
 
49 49
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
cancelled_registration/EE_Cancelled_Registration_message_type.class.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@
 block discarded – undo
67 67
 
68 68
         // remove unwanted transaction shortcode
69 69
         foreach ($this->_valid_shortcodes as $context => $shortcodes) {
70
-            if (($key = array_search('transaction', $shortcodes) ) !== false) {
71
-                unset($this->_valid_shortcodes[ $context ][ $key ]);
70
+            if (($key = array_search('transaction', $shortcodes)) !== false) {
71
+                unset($this->_valid_shortcodes[$context][$key]);
72 72
             }
73 73
         }
74 74
     }
Please login to merge, or discard this patch.
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -15,61 +15,61 @@
 block discarded – undo
15 15
 class EE_Cancelled_Registration_message_type extends EE_Registration_Base_message_type
16 16
 {
17 17
 
18
-    public function __construct()
19
-    {
20
-        $this->name = 'cancelled_registration';
21
-        $this->description = esc_html__('This message type is for messages sent to registrants when their registration is cancelled.', 'event_espresso');
22
-        $this->label = array(
23
-            'singular' => esc_html__('registration cancelled', 'event_espresso'),
24
-            'plural' => esc_html__('registrations cancelled', 'event_espresso')
25
-            );
26
-        $this->_master_templates = array(
27
-            'email' => 'not_approved_registration'
28
-            );
29
-        parent::__construct();
30
-    }
18
+	public function __construct()
19
+	{
20
+		$this->name = 'cancelled_registration';
21
+		$this->description = esc_html__('This message type is for messages sent to registrants when their registration is cancelled.', 'event_espresso');
22
+		$this->label = array(
23
+			'singular' => esc_html__('registration cancelled', 'event_espresso'),
24
+			'plural' => esc_html__('registrations cancelled', 'event_espresso')
25
+			);
26
+		$this->_master_templates = array(
27
+			'email' => 'not_approved_registration'
28
+			);
29
+		parent::__construct();
30
+	}
31 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' => esc_html__('recipient', 'event_espresso'),
46
-            'plural' => esc_html__('recipients', 'event_espresso'),
47
-            'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', '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' => esc_html__('recipient', 'event_espresso'),
46
+			'plural' => esc_html__('recipients', 'event_espresso'),
47
+			'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', 'event_espresso')
48
+			);
49 49
 
50
-        $this->_contexts = array(
51
-            'admin' => array(
52
-                'label' => esc_html__('Event Admin', 'event_espresso'),
53
-                'description' => esc_html__('This template is what event administrators will receive with an cancelled registration', 'event_espresso')
54
-                ),
55
-            'attendee' => array(
56
-                'label' => esc_html__('Registrant', 'event_espresso'),
57
-                'description' => esc_html__('This template is what each registrant for the event will receive when their registration is cancelled.', 'event_espresso')
58
-                )
59
-            );
60
-    }
50
+		$this->_contexts = array(
51
+			'admin' => array(
52
+				'label' => esc_html__('Event Admin', 'event_espresso'),
53
+				'description' => esc_html__('This template is what event administrators will receive with an cancelled registration', 'event_espresso')
54
+				),
55
+			'attendee' => array(
56
+				'label' => esc_html__('Registrant', 'event_espresso'),
57
+				'description' => esc_html__('This template is what each registrant for the event will receive when their registration is cancelled.', 'event_espresso')
58
+				)
59
+			);
60
+	}
61 61
 
62 62
 
63 63
 
64
-    protected function _set_valid_shortcodes()
65
-    {
66
-        parent::_set_valid_shortcodes();
64
+	protected function _set_valid_shortcodes()
65
+	{
66
+		parent::_set_valid_shortcodes();
67 67
 
68
-        // remove unwanted transaction shortcode
69
-        foreach ($this->_valid_shortcodes as $context => $shortcodes) {
70
-            if (($key = array_search('transaction', $shortcodes) ) !== false) {
71
-                unset($this->_valid_shortcodes[ $context ][ $key ]);
72
-            }
73
-        }
74
-    }
68
+		// remove unwanted transaction shortcode
69
+		foreach ($this->_valid_shortcodes as $context => $shortcodes) {
70
+			if (($key = array_search('transaction', $shortcodes) ) !== false) {
71
+				unset($this->_valid_shortcodes[ $context ][ $key ]);
72
+			}
73
+		}
74
+	}
75 75
 }
Please login to merge, or discard this patch.
EE_Messages_Email_Cancelled_Registration_Validator.class.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -15,30 +15,30 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'cancelled_registration';
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'cancelled_registration';
22 22
 
23
-        parent::__construct($fields, $context);
24
-    }
23
+		parent::__construct($fields, $context);
24
+	}
25 25
 
26
-    /**
27
-     * custom validator (will override what was originally set by the message_type and messenger)
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-        $new_config['event_list'] = array(
33
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
34
-            'required' => array('[EVENT_LIST]')
35
-            );
36
-        $this->_messenger->set_validator_config($new_config);
26
+	/**
27
+	 * custom validator (will override what was originally set by the message_type and messenger)
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+		$new_config['event_list'] = array(
33
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
34
+			'required' => array('[EVENT_LIST]')
35
+			);
36
+		$this->_messenger->set_validator_config($new_config);
37 37
 
38
-        if ($this->_context != 'admin') {
39
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
40
-        }
38
+		if ($this->_context != 'admin') {
39
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
40
+		}
41 41
 
42
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
43
-    }
42
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
43
+	}
44 44
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->_messenger->set_validator_config($new_config);
39 39
 
40 40
         if ($this->_context != 'admin') {
41
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42 42
         }
43 43
 
44 44
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
payment_cancelled/EE_Messages_Email_Payment_Cancelled_Validator.class.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -16,37 +16,37 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    public function __construct($fields, $context)
20
-    {
21
-        $this->_m_name = 'email';
22
-        $this->_mt_name = 'payment_cancelled';
23
-
24
-        parent::__construct($fields, $context);
25
-    }
26
-
27
-    /**
28
-     * at this point no custom validation needed for this messenger/message_type combo.
29
-     */
30
-    protected function _modify_validator()
31
-    {
32
-        $new_config = $this->_messenger->get_validator_config();
33
-
34
-        // modify just event_list
35
-        $new_config['event_list'] = array(
36
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
37
-            );
38
-        $new_config['ticket_list'] = array(
39
-            'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
40
-            );
41
-        $new_config['content'] = array(
42
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
43
-            );
44
-        $this->_messenger->set_validator_config($new_config);
45
-
46
-        if ($this->_context != 'admin') {
47
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
48
-        }
49
-
50
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
51
-    }
19
+	public function __construct($fields, $context)
20
+	{
21
+		$this->_m_name = 'email';
22
+		$this->_mt_name = 'payment_cancelled';
23
+
24
+		parent::__construct($fields, $context);
25
+	}
26
+
27
+	/**
28
+	 * at this point no custom validation needed for this messenger/message_type combo.
29
+	 */
30
+	protected function _modify_validator()
31
+	{
32
+		$new_config = $this->_messenger->get_validator_config();
33
+
34
+		// modify just event_list
35
+		$new_config['event_list'] = array(
36
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
37
+			);
38
+		$new_config['ticket_list'] = array(
39
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
40
+			);
41
+		$new_config['content'] = array(
42
+			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
43
+			);
44
+		$this->_messenger->set_validator_config($new_config);
45
+
46
+		if ($this->_context != 'admin') {
47
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
48
+		}
49
+
50
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
51
+	}
52 52
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
 
33 33
         // modify just event_list
34 34
         $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
35
+            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36 36
             );
37 37
         $new_config['ticket_list'] = array(
38 38
             'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39 39
             );
40 40
         $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
41
+            'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42 42
             );
43 43
         $this->_messenger->set_validator_config($new_config);
44 44
 
45 45
         if ($this->_context != 'admin') {
46
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
46
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47 47
         }
48 48
 
49 49
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
EE_Messages_Email_Declined_Registration_Validator.class.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'declined_registration';
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'declined_registration';
22 22
 
23
-        parent::__construct($fields, $context);
24
-    }
23
+		parent::__construct($fields, $context);
24
+	}
25 25
 
26
-    /**
27
-     * custom validator (restricting what was originally set by the messenger)
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-        // modify just event_list
33
-        $new_config['event_list'] = array(
34
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
35
-            'required' => array('[EVENT_LIST]')
36
-            );
37
-        $this->_messenger->set_validator_config($new_config);
26
+	/**
27
+	 * custom validator (restricting what was originally set by the messenger)
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+		// modify just event_list
33
+		$new_config['event_list'] = array(
34
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
35
+			'required' => array('[EVENT_LIST]')
36
+			);
37
+		$this->_messenger->set_validator_config($new_config);
38 38
 
39
-        if ($this->_context != 'admin') {
40
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
-        }
39
+		if ($this->_context != 'admin') {
40
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+		}
42 42
 
43
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
44
-    }
43
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
44
+	}
45 45
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->_messenger->set_validator_config($new_config);
39 39
 
40 40
         if ($this->_context != 'admin') {
41
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42 42
         }
43 43
 
44 44
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
payment_reminder/EE_Messages_Email_Payment_Reminder_Validator.class.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -15,37 +15,37 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'payment_reminder';
22
-
23
-        parent::__construct($fields, $context);
24
-    }
25
-
26
-    /**
27
-     * at this point no custom validation needed for this messenger/message_type combo.
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-
33
-        // modify just event_list
34
-        $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36
-            );
37
-        $new_config['ticket_list'] = array(
38
-            'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39
-            );
40
-        $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42
-            );
43
-        $this->_messenger->set_validator_config($new_config);
44
-
45
-        if ($this->_context != 'admin') {
46
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47
-        }
48
-
49
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
50
-    }
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'payment_reminder';
22
+
23
+		parent::__construct($fields, $context);
24
+	}
25
+
26
+	/**
27
+	 * at this point no custom validation needed for this messenger/message_type combo.
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+
33
+		// modify just event_list
34
+		$new_config['event_list'] = array(
35
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36
+			);
37
+		$new_config['ticket_list'] = array(
38
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39
+			);
40
+		$new_config['content'] = array(
41
+			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42
+			);
43
+		$this->_messenger->set_validator_config($new_config);
44
+
45
+		if ($this->_context != 'admin') {
46
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47
+		}
48
+
49
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
50
+	}
51 51
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
 
33 33
         // modify just event_list
34 34
         $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
35
+            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36 36
             );
37 37
         $new_config['ticket_list'] = array(
38 38
             'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39 39
             );
40 40
         $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
41
+            'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42 42
             );
43 43
         $this->_messenger->set_validator_config($new_config);
44 44
 
45 45
         if ($this->_context != 'admin') {
46
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
46
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47 47
         }
48 48
 
49 49
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
caffeinated/core/libraries/shortcodes/EE_Question_Shortcodes.lib.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
     protected function _parser($shortcode)
50 50
     {
51 51
 
52
-        if (! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
52
+        if ( ! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
53 53
             return '';
54 54
         }
55 55
 
56 56
         switch ($shortcode) {
57 57
             case '[QUESTION]':
58
-                $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ])
59
-                    ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question();
60
-                if (! $question instanceof EE_Question) {
58
+                $question = isset($this->_extra_data['data']->questions[$this->_data->ID()])
59
+                    ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
60
+                if ( ! $question instanceof EE_Question) {
61 61
                     return ''; // get out because we can't figure out what the question is.
62 62
                 }
63 63
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
             case '[ANSWER]':
68 68
                 // need to get the question to determine the type of question (some questions require translation of the answer).
69
-                $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ])
70
-                    ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question();
71
-                if (! $question instanceof EE_Question) {
69
+                $question = isset($this->_extra_data['data']->questions[$this->_data->ID()])
70
+                    ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
71
+                if ( ! $question instanceof EE_Question) {
72 72
                     return ''; // get out cause we can't figure out what the question type is!
73 73
                 }
74 74
 
Please login to merge, or discard this patch.
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -19,85 +19,85 @@
 block discarded – undo
19 19
 {
20 20
 
21 21
 
22
-    /**
23
-     * _init_props
24
-     *
25
-     * @access protected
26
-     * @return void
27
-     */
28
-    protected function _init_props()
29
-    {
30
-        $this->label = esc_html__('Attendee Shortcodes', 'event_espresso');
31
-        $this->description = esc_html__('All shortcodes specific to attendee related data', 'event_espresso');
32
-        $this->_shortcodes = array(
33
-            '[QUESTION]' => esc_html__('Will parse to a question.', 'event_espresso'),
34
-            '[ANSWER]'   => esc_html__('Will parse to the answer for a question', 'event_espresso'),
35
-        );
36
-    }
22
+	/**
23
+	 * _init_props
24
+	 *
25
+	 * @access protected
26
+	 * @return void
27
+	 */
28
+	protected function _init_props()
29
+	{
30
+		$this->label = esc_html__('Attendee Shortcodes', 'event_espresso');
31
+		$this->description = esc_html__('All shortcodes specific to attendee related data', 'event_espresso');
32
+		$this->_shortcodes = array(
33
+			'[QUESTION]' => esc_html__('Will parse to a question.', 'event_espresso'),
34
+			'[ANSWER]'   => esc_html__('Will parse to the answer for a question', 'event_espresso'),
35
+		);
36
+	}
37 37
 
38 38
 
39
-    /**
40
-     * This method will give parsing instructions for each shortcode defined in the _shortcodes array.  Child methods
41
-     * will have to take care of handling.
42
-     *
43
-     * @access protected
44
-     *
45
-     * @param string $shortcode the shortcode to be parsed.
46
-     *
47
-     * @return string parsed shortcode
48
-     */
49
-    protected function _parser($shortcode)
50
-    {
39
+	/**
40
+	 * This method will give parsing instructions for each shortcode defined in the _shortcodes array.  Child methods
41
+	 * will have to take care of handling.
42
+	 *
43
+	 * @access protected
44
+	 *
45
+	 * @param string $shortcode the shortcode to be parsed.
46
+	 *
47
+	 * @return string parsed shortcode
48
+	 */
49
+	protected function _parser($shortcode)
50
+	{
51 51
 
52
-        if (! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
53
-            return '';
54
-        }
52
+		if (! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
53
+			return '';
54
+		}
55 55
 
56
-        switch ($shortcode) {
57
-            case '[QUESTION]':
58
-                $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ])
59
-                    ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question();
60
-                if (! $question instanceof EE_Question) {
61
-                    return ''; // get out because we can't figure out what the question is.
62
-                }
56
+		switch ($shortcode) {
57
+			case '[QUESTION]':
58
+				$question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ])
59
+					? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question();
60
+				if (! $question instanceof EE_Question) {
61
+					return ''; // get out because we can't figure out what the question is.
62
+				}
63 63
 
64
-                return $question->get('QST_display_text');
65
-                break;
64
+				return $question->get('QST_display_text');
65
+				break;
66 66
 
67
-            case '[ANSWER]':
68
-                // need to get the question to determine the type of question (some questions require translation of the answer).
69
-                $question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ])
70
-                    ? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question();
71
-                if (! $question instanceof EE_Question) {
72
-                    return ''; // get out cause we can't figure out what the question type is!
73
-                }
67
+			case '[ANSWER]':
68
+				// need to get the question to determine the type of question (some questions require translation of the answer).
69
+				$question = isset($this->_extra_data['data']->questions[ $this->_data->ID() ])
70
+					? $this->_extra_data['data']->questions[ $this->_data->ID() ] : $this->_data->question();
71
+				if (! $question instanceof EE_Question) {
72
+					return ''; // get out cause we can't figure out what the question type is!
73
+				}
74 74
 
75
-                // what we show for the answer depends on the question type!
76
-                switch ($question->get('QST_type')) {
77
-                    case 'STATE':
78
-                        $state = EEM_State::instance()->get_one_by_ID($this->_data->get('ANS_value'));
79
-                        $answer = $state instanceof EE_State ? $state->name() : '';
80
-                        break;
75
+				// what we show for the answer depends on the question type!
76
+				switch ($question->get('QST_type')) {
77
+					case 'STATE':
78
+						$state = EEM_State::instance()->get_one_by_ID($this->_data->get('ANS_value'));
79
+						$answer = $state instanceof EE_State ? $state->name() : '';
80
+						break;
81 81
 
82
-                    case 'COUNTRY':
83
-                        $country = EEM_Country::instance()->get_one_by_ID($this->_data->get('ANS_value'));
84
-                        $answer = $country instanceof EE_Country ? $country->name() : '';
85
-                        break;
82
+					case 'COUNTRY':
83
+						$country = EEM_Country::instance()->get_one_by_ID($this->_data->get('ANS_value'));
84
+						$answer = $country instanceof EE_Country ? $country->name() : '';
85
+						break;
86 86
 
87
-                    default:
88
-                        $answer = $this->_data->get_pretty('ANS_value', 'no_wpautop');
89
-                        break;
90
-                }
87
+					default:
88
+						$answer = $this->_data->get_pretty('ANS_value', 'no_wpautop');
89
+						break;
90
+				}
91 91
 
92
-                return apply_filters(
93
-                    'FHEE__EE_Question_Shortcodes___parser__answer',
94
-                    $answer,
95
-                    $question,
96
-                    $this->_data
97
-                );
98
-                break;
99
-        }
92
+				return apply_filters(
93
+					'FHEE__EE_Question_Shortcodes___parser__answer',
94
+					$answer,
95
+					$question,
96
+					$this->_data
97
+				);
98
+				break;
99
+		}
100 100
 
101
-        return '';
102
-    }
101
+		return '';
102
+	}
103 103
 }
Please login to merge, or discard this patch.
events_archive_caff/templates/admin-event-list-settings.template.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             </label>
51 51
         </th>
52 52
         <td>
53
-            <p><?php echo site_url() . '/ '
53
+            <p><?php echo site_url().'/ '
54 54
                           . EEH_Form_Fields::text(
55 55
                               'not_used',
56 56
                               EE_Registry::instance()->CFG->core->event_cpt_slug,
Please login to merge, or discard this patch.
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@  discard block
 block discarded – undo
2 2
 add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 
4 4
 $values = EEH_Form_Fields::prep_answer_options(
5
-    array(
6
-        array('id' => 1, 'text' => esc_html__('Yes', 'event_espresso')),
7
-        array('id' => 0, 'text' => esc_html__('No', 'event_espresso')),
8
-    )
5
+	array(
6
+		array('id' => 1, 'text' => esc_html__('Yes', 'event_espresso')),
7
+		array('id' => 0, 'text' => esc_html__('No', 'event_espresso')),
8
+	)
9 9
 );
10 10
 
11 11
 $description = EEH_Form_Fields::prep_answer_options(
12
-    array(
13
-        array('id' => 0, 'text' => esc_html__('none', 'event_espresso')),
14
-        array('id' => 1, 'text' => esc_html__('excerpt (short desc)', 'event_espresso')),
15
-        array('id' => 2, 'text' => esc_html__('full description', 'event_espresso')),
16
-    )
12
+	array(
13
+		array('id' => 0, 'text' => esc_html__('none', 'event_espresso')),
14
+		array('id' => 1, 'text' => esc_html__('excerpt (short desc)', 'event_espresso')),
15
+		array('id' => 2, 'text' => esc_html__('full description', 'event_espresso')),
16
+	)
17 17
 );
18 18
 
19 19
 ?>
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
         <th>
33 33
             <label for="event_listings_url">
34 34
                 <?php esc_html_e('Event Listings URL', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
35
-                    'event_listings_url_info'
36
-                ); ?>
35
+					'event_listings_url_info'
36
+				); ?>
37 37
             </label>
38 38
         </th>
39 39
         <td>
40 40
             <a id="event_listings_url" class="ee-admin-settings-lnk small-text"
41 41
                href="<?php echo EEH_Event_View::event_archive_url(); ?>"><?php
42
-                echo EEH_Event_View::event_archive_url(); ?></a>
42
+				echo EEH_Event_View::event_archive_url(); ?></a>
43 43
         </td>
44 44
     </tr>
45 45
 
@@ -51,30 +51,30 @@  discard block
 block discarded – undo
51 51
         </th>
52 52
         <td>
53 53
             <p><?php echo site_url() . '/ '
54
-                          . EEH_Form_Fields::text(
55
-                              'not_used',
56
-                              EE_Registry::instance()->CFG->core->event_cpt_slug,
57
-                              'event_cpt_slug',
58
-                              'event_cpt_slug',
59
-                              'regular'
60
-                          ); ?></p>
54
+						  . EEH_Form_Fields::text(
55
+							  'not_used',
56
+							  EE_Registry::instance()->CFG->core->event_cpt_slug,
57
+							  'event_cpt_slug',
58
+							  'event_cpt_slug',
59
+							  'regular'
60
+						  ); ?></p>
61 61
             <p class="description"><?php
62
-                esc_html_e(
63
-                    'This allows you to configure what slug is used for the url of all event pages.',
64
-                    'event_espresso'
65
-                ); ?></p>
62
+				esc_html_e(
63
+					'This allows you to configure what slug is used for the url of all event pages.',
64
+					'event_espresso'
65
+				); ?></p>
66 66
             <?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?>
67 67
                 <p class="important-notice">
68 68
                     <?php
69
-                    sprintf(
70
-                        esc_html__(
71
-                            'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.',
72
-                            'event_espresso'
73
-                        ),
74
-                        '<code>',
75
-                        '</code>'
76
-                    );
77
-                    ?>
69
+					sprintf(
70
+						esc_html__(
71
+							'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.',
72
+							'event_espresso'
73
+						),
74
+						'<code>',
75
+						'</code>'
76
+					);
77
+					?>
78 78
                 </p>
79 79
             <?php endif; ?>
80 80
         </td>
@@ -88,17 +88,17 @@  discard block
 block discarded – undo
88 88
         </th>
89 89
         <td>
90 90
             <?php echo EEH_Form_Fields::select(
91
-                'display_status_banner',
92
-                $display_status_banner,
93
-                $values,
94
-                'EED_Events_Archive_display_status_banner',
95
-                'EED_Events_Archive_display_status_banner'
96
-            ); ?>
91
+				'display_status_banner',
92
+				$display_status_banner,
93
+				$values,
94
+				'EED_Events_Archive_display_status_banner',
95
+				'EED_Events_Archive_display_status_banner'
96
+			); ?>
97 97
             <p class="description"><?php
98
-                esc_html_e(
99
-                    'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.',
100
-                    'event_espresso'
101
-                ); ?></p>
98
+				esc_html_e(
99
+					'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.',
100
+					'event_espresso'
101
+				); ?></p>
102 102
         </td>
103 103
     </tr>
104 104
 
@@ -106,18 +106,18 @@  discard block
 block discarded – undo
106 106
         <th>
107 107
             <label for="EED_Events_Archive_display_description">
108 108
                 <?php esc_html_e('Display Description', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
109
-                    'display_description_info'
110
-                ); ?>
109
+					'display_description_info'
110
+				); ?>
111 111
             </label>
112 112
         </th>
113 113
         <td>
114 114
             <?php echo EEH_Form_Fields::select(
115
-                'description',
116
-                $display_description,
117
-                $description,
118
-                'EED_Events_Archive_display_description',
119
-                'EED_Events_Archive_display_description'
120
-            ); ?>
115
+				'description',
116
+				$display_description,
117
+				$description,
118
+				'EED_Events_Archive_display_description',
119
+				'EED_Events_Archive_display_description'
120
+			); ?>
121 121
         </td>
122 122
     </tr>
123 123
 
@@ -125,18 +125,18 @@  discard block
 block discarded – undo
125 125
         <th>
126 126
             <label for="EED_Events_Archive_display_ticket_selector">
127 127
                 <?php esc_html_e('Display Ticket Selector', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
128
-                    'display_ticket_selector_info'
129
-                ); ?>
128
+					'display_ticket_selector_info'
129
+				); ?>
130 130
             </label>
131 131
         </th>
132 132
         <td>
133 133
             <?php echo EEH_Form_Fields::select(
134
-                'ticket_selector',
135
-                $display_ticket_selector,
136
-                $values,
137
-                'EED_Events_Archive_display_ticket_selector',
138
-                'EED_Events_Archive_display_ticket_selector'
139
-            ); ?>
134
+				'ticket_selector',
135
+				$display_ticket_selector,
136
+				$values,
137
+				'EED_Events_Archive_display_ticket_selector',
138
+				'EED_Events_Archive_display_ticket_selector'
139
+			); ?>
140 140
         </td>
141 141
     </tr>
142 142
 
@@ -144,18 +144,18 @@  discard block
 block discarded – undo
144 144
         <th>
145 145
             <label for="EED_Events_Archive_display_datetimes">
146 146
                 <?php esc_html_e('Display Datetimes', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
147
-                    'display_datetimes_info'
148
-                ); ?>
147
+					'display_datetimes_info'
148
+				); ?>
149 149
             </label>
150 150
         </th>
151 151
         <td>
152 152
             <?php echo EEH_Form_Fields::select(
153
-                'venue_details',
154
-                $display_datetimes,
155
-                $values,
156
-                'EED_Events_Archive_display_datetimes',
157
-                'EED_Events_Archive_display_datetimes'
158
-            ); ?>
153
+				'venue_details',
154
+				$display_datetimes,
155
+				$values,
156
+				'EED_Events_Archive_display_datetimes',
157
+				'EED_Events_Archive_display_datetimes'
158
+			); ?>
159 159
         </td>
160 160
     </tr>
161 161
 
@@ -163,18 +163,18 @@  discard block
 block discarded – undo
163 163
         <th>
164 164
             <label for="EED_Events_Archive_display_venue">
165 165
                 <?php esc_html_e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
166
-                    'display_venue_details_info'
167
-                ); ?>
166
+					'display_venue_details_info'
167
+				); ?>
168 168
             </label>
169 169
         </th>
170 170
         <td>
171 171
             <?php echo EEH_Form_Fields::select(
172
-                'display_venue',
173
-                $display_venue,
174
-                $values,
175
-                'EED_Events_Archive_display_venue',
176
-                'EED_Events_Archive_display_venue'
177
-            ); ?>
172
+				'display_venue',
173
+				$display_venue,
174
+				$values,
175
+				'EED_Events_Archive_display_venue',
176
+				'EED_Events_Archive_display_venue'
177
+			); ?>
178 178
         </td>
179 179
     </tr>
180 180
 
@@ -182,18 +182,18 @@  discard block
 block discarded – undo
182 182
         <th>
183 183
             <label for="EED_Events_Archive_display_expired_events">
184 184
                 <?php esc_html_e('Display Expired Events', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
185
-                    'display_expired_events_info'
186
-                ); ?>
185
+					'display_expired_events_info'
186
+				); ?>
187 187
             </label>
188 188
         </th>
189 189
         <td>
190 190
             <?php echo EEH_Form_Fields::select(
191
-                'expired_events',
192
-                $display_expired_events,
193
-                $values,
194
-                'EED_Events_Archive_display_expired_events',
195
-                'EED_Events_Archive_display_expired_events'
196
-            ); ?>
191
+				'expired_events',
192
+				$display_expired_events,
193
+				$values,
194
+				'EED_Events_Archive_display_expired_events',
195
+				'EED_Events_Archive_display_expired_events'
196
+			); ?>
197 197
         </td>
198 198
     </tr>
199 199
 
@@ -201,43 +201,43 @@  discard block
 block discarded – undo
201 201
         <th>
202 202
             <label for="EED_Events_Archive_use_sortable_display_order">
203 203
                 <?php esc_html_e(
204
-                    'Use Custom Display Order?',
205
-                    'event_espresso'
206
-                ); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?>
204
+					'Use Custom Display Order?',
205
+					'event_espresso'
206
+				); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?>
207 207
             </label>
208 208
         </th>
209 209
         <td>
210 210
             <?php echo EEH_Form_Fields::select(
211
-                'use_sortable_display_order',
212
-                $use_sortable_display_order,
213
-                $values,
214
-                'EED_Events_Archive_use_sortable_display_order',
215
-                'EED_Events_Archive_use_sortable_display_order'
216
-            ); ?>
211
+				'use_sortable_display_order',
212
+				$use_sortable_display_order,
213
+				$values,
214
+				'EED_Events_Archive_use_sortable_display_order',
215
+				'EED_Events_Archive_use_sortable_display_order'
216
+			); ?>
217 217
         </td>
218 218
     </tr>
219 219
 
220 220
     <tr>
221 221
         <th>
222 222
             <?php esc_html_e(
223
-                'Display Order',
224
-                'event_espresso'
225
-            ); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
223
+				'Display Order',
224
+				'event_espresso'
225
+			); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
226 226
         </th>
227 227
         <td>
228 228
 
229 229
             <?php wp_nonce_field(
230
-                'espresso_update_event_archive_order',
231
-                'espresso_update_event_archive_order_nonce',
232
-                false
233
-            ); ?>
230
+				'espresso_update_event_archive_order',
231
+				'espresso_update_event_archive_order_nonce',
232
+				false
233
+			); ?>
234 234
             <?php echo $event_archive_display_order; ?>
235 235
 
236 236
             <p class="description"><?php
237
-                esc_html_e(
238
-                    'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.',
239
-                    'event_espresso'
240
-                ); ?></p>
237
+				esc_html_e(
238
+					'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.',
239
+					'event_espresso'
240
+				); ?></p>
241 241
 
242 242
         </td>
243 243
     </tr>
@@ -250,12 +250,12 @@  discard block
 block discarded – undo
250 250
         </th>
251 251
         <td>
252 252
             <?php echo EEH_Form_Fields::select(
253
-                'reset_event_list_settings',
254
-                0,
255
-                $values,
256
-                'EED_Events_Archive_reset_event_list_settings',
257
-                'EED_Events_Archive_reset_event_list_settings'
258
-            ); ?>
253
+				'reset_event_list_settings',
254
+				0,
255
+				$values,
256
+				'EED_Events_Archive_reset_event_list_settings',
257
+				'EED_Events_Archive_reset_event_list_settings'
258
+			); ?>
259 259
         </td>
260 260
     </tr>
261 261
 
Please login to merge, or discard this patch.