Completed
Branch FET/11199/integrate-persistent... (5935c5)
by
unknown
17:34 queued 15:28
created
admin_pages/other_services/Other_Services_Admin_Page_Init.core.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
 /**
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function __construct() {
34 34
 		//define some help/support page related constants
35
-		define( 'EE_OTHER_SERVICES_PG_SLUG', 'espresso_packages' );
36
-		define( 'EE_OTHER_SERVICES_ADMIN_URL', admin_url('admin.php?page=' . EE_OTHER_SERVICES_PG_SLUG ));
37
-		define( 'EE_OTHER_SERVICES_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'other_services/templates/');
38
-		define( 'EE_OTHER_SERVICES_ADMIN', EE_ADMIN_PAGES . 'other_services/' );
39
-		define( 'EE_OTHER_SERVICES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'other_services/assets/');
35
+		define('EE_OTHER_SERVICES_PG_SLUG', 'espresso_packages');
36
+		define('EE_OTHER_SERVICES_ADMIN_URL', admin_url('admin.php?page='.EE_OTHER_SERVICES_PG_SLUG));
37
+		define('EE_OTHER_SERVICES_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES.'other_services/templates/');
38
+		define('EE_OTHER_SERVICES_ADMIN', EE_ADMIN_PAGES.'other_services/');
39
+		define('EE_OTHER_SERVICES_ASSETS_URL', EE_ADMIN_PAGES_URL.'other_services/assets/');
40 40
 
41 41
 		parent::__construct();
42 42
 	}
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	protected function _set_menu_map() {
49
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
49
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
50 50
 			'menu_group' => 'extras',
51 51
 			'menu_order' => 30,
52 52
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
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/payments/Payment_Log_Admin_List_Table.class.php 2 patches
Braces   +4 added lines, -3 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
@@ -185,9 +186,9 @@  discard block
 block discarded – undo
185 186
 	public function column_PMD_ID(EE_Change_Log $item){
186 187
 		if($item->object() instanceof EE_Payment_Method){
187 188
 			return $item->object()->admin_name();
188
-		}elseif($item->object() instanceof EE_Payment && $item->object()->payment_method()){
189
+		} elseif($item->object() instanceof EE_Payment && $item->object()->payment_method()){
189 190
 			return $item->object()->payment_method()->admin_name();
190
-		}else{
191
+		} else{
191 192
 			return __("No longer exists", 'event_espresso');
192 193
 		}
193 194
 	}
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 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
 /**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @param \EE_Admin_Page $admin_page
36 36
 	 * @return Payment_Log_Admin_List_Table
37 37
 	 */
38
-	public function __construct( $admin_page ) {
38
+	public function __construct($admin_page) {
39 39
 		parent::__construct($admin_page);
40 40
 	}
41 41
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 //		}else{
53 53
 //			$this->_data = $this->_admin_page->get_questions( $this->_per_page,$this->_current_page, FALSE );
54 54
 //		}
55
-		$this->_all_data_count = $this->_admin_page->get_payment_logs( $this->_per_page,$this->_current_page, TRUE );
56
-		add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons',array($this,'add_download_logs_checkbox'));
55
+		$this->_all_data_count = $this->_admin_page->get_payment_logs($this->_per_page, $this->_current_page, TRUE);
56
+		add_action('AHEE__EE_Admin_List_Table__extra_tablenav__after_bottom_buttons', array($this, 'add_download_logs_checkbox'));
57 57
 	}
58 58
 
59 59
 
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 	 * adds a checkbox to the bottom of the list table, instead of at the top with the rest of the filters
64 64
 	 * @return void
65 65
 	 */
