Completed
Branch BUG-10738-inconsistency-in-ses... (4fb977)
by
unknown
104:46 queued 94:10
created
registration_form/templates/question_groups_main_meta_box.template.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                     <?php
122 122
 					$question_order = 0;
123 123
 					$question_group_questions = $question_group->questions();
124
-                    foreach( $all_questions as $question_ID => $question ){
124
+					foreach( $all_questions as $question_ID => $question ){
125 125
 						if ( $question instanceof EE_Question ) {
126 126
 							/*@var $question EE_Question*/
127 127
 							$checked = isset( $question_group_questions[ $question_ID ] ) ? ' checked="checked"' : '';
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 assert($question_group);
10 10
 assert($question_group instanceof EE_Question_Group);
11 11
 /* @var EE_Question[] $all_questions */
12
-assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));//list of unused questions
13
-foreach($all_questions as $unused_question){
12
+assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions))); //list of unused questions
13
+foreach ($all_questions as $unused_question) {
14 14
 	assert($unused_question);
15 15
 	assert($unused_question instanceof EE_Question);
16 16
 }
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 $QSG_system = $question_group->system_group();
21 21
 
22
-$disabled = ! empty( $QSG_system ) ? ' disabled="disabled"' : '';
23
-$id =  ! empty( $QST_system ) ? '_disabled' : '';
22
+$disabled = ! empty($QSG_system) ? ' disabled="disabled"' : '';
23
+$id = ! empty($QST_system) ? '_disabled' : '';
24 24
 ?>
25 25
 
26 26
 <div id="group-details" class="edit-group padding">
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 			<tr>
31 31
 				<th>
32 32
 					<label for="QSG_name">
