Completed
Branch BUG-8936-recaptcha-fail (74c1f8)
by
unknown
48:00 queued 37:47
created
admin_pages/messages/Messages_Template_List_Table.class.php 2 patches
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 	protected function _setup_data() {
34
-		$this->_data = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, FALSE);
35
-		$this->_all_data_count = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, TRUE, TRUE );
34
+		$this->_data = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, FALSE);
35
+		$this->_all_data_count = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, TRUE, TRUE);
36 36
 	}
37 37
 
38 38
 
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
 
42 42
 	protected function _set_properties() {
43 43
 		$this->_wp_list_args = array(
44
-			'singular' => __('Message Template Group', 'event_espresso' ),
45
-			'plural' => __('Message Template', 'event_espresso' ),
44
+			'singular' => __('Message Template Group', 'event_espresso'),
45
+			'plural' => __('Message Template', 'event_espresso'),
46 46
 			'ajax' => TRUE, //for now,
47 47
 			'screen' => $this->_admin_page->get_current_screen()->id
48 48
 			);
49 49
 		$this->_columns = array(
50 50
 			//'cb' => '<input type="checkbox" />', //no deleting default (global) templates!
51 51
 			'message_type' => __('Message Type', 'event_espresso'),
52
-			'messenger' => __( 'Messenger', 'event_espresso'),
53
-			'description' => __( 'Description', 'event_espresso' ),
52
+			'messenger' => __('Messenger', 'event_espresso'),
53
+			'description' => __('Description', 'event_espresso'),
54 54
 			//'messages_sent' => __( 'Total Sent', 'event_espresso' ) //todo this will come later when we've got message tracking in place.
55 55
 			);
56 56
 
57 57
 		$this->_sortable_columns = array(
58
-			'messenger' => array( 'MTP_messenger' => TRUE ),
58
+			'messenger' => array('MTP_messenger' => TRUE),
59 59
 			//'message_type' => array( 'MTP_message_type' => FALSE )
60 60
 			);
61 61
 
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
 	 *
75 75
 	 * @return string
76 76
 	 */
77
-	public function single_row( $item ) {
77
+	public function single_row($item) {
78 78
 		$message_type = $item->message_type_obj();
79 79
 		$messenger = $item->messenger_obj();
80 80
 
81
-		if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger ) {
81
+		if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger) {
82 82
 			echo '';
83 83
 			return;
84 84
 		}
85 85
 
86
-		parent::single_row( $item );
86
+		parent::single_row($item);
87 87
 	}
88 88
 
89 89
 
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 
93 93
 	protected function _get_table_filters() {
94 94
 		$filters = array();
95
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
95
+		EE_Registry::instance()->load_helper('Form_Fields');
96 96
 		$messengers = $this->_admin_page->get_active_messengers();
97 97
 		$message_types = $this->_admin_page->get_installed_message_types();
98 98
 
99 99
 
100 100
 		//setup messengers for selects
101
-		$i=1;
101
+		$i = 1;
102 102
 		$m_values[0]['id'] = 'all';
103
-		$m_values[0]['text'] = __('All Messengers', 'event_espresso' );
104
-		foreach ( $messengers as $messenger => $args ) {
103
+		$m_values[0]['text'] = __('All Messengers', 'event_espresso');
104
+		foreach ($messengers as $messenger => $args) {
105 105
 			$m_values[$i]['id'] = $messenger;
106 106
 			$m_values[$i]['text'] = ucwords($args['obj']->label['singular']);
107 107
 			$i++;
108 108
 		}
109 109
 
110 110
 		//lets do the same for message types
111
-		$i=1;
112
-		foreach ( $message_types as $message_type => $args ) {
111
+		$i = 1;
112
+		foreach ($message_types as $message_type => $args) {
113 113
 			$mt_values[$i]['id'] = $message_type;
114 114
 			$mt_values[$i]['text'] = ucwords($args['obj']->label['singular']);
115 115
 			$i++;
@@ -125,28 +125,28 @@  discard block
 block discarded – undo
125 125
 			'text' => __('Show All', 'event_espresso')
126 126
 			);
127 127
 
128
-		$msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array();
129
-		$mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array();
128
+		$msgr_filters = ! empty($m_values) ? array_merge($msgr_default, $m_values) : array();
129
+		$mt_filters = ! empty($mt_values) ? array_merge($mt_default, $mt_values) : array();
130 130
 
131
-		if ( empty( $m_values ) )
131
+		if (empty($m_values))
132 132
 			$msgr_filters[0] = array(
133 133
 				'id' => 'no_messenger_options',
134 134
 				'text' => __('No Messengers active', 'event_espresso')
135 135
 				);
136 136
 
137
-		if ( empty($mt_values) )
137
+		if (empty($mt_values))
138 138
 			$mt_filters[0] = array(
139 139
 				'id' => 'no_message_type_options',
140 140
 				'text' => __('No Message Types active', 'event_espresso')
141 141
 				);
142 142
 
143
-		if ( count( $messengers ) >= 1  && !empty( $m_values ) ) {
144
-			unset( $msgr_filters[0] );
145
-			$msgr_filters = array_values( $msgr_filters ); //reindex keys
143
+		if (count($messengers) >= 1 && ! empty($m_values)) {
144
+			unset($msgr_filters[0]);
145
+			$msgr_filters = array_values($msgr_filters); //reindex keys
146 146
 		}
147 147
 
148
-		$filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key( $this->_req_data['ee_messenger_filter_by']) : '' );
149
-		$filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key( $this->_req_data['ee_message_type_filter_by']) : '');
148
+		$filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key($this->_req_data['ee_messenger_filter_by']) : '');
149
+		$filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key($this->_req_data['ee_message_type_filter_by']) : '');
150 150
 		return $filters;
151 151
 	}