66
-	public function add_download_logs_checkbox(){
67
-		echo "<input type='submit' class='button-primary' id='download_results' name='download_results' value='".  __( 'Download Results', 'event_espresso' )."'>";
66
+	public function add_download_logs_checkbox() {
67
+		echo "<input type='submit' class='button-primary' id='download_results' name='download_results' value='".__('Download Results', 'event_espresso')."'>";
68 68
 	}
69 69
 
70 70
 
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	protected function _set_properties() {
77 77
 		$this->_wp_list_args = array(
78
-			'singular' => __('payment log', 'event_espresso' ),
79
-			'plural' => __('payment logs', 'event_espresso' ),
78
+			'singular' => __('payment log', 'event_espresso'),
79
+			'plural' => __('payment logs', 'event_espresso'),
80 80
 			'ajax' => TRUE, //for now,
81 81
 			'screen' => $this->_admin_page->get_current_screen()->id
82 82
 			);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			);
91 91
 
92 92
 		$this->_sortable_columns = array(
93
-			'LOG_time' => array( 'LOG_time' => TRUE ),
93
+			'LOG_time' => array('LOG_time' => TRUE),
94 94
 			);
95 95
 
96 96
 		$this->_hidden_columns = array(
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
 		$filters = array();
109 109
 		//todo we're currently using old functions here. We need to move things into the Events_Admin_Page() class as methods.
110 110
 		$payment_methods = EEM_Payment_Method::instance()->get_all();
111
-		$payment_method_names = array(array('id'=>'all','text'=>  __("All", 'event_espresso')),array('id'=>'0','text'=>  __("Unknown Payment Method", 'event_espresso')));
112
-		foreach($payment_methods as $payment_method){
113
-			$payment_method_names[] = array('id'=>$payment_method->ID(),'text'=>$payment_method->admin_name());
111
+		$payment_method_names = array(array('id'=>'all', 'text'=>  __("All", 'event_espresso')), array('id'=>'0', 'text'=>  __("Unknown Payment Method", 'event_espresso')));
112
+		foreach ($payment_methods as $payment_method) {
113
+			$payment_method_names[] = array('id'=>$payment_method->ID(), 'text'=>$payment_method->admin_name());
114 114
 		}
115 115
 		$filters[] = EEH_Form_Fields::select_input('_payment_method', $payment_method_names, isset($this->_req_data['_payment_method']) ? $this->_req_data['_payment_method'] : 'all');
116
-		$start_date = isset( $this->_req_data['payment-filter-start-date'] ) ? wp_strip_all_tags( $this->_req_data['payment-filter-start-date'] ) : date( 'm/d/Y', strtotime( '-6 months' ));
117
-		$end_date = isset( $this->_req_data['payment-filter-end-date'] ) ? wp_strip_all_tags( $this->_req_data['payment-filter-end-date'] ) : date( 'm/d/Y' );
116
+		$start_date = isset($this->_req_data['payment-filter-start-date']) ? wp_strip_all_tags($this->_req_data['payment-filter-start-date']) : date('m/d/Y', strtotime('-6 months'));
117
+		$end_date = isset($this->_req_data['payment-filter-end-date']) ? wp_strip_all_tags($this->_req_data['payment-filter-end-date']) : date('m/d/Y');
118 118
 		ob_start();
119 119
 		?>
120
-		<label for="txn-filter-start-date"><?php _e( 'Display Transactions from ', 'event_espresso' ); ?></label>
120
+		<label for="txn-filter-start-date"><?php _e('Display Transactions from ', 'event_espresso'); ?></label>
121 121
 		<input id="payment-filter-start-date" class="datepicker" type="text" value="<?php echo $start_date; ?>" name="payment-filter-start-date" size="15"/>
122
-		<label for="txn-filter-end-date"><?php _e( ' until ', 'event_espresso' ); ?></label>
122
+		<label for="txn-filter-end-date"><?php _e(' until ', 'event_espresso'); ?></label>
123 123
 		<input id="payment-filter-end-date" class="datepicker" type="text" value="<?php echo $end_date; ?>" name="payment-filter-end-date" size="15"/>
124 124
 		<?php
125 125
 		$filters[] = ob_get_clean();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return void
134 134
 	 */
135 135
 	protected function _add_view_counts() {
136
-		$this->_views['all']['count'] = $this->_admin_page->get_payment_logs( $this->_per_page,$this->_current_page, TRUE );
136
+		$this->_views['all']['count'] = $this->_admin_page->get_payment_logs($this->_per_page, $this->_current_page, TRUE);
137 137
 	}
138 138
 
139 139
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	 * @return string
145 145
 	 */
146 146
 	public function column_cb($item) {
147
-		return sprintf( '<input type="checkbox" class="option_id" name="checkbox[%1$d]" value="%1$d" />', $item->ID() );
147
+		return sprintf('<input type="checkbox" class="option_id" name="checkbox[%1$d]" value="%1$d" />', $item->ID());
148 148
 	}
149 149
 
150 150
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 * @param \EE_Change_Log $item
171 171
 	 * @return string
172 172
 	 */
173
-	public function column_LOG_time(EE_Change_Log $item){
173
+	public function column_LOG_time(EE_Change_Log $item) {
174 174
 		return $item->get_datetime('LOG_time');
175 175
 	}
176 176
 
@@ -181,12 +181,12 @@  discard block
 block discarded – undo
181 181
 	 * @param \EE_Change_Log $item
182 182
 	 * @return string
183 183
 	 */
184
-	public function column_PMD_ID(EE_Change_Log $item){
185
-		if($item->object() instanceof EE_Payment_Method){
184
+	public function column_PMD_ID(EE_Change_Log $item) {
185
+		if ($item->object() instanceof EE_Payment_Method) {
186 186
 			return $item->object()->admin_name();
187
-		}elseif($item->object() instanceof EE_Payment && $item->object()->payment_method()){
187
+		}elseif ($item->object() instanceof EE_Payment && $item->object()->payment_method()) {
188 188
 			return $item->object()->payment_method()->admin_name();
189
-		}else{
189
+		} else {
190 190
 			return __("No longer exists", 'event_espresso');
191 191
 		}
192 192
 	}
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
 	 * @param \EE_Change_Log $item
199 199
 	 * @return string
200 200
 	 */
201
-	public function column_TXN_ID(EE_Change_Log $item){
202
-		if($item->object() instanceof EE_Payment){
203
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction', $item->object()->TXN_ID() )) {
204
-				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->object()->TXN_ID() ), TXN_ADMIN_URL );
205
-				return '<a href="'.$view_txn_lnk_url.'"  title="' . sprintf( esc_attr__( 'click to view transaction #%s', 'event_espresso' ),  $item->object()->TXN_ID() ) . '">' . sprintf( __( 'view txn %s', 'event_espresso' ),  $item->object()->TXN_ID() ) . '</a>';
201
+	public function column_TXN_ID(EE_Change_Log $item) {
202
+		if ($item->object() instanceof EE_Payment) {
203
+			if (EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->object()->TXN_ID())) {
204
+				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->object()->TXN_ID()), TXN_ADMIN_URL);
205
+				return '<a href="'.$view_txn_lnk_url.'"  title="'.sprintf(esc_attr__('click to view transaction #%s', 'event_espresso'), $item->object()->TXN_ID()).'">'.sprintf(__('view txn %s', 'event_espresso'), $item->object()->TXN_ID()).'</a>';
206 206
 			}
207 207
 		} else {
208 208
 			return __("Unable to find transaction", 'event_espresso');
Please login to merge, or discard this patch.
payments/help_tours/Payment_Methods_Selection_Help_Tour.class.php 2 patches
Spacing   +6 added lines, -6 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
 /**
@@ -68,21 +68,21 @@  discard block
 block discarded – undo
68 68
 
69 69
 
70 70
 	protected function _start() {
71
-		$content = '<h3>' . __('Payment Methods', 'event_espresso') . '</h3>';
72
-		$content .= '<p>' . __('This tour of the Payment Methods page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
71
+		$content = '<h3>'.__('Payment Methods', 'event_espresso').'</h3>';
72
+		$content .= '<p>'.__('This tour of the Payment Methods page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
73 73
 		return $content;
74 74
 	}
75 75
 
76 76
 	protected function _gateway_links_stop() {
77
-		return '<p>' . __('Available payment methods are shown here. Clicking on a payment method will provide you with an option to activate that payment gateway.', 'event_espresso') . '</p>';
77
+		return '<p>'.__('Available payment methods are shown here. Clicking on a payment method will provide you with an option to activate that payment gateway.', 'event_espresso').'</p>';
78 78
 	}
79 79
 
80 80
 	protected function _gateway_settings_metabox_stop() {
81
-		return '<p>' . __('A payment gateway must first be enabled. You will then be able to configure the payment gateway. Be sure to save settings after configuring your payment gateway.', 'event_espresso') . '</p>';
81
+		return '<p>'.__('A payment gateway must first be enabled. You will then be able to configure the payment gateway. Be sure to save settings after configuring your payment gateway.', 'event_espresso').'</p>';
82 82
 	}
83 83
 
84 84
 	protected function _end_tour_stop() {
85
-		return '<p>' . __('After configuring your payment gateway, go to the Event Editor to create your first event with Event Espresso.', 'event_espresso') . '</p>';
85
+		return '<p>'.__('After configuring your payment gateway, go to the Event Editor to create your first event with Event Espresso.', 'event_espresso').'</p>';
86 86
 	}
87 87
 
88 88
 }
89 89
\ 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.
payments/help_tours/Payment_Methods_Settings_Help_Tour.class.php 2 patches
Spacing   +4 added lines, -4 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
 /**
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 
54 54
 
55 55
 	protected function _start() {
56
-		$content = '<h3>' . __('Payment Settings', 'event_espresso') . '</h3>';
57
-		$content .= '<p>' . __('This tour of the Payment Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
56
+		$content = '<h3>'.__('Payment Settings', 'event_espresso').'</h3>';
57
+		$content .= '<p>'.__('This tour of the Payment Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
58 58
 		return $content;
59 59
 	}
60 60
 
61 61
 	protected function _show_pending_options_stop() {
62
-		return '<p>' . __('Specify whether to provide your registrants with the option to retry payments.', 'event_espresso') . '</p>';
62
+		return '<p>'.__('Specify whether to provide your registrants with the option to retry payments.', 'event_espresso').'</p>';
63 63
 	}
64 64
 }
65 65
\ 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/payments/templates/payment_log_details.template.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -3,27 +3,27 @@
 block discarded – undo
3 3
 if (!defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 /**
6
- * Event Espresso
7
- *
8
- * Event Registration and Management Plugin for WordPress
9
- *
10
- * @ package			Event Espresso
11
- * @ author			Seth Shoultes
12
- * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
- * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
- * @ link					http://www.eventespresso.com
15
- * @ version		 	4.3
16
- *
17
- * ------------------------------------------------------------------------
18
- *
19
- * payment_log_details
20
- *
21
- * @package			Event Espresso
22
- * @subpackage
23
- * @author				Mike Nelson
24
- *
25
- * ------------------------------------------------------------------------
26
- */
6
+	 * Event Espresso
7
+	 *
8
+	 * Event Registration and Management Plugin for WordPress
9
+	 *
10
+	 * @ package			Event Espresso
11
+	 * @ author			Seth Shoultes
12
+	 * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
+	 * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
+	 * @ link					http://www.eventespresso.com
15
+	 * @ version		 	4.3
16
+	 *
17
+	 * ------------------------------------------------------------------------
18
+	 *
19
+	 * payment_log_details
20
+	 *
21
+	 * @package			Event Espresso
22
+	 * @subpackage
23
+	 * @author				Mike Nelson
24
+	 *
25
+	 * ------------------------------------------------------------------------
26
+	 */
27 27
 /*@var EE_Change_Log $payment_Log */
28 28
 /*@var EE_Payment_Method $payment_Method*/
29 29
 /*@var EE_Transaction $transaction*/
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 /**
6 6
  * Event Espresso
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 					</label>
62 62
 				</th>
63 63
 				<td>
64
-					<?php echo $transaction ? $transaction->ID() : __("Could not be determined", 'event_espresso');?>
64
+					<?php echo $transaction ? $transaction->ID() : __("Could not be determined", 'event_espresso'); ?>
65 65
 
66 66
 				</td>
67 67
 			</tr>
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 					</label>
73 73
 				</th>
74 74
 				<td>
75
-					<?php echo $payment_log->e('LOG_message','as_table');//EEH_Template::layout_array_as_table($payment_log->content())?>
75
+					<?php echo $payment_log->e('LOG_message', 'as_table'); //EEH_Template::layout_array_as_table($payment_log->content())?>
76 76
 				</td>
77 77
 			</tr>
78 78
 		</tbody>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 /**
6 7
  * Event Espresso
7 8
  *
Please login to merge, or discard this patch.
admin_pages/payments/templates/payment_method_activate.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 				<td>
15 15
 					
16 16
 					<a id="activate_<?php echo $payment_method->slug()?>" class="espresso-button-green button-primary" href="<?php echo $activate_url?>">
17
-						<?php printf(__("Activate %s Payment Method?", "event_espresso"),$payment_method->admin_name()); ?>
17
+						<?php printf(__("Activate %s Payment Method?", "event_espresso"), $payment_method->admin_name()); ?>
18 18
 					</a>
19 19
 				</td>
20 20
 			</tr>
Please login to merge, or discard this patch.
admin_pages/payments/templates/payment_settings.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 					</label>
10 10
 				</th>
11 11
 				<td>
12
-					<?php echo EEH_Form_Fields::select_input('show_pending_payment_options', $values, $show_pending_payment_options ); ?>
12
+					<?php echo EEH_Form_Fields::select_input('show_pending_payment_options', $values, $show_pending_payment_options); ?>
13 13
 
14 14
 				</td>
15 15
 			</tr>
Please login to merge, or discard this patch.
admin_pages/registration_form/Registration_Form_Admin_Page_Init.core.php 2 patches
Spacing   +12 added lines, -12 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
 /**
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
 
34 34
 	public function __construct() {
35 35
 		//define some constants
36
-		define( 'REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form' );
37
-		define( 'REGISTRATION_FORM_LABEL', __('Registration Form', 'event_espresso'));
38
-		define( 'REGISTRATION_FORM_PG_NAME', REGISTRATION_FORM_LABEL );
39
-		define( 'REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES . 'registration_form' . DS );
40
-		define( 'REGISTRATION_FORM_ADMIN_URL', admin_url( 'admin.php?page=' . REGISTRATION_FORM_PG_SLUG ));
41
-		define( 'EE_FORMS_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG ));
42
-		define( 'REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN . 'assets' . DS );
43
-		define( 'REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registration_form/assets/' );
44
-		define( 'REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN . 'templates' . DS );
45
-		define( 'REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registration_form/templates/' );
36
+		define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form');
37
+		define('REGISTRATION_FORM_LABEL', __('Registration Form', 'event_espresso'));
38
+		define('REGISTRATION_FORM_PG_NAME', REGISTRATION_FORM_LABEL);
39
+		define('REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES.'registration_form'.DS);
40
+		define('REGISTRATION_FORM_ADMIN_URL', admin_url('admin.php?page='.REGISTRATION_FORM_PG_SLUG));
41
+		define('EE_FORMS_ADMIN_URL', admin_url('admin.php?page='.REGISTRATION_FORM_PG_SLUG));
42
+		define('REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN.'assets'.DS);
43
+		define('REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL.'registration_form/assets/');
44
+		define('REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN.'templates'.DS);
45
+		define('REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'registration_form/templates/');
46 46
 		parent::__construct();
47 47
 	}
48 48
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 
55 55
 	protected function _set_menu_map() {
56
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
56
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
57 57
 			'menu_group' => 'management',
58 58
 			'menu_order' => 30,
59 59
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
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.
registration_form/Registration_Form_Questions_Admin_List_Table.class.php 2 patches
Braces   +7 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
@@ -42,7 +43,7 @@  discard block
 block discarded – undo
42 43
 	protected function _setup_data() {
43 44
 		if(isset($this->_req_data['status'] ) && $this->_req_data['status'] == 'trash'){
44 45
 			$this->_data = $this->_admin_page->get_trashed_questions( $this->_per_page,$this->_current_page, FALSE );
45
-		}else{
46
+		} else{
46 47
 			$this->_data = $this->_admin_page->get_questions( $this->_per_page,$this->_current_page, FALSE );
47 48
 		}
48 49
 		$this->_all_data_count = $this->_admin_page->get_questions( $this->_per_page,$this->_current_page, TRUE );
@@ -117,8 +118,9 @@  discard block
 block discarded – undo
117 118
 	public function column_display_text(EE_Question $item) {
118 119
 		$system_question = $item->is_system_question();
119 120
 
120
-		if ( !defined('REG_ADMIN_URL') )
121
-			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
121
+		if ( !defined('REG_ADMIN_URL') ) {
122
+					define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
123
+		}
122 124
 
123 125
 		$edit_query_args = array(
124 126
 				'action' => 'edit_question',
@@ -152,7 +154,7 @@  discard block
 block discarded – undo
152 154
 		$options= $item->options();
153 155
 		if(empty($options)){
154 156
 			return "N/A";
155
-		}else{
157
+		} else{
156 158
 			foreach($options as $optionID=>$option){
157 159
 				/* @var $option EE_Question_Option */
158 160
 				$optionNames[]=$option->value();
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 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
 /**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 class Registration_Form_Questions_Admin_List_Table extends EE_Admin_List_Table {
33 33
 
34 34
 
35
-	public function __construct( $admin_page ) {
35
+	public function __construct($admin_page) {
36 36
 		parent::__construct($admin_page);
37 37
 	}
38 38
 
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 
41 41
 
42 42
 	protected function _setup_data() {
43
-		if(isset($this->_req_data['status'] ) && $this->_req_data['status'] == 'trash'){
44
-			$this->_data = $this->_admin_page->get_trashed_questions( $this->_per_page,$this->_current_page, FALSE );
45
-		}else{
46
-			$this->_data = $this->_admin_page->get_questions( $this->_per_page,$this->_current_page, FALSE );
43
+		if (isset($this->_req_data['status']) && $this->_req_data['status'] == 'trash') {
44
+			$this->_data = $this->_admin_page->get_trashed_questions($this->_per_page, $this->_current_page, FALSE);
45
+		} else {
46
+			$this->_data = $this->_admin_page->get_questions($this->_per_page, $this->_current_page, FALSE);
47 47
 		}
48
-		$this->_all_data_count = $this->_admin_page->get_questions( $this->_per_page,$this->_current_page, TRUE );
48
+		$this->_all_data_count = $this->_admin_page->get_questions($this->_per_page, $this->_current_page, TRUE);
49 49
 	}
50 50
 
51 51
 
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
 	protected function _set_properties() {
56 56
 		$this->_wp_list_args = array(
57
-			'singular' => __('question', 'event_espresso' ),
58
-			'plural' => __('questions', 'event_espresso' ),
57
+			'singular' => __('question', 'event_espresso'),
58
+			'plural' => __('questions', 'event_espresso'),
59 59
 			'ajax' => TRUE, //for now,
60 60
 			'screen' => $this->_admin_page->get_current_screen()->id
61 61
 			);
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 			);
72 72
 
73 73
 		$this->_sortable_columns = array(
74
-			'id' => array( 'QST_ID' => FALSE ),
75
-			'display_text' => array( 'QST_display_text' => FALSE )
74
+			'id' => array('QST_ID' => FALSE),
75
+			'display_text' => array('QST_display_text' => FALSE)
76 76
 			);
77 77
 
78 78
 		$this->_hidden_columns = array(
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 
91 91
 
92 92
 	protected function _add_view_counts() {
93
-		$this->_views['all']['count'] = $this->_admin_page->get_questions( $this->_per_page,$this->_current_page, TRUE );
94
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_questions', 'espresso_registration_form_trash_question' ) ) {
93
+		$this->_views['all']['count'] = $this->_admin_page->get_questions($this->_per_page, $this->_current_page, TRUE);
94
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_questions', 'espresso_registration_form_trash_question')) {
95 95
 			$this->_views['trash']['count'] = $this->_admin_page->get_trashed_questions( -1, $this->_current_page, TRUE);
96 96
 		}
97 97
 	}
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 	public function column_cb($item) {
102 102
 		$system_question = $item->is_system_question();
103 103
 		$related_answer_count = $item->count_related('Answer');
104
-		$lock_icon = ( !$system_question && $related_answer_count > 0 && $this->_view == 'trash' ) ? 'ee-lock-icon ee-alternate-color' : 'ee-lock-icon ee-system-lock';
105
-		return $system_question || (!$system_question && $related_answer_count > 0 && $this->_view == 'trash' ) ? '<span class="' . $lock_icon . '"></span>' . sprintf( '<input type="hidden" name="hdnchk[%1$d]" value="%1$d" />', $item->ID() )  : sprintf( '<input type="checkbox" class="QST_ID" name="checkbox[%1$d]" value="%1$d" />', $item->ID() );
104
+		$lock_icon = ( ! $system_question && $related_answer_count > 0 && $this->_view == 'trash') ? 'ee-lock-icon ee-alternate-color' : 'ee-lock-icon ee-system-lock';
105
+		return $system_question || ( ! $system_question && $related_answer_count > 0 && $this->_view == 'trash') ? '<span class="'.$lock_icon.'"></span>'.sprintf('<input type="hidden" name="hdnchk[%1$d]" value="%1$d" />', $item->ID()) : sprintf('<input type="checkbox" class="QST_ID" name="checkbox[%1$d]" value="%1$d" />', $item->ID());
106 106
 	}
107 107
 
108 108
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 	public function column_id(EE_Question $item) {
112 112
 		$content = $item->ID();
113
-		$content .= '  <span class="show-on-mobile-view-only">' . $item->display_text() . '</span>';
113
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->display_text().'</span>';
114 114
 		return $content;
115 115
 	}
116 116
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	public function column_display_text(EE_Question $item) {
120 120
 		$system_question = $item->is_system_question();
121 121
 
122
-		if ( !defined('REG_ADMIN_URL') )
122
+		if ( ! defined('REG_ADMIN_URL'))
123 123
 			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
124 124
 
125 125
 		$edit_query_args = array(
@@ -127,16 +127,16 @@  discard block
 block discarded – undo
127 127
 				'QST_ID' => $item->ID()
128 128
 			);
129 129
 
130
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question', 'espresso_registration_form_edit_question', $item->ID() ) ) {
131
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_FORMS_ADMIN_URL );
130
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID())) {
131
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
132 132
 
133 133
 			$actions = array(
134
-				'edit' => '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Event', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'
134
+				'edit' => '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Event', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'
135 135
 				);
136 136
 		}
137 137
 
138 138
 
139
-		$content = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_question', 'espresso_registration_form_edit_question', $item->ID() ) ? '<strong><a class="row-title" href="' . $edit_link . '">' . $item->display_text() . '</a></strong>' : $item->display_text();
139
+		$content = EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID()) ? '<strong><a class="row-title" href="'.$edit_link.'">'.$item->display_text().'</a></strong>' : $item->display_text();
140 140
 		$content .= $this->row_actions($actions);
141 141
 		return $content;
142 142
 	}
@@ -150,16 +150,16 @@  discard block
 block discarded – undo
150 150
 
151 151
 
152 152
 	public function column_values(EE_Question $item) {
153
-		$optionNames=array();
154
-		$options= $item->options();
155
-		if(empty($options)){
153
+		$optionNames = array();
154
+		$options = $item->options();
155
+		if (empty($options)) {
156 156
 			return "N/A";
157
-		}else{
158
-			foreach($options as $optionID=>$option){
157
+		} else {
158
+			foreach ($options as $optionID=>$option) {
159 159
 				/* @var $option EE_Question_Option */
160
-				$optionNames[]=$option->value();
160
+				$optionNames[] = $option->value();
161 161
 			}
162
-			return implode(', ',$optionNames);
162
+			return implode(', ', $optionNames);
163 163
 		}
164 164
 	}
165 165
 
Please login to merge, or discard this patch.