33
-						<?php _e('Group Name','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_name_info');?>
33
+						<?php _e('Group Name', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_name_info'); ?>
34 34
 					</label>
35 35
 				</th>
36 36
 				<td>
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 			<tr>
43 43
 				<th>
44 44
 					<label for="QSG_identifier">
45
-						<?php _e('Group Identifier','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_identifier_info');?>
45
+						<?php _e('Group Identifier', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_identifier_info'); ?>
46 46
 					</label>
47 47
 				</th>
48 48
 				<td>
49 49
 					<input id="QSG_identifier" name="QSG_identifier<?php echo $id; ?>" value="<?php echo $question_group->identifier()?>" type="text" class="regular-text"<?php echo $disabled; ?>>
50
-					<?php if ( ! empty( $QSG_system )) { ?>
50
+					<?php if ( ! empty($QSG_system)) { ?>
51 51
 					<p><span class="description" style="color:#D54E21;">
52
-							<?php _e('System question group! This field cannot be changed.','event_espresso')?>
52
+							<?php _e('System question group! This field cannot be changed.', 'event_espresso')?>
53 53
 					</span><br/></p>
54 54
 					<?php } ?>
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			<tr>
59 59
 				<th>
60 60
 					<label for="QSG_desc">
61
-						<?php _e('Description','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_description_info');?>
61
+						<?php _e('Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_description_info'); ?>
62 62
 					</label>
63 63
 				</th>
64 64
 				<td>
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			<tr>
70 70
 				<th>
71 71
 					<label for="QSG_order">
72
-						<?php _e('Question Group Order','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('group_order_info');?>
72
+						<?php _e('Question Group Order', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('group_order_info'); ?>
73 73
 					</label>
74 74
 				</th>
75 75
 				<td>
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 			<tr>
81 81
 				<th>
82 82
 					<label>
83
-						<?php _e('Show Name','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('show_group_name_info');?>
83
+						<?php _e('Show Name', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('show_group_name_info'); ?>
84 84
 					</label>
85 85
 				</th>
86 86
 				<td>
87 87
 					<label for="QSG_show_group_name">
88
-                        <?php echo EEH_Form_Fields::select_input( 'QSG_show_group_name', $values, $question_group->show_group_name() ); ?>
89
-						<p class="description"><?php _e('Show Group Name on Registration Page?','event_espresso');?></p>
88
+                        <?php echo EEH_Form_Fields::select_input('QSG_show_group_name', $values, $question_group->show_group_name()); ?>
89
+						<p class="description"><?php _e('Show Group Name on Registration Page?', 'event_espresso'); ?></p>
90 90
 					</label>
91 91
 				</td>
92 92
 			</tr>
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
 			<tr>
95 95
 				<th>
96 96
 					<label>
97
-						<?php _e(' Show Description','event_espresso');?> <?php echo EEH_Template::get_help_tab_link('show_group_description_info');?>
97
+						<?php _e(' Show Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('show_group_description_info'); ?>
98 98
 					</label>
99 99
 				</th>
100 100
 				<td>
101 101
                     <label for="QSG_show_group_order">
102
-                        <?php echo EEH_Form_Fields::select_input( 'QSG_show_group_desc', $values, $question_group->show_group_desc() ); ?>
103
-                        <p class="description"><?php _e(' Show Group Description on Registration Page?','event_espresso');?></p>
102
+                        <?php echo EEH_Form_Fields::select_input('QSG_show_group_desc', $values, $question_group->show_group_desc()); ?>
103
+                        <p class="description"><?php _e(' Show Group Description on Registration Page?', 'event_espresso'); ?></p>
104 104
 					</label>
105 105
                     <input type="hidden" name="QSG_system" value="<?php echo $question_group->system_group(); ?>">
106 106
                 </td>
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 </div>
112 112
 
113 113
 <div id="group-questions" class="edit-group padding question-group-questions-container postbox">
114
-    <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'event_espresso' ); ?>"><br></div>
115
-    <h2 class="handle"><?php _e('Questions','event_espresso');?></h2>
114
+    <div class="handlediv" title="<?php esc_attr_e('Click to toggle', 'event_espresso'); ?>"><br></div>
115
+    <h2 class="handle"><?php _e('Questions', 'event_espresso'); ?></h2>
116 116
 	<div class="form-table question-group-questions inside">
117 117
         <div class="padding">
118 118
             <p><span class="description"><?php _e('Select which questions should be shown in this group by checking or unchecking boxes. You can drag and drop questions to reorder them. Your changes will be updated when you save.', 'event_espresso'); ?></span></p>
@@ -121,26 +121,26 @@  discard block
 block discarded – undo
121 121
                     <?php
122 122
 					$question_order = 0;
123 123
 					$question_group_questions = $question_group->questions();
124
-                    foreach( $all_questions as $question_ID => $question ){
125
-						if ( $question instanceof EE_Question ) {
124
+                    foreach ($all_questions as $question_ID => $question) {
125
+						if ($question instanceof EE_Question) {
126 126
 							/*@var $question EE_Question*/
127
-							$checked = isset( $question_group_questions[ $question_ID ] ) ? ' checked="checked"' : '';
127
+							$checked = isset($question_group_questions[$question_ID]) ? ' checked="checked"' : '';
128 128
 							// disable questions from the personal information question group
129 129
 							// is it required in the current question group? if so don't allow admins to remove it
130
-							$disabled = in_array( $question->system_ID(), EEM_Question::instance()->required_system_questions_in_system_question_group( $QSG_system ) ) ? 'disabled="disabled"' : '';
130
+							$disabled = in_array($question->system_ID(), EEM_Question::instance()->required_system_questions_in_system_question_group($QSG_system)) ? 'disabled="disabled"' : '';
131 131
 							//limit where system questions can appear
132 132
 							if (
133 133
 								$question->system_ID() &&
134
-								! in_array( $question->system_ID(), EEM_Question::instance()->allowed_system_questions_in_system_question_group( $QSG_system ) )
134
+								! in_array($question->system_ID(), EEM_Question::instance()->allowed_system_questions_in_system_question_group($QSG_system))
135 135
 							) {
136 136
 								continue; //skip over system question not assigned to this group except for the address system group cause we want the address questions to display even if they aren't selected (but still not show the personal system questions).  The third condition checks if we're displaying a non system question group and the question is a system question, then we skip because for non-system question groups we only want to show non-system questions.
137 137
 							}
138 138
 						?>
139 139
                     <li class="ee-question-sortable">
140 140
                         <label for="question-<?php echo $question_ID?>">
141
-                            <input type="checkbox" name="questions[<?php echo $question_ID;?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID;?>"<?php echo $disabled; ?><?php echo $checked; ?>/>
141
+                            <input type="checkbox" name="questions[<?php echo $question_ID; ?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID; ?>"<?php echo $disabled; ?><?php echo $checked; ?>/>
142 142
                             <span class="question-text">
143
-								<?php echo trim( $question->display_text() ) . ( 95 <= strlen( trim( $question->display_text() ) ) ? "&hellip;" : '' ); ?>
143
+								<?php echo trim($question->display_text()).(95 <= strlen(trim($question->display_text())) ? "&hellip;" : ''); ?>
144 144
 							</span>
145 145
                             <input class="question-group-QGQ_order" type="hidden" name="question_orders[<?php echo $question_ID; ?>]" value="<?php echo $question_order; ?>">
146 146
                         </label>
Please login to merge, or discard this patch.
extend/registration_form/templates/questions_in_group_meta_box.template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 //required variables for template:
3 3
 assert($question_group instanceof EE_Question_Group);
4
-assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));//list of unused questions
5
-foreach($all_questions as $question_option){
4
+assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions))); //list of unused questions
5
+foreach ($all_questions as $question_option) {
6 6
 	assert($question_option);
7 7
 	assert($question_option instanceof EE_Question);
8 8
 }
9 9
 ?>
10
-<h4><?php _e('Check off all questions that you wish to appear in this group.','event_espresso');?></h4>
10
+<h4><?php _e('Check off all questions that you wish to appear in this group.', 'event_espresso'); ?></h4>
11 11
 <ul>
12 12
 	<?php 
13
-	foreach( $all_questions as $question_ID=>$question ){
13
+	foreach ($all_questions as $question_ID=>$question) {
14 14
 		/*@var $question EE_Question*/
15
-		$checked = array_key_exists( $question_ID, $question_group->questions() ) ? ' checked="checked"' : '';
15
+		$checked = array_key_exists($question_ID, $question_group->questions()) ? ' checked="checked"' : '';
16 16
 	?>
17 17
 	<li>
18 18
 		<label for="question-<?php echo $question_ID?>">
19
-			<input type="checkbox" name="questions[<?php echo $question_ID;?>]" id="question-<?php echo $question_ID;?>" value="<?php echo $question_ID;?>"<?php echo $checked;?>/>
19
+			<input type="checkbox" name="questions[<?php echo $question_ID; ?>]" id="question-<?php echo $question_ID; ?>" value="<?php echo $question_ID; ?>"<?php echo $checked; ?>/>
20 20
 			<?php echo $question->display_text()?>				
21 21
 		</label>
22 22
 	</li>
Please login to merge, or discard this patch.
admin/extend/registration_form/templates/reg_form_settings.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <div class="padding">
2
-		<?php do_action( 'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template' ); ?>
2
+		<?php do_action('AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template'); ?>
3 3
 </div>
Please login to merge, or discard this patch.
admin/extend/registrations/EE_Registration_CheckIn_List_Table.class.php 2 patches
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -123,8 +125,9 @@  discard block
 block discarded – undo
123 125
 		}
124 126
 
125 127
 		//if no reg id then get out cause need a reg id
126
-		if ( empty( $REG_ID ) || empty( $DTT_ID ) )
127
-			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
128
+		if ( empty( $REG_ID ) || empty( $DTT_ID ) ) {
129
+					throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
130
+		}
128 131
 
129 132
 		//set orderby
130 133
 		$orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value.
@@ -147,8 +150,9 @@  discard block
 block discarded – undo
147 150
 		$query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit );
148 151
 
149 152
 		//if no per_page value then we just want to return a count of all Check-ins
150
-		if ( $count )
151
-			return EEM_Checkin::instance()->count( array( $_where ) );
153
+		if ( $count ) {
154
+					return EEM_Checkin::instance()->count( array( $_where ) );
155
+		}
152 156
 
153 157
 		return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params);
154 158
 	}
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 
30 30
 
31
-	public function __construct( $admin_page ) {
31
+	public function __construct($admin_page) {
32 32
 		parent::__construct($admin_page);
33 33
 	}
34 34
 
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
 
38 38
 	protected function _setup_data() {
39
-		$this->_data = $this->_get_checkins( $this->_per_page );
40
-		$this->_all_data_count = $this->_get_checkins(  $this->_per_page, TRUE );
39
+		$this->_data = $this->_get_checkins($this->_per_page);
40
+		$this->_all_data_count = $this->_get_checkins($this->_per_page, TRUE);
41 41
 	}
42 42
 
43 43
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			);
59 59
 
60 60
 		$this->_sortable_columns = array(
61
-			'CHK_timestamp' => array( 'CHK_timestamp' => TRUE )
61
+			'CHK_timestamp' => array('CHK_timestamp' => TRUE)
62 62
 			);
63 63
 
64 64
 		$this->_primary_column = 'CHK_in';
@@ -82,25 +82,25 @@  discard block
 block discarded – undo
82 82
 	}
83 83
 
84 84
 
85
-	function column_cb($item ) {
86
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', $item->ID() );
85
+	function column_cb($item) {
86
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" />', $item->ID());
87 87
 	}
88 88
 
89 89
 
90
-	function column_CHK_in( EE_Checkin $item ) {
90
+	function column_CHK_in(EE_Checkin $item) {
91 91
 		$checkinstatus = $item->get('CHK_in');
92 92
 		$checkinstatus = $checkinstatus ? EE_Registration::checkin_status_in : EE_Registration::checkin_status_out;
93
-		return '<span class="checkin-icons checkedin-status-' . $checkinstatus . '"></span><span class="show-on-mobile-view-only">' . $item->get_datetime('CHK_timestamp') . '</span>';
93
+		return '<span class="checkin-icons checkedin-status-'.$checkinstatus.'"></span><span class="show-on-mobile-view-only">'.$item->get_datetime('CHK_timestamp').'</span>';
94 94
 	}
95 95
 
96 96
 
97 97
 
98
-	function column_CHK_timestamp( EE_Checkin $item ) {
98
+	function column_CHK_timestamp(EE_Checkin $item) {
99 99
 		$actions = array();
100
-		$delete_url = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID() ) );
101
-		$actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can( 'ee_delete_checkins', 'espresso_registrations_delete_checkin_row' ) ? '<a href="' . $delete_url . '" title="' . esc_attr__('Click here to delete this check-in record', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>' : '';
100
+		$delete_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID()));
101
+		$actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can('ee_delete_checkins', 'espresso_registrations_delete_checkin_row') ? '<a href="'.$delete_url.'" title="'.esc_attr__('Click here to delete this check-in record', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>' : '';
102 102
 
103
-		return sprintf( '%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions) );
103
+		return sprintf('%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions));
104 104
 	}
105 105
 
106 106
 
@@ -115,30 +115,30 @@  discard block
 block discarded – undo
115 115
 	 * @param bool    $count        Whether to return a count or not
116 116
 	 * @return EE_Checkin[]|int
117 117
 	 */
118
-	protected function _get_checkins( $per_page = 10, $count = FALSE ) {
119
-		$REG_ID = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : FALSE;
120
-		$DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : FALSE;
118
+	protected function _get_checkins($per_page = 10, $count = FALSE) {
119
+		$REG_ID = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : FALSE;
120
+		$DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : FALSE;
121 121
 
122 122
 		//if user does not have the capability for the checkins for this registration then get out!
123
-		if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID ) ) {
123
+		if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID)) {
124 124
 			return $count ? 0 : array();
125 125
 		}
126 126
 
127 127
 		//if no reg id then get out cause need a reg id
128
-		if ( empty( $REG_ID ) || empty( $DTT_ID ) )
129
-			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') );
128
+		if (empty($REG_ID) || empty($DTT_ID))
129
+			throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso'));
130 130
 
131 131
 		//set orderby
132 132
 		$orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value.
133 133
 
134
-		$order = !empty( $this->_req_data['order'] ) ? $this->_req_data['order'] : 'ASC';
134
+		$order = ! empty($this->_req_data['order']) ? $this->_req_data['order'] : 'ASC';
135 135
 
136
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
137
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
136
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
137
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
138 138
 		$limit = NULL;
139
-		if ( !$count ) {
140
-			$offset = ($current_page-1)*$per_page;
141
-			$limit = array( $offset, $per_page );
139
+		if ( ! $count) {
140
+			$offset = ($current_page - 1) * $per_page;
141
+			$limit = array($offset, $per_page);
142 142
 		}
143 143
 
144 144
 		$_where = array(
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
 			'DTT_ID' => $DTT_ID
147 147
 			);
148 148
 
149
-		$query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit );
149
+		$query_params = array($_where, 'order_by' => array($orderby => $order), 'limit' => $limit);
150 150
 
151 151
 		//if no per_page value then we just want to return a count of all Check-ins
152
-		if ( $count )
153
-			return EEM_Checkin::instance()->count( array( $_where ) );
152
+		if ($count)
153
+			return EEM_Checkin::instance()->count(array($_where));
154 154
 
155
-		return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params);
155
+		return $count ? EEM_Checkin::instance()->count(array($_where)) : EEM_Checkin::instance()->get_all($query_params);
156 156
 	}
157 157
 
158 158
 } //end class EE_Registration_CheckIn_List_Table
Please login to merge, or discard this patch.
admin/extend/registrations/templates/newsletter-send-form.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
                 <input type="hidden" id="get_newsletter_form_content_nonce" name="get_newsletter_form_content_nonce" value="<?php echo $ajax_nonce; ?>">
33 33
                 <input type="hidden" name="batch_message[id_type]" value="<?php echo $id_type; ?>">
34 34
                 <input id="newsletter-batch-ids" type="hidden" name="batch_message[ids]" value="">
35
-                <h3 class="newsletter-send-form-title"><?php printf( __('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]' ); ?></h3>
35
+                <h3 class="newsletter-send-form-title"><?php printf(__('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]'); ?></h3>
36 36
                 <label for="batch-message-template-selector"><?php _e('Select Template:', 'event_espresso'); ?></label>
37 37
                 <?php echo $template_selector; ?>
38 38
                 <div class="batch-message-edit-fields" style="display:none;">
Please login to merge, or discard this patch.
caffeinated/admin/new/pricing/Price_Types_List_Table.class.php 2 patches
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
  */
29 29
 class Price_Types_List_Table extends EE_Admin_List_Table {
30 30
 
31
-	public function __construct( $admin_page ) {
31
+	public function __construct($admin_page) {
32 32
 		parent::__construct($admin_page);
33
-		require_once(EE_MODELS . 'EEM_Price_Type.model.php');
33
+		require_once(EE_MODELS.'EEM_Price_Type.model.php');
34 34
 		$this->_PRT = EEM_Price_Type::instance();
35 35
 	}
36 36
 
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 
40 40
 	protected function _setup_data() {
41 41
 		$trashed = $this->_admin_page->get_view() == 'trashed' ? TRUE : FALSE;
42
-		$this->_data = $this->_admin_page->get_price_types_overview_data( $this->_per_page, FALSE, $trashed );
43
-		$this->_all_data_count = $this->_admin_page->get_price_types_overview_data( $this->_per_page, TRUE, FALSE );
44
-		$this->_trashed_count = $this->_admin_page->get_price_types_overview_data( $this->_per_page, TRUE, TRUE );
42
+		$this->_data = $this->_admin_page->get_price_types_overview_data($this->_per_page, FALSE, $trashed);
43
+		$this->_all_data_count = $this->_admin_page->get_price_types_overview_data($this->_per_page, TRUE, FALSE);
44
+		$this->_trashed_count = $this->_admin_page->get_price_types_overview_data($this->_per_page, TRUE, TRUE);
45 45
 	}
46 46
 
47 47
 
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 		$this->_columns = array(
58 58
 				'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
59 59
 				'name' => __('Name', 'event_espresso'),
60
-				'base_type' => '<div class="jst-cntr">' . __('Base Type', 'event_espresso') . '</div>',
61
-				'percent' => '<div class="jst-cntr">' . __('Applied', 'event_espresso') . '<br/>' . __('as ', 'event_espresso') . '<span class="big-text">' . __('%', 'event_espresso') . '</span>' . __(' or ', 'event_espresso') . '<span class="big-text">' . __('$', 'event_espresso') . '</span></div>',
62
-				'order' => '<div class="jst-cntr">' . __('Order of', 'event_espresso') . '<br/>' . __('Application', 'event_espresso') . '</div>'
60
+				'base_type' => '<div class="jst-cntr">'.__('Base Type', 'event_espresso').'</div>',
61
+				'percent' => '<div class="jst-cntr">'.__('Applied', 'event_espresso').'<br/>'.__('as ', 'event_espresso').'<span class="big-text">'.__('%', 'event_espresso').'</span>'.__(' or ', 'event_espresso').'<span class="big-text">'.__('$', 'event_espresso').'</span></div>',
62
+				'order' => '<div class="jst-cntr">'.__('Order of', 'event_espresso').'<br/>'.__('Application', 'event_espresso').'</div>'
63 63
 			);
64 64
 
65 65
 		$this->_sortable_columns = array(
66 66
 			// TRUE means its already sorted
67
-			'name' => array( 'name' => FALSE )
67
+			'name' => array('name' => FALSE)
68 68
 		);
69 69
 
70 70
 		$this->_hidden_columns = array();
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 	protected function _add_view_counts() {
84 84
 		$this->_views['all']['count'] = $this->_all_data_count;
85
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_types', 'pricing_trash_price_type' ) ) {
85
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_types', 'pricing_trash_price_type')) {
86 86
 			$this->_views['trashed']['count'] = $this->_trashed_count;
87 87
 		}
88 88
 	}
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 	function column_cb($item) {
95
-		if ( $item->base_type() !== 1 )
96
-			return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID() );
95
+		if ($item->base_type() !== 1)
96
+			return sprintf('<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID());
97 97
 		return '';
98 98
 	}
99 99
 
@@ -106,30 +106,30 @@  discard block
 block discarded – undo
106 106
 		//Build row actions
107 107
 		$actions = array();
108 108
 		// edit price link
109
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID() ) ) {
110
-			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_price_type', 'id'=>$item->ID() ), PRICING_ADMIN_URL );
111
-			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Price Type', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>';
109
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID())) {
110
+			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_price_type', 'id'=>$item->ID()), PRICING_ADMIN_URL);
111
+			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Price Type', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
112 112
 		}
113 113
 
114
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID() ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Price Type', 'event_espresso' ) . '">' . stripslashes( $item->name() ) . '</a>' : $item->name();
114
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Price Type', 'event_espresso').'">'.stripslashes($item->name()).'</a>' : $item->name();
115 115
 
116
-		if ( $item->base_type() !== 1 ) {
117
-			if ( $this->_view == 'all' ) {
116
+		if ($item->base_type() !== 1) {
117
+			if ($this->_view == 'all') {
118 118
 				// trash price link
119
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_type', 'pricing_trash_price_type', $item->ID() ) ) {
120
-					$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_price_type', 'id'=>$item->ID(), 'noheader' => TRUE ), PRICING_ADMIN_URL );
121
-					$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Price Type to Trash', 'event_espresso' ) . '">' . __( 'Move to Trash', 'event_espresso' ) . '</a>';
119
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_type', 'pricing_trash_price_type', $item->ID())) {
120
+					$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_price_type', 'id'=>$item->ID(), 'noheader' => TRUE), PRICING_ADMIN_URL);
121
+					$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Price Type to Trash', 'event_espresso').'">'.__('Move to Trash', 'event_espresso').'</a>';
122 122
 				}
123 123
 			} else {
124 124
 				// restore price link
125
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_type', 'pricing_restore_price_type', $item->ID() ) ) {
126
-					$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_price_type', 'id'=>$item->ID(), 'noheader' => TRUE ), PRICING_ADMIN_URL );
127
-					$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Price Type', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>';
125
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_type', 'pricing_restore_price_type', $item->ID())) {
126
+					$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_price_type', 'id'=>$item->ID(), 'noheader' => TRUE), PRICING_ADMIN_URL);
127
+					$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Price Type', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
128 128
 				}
129 129
 				// delete price link
130
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_type', 'pricing_delete_price_type', $item->ID() ) ) {
131
-					$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_price_type', 'id'=>$item->ID(), 'noheader' => TRUE ), PRICING_ADMIN_URL );
132
-					$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Price Type Permanently', 'event_espresso' ) . '">' . __( 'Delete Permanently', 'event_espresso' ) . '</a>';
130
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_type', 'pricing_delete_price_type', $item->ID())) {
131
+					$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_price_type', 'id'=>$item->ID(), 'noheader' => TRUE), PRICING_ADMIN_URL);
132
+					$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Price Type Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
133 133
 				}
134 134
 			}
135 135
 		}
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
 
148 148
 
149 149
 	function column_base_type($item) {
150
-		return '<div class="jst-cntr">' . $item->base_type_name()  . '</div>';
150
+		return '<div class="jst-cntr">'.$item->base_type_name().'</div>';
151 151
 	}
152 152
 
153 153
 
154 154
 
155 155
 
156 156
 	function column_percent($item) {
157
-		return '<div class="jst-cntr">' . ( $item->is_percent() ? '%' : EE_Registry::instance()->CFG->currency->sign ) . '</div>';
157
+		return '<div class="jst-cntr">'.($item->is_percent() ? '%' : EE_Registry::instance()->CFG->currency->sign).'</div>';
158 158
 	}
159 159
 
160 160
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
 
164 164
 	function column_order($item) {
165
-		return '<div class="jst-cntr">' . $item->order() . '</div>';
165
+		return '<div class="jst-cntr">'.$item->order().'</div>';
166 166
 	}
167 167
 
168 168
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 
3 5
 /**
4 6
  * Event Espresso
@@ -92,8 +94,9 @@  discard block
 block discarded – undo
92 94
 
93 95
 
94 96
 	function column_cb($item) {
95
-		if ( $item->base_type() !== 1 )
96
-			return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID() );
97
+		if ( $item->base_type() !== 1 ) {
98
+					return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID() );
99
+		}
97 100
 		return '';
98 101
 	}
99 102
 
Please login to merge, or discard this patch.
caffeinated/admin/new/pricing/Prices_List_Table.class.php 3 patches
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 
3 5
 /**
4 6
  * Event Espresso
@@ -118,8 +120,9 @@  discard block
 block discarded – undo
118 120
 
119 121
 		$new_row = $row_class;
120 122
 
121
-		if ( $item->type_obj()->base_type() !== 1 && $item->type_obj()->base_type() !== 4 )
122
-			$new_row .= ' rowsortable';
123
+		if ( $item->type_obj()->base_type() !== 1 && $item->type_obj()->base_type() !== 4 ) {
124
+					$new_row .= ' rowsortable';
125
+		}
123 126
 
124 127
 		return ' class="' . $new_row . '"';
125 128
 	}
@@ -131,8 +134,9 @@  discard block
 block discarded – undo
131 134
 
132 135
 
133 136
 	function column_cb($item) {
134
-		if ( $item->type_obj()->base_type() !== 1 )
135
-			return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() );
137
+		if ( $item->type_obj()->base_type() !== 1 ) {
138
+					return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() );
139
+		}
136 140
 		return '';
137 141
 	}
138 142
 
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	protected $_price_types = array();
38 38
 
39
-	public function __construct( $admin_page ) {
39
+	public function __construct($admin_page) {
40 40
 		parent::__construct($admin_page);
41
-		require_once(EE_MODELS . 'EEM_Price_Type.model.php');
41
+		require_once(EE_MODELS.'EEM_Price_Type.model.php');
42 42
 		$this->_PRT = EEM_Price_Type::instance();
43 43
 		$this->_price_types = $this->_PRT->get_all_deleted_and_undeleted();
44 44
 	}
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
 	protected function _setup_data() {
50 50
 		$trashed = $this->_admin_page->get_view() == 'trashed' ? true : false;
51
-		$this->_data = $this->_admin_page->get_prices_overview_data( $this->_per_page, false, $trashed );
52
-		$this->_all_data_count = $this->_admin_page->get_prices_overview_data( $this->_per_page, true, false );
53
-		$this->_trashed_count = $this->_admin_page->get_prices_overview_data( $this->_per_page, true, true );
51
+		$this->_data = $this->_admin_page->get_prices_overview_data($this->_per_page, false, $trashed);
52
+		$this->_all_data_count = $this->_admin_page->get_prices_overview_data($this->_per_page, true, false);
53
+		$this->_trashed_count = $this->_admin_page->get_prices_overview_data($this->_per_page, true, true);
54 54
 	}
55 55
 
56 56
 
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 
75 75
 			$this->_sortable_columns = array(
76 76
 						// true means its already sorted
77
-						'name' => array( 'name' => false ),
78
-						'type' => array( 'type' => false ),
79
-						'amount' => array( 'amount' => false )
77
+						'name' => array('name' => false),
78
+						'type' => array('type' => false),
79
+						'amount' => array('amount' => false)
80 80
 			);
81 81
 
82 82
         $this->_hidden_columns = array(
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 	protected function _add_view_counts() {
100 100
 		$this->_views['all']['count'] = $this->_all_data_count;
101
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_prices', 'pricing_trash_price') ) {
101
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_prices', 'pricing_trash_price')) {
102 102
 			$this->_views['trashed']['count'] = $this->_trashed_count;
103 103
 		}
104 104
 	}
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
 	 * @param  object $item the current item
113 113
 	 * @return string
114 114
 	 */
115
-	protected function _get_row_class( $item ) {
115
+	protected function _get_row_class($item) {
116 116
 		static $row_class = '';
117
-		$row_class = ( $row_class == '' ? 'alternate' : '' );
117
+		$row_class = ($row_class == '' ? 'alternate' : '');
118 118
 
119 119
 		$new_row = $row_class;
120 120
 
121
-		if ( $item->type_obj()->base_type() !== 1 && $item->type_obj()->base_type() !== 4 )
121
+		if ($item->type_obj()->base_type() !== 1 && $item->type_obj()->base_type() !== 4)
122 122
 			$new_row .= ' rowsortable';
123 123
 
124
-		return ' class="' . $new_row . '"';
124
+		return ' class="'.$new_row.'"';
125 125
 	}
126 126
 
127 127
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 
132 132
 
133 133
 	function column_cb($item) {
134
-		if ( $item->type_obj()->base_type() !== 1 )
135
-			return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() );
134
+		if ($item->type_obj()->base_type() !== 1)
135
+			return sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID());
136 136
 		return '';
137 137
 	}
138 138
 
@@ -145,31 +145,31 @@  discard block
 block discarded – undo
145 145
 		//Build row actions
146 146
 		$actions = array();
147 147
 		// edit price link
148
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_default_price', 'pricing_edit_price', $item->ID() ) ) {
149
-			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_price', 'id'=>$item->ID() ), PRICING_ADMIN_URL );
150
-			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Price', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>';
148
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_default_price', 'pricing_edit_price', $item->ID())) {
149
+			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_price', 'id'=>$item->ID()), PRICING_ADMIN_URL);
150
+			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Price', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
151 151
 		}