152 152
 
@@ -154,20 +154,20 @@  discard block
 block discarded – undo
154 154
 	 * we're just removing the search box for message templates, not needed.
155 155
 	 * @return string (empty);
156 156
 	 */
157
-	function search_box( $text, $input_id ) {
157
+	function search_box($text, $input_id) {
158 158
 		return '';
159 159
 	}
160 160
 
161 161
 
162 162
 	protected function _add_view_counts() {
163
-		foreach ( $this->_views as $view => $args )  {
164
-			$this->_views[$view]['count'] = $this->_admin_page->get_message_templates( $this->_per_page, $view, TRUE, TRUE );
163
+		foreach ($this->_views as $view => $args) {
164
+			$this->_views[$view]['count'] = $this->_admin_page->get_message_templates($this->_per_page, $view, TRUE, TRUE);
165 165
 		}
166 166
 	}
167 167
 
168 168
 
169 169
 
170
-	public function column_cb( $item ) {
170
+	public function column_cb($item) {
171 171
 		return '';
172 172
 	}
173 173
 
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
 
176 176
 
177 177
 
178
-	function column_description( $item ) {
179
-		return '<p>' . $item->message_type_obj()->description . '</p>';
178
+	function column_description($item) {
179
+		return '<p>'.$item->message_type_obj()->description.'</p>';
180 180
 	}
181 181
 
182 182
 
@@ -191,27 +191,27 @@  discard block
 block discarded – undo
191 191
 		$actions = array();
192 192
 
193 193
 		// edit link but only if item isn't trashed.
194
-		if ( !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ) {
195
-			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_message_template', 'id'=>$item->GRP_ID() ), EE_MSG_ADMIN_URL );
196
-			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template Group', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>';
194
+		if ( ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID())) {
195
+			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID()), EE_MSG_ADMIN_URL);
196
+			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template Group', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
197 197
 		}
198 198
 
199
-		$name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template Group', 'event_espresso' ) . '">' . ucwords( $item->messenger_obj()->label['singular'] ) . '</a>' : ucwords( $item->messenger_obj()->label['singular'] );
199
+		$name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template Group', 'event_espresso').'">'.ucwords($item->messenger_obj()->label['singular']).'</a>' : ucwords($item->messenger_obj()->label['singular']);
200 200
 
201 201
 		//we want to display the contexts in here so we need to set them up
202 202
 		$c_label = $item->context_label();
203 203
 		$c_configs = $item->contexts_config();
204 204
 		$ctxt = array();
205 205
 		$context_templates = $item->context_templates();
206
-		foreach ( $context_templates as $context => $template_fields ) {
207
-			$mtp_to = !empty( $context_templates[$context]['to'] ) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL;
208
-			$inactive = empty( $mtp_to ) && !empty( $context_templates[$context]['to'] ) ? ' class="mtp-inactive"' : '';
206
+		foreach ($context_templates as $context => $template_fields) {
207
+			$mtp_to = ! empty($context_templates[$context]['to']) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL;
208
+			$inactive = empty($mtp_to) && ! empty($context_templates[$context]['to']) ? ' class="mtp-inactive"' : '';
209 209
 			$context_title = ucwords($c_configs[$context]['label']);
210
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL );
211
-			$ctxt[] = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? '<a' . $inactive . ' href="'. $edit_link . '" title="' . esc_attr__('Edit Context', 'event_espresso') . '">' . $context_title . '</a>' : $context_title;
210
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL);
211
+			$ctxt[] = EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a'.$inactive.' href="'.$edit_link.'" title="'.esc_attr__('Edit Context', 'event_espresso').'">'.$context_title.'</a>' : $context_title;
212 212
 		}
213 213
 
214
-		$ctx_content = !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? sprintf( __('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural']) ) . implode(' | ', $ctxt) : '';
214
+		$ctx_content = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? sprintf(__('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural'])).implode(' | ', $ctxt) : '';
215 215
 