152 152
 
153
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_default_price', 'edit_price', $item->ID() ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Price', 'event_espresso' ) . '">' . stripslashes( $item->name() ) . '</a>' : $item->name();
153
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_default_price', 'edit_price', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Price', 'event_espresso').'">'.stripslashes($item->name()).'</a>' : $item->name();
154 154
 
155
-		if ( $item->type_obj()->base_type() !== 1 ) {
155
+		if ($item->type_obj()->base_type() !== 1) {
156 156
 			if ($this->_view == 'all') {
157 157
 				// trash price link
158
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price', 'pricing_trash_price', $item->ID() ) ) {
159
-					$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_price', 'id'=>$item->ID(), 'noheader' => true ), PRICING_ADMIN_URL );
160
-					$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Price to Trash', 'event_espresso' ) . '">' . __( 'Move to Trash', 'event_espresso' ) . '</a>';
158
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price', 'pricing_trash_price', $item->ID())) {
159
+					$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_price', 'id'=>$item->ID(), 'noheader' => true), PRICING_ADMIN_URL);
160
+					$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Price to Trash', 'event_espresso').'">'.__('Move to Trash', 'event_espresso').'</a>';
161 161
 				}
162 162
 			} else {
163
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price', 'pricing_restore_price', $item->ID() ) ) {
163
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price', 'pricing_restore_price', $item->ID())) {
164 164
 					// restore price link
165
-					$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_price', 'id'=>$item->ID(), 'noheader' => true ), PRICING_ADMIN_URL );
166
-					$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Price', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>';
165
+					$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_price', 'id'=>$item->ID(), 'noheader' => true), PRICING_ADMIN_URL);
166
+					$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Price', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
167 167
 				}
168 168
 
169 169
 				// delete price link
170
-				if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price', 'pricing_delete_price', $item->ID() ) ) {
171
-					$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_price', 'id'=>$item->ID(), 'noheader' => true ), PRICING_ADMIN_URL );
172
-					$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Price Permanently', 'event_espresso' ) . '">' . __( 'Delete Permanently', 'event_espresso' ) . '</a>';
170
+				if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price', 'pricing_delete_price', $item->ID())) {
171
+					$delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_price', 'id'=>$item->ID(), 'noheader' => true), PRICING_ADMIN_URL);
172
+					$actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Price Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
173 173
 				}
174 174
 			}
175 175
 		}
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
179 179
 										/* $1%s */ $name_link,
180 180
 										/* $2%s */ $item->ID(),
181
-										/* $3%s */ $this->row_actions( $actions )
181
+										/* $3%s */ $this->row_actions($actions)
182 182
 		);
183 183
 	}
184 184
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
 
197 197
 	function column_description($item) {
198
-		return stripslashes( $item->desc() );
198
+		return stripslashes($item->desc());
199 199
 	}
200 200
 
201 201
 
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
 
205 205
 	function column_amount($item) {
206 206
 		if ($this->_price_types[$item->type()]->is_percent()) {
207
-			return '<div class="pad-amnt-rght">' . number_format($item->amount(), 1) . '%</div>';
207
+			return '<div class="pad-amnt-rght">'.number_format($item->amount(), 1).'%</div>';
208 208
 		} else {
209
-			return '<div class="pad-amnt-rght">' . EEH_Template::format_currency( $item->amount() ) . '</div>';
209
+			return '<div class="pad-amnt-rght">'.EEH_Template::format_currency($item->amount()).'</div>';
210 210
 		}
211 211
 	}
212 212
 
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,10 +79,10 @@
 block discarded – undo
79 79
 						'amount' => array( 'amount' => false )
80 80
 			);