216 216
 
217 217
 		//Return the name contents
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 										/* $1%s */ $name_link,
220 220
 										/* $2%s */ $item->GRP_ID(),
221 221
 										/* %4$s */ $ctx_content,
222
-										/* $3%s */ $this->row_actions( $actions )
222
+										/* $3%s */ $this->row_actions($actions)
223 223
 		);
224 224
 	}
225 225
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	 * @return string       message_type name
230 230
 	 */
231 231
 	function column_message_type($item) {
232
-		return ucwords($item->message_type_obj()->label['singular'] );
232
+		return ucwords($item->message_type_obj()->label['singular']);
233 233
 	}
234 234
 
235 235
 
Please login to merge, or discard this patch.
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
@@ -128,17 +129,19 @@  discard block
 block discarded – undo
128 129
 		$msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array();
129 130
 		$mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array();
130 131
 
131
-		if ( empty( $m_values ) )
132
-			$msgr_filters[0] = array(
132
+		if ( empty( $m_values ) ) {
133
+					$msgr_filters[0] = array(
133 134
 				'id' => 'no_messenger_options',
134 135
 				'text' => __('No Messengers active', 'event_espresso')
135 136
 				);
137
+		}
136 138
 
137
-		if ( empty($mt_values) )
138
-			$mt_filters[0] = array(
139
+		if ( empty($mt_values) ) {
140
+					$mt_filters[0] = array(
139 141
 				'id' => 'no_message_type_options',
140 142
 				'text' => __('No Message Types active', 'event_espresso')
141 143
 				);
144
+		}
142 145
 
143 146
 		if ( count( $messengers ) >= 1  && !empty( $m_values ) ) {
144 147
 			unset( $msgr_filters[0] );
Please login to merge, or discard this patch.
admin_pages/messages/espresso_events_Messages_Hooks.class.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 class espresso_events_Messages_Hooks extends EE_Admin_Hooks {
31 31
 
32 32
 
33
-	public function __construct( EE_Admin_Page $admin_page ) {
33
+	public function __construct(EE_Admin_Page $admin_page) {
34 34
 		parent::__construct($admin_page);
35 35
 	}
36 36
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/messages/help_tours/Message_Templates_Edit_Help_Tour.class.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -96,38 +96,38 @@  discard block
 block discarded – undo
96 96
 
97 97
 
98 98
 	protected function _start() {
99
-		$content = '<h3>' . __('Message Template Editor', 'event_espresso') . '</h3>';
100
-		$content .= '<p>' . __('This tour of the Message Template Editor page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
99
+		$content = '<h3>'.__('Message Template Editor', 'event_espresso').'</h3>';
100
+		$content .= '<p>'.__('This tour of the Message Template Editor page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
101 101
 		return $content;
102 102
 	}
103 103
 
104 104
 
105 105
 	protected function _context_switcher_stop() {
106
-		return '<p>' . __('This dropdown allows you to swap between the different recipients templates that are available in this message type. Be sure to save changes befor switching to a different context.', 'event_espresso') . '</p>';
106
+		return '<p>'.__('This dropdown allows you to swap between the different recipients templates that are available in this message type. Be sure to save changes befor switching to a different context.', 'event_espresso').'</p>';
107 107
 	}
108 108
 
109 109
 
110 110
 	protected function _preview_button_stop() {
111
-		return '<p>' . __('Clicking this button will show you a preview of how your message will look.', 'event_espresso') . '</p>';
111
+		return '<p>'.__('Clicking this button will show you a preview of how your message will look.', 'event_espresso').'</p>';
112 112
 	}
113 113
 
114 114
 
115 115
 	protected function _template_area_stop() {
116
-		return '<p>' . __('Depending on the messenger (recipient) and the message type, the main screen can show different boxes. Overall the screen allows you to confirm who the messages go to and who from, and the actual content of the message.', 'event_espresso') . '</p>';
116
+		return '<p>'.__('Depending on the messenger (recipient) and the message type, the main screen can show different boxes. Overall the screen allows you to confirm who the messages go to and who from, and the actual content of the message.', 'event_espresso').'</p>';
117 117
 	}
118 118
 
119 119
 	protected function _mtp_valid_shortcodes_stop() {
120
-		return '<p>' . __('These shortcodes allow you to quickly add data into your messages, without touching code. From emails, to ticket details, to your company logo, building messages with shortcodes is easy and fast.', 'event_espresso') . '</p>';
120
+		return '<p>'.__('These shortcodes allow you to quickly add data into your messages, without touching code. From emails, to ticket details, to your company logo, building messages with shortcodes is easy and fast.', 'event_espresso').'</p>';
121 121
 	}
122 122
 
123 123
 
124 124
 	protected function _mtp_extra_actions_stop() {
125
-		return '<p>' . __('Here you will find miscellaneous options to assist you, including a test send button and a reset button.', 'event_espresso') . '</p>';
125
+		return '<p>'.__('Here you will find miscellaneous options to assist you, including a test send button and a reset button.', 'event_espresso').'</p>';
126 126
 	}
127 127
 
128 128
 
129 129
 	protected function _update_metabox_stop() {
130
-		return '<p>' . __('When done creating your message, click here to save it.', 'event_espresso') . '</p>';
130
+		return '<p>'.__('When done creating your message, click here to save it.', 'event_espresso').'</p>';
131 131
 	}
132 132
 
133 133
 }
134 134
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/messages/help_tours/Messages_Overview_Help_Tour.class.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -99,32 +99,32 @@  discard block
 block discarded – undo
99 99
 
100 100
 
101 101
 	protected function _start() {
102
-		$content = '<h3>' . __('Messages Overview', 'event_espresso') . '</h3>';
103
-		$content .= '<p>' . __('This tour of the Messages Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
102
+		$content = '<h3>'.__('Messages Overview', 'event_espresso').'</h3>';
103
+		$content .= '<p>'.__('This tour of the Messages Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
104 104
 		return $content;
105 105
 	}
106 106
 
107 107
 	protected function event_column_stop() {
108
-		return '<p>' . __('View if a message is associated with one event or multiple events. Can be sorted in ascending and descending order.', 'event_espresso') . '</p>';
108
+		return '<p>'.__('View if a message is associated with one event or multiple events. Can be sorted in ascending and descending order.', 'event_espresso').'</p>';
109 109
 	}
110 110
 
111 111
 	protected function _message_type_column_stop() {
112
-		return '<p>' . __('View the type of message. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
112
+		return '<p>'.__('View the type of message. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
113 113
 	}
114 114
 
115 115
 	protected function _messenger_column_stop() {
116
-		return '<p>' . __('View who messages will be sent to. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
116
+		return '<p>'.__('View who messages will be sent to. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
117 117
 	}
118 118
 	
119 119
 	protected function _description_column_stop() {
120
-		return '<p>' . __('View the description for each message type.', 'event_espresso') . '</p>';
120
+		return '<p>'.__('View the description for each message type.', 'event_espresso').'</p>';
121 121
 	}
122 122
 
123 123
 	protected function _bulk_actions_stop() {
124
-		return '<p>' . __('Perform bulk actions to multiple message types.', 'event_espresso') . '</p>';
124
+		return '<p>'.__('Perform bulk actions to multiple message types.', 'event_espresso').'</p>';
125 125
 	}
126 126
 
127 127
 	protected function _filters_stop() {
128
-		return '<p>' . __('You can filter by different notifications by making a selection below and clicking on the filter button. To reset your selection, just click on the reset filters button.', 'event_espresso') . '</p>';
128
+		return '<p>'.__('You can filter by different notifications by making a selection below and clicking on the filter button. To reset your selection, just click on the reset filters button.', 'event_espresso').'</p>';
129 129
 	}
130 130
 }
131 131
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/messages/help_tours/Messages_Settings_Help_Tour.class.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -89,28 +89,28 @@  discard block
 block discarded – undo
89 89
 
90 90
 
91 91
 	protected function _start() {
92
-		$content = '<h3>' . __('Messages Settings', 'event_espresso') . '</h3>';
93
-		$content .= '<p>' . __('This tour of the Messages Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
92
+		$content = '<h3>'.__('Messages Settings', 'event_espresso').'</h3>';
93
+		$content .= '<p>'.__('This tour of the Messages Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
94 94
 		return $content;
95 95
 	}
96 96
 
97 97
 	protected function _messenger_links_stop() {
98
-		return '<p>' . __('Available messengers are shown above.', 'event_espresso') . '</p>';
98
+		return '<p>'.__('Available messengers are shown above.', 'event_espresso').'</p>';
99 99
 	}
100 100
 
101 101
 	protected function _email_settings_metabox_stop() {
102
-		return '<p>' . __('View the different message types that are currently active.', 'event_espresso') . '</p>';
102
+		return '<p>'.__('View the different message types that are currently active.', 'event_espresso').'</p>';
103 103
 	}
104 104
 
105 105
 	protected function _on_off_toggle_stop() {
106
-		return '<p>' . __('This toggle will turn all messages on or off for this message type.', 'event_espresso') . '</p>';
106
+		return '<p>'.__('This toggle will turn all messages on or off for this message type.', 'event_espresso').'</p>';
107 107
 	}
108 108
 
109 109
 	protected function _active_mts_container_stop() {
110
-		return '<p>' . __('These are your active message types. Click them to see a description and settings for each one.', 'event_espresso') . '</p>';
110
+		return '<p>'.__('These are your active message types. Click them to see a description and settings for each one.', 'event_espresso').'</p>';
111 111
 	}
112 112
 
113 113
 	protected function _inactive_mts_container_stop() {
114
-		return '<p>' . __('Drag message types here to deactivate them. Drag them from here to the active box to reactivate them.', 'event_espresso') . '</p>';
114
+		return '<p>'.__('Drag message types here to deactivate them. Drag them from here to the active box to reactivate them.', 'event_espresso').'</p>';
115 115
 	}
116 116
 }
117 117
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/messages/templates/ee_msg_admin_overview.template.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,31 +1,31 @@
 block discarded – undo
1 1
 
2 2
 		<ul class="subsubsub">
3
-			<?php foreach ( $view_RLs as $vw ) : ?>
4
-				<li class="<?php echo $vw['slug']; ?>"><a class="<?php echo $vw['class']; ?>" href="<?php echo $vw['url'];?>"><?php echo $vw['label']; ?><span class="count">(<?php echo $vw['count']; ?>)</span></a></li>
3
+			<?php foreach ($view_RLs as $vw) : ?>
4
+				<li class="<?php echo $vw['slug']; ?>"><a class="<?php echo $vw['class']; ?>" href="<?php echo $vw['url']; ?>"><?php echo $vw['label']; ?><span class="count">(<?php echo $vw['count']; ?>)</span></a></li>
5 5
 		 	<?php endforeach; ?>
6 6
 		 		<li>
7 7
 		 		</li>
8 8
 		</ul>
9 9
 		<div class="clear"></div>
10 10
 		<div id="ee-messenger-filters-dv">
11
-			<form id="ee-messenger-filters-frm" action="<?php echo $ee_msg_overview_url;?>" method="post" name="ee-messenger-filters-frm">
11
+			<form id="ee-messenger-filters-frm" action="<?php echo $ee_msg_overview_url; ?>" method="post" name="ee-messenger-filters-frm">
12 12
 				<select name="ee_messenger_filter_by" id="ee_messenger_filter_by">
13
-					<?php foreach ( $active_messengers as $messenger => $args ) : ?>
14
-					<option value="<?php echo $messenger; ?>"><?php echo ucwords(str_replace('_', ' ', $messenger) ); ?></option>
13
+					<?php foreach ($active_messengers as $messenger => $args) : ?>
14
+					<option value="<?php echo $messenger; ?>"><?php echo ucwords(str_replace('_', ' ', $messenger)); ?></option>
15 15
 					<?php endforeach; ?>
16 16
 				</select>
17 17
 				<input id="submit-ee-messenger-filters-sbmt" class="button-secondary" type="submit" value="Filter Messenger">
18 18
 
19 19
 				<select name="ee_message_type_filter_by" id="ee_message_type_filter_by">
20
-					<?php foreach ( $active_message_types as $message_type => $args ) : ?>
21
-					<option value="<?php echo $message_type; ?>"><?php echo ucwords(str_replace('_', ' ', $message_type) ); ?></option>
20
+					<?php foreach ($active_message_types as $message_type => $args) : ?>
21
+					<option value="<?php echo $message_type; ?>"><?php echo ucwords(str_replace('_', ' ', $message_type)); ?></option>
22 22
 					<?php endforeach; ?>
23 23
 				</select>
24 24
 				<input id="submit-ee-message-type-filters-sbmt" class="button-secondary" type="submit" value="Filter Message Type">
25 25
 			</form>
26 26
 		</div>
27 27
 
28
-        <form id="ee-messages-overview-frm" action="<?php echo $ee_msg_overview_url;?>" method="get">
28
+        <form id="ee-messages-overview-frm" action="<?php echo $ee_msg_overview_url; ?>" method="get">
29 29
             <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
30 30
             <input type="hidden" id="per_page" name="per_page" value="" />
31 31
             <?php echo $list_table->display(); ?>
Please login to merge, or discard this patch.
messages/templates/ee_msg_details_main_add_meta_box.template.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@
 block discarded – undo
1 1
 <div id="admin-primary-mbox-dv" class="admin-primary-mbox-dv">
2 2
 	
3
-	<h4 class="admin-primary-mbox-h4"><?php echo ($event_name) ? $event_name . ' Custom Template' : ''; ?></h4>
3
+	<h4 class="admin-primary-mbox-h4"><?php echo ($event_name) ? $event_name.' Custom Template' : ''; ?></h4>
4 4
 	<p><?php echo $action_message; ?></p>
5 5
 
6 6
 	<form id="ee-msg-add-message-template-frm" action="<?php echo $edit_message_template_form_url; ?>" method="post">
7 7
 		<input type="hidden" id="evt_id" name="EVT_ID" value="<?php echo ($EVT_ID) ? $EVT_ID : ''; ?>" />
8
-		<?php if ( isset( $hidden_fields ) ) echo $hidden_fields; ?>
8
+		<?php if (isset($hidden_fields)) echo $hidden_fields; ?>
9 9
 		
10 10
 		<!--active_messengers -->
11 11
 		<label for="MTP_messenger"><?php _e('Select Messenger', 'event_espresso'); ?></label>
12 12
 		<select name="MTP_messenger" id="MTP-messenger">
13
-			<?php foreach ( $active_messengers as $messenger => $values ) : ?>
14
-			<option value="<?php echo $messenger; ?>"><?php echo ucwords(str_replace('_', ' ', $messenger) ); ?></option>
13
+			<?php foreach ($active_messengers as $messenger => $values) : ?>
14
+			<option value="<?php echo $messenger; ?>"><?php echo ucwords(str_replace('_', ' ', $messenger)); ?></option>
15 15
 			<?php endforeach; ?>
16 16
 		</select>
17 17
 
18 18
 		<label for="MTP_message_type"><?php _e('Select Message Type', 'event_espresso'); ?></label>
19 19
 		<select name="MTP_message_type" id="MTP-message-type">
20
-			<?php foreach ( $active_message_types as $message_type => $values ) : ?>
21
-			<option value="<?php echo $message_type; ?>"><?php echo ucwords(str_replace('_', ' ', $message_type) ); ?></option>
20
+			<?php foreach ($active_message_types as $message_type => $values) : ?>
21
+			<option value="<?php echo $message_type; ?>"><?php echo ucwords(str_replace('_', ' ', $message_type)); ?></option>
22 22
 			<?php endforeach; ?>
23 23
 		</select>
24 24
 
25 25
 		<!-- events if we don't have an EVENT_ID -->
26
-		<?php if ( !empty( $active_events ) ) : ?>
26
+		<?php if ( ! empty($active_events)) : ?>
27 27
 			<label for="EVT_ID_select"><?php _e('Select Event', 'event_espresso'); ?></label>
28 28
 			<select name="EVT_ID" id="EVT_ID_select">
29
-				<?php foreach ( $active_events as $event ) : ?>
29
+				<?php foreach ($active_events as $event) : ?>
30 30
 				<option value="<?php echo $event->event_id; ?>"><?php echo $event->event_name; ?></option>
31 31
 				<?php endforeach; ?>
32 32
 			</select>
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,10 @@
 block discarded – undo
5 5
 
6 6
 	<form id="ee-msg-add-message-template-frm" action="<?php echo $edit_message_template_form_url; ?>" method="post">
7 7
 		<input type="hidden" id="evt_id" name="EVT_ID" value="<?php echo ($EVT_ID) ? $EVT_ID : ''; ?>" />
8
-		<?php if ( isset( $hidden_fields ) ) echo $hidden_fields; ?>
8
+		<?php if ( isset( $hidden_fields ) ) {
9
+	echo $hidden_fields;
10
+}
11
+?>
9 12
 		
10 13
 		<!--active_messengers -->
11 14
 		<label for="MTP_messenger"><?php _e('Select Messenger', 'event_espresso'); ?></label>
Please login to merge, or discard this patch.
messages/templates/ee_msg_details_main_edit_meta_box.template.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,11 @@
 block discarded – undo
19 19
 					<textarea id="ee-msg-non-global-fields-MTP_description" class="large-text" name="ee_msg_non_global_fields[MTP_description]"><?php echo $MTP->description(); ?></textarea>
20 20
 				</p>
21 21
 			</div>
22
-		<?php else: ?>
23
-			<input type="hidden" name="ee_msg_non_global_fields[MTP_name]" value="<?php echo $MTP->name(); ?>">
22
+		<?php else {
23
+	: ?>
24
+			<input type="hidden" name="ee_msg_non_global_fields[MTP_name]" value="<?php echo $MTP->name();
25
+}
26
+?>">
24 27
 			<input type="hidden" name="ee_msg_non_global_fields[MTP_description]" value="<?php echo $MTP->description(); ?>">
25 28
 		<?php endif; ?>
26 29
 		<!-- we need to loop through the template_fields so we know our structure -->
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <div id="admin-primary-mbox-dv" class="admin-primary-mbox-dv">
2 2
 
3
-	<h3 class="admin-primary-mbox-h4"><?php echo isset($event_name) ? $event_name . ' Custom Template' : ''; ?></h3>
3
+	<h3 class="admin-primary-mbox-h4"><?php echo isset($event_name) ? $event_name.' Custom Template' : ''; ?></h3>
4 4
 		<input type="hidden" id="ee-msg-current-context" name="MTP_context" value="<?php echo $context; ?>"  />
5 5
 		<!-- if this is not a global template then let's show the name and description fields -->
6
-		<?php if ( ! $MTP->is_global() ) : ?>
6
+		<?php if ( ! $MTP->is_global()) : ?>
7 7
 			<div class="non-global-mtp-fields">
8 8
 				<p>
9 9
 					<?php _e('This is a custom template.  Custom Templates have an editable name and description to help you differentiate between templates.', 'event_espresso'); ?>
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		<?php endif; ?>
26 26
 		<!-- we need to loop through the template_fields so we know our structure -->
27 27
 		<?php
28
-		if ( isset($template_fields) && !empty($template_fields) && !is_wp_error($template_fields) ) {
28
+		if (isset($template_fields) && ! empty($template_fields) && ! is_wp_error($template_fields)) {
29 29
 				echo $template_fields;
30 30
 		} else {
31 31
 			?>
Please login to merge, or discard this patch.
messages/templates/ee_msg_details_messenger_meta_box.template.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <div class="<?php echo $messenger; ?>-content">
2
-	<?php if (  empty( $inactive_message_types ) && empty( $active_message_types )  ) : echo '<p>' . __('This messenger is not currently used with any message types for templates but merely adds to the shortcodes available for templates on other messenger and message types.') . '</p>'; else : ?>
2
+	<?php if (empty($inactive_message_types) && empty($active_message_types)) : echo '<p>'.__('This messenger is not currently used with any message types for templates but merely adds to the shortcodes available for templates on other messenger and message types.').'</p>'; else : ?>
3 3
 		<p class="inactive-on-message <?php echo $hide_on_message; ?>">
4 4
 			<?php _e('Below are message types that are currently inactive with this messenger.  Drag them over to the messenger box to activate them.', 'event_espresso'); ?>
5 5
 		<p>
6 6
 		<p class="inactive-off-message <?php echo $hide_off_message; ?>">
7 7
 			<?php _e('This messenger is currently inactive.  Once the messenger is activated any inactive message types associated with the messenger will be shown here.', 'event_espresso'); ?>
8 8
 		</p>
9
-		<div<?php if ( $active ) : ?> id="inactive-message-types"<?php endif; ?> class="inactive-message-types mt-tab-container ui-widget-content-ui-state-default <?php echo $hide_on_message; ?>">
9
+		<div<?php if ($active) : ?> id="inactive-message-types"<?php endif; ?> class="inactive-message-types mt-tab-container ui-widget-content-ui-state-default <?php echo $hide_on_message; ?>">
10 10
 			<ul class="messenger-activation">
11 11
 				<?php echo $inactive_message_types; ?>
12 12
 			</ul>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,9 @@
 block discarded – undo
1 1
 <div class="<?php echo $messenger; ?>-content">
2
-	<?php if (  empty( $inactive_message_types ) && empty( $active_message_types )  ) : echo '<p>' . __('This messenger is not currently used with any message types for templates but merely adds to the shortcodes available for templates on other messenger and message types.') . '</p>'; else : ?>
3
-		<p class="inactive-on-message <?php echo $hide_on_message; ?>">
2
+	<?php if (  empty( $inactive_message_types ) && empty( $active_message_types )  ) : echo '<p>' . __('This messenger is not currently used with any message types for templates but merely adds to the shortcodes available for templates on other messenger and message types.') . '</p>'; else {
3
+	: ?>
4
+		<p class="inactive-on-message <?php echo $hide_on_message;
5
+}
6
+?>">
4 7
 			<?php _e('Below are message types that are currently inactive with this messenger.  Drag them over to the messenger box to activate them.', 'event_espresso'); ?>
5 8
 		<p>
6 9
 		<p class="inactive-off-message <?php echo $hide_off_message; ?>">
Please login to merge, or discard this patch.