81 81
 
82
-        $this->_hidden_columns = array(
82
+		$this->_hidden_columns = array(
83 83
 			);
84 84
 
85
-        $this->_ajax_sorting_callback = 'update_prices_order';
85
+		$this->_ajax_sorting_callback = 'update_prices_order';
86 86
 
87 87
 	}
88 88
 
Please login to merge, or discard this patch.
caffeinated/admin/new/pricing/Pricing_Admin_Page_Init.core.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 *
24 24
 * ------------------------------------------------------------------------
25 25
 */
26
-class Pricing_Admin_Page_Init extends EE_Admin_Page_Init  {
26
+class Pricing_Admin_Page_Init extends EE_Admin_Page_Init {
27 27
 
28 28
 
29 29
 
@@ -36,20 +36,20 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	public function __construct() {
38 38
 
39
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
39
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
40 40
 
41
-		define( 'PRICING_PG_SLUG', 'pricing' );
42
-		define( 'PRICING_LABEL', __('Pricing', 'event_espresso'));
43
-		define( 'PRICING_PG_NAME', ucwords( str_replace( '_', '', PRICING_PG_SLUG )));
44
-		define( 'PRICING_ADMIN', EE_CORE_CAF_ADMIN . 'new' . DS . PRICING_PG_SLUG . DS );
45
-		define( 'PRICING_ADMIN_URL', admin_url( 'admin.php?page=' . PRICING_PG_SLUG ));
46
-		define( 'PRICING_ASSETS_PATH', PRICING_ADMIN . 'assets' . DS );
47
-		define( 'PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG .'/assets/' );
48
-		define( 'PRICING_TEMPLATE_PATH', PRICING_ADMIN . 'templates' . DS );
49
-		define( 'PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new' . DS . PRICING_PG_SLUG . DS . 'templates/' );
41
+		define('PRICING_PG_SLUG', 'pricing');
42
+		define('PRICING_LABEL', __('Pricing', 'event_espresso'));
43
+		define('PRICING_PG_NAME', ucwords(str_replace('_', '', PRICING_PG_SLUG)));
44
+		define('PRICING_ADMIN', EE_CORE_CAF_ADMIN.'new'.DS.PRICING_PG_SLUG.DS);
45
+		define('PRICING_ADMIN_URL', admin_url('admin.php?page='.PRICING_PG_SLUG));
46
+		define('PRICING_ASSETS_PATH', PRICING_ADMIN.'assets'.DS);
47
+		define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL.'new'.DS.PRICING_PG_SLUG.'/assets/');
48
+		define('PRICING_TEMPLATE_PATH', PRICING_ADMIN.'templates'.DS);
49
+		define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL.'new'.DS.PRICING_PG_SLUG.DS.'templates/');
50 50
 
51 51
 		parent::__construct();
52
-		$this->_folder_path = EE_CORE_CAF_ADMIN . 'new' . DS . $this->_folder_name . DS;
52
+		$this->_folder_path = EE_CORE_CAF_ADMIN.'new'.DS.$this->_folder_name.DS;
53 53
 
54 54
 	}
55 55
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 
66 66
 	protected function _set_menu_map() {
67
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
67
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
68 68
 			'menu_group' => 'management',
69 69
 			'menu_order' => 20,
70 70
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
 * Event Espresso
4 6
 *
Please login to merge, or discard this patch.
new/pricing/help_tours/Pricing_Add_New_Default_Price_Help_Tour.class.php 2 patches
Spacing   +7 added lines, -7 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
 /**
@@ -78,25 +78,25 @@  discard block
 block discarded – undo
78 78
 
79 79
 
80 80
 	protected function _start() {
81
-		$content = '<h3>' . __('Add New Default Price', 'event_espresso') . '</h3>';
82
-		$content .= '<p>' . __('This tour of the add new default price page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
81
+		$content = '<h3>'.__('Add New Default Price', 'event_espresso').'</h3>';
82
+		$content .= '<p>'.__('This tour of the add new default price page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
83 83
 		return $content;
84 84
 	}
85 85
 
86 86
 	protected function _price_type_stop() {
87
-		return '<p>' . __('Price Types are a way of categorizing a price, discount, tax, or surcharge and indicating how it gets applied to a running total when a transaction occurs.', 'event_espresso') . '</p>';
87
+		return '<p>'.__('Price Types are a way of categorizing a price, discount, tax, or surcharge and indicating how it gets applied to a running total when a transaction occurs.', 'event_espresso').'</p>';
88 88
 	}
89 89
 
90 90
 	protected function _price_name_stop() {
91
-		return '<p>' . __('The name of the price, discount, tax, or surcharge that will be seen by your customers.', 'event_espresso') . '</p>';
91
+		return '<p>'.__('The name of the price, discount, tax, or surcharge that will be seen by your customers.', 'event_espresso').'</p>';
92 92
 	}
93 93
 
94 94
 	protected function _price_description_stop() {
95
-		return '<p>' . __('View the price type (price, discount, tax or surcharge) description.', 'event_espresso') . '</p>';
95
+		return '<p>'.__('View the price type (price, discount, tax or surcharge) description.', 'event_espresso').'</p>';
96 96
 	}
97 97
 
98 98
 	protected function _price_amount_stop() {
99
-		return '<p>' . __('The ticket amount before any deductions.', 'event_espresso') . '</p>';
99
+		return '<p>'.__('The ticket amount before any deductions.', 'event_espresso').'</p>';
100 100
 	}
101 101
 
102 102
 }
103 103
\ 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.