@@ -1,5 +1,5 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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( |
@@ -107,20 +107,20 @@ discard block |
||
107 | 107 | protected function _get_table_filters() { |
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 | - EE_Registry::instance()->load_helper( 'Form_Fields' ); |
|
110 | + EE_Registry::instance()->load_helper('Form_Fields'); |
|
111 | 111 | $payment_methods = EEM_Payment_Method::instance()->get_all(); |
112 | - $payment_method_names = array(array('id'=>'all','text'=> __("All", 'event_espresso')),array('id'=>'0','text'=> __("Unknown Payment Method", 'event_espresso'))); |
|
113 | - foreach($payment_methods as $payment_method){ |
|
114 | - $payment_method_names[] = array('id'=>$payment_method->ID(),'text'=>$payment_method->admin_name()); |
|
112 | + $payment_method_names = array(array('id'=>'all', 'text'=> __("All", 'event_espresso')), array('id'=>'0', 'text'=> __("Unknown Payment Method", 'event_espresso'))); |
|
113 | + foreach ($payment_methods as $payment_method) { |
|
114 | + $payment_method_names[] = array('id'=>$payment_method->ID(), 'text'=>$payment_method->admin_name()); |
|
115 | 115 | } |
116 | 116 | $filters[] = EEH_Form_Fields::select_input('_payment_method', $payment_method_names, isset($this->_req_data['_payment_method']) ? $this->_req_data['_payment_method'] : 'all'); |
117 | - $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' )); |
|
118 | - $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' ); |
|
117 | + $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')); |
|
118 | + $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'); |
|
119 | 119 | ob_start(); |
120 | 120 | ?> |
121 | - <label for="txn-filter-start-date"><?php _e( 'Display Transactions from ', 'event_espresso' ); ?></label> |
|
121 | + <label for="txn-filter-start-date"><?php _e('Display Transactions from ', 'event_espresso'); ?></label> |
|
122 | 122 | <input id="payment-filter-start-date" class="datepicker" type="text" value="<?php echo $start_date; ?>" name="payment-filter-start-date" size="15"/> |
123 | - <label for="txn-filter-end-date"><?php _e( ' until ', 'event_espresso' ); ?></label> |
|
123 | + <label for="txn-filter-end-date"><?php _e(' until ', 'event_espresso'); ?></label> |
|
124 | 124 | <input id="payment-filter-end-date" class="datepicker" type="text" value="<?php echo $end_date; ?>" name="payment-filter-end-date" size="15"/> |
125 | 125 | <?php |
126 | 126 | $filters[] = ob_get_clean(); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @return void |
135 | 135 | */ |
136 | 136 | protected function _add_view_counts() { |
137 | - $this->_views['all']['count'] = $this->_admin_page->get_payment_logs( $this->_per_page,$this->_current_page, TRUE ); |
|
137 | + $this->_views['all']['count'] = $this->_admin_page->get_payment_logs($this->_per_page, $this->_current_page, TRUE); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @return string |
146 | 146 | */ |
147 | 147 | public function column_cb($item) { |
148 | - return sprintf( '<input type="checkbox" class="option_id" name="checkbox[%1$d]" value="%1$d" />', $item->ID() ); |
|
148 | + return sprintf('<input type="checkbox" class="option_id" name="checkbox[%1$d]" value="%1$d" />', $item->ID()); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * @param \EE_Change_Log $item |
172 | 172 | * @return string |
173 | 173 | */ |
174 | - public function column_LOG_time(EE_Change_Log $item){ |
|
174 | + public function column_LOG_time(EE_Change_Log $item) { |
|
175 | 175 | return $item->get_datetime('LOG_time'); |
176 | 176 | } |
177 | 177 | |
@@ -182,12 +182,12 @@ discard block |
||
182 | 182 | * @param \EE_Change_Log $item |
183 | 183 | * @return string |
184 | 184 | */ |
185 | - public function column_PMD_ID(EE_Change_Log $item){ |
|
186 | - if($item->object() instanceof EE_Payment_Method){ |
|
185 | + public function column_PMD_ID(EE_Change_Log $item) { |
|
186 | + if ($item->object() instanceof EE_Payment_Method) { |
|
187 | 187 | return $item->object()->admin_name(); |
188 | - }elseif($item->object() instanceof EE_Payment && $item->object()->payment_method()){ |
|
188 | + }elseif ($item->object() instanceof EE_Payment && $item->object()->payment_method()) { |
|
189 | 189 | return $item->object()->payment_method()->admin_name(); |
190 | - }else{ |
|
190 | + } else { |
|
191 | 191 | return __("No longer exists", 'event_espresso'); |
192 | 192 | } |
193 | 193 | } |
@@ -199,11 +199,11 @@ discard block |
||
199 | 199 | * @param \EE_Change_Log $item |
200 | 200 | * @return string |
201 | 201 | */ |
202 | - public function column_TXN_ID(EE_Change_Log $item){ |
|
203 | - if($item->object() instanceof EE_Payment){ |
|
204 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction', $item->object()->TXN_ID() )) { |
|
205 | - $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 ); |
|
206 | - 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>'; |
|
202 | + public function column_TXN_ID(EE_Change_Log $item) { |
|
203 | + if ($item->object() instanceof EE_Payment) { |
|
204 | + if (EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->object()->TXN_ID())) { |
|
205 | + $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); |
|
206 | + 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>'; |
|
207 | 207 | } |
208 | 208 | } else { |
209 | 209 | return __("Unable to find transaction", 'event_espresso'); |
@@ -1,6 +1,7 @@ discard block |
||
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 |
||
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 | } |
@@ -93,7 +93,7 @@ |
||
93 | 93 | * |
94 | 94 | * @abstract |
95 | 95 | * @access protected |
96 | - * @return array |
|
96 | + * @return string[] |
|
97 | 97 | */ |
98 | 98 | protected function _get_table_filters() { |
99 | 99 | $filters = array(); |
@@ -1,5 +1,5 @@ discard block |
||
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,15 +35,15 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function __construct() { |
37 | 37 | //define some page related constants |
38 | - define( 'EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings' ); |
|
39 | - define( 'EE_PAYMENTS_ADMIN_URL', admin_url( 'admin.php?page=' . EE_PAYMENTS_PG_SLUG )); |
|
40 | - define( 'EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments' . DS ); |
|
41 | - define( 'EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates' . DS ); |
|
42 | - define( 'EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/' ); |
|
38 | + define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
|
39 | + define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page='.EE_PAYMENTS_PG_SLUG)); |
|
40 | + define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES.'payments'.DS); |
|
41 | + define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN.'templates'.DS); |
|
42 | + define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL.'payments/assets/'); |
|
43 | 43 | |
44 | 44 | //check that there are active gateways on all admin page loads. but dont do it just yet |
45 | 45 | // echo "constructing payments admin page";die; |
46 | - add_action('admin_notices',array($this,'check_payment_gateway_setup')); |
|
46 | + add_action('admin_notices', array($this, 'check_payment_gateway_setup')); |
|
47 | 47 | parent::__construct(); |
48 | 48 | } |
49 | 49 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | protected function _set_menu_map() { |
55 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
55 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
56 | 56 | 'menu_group' => 'settings', |
57 | 57 | 'menu_order' => 30, |
58 | 58 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
@@ -68,23 +68,23 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Checks that there is at least one active gateway. If not, add a notice |
70 | 70 | */ |
71 | - public function check_payment_gateway_setup(){ |
|
71 | + public function check_payment_gateway_setup() { |
|
72 | 72 | //ONLY do this check if models can query |
73 | 73 | //and avoid a bug where when we nuke EE4's data that this causes a fatal error |
74 | 74 | //because the tables are deleted just before this request runs. see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
75 | 75 | EE_Registry::instance()->load_helper('Activation'); |
76 | - if ( ! EE_Maintenance_Mode::instance()->models_can_query() || ! EEH_Activation::table_exists( EEM_Payment_Method::instance()->table() ) ) { |
|
76 | + if ( ! EE_Maintenance_Mode::instance()->models_can_query() || ! EEH_Activation::table_exists(EEM_Payment_Method::instance()->table())) { |
|
77 | 77 | return; |
78 | 78 | } |
79 | 79 | |
80 | 80 | |
81 | 81 | // ensure Payment_Method model is loaded |
82 | - EE_Registry::instance()->load_model( 'Payment_Method' ); |
|
83 | - $actives = EEM_Payment_Method::instance()->count_active( EEM_Payment_Method::scope_cart ); |
|
84 | - if( $actives < 1 ){ |
|
82 | + EE_Registry::instance()->load_model('Payment_Method'); |
|
83 | + $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
84 | + if ($actives < 1) { |
|
85 | 85 | $url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_PAYMENTS_ADMIN_URL); |
86 | 86 | echo '<div class="error"> |
87 | - <p>'. sprintf(__("There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", "event_espresso"),"<a href='$url'>","</a>").'</p> |
|
87 | + <p>'. sprintf(__("There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", "event_espresso"), "<a href='$url'>", "</a>").'</p> |
|
88 | 88 | </div>'; |
89 | 89 | } |
90 | 90 | } |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -2,10 +2,10 @@ |
||
2 | 2 | <?php _e('Mijireh Gateway', 'event_espresso'); ?> |
3 | 3 | </h3> |
4 | 4 | <p> |
5 | -<?php printf(__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %sMijireh\' website%s, where you configure your Mijireh store with the %spayment gateway of your choice%s.', 'event_espresso'),'<a href="http://www.mijireh.com/">','</a>','<a href="http://www.mijireh.com/docs/payment-gateways/">','</a>'); ?> |
|
5 | +<?php printf(__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %sMijireh\' website%s, where you configure your Mijireh store with the %spayment gateway of your choice%s.', 'event_espresso'), '<a href="http://www.mijireh.com/">', '</a>', '<a href="http://www.mijireh.com/docs/payment-gateways/">', '</a>'); ?> |
|
6 | 6 | </p> |
7 | 7 | <h3><?php _e('Mijireh Checkout Page Design', 'event_espresso'); ?></h3> |
8 | 8 | <p> |
9 | -<?php _e("As you're probably aware, when users pay with Mijireh Gateway, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page. ", 'event_espresso');?> |
|
10 | -<?php printf(__("In order to do this, we automatically create a new WordPress page which is design to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft. ", 'event_espresso'),'<a href="https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMdjREYUtGM18wSms/edit?usp=drivesdk">','</a>');?> |
|
9 | +<?php _e("As you're probably aware, when users pay with Mijireh Gateway, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page. ", 'event_espresso'); ?> |
|
10 | +<?php printf(__("In order to do this, we automatically create a new WordPress page which is design to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft. ", 'event_espresso'), '<a href="https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMdjREYUtGM18wSms/edit?usp=drivesdk">', '</a>'); ?> |
|
11 | 11 | </p> |
12 | 12 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
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 |
||
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 |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,5 +1,5 @@ discard block |
||
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 |
||
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 |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -3,27 +3,27 @@ |
||
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*/ |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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 |
||
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> |
@@ -1,7 +1,8 @@ |
||
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 | * |
@@ -14,7 +14,7 @@ |
||
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> |
@@ -9,7 +9,7 @@ |
||
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> |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ), |
140 | 140 | 'list_table' => 'Registration_Form_Questions_Admin_List_Table', |
141 | 141 | 'metaboxes' => $this->_default_espresso_metaboxes, |
142 | - 'help_tabs' => array( |
|
142 | + 'help_tabs' => array( |
|
143 | 143 | 'registration_form_questions_overview_help_tab' => array( |
144 | 144 | 'title' => __('Questions Overview', 'event_espresso'), |
145 | 145 | 'filename' => 'registration_form_questions_overview' |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | 'filename' => 'registration_form_edit_question' |
191 | 191 | ), |
192 | 192 | ), |
193 | - 'help_tour' => array( 'Registration_Form_Edit_Question_Help_Tour'), |
|
193 | + 'help_tour' => array( 'Registration_Form_Edit_Question_Help_Tour'), |
|
194 | 194 | 'require_nonce' => FALSE |
195 | 195 | ), |
196 | 196 | ); |
@@ -1,6 +1,7 @@ discard block |
||
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 |
@@ -330,14 +331,9 @@ discard block |
||
330 | 331 | else if ( $fieldName == 'QST_admin_label' && ( isset( $this->_req_data['QST_admin_label'] ) && empty( $this->_req_data['QST_admin_label'] ) )) { |
331 | 332 | $QST_text = isset( $this->_req_data['QST_display_text'] ) ? $this->_req_data['QST_display_text'] : '' ; |
332 | 333 | $set_column_values[$fieldName] = sanitize_title(wp_trim_words($QST_text,10)); |
333 | - } |
|
334 | - |
|
335 | - |
|
336 | - else if ( $fieldName == 'QST_admin_only' && ( !isset( $this->_req_data['QST_admin_only'] ) ) ) { |
|
334 | + } else if ( $fieldName == 'QST_admin_only' && ( !isset( $this->_req_data['QST_admin_only'] ) ) ) { |
|
337 | 335 | $set_column_values[$fieldName] = 0; |
338 | - } |
|
339 | - |
|
340 | - else if ( $fieldName == 'QST_max' ) { |
|
336 | + } else if ( $fieldName == 'QST_max' ) { |
|
341 | 337 | $qst_system = EEM_Question::instance()->get_var( |
342 | 338 | array( |
343 | 339 | array( |
@@ -390,7 +386,7 @@ discard block |
||
390 | 386 | $question=$this->_question_model->get_one_by_ID($ID); |
391 | 387 | $additional_hidden_fields=array('QST_ID'=>array('type'=>'hidden','value'=>$ID)); |
392 | 388 | $this->_set_add_edit_form_tags('update_question', $additional_hidden_fields); |
393 | - }else{ |
|
389 | + } else{ |
|
394 | 390 | $question= EE_Question::new_instance(); |
395 | 391 | $question->set_order_to_latest(); |
396 | 392 | $this->_set_add_edit_form_tags('insert_question'); |
@@ -421,7 +417,7 @@ discard block |
||
421 | 417 | $ID=$this->_question_model->insert($set_column_values); |
422 | 418 | $success = $ID ? true : false; |
423 | 419 | $action_desc = 'added'; |
424 | - }else{ |
|
420 | + } else{ |
|
425 | 421 | $ID=absint($this->_req_data['QST_ID']); |
426 | 422 | $pk=$this->_question_model->primary_key_name(); |
427 | 423 | $wheres=array($pk=>$ID); |
@@ -442,7 +438,7 @@ discard block |
||
442 | 438 | $option_req_index=$this->_get_option_req_data_index($option_ID); |
443 | 439 | if($option_req_index!==FALSE){ |
444 | 440 | $option->save($this->_req_data['question_options'][$option_req_index]); |
445 | - }else{ |
|
441 | + } else{ |
|
446 | 442 | //not found, remove it |
447 | 443 | $option->delete(); |
448 | 444 | } |
@@ -519,7 +515,7 @@ discard block |
||
519 | 515 | 'QSG_name'=>array('LIKE',"%$search_string%"), |
520 | 516 | 'QSG_desc'=>array('LIKE',"%$search_string%")) |
521 | 517 | ); |
522 | - }else{ |
|
518 | + } else{ |
|
523 | 519 | $query_params[0]=array( |
524 | 520 | 'QST_display_text'=>array('LIKE',"%$search_string%") |
525 | 521 | ); |
@@ -575,7 +571,7 @@ discard block |
||
575 | 571 | if ($count){ |
576 | 572 | $where = isset( $query_params[0] ) ? array( $query_params[0] ) : array(); |
577 | 573 | $results = $QST->count($where); |
578 | - }else{ |
|
574 | + } else{ |
|
579 | 575 | $results = $QST->get_all($query_params); |
580 | 576 | } |
581 | 577 | return $results; |
@@ -1,5 +1,5 @@ discard block |
||
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 | /** |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | |
59 | 59 | |
60 | 60 | |
61 | - public function __construct( $routing = TRUE ) { |
|
62 | - require_once( EE_MODELS . 'EEM_Question.model.php' ); |
|
63 | - require_once( EE_MODELS . 'EEM_Question_Group.model.php' ); |
|
64 | - $this->_question_model= EEM_Question::instance(); |
|
65 | - $this->_question_group_model=EEM_Question_Group::instance(); |
|
66 | - parent::__construct( $routing ); |
|
61 | + public function __construct($routing = TRUE) { |
|
62 | + require_once(EE_MODELS.'EEM_Question.model.php'); |
|
63 | + require_once(EE_MODELS.'EEM_Question_Group.model.php'); |
|
64 | + $this->_question_model = EEM_Question::instance(); |
|
65 | + $this->_question_group_model = EEM_Question_Group::instance(); |
|
66 | + parent::__construct($routing); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | |
99 | 99 | protected function _set_page_routes() { |
100 | - $qst_id = ! empty( $this->_req_data['QST_ID'] ) ? $this->_req_data['QST_ID'] : 0; |
|
100 | + $qst_id = ! empty($this->_req_data['QST_ID']) ? $this->_req_data['QST_ID'] : 0; |
|
101 | 101 | $this->_page_routes = array( |
102 | 102 | 'default' => array( |
103 | 103 | 'func' => '_questions_overview_list_table', |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | 'update_question' => array( |
120 | 120 | 'func' => '_insert_or_update_question', |
121 | - 'args' => array('new_question' => FALSE ), |
|
121 | + 'args' => array('new_question' => FALSE), |
|
122 | 122 | 'capability' => 'ee_edit_question', |
123 | 123 | 'obj_id' => $qst_id, |
124 | 124 | 'noheader' => TRUE, |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | 'filename' => 'registration_form_questions_overview_views_bulk_actions_search' |
154 | 154 | ) |
155 | 155 | ), |
156 | - 'help_tour' => array( 'Registration_Form_Questions_Overview_Help_Tour'), |
|
156 | + 'help_tour' => array('Registration_Form_Questions_Overview_Help_Tour'), |
|
157 | 157 | 'require_nonce' => FALSE, |
158 | 158 | 'qtips' => array( |
159 | 159 | 'EE_Registration_Form_Tips' |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | 'filename' => 'registration_form_question_groups' |
173 | 173 | ), |
174 | 174 | ), |
175 | - 'help_tour' => array( 'Registration_Form_Question_Groups_Help_Tour'), |
|
175 | + 'help_tour' => array('Registration_Form_Question_Groups_Help_Tour'), |
|
176 | 176 | 'require_nonce' => FALSE |
177 | 177 | ), |
178 | 178 | |
@@ -181,16 +181,16 @@ discard block |
||
181 | 181 | 'label' => __('Edit Question', 'event_espresso'), |
182 | 182 | 'order' => 15, |
183 | 183 | 'persistent' => FALSE, |
184 | - 'url' => isset($this->_req_data['question_id']) ? add_query_arg(array('question_id' => $this->_req_data['question_id'] ), $this->_current_page_view_url ) : $this->_admin_base_url |
|
184 | + 'url' => isset($this->_req_data['question_id']) ? add_query_arg(array('question_id' => $this->_req_data['question_id']), $this->_current_page_view_url) : $this->_admin_base_url |
|
185 | 185 | ), |
186 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_publish_post_box' ) ), |
|
186 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
187 | 187 | 'help_tabs' => array( |
188 | 188 | 'registration_form_edit_question_group_help_tab' => array( |
189 | 189 | 'title' => __('Edit Question', 'event_espresso'), |
190 | 190 | 'filename' => 'registration_form_edit_question' |
191 | 191 | ), |
192 | 192 | ), |
193 | - 'help_tour' => array( 'Registration_Form_Edit_Question_Help_Tour'), |
|
193 | + 'help_tour' => array('Registration_Form_Edit_Question_Help_Tour'), |
|
194 | 194 | 'require_nonce' => FALSE |
195 | 195 | ), |
196 | 196 | ); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | //none of the below group are currently used for Event Categories |
219 | 219 | protected function _add_feature_pointers() {} |
220 | 220 | public function load_scripts_styles() { |
221 | - wp_register_style( 'espresso_registration', REGISTRATION_FORM_ASSETS_URL . 'espresso_registration_form_admin.css', array(), EVENT_ESPRESSO_VERSION ); |
|
221 | + wp_register_style('espresso_registration', REGISTRATION_FORM_ASSETS_URL.'espresso_registration_form_admin.css', array(), EVENT_ESPRESSO_VERSION); |
|
222 | 222 | wp_enqueue_style('espresso_registration'); |
223 | 223 | } |
224 | 224 | public function admin_init() {} |
@@ -234,20 +234,20 @@ discard block |
||
234 | 234 | |
235 | 235 | public function load_scripts_styles_add_question() { |
236 | 236 | $this->load_scripts_styles_forms(); |
237 | - wp_register_script( 'espresso_registration_form_single', REGISTRATION_FORM_ASSETS_URL . 'espresso_registration_form_admin.js', array('jquery-ui-sortable'), EVENT_ESPRESSO_VERSION, TRUE ); |
|
238 | - wp_enqueue_script( 'espresso_registration_form_single' ); |
|
237 | + wp_register_script('espresso_registration_form_single', REGISTRATION_FORM_ASSETS_URL.'espresso_registration_form_admin.js', array('jquery-ui-sortable'), EVENT_ESPRESSO_VERSION, TRUE); |
|
238 | + wp_enqueue_script('espresso_registration_form_single'); |
|
239 | 239 | } |
240 | 240 | public function load_scripts_styles_edit_question() { |
241 | 241 | $this->load_scripts_styles_forms(); |
242 | - wp_register_script( 'espresso_registration_form_single', REGISTRATION_FORM_ASSETS_URL . 'espresso_registration_form_admin.js', array('jquery-ui-sortable'), EVENT_ESPRESSO_VERSION, TRUE ); |
|
243 | - wp_enqueue_script( 'espresso_registration_form_single' ); |
|
242 | + wp_register_script('espresso_registration_form_single', REGISTRATION_FORM_ASSETS_URL.'espresso_registration_form_admin.js', array('jquery-ui-sortable'), EVENT_ESPRESSO_VERSION, TRUE); |
|
243 | + wp_enqueue_script('espresso_registration_form_single'); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | |
247 | 247 | |
248 | 248 | |
249 | 249 | public function recaptcha_info_help_tab() { |
250 | - $template = REGISTRATION_FORM_TEMPLATE_PATH . 'recaptcha_info_help_tab.template.php'; |
|
250 | + $template = REGISTRATION_FORM_TEMPLATE_PATH.'recaptcha_info_help_tab.template.php'; |
|
251 | 251 | EEH_Template::display_template($template, array()); |
252 | 252 | } |
253 | 253 | |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | ) |
280 | 280 | ); |
281 | 281 | |
282 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_questions', 'espresso_registration_form_trash_questions' ) ) { |
|
282 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_questions', 'espresso_registration_form_trash_questions')) { |
|
283 | 283 | $this->_views['trash'] = array( |
284 | 284 | 'slug' => 'trash', |
285 | 285 | 'label' => __('Trash', 'event_espresso'), |
@@ -297,9 +297,9 @@ discard block |
||
297 | 297 | */ |
298 | 298 | protected function _questions_groups_preview() { |
299 | 299 | $this->_admin_page_title = __('Question Groups (Preview)', 'event_espresso'); |
300 | - $this->_template_args['preview_img'] = '<img src="' . REGISTRATION_FORM_ASSETS_URL . 'caf_reg_form_preview.jpg" alt="' . esc_attr__( 'Preview Question Groups Overview List Table screenshot', 'event_espresso' ) . '" />'; |
|
301 | - $this->_template_args['preview_text'] = '<strong>'.__( 'Question Groups is a feature that is only available in the Caffeinated version of Event Espresso. With the Question Groups feature you are able to: create new question groups, edit existing question groups, and also create and edit new questions and add them to question groups.', 'event_espresso' ).'</strong>'; |
|
302 | - $this->display_admin_caf_preview_page( 'question_groups_tab' ); |
|
300 | + $this->_template_args['preview_img'] = '<img src="'.REGISTRATION_FORM_ASSETS_URL.'caf_reg_form_preview.jpg" alt="'.esc_attr__('Preview Question Groups Overview List Table screenshot', 'event_espresso').'" />'; |
|
301 | + $this->_template_args['preview_text'] = '<strong>'.__('Question Groups is a feature that is only available in the Caffeinated version of Event Espresso. With the Question Groups feature you are able to: create new question groups, edit existing question groups, and also create and edit new questions and add them to question groups.', 'event_espresso').'</strong>'; |
|
302 | + $this->display_admin_caf_preview_page('question_groups_tab'); |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | |
@@ -310,58 +310,58 @@ discard block |
||
310 | 310 | * @param \EEM_Base $model |
311 | 311 | * @return array where each key is the name of a model's field/db column, and each value is its value. |
312 | 312 | */ |
313 | - protected function _set_column_values_for(EEM_Base $model){ |
|
314 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
315 | - $set_column_values=array(); |
|
313 | + protected function _set_column_values_for(EEM_Base $model) { |
|
314 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
315 | + $set_column_values = array(); |
|
316 | 316 | |
317 | 317 | //some initial checks for proper values. |
318 | 318 | //if QST_admin_only, then no matter what QST_required is we disable. |
319 | - if ( !empty( $this->_req_data['QST_admin_only'] ) ) { |
|
319 | + if ( ! empty($this->_req_data['QST_admin_only'])) { |
|
320 | 320 | $this->_req_data['QST_required'] = 0; |
321 | 321 | } |
322 | - foreach($model->field_settings() as $fieldName=>$settings){ |
|
322 | + foreach ($model->field_settings() as $fieldName=>$settings) { |
|
323 | 323 | // basically if QSG_identifier is empty or not set |
324 | - if ( $fieldName == 'QSG_identifier' && ( isset( $this->_req_data['QSG_identifier'] ) && empty( $this->_req_data['QSG_identifier'] ) )) { |
|
325 | - $QSG_name = isset( $this->_req_data['QSG_name'] ) ? $this->_req_data['QSG_name'] : '' ; |
|
326 | - $set_column_values[$fieldName] = sanitize_title($QSG_name ) . '-' . uniqid(); |
|
324 | + if ($fieldName == 'QSG_identifier' && (isset($this->_req_data['QSG_identifier']) && empty($this->_req_data['QSG_identifier']))) { |
|
325 | + $QSG_name = isset($this->_req_data['QSG_name']) ? $this->_req_data['QSG_name'] : ''; |
|
326 | + $set_column_values[$fieldName] = sanitize_title($QSG_name).'-'.uniqid(); |
|
327 | 327 | // dd($set_column_values); |
328 | 328 | } |
329 | 329 | //if the admin label is blank, use a slug version of the question text |
330 | - else if ( $fieldName == 'QST_admin_label' && ( isset( $this->_req_data['QST_admin_label'] ) && empty( $this->_req_data['QST_admin_label'] ) )) { |
|
331 | - $QST_text = isset( $this->_req_data['QST_display_text'] ) ? $this->_req_data['QST_display_text'] : '' ; |
|
332 | - $set_column_values[$fieldName] = sanitize_title(wp_trim_words($QST_text,10)); |
|
330 | + else if ($fieldName == 'QST_admin_label' && (isset($this->_req_data['QST_admin_label']) && empty($this->_req_data['QST_admin_label']))) { |
|
331 | + $QST_text = isset($this->_req_data['QST_display_text']) ? $this->_req_data['QST_display_text'] : ''; |
|
332 | + $set_column_values[$fieldName] = sanitize_title(wp_trim_words($QST_text, 10)); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | |
336 | - else if ( $fieldName == 'QST_admin_only' && ( !isset( $this->_req_data['QST_admin_only'] ) ) ) { |
|
336 | + else if ($fieldName == 'QST_admin_only' && ( ! isset($this->_req_data['QST_admin_only']))) { |
|
337 | 337 | $set_column_values[$fieldName] = 0; |
338 | 338 | } |
339 | 339 | |
340 | - else if ( $fieldName == 'QST_max' ) { |
|
340 | + else if ($fieldName == 'QST_max') { |
|
341 | 341 | $qst_system = EEM_Question::instance()->get_var( |
342 | 342 | array( |
343 | 343 | array( |
344 | - 'QST_ID' => isset( $this->_req_data[ 'QST_ID' ] ) ? $this->_req_data[ 'QST_ID' ] : 0 |
|
344 | + 'QST_ID' => isset($this->_req_data['QST_ID']) ? $this->_req_data['QST_ID'] : 0 |
|
345 | 345 | ) |
346 | 346 | ), |
347 | 347 | 'QST_system' ); |
348 | - $max_max = EEM_Question::instance()->absolute_max_for_system_question( $qst_system ); |
|
349 | - if( empty( $this->_req_data[ 'QST_max' ] ) || |
|
350 | - $this->_req_data[ 'QST_max' ] > $max_max ) { |
|
351 | - $set_column_values[ $fieldName ] = $max_max; |
|
348 | + $max_max = EEM_Question::instance()->absolute_max_for_system_question($qst_system); |
|
349 | + if (empty($this->_req_data['QST_max']) || |
|
350 | + $this->_req_data['QST_max'] > $max_max) { |
|
351 | + $set_column_values[$fieldName] = $max_max; |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | |
355 | 355 | |
356 | 356 | //only add a property to the array if it's not null (otherwise the model should just use the default value) |
357 | - if( |
|
358 | - ! isset( $set_column_values[ $fieldName ] ) && |
|
359 | - isset($this->_req_data[$fieldName] ) ){ |
|
360 | - $set_column_values[$fieldName]=$this->_req_data[$fieldName]; |
|
357 | + if ( |
|
358 | + ! isset($set_column_values[$fieldName]) && |
|
359 | + isset($this->_req_data[$fieldName]) ) { |
|
360 | + $set_column_values[$fieldName] = $this->_req_data[$fieldName]; |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | } |
364 | - return $set_column_values;//validation fo this data to be performed by the model before insertion. |
|
364 | + return $set_column_values; //validation fo this data to be performed by the model before insertion. |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | |
@@ -379,30 +379,30 @@ discard block |
||
379 | 379 | /** |
380 | 380 | * @param string $action |
381 | 381 | */ |
382 | - protected function _edit_question( $action= 'add' ) { |
|
383 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
384 | - $ID=isset( $this->_req_data['QST_ID'] ) && ! empty( $this->_req_data['QST_ID'] ) ? absint( $this->_req_data['QST_ID'] ) : FALSE; |
|
382 | + protected function _edit_question($action = 'add') { |
|
383 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
384 | + $ID = isset($this->_req_data['QST_ID']) && ! empty($this->_req_data['QST_ID']) ? absint($this->_req_data['QST_ID']) : FALSE; |
|
385 | 385 | |
386 | - $this->_admin_page_title = ucwords( str_replace( '_', ' ', $this->_req_action )); |
|
386 | + $this->_admin_page_title = ucwords(str_replace('_', ' ', $this->_req_action)); |
|
387 | 387 | // add PRC_ID to title if editing |
388 | - $this->_admin_page_title = $ID ? $this->_admin_page_title . ' # ' . $ID : $this->_admin_page_title; |
|
389 | - if($ID){ |
|
390 | - $question=$this->_question_model->get_one_by_ID($ID); |
|
391 | - $additional_hidden_fields=array('QST_ID'=>array('type'=>'hidden','value'=>$ID)); |
|
388 | + $this->_admin_page_title = $ID ? $this->_admin_page_title.' # '.$ID : $this->_admin_page_title; |
|
389 | + if ($ID) { |
|
390 | + $question = $this->_question_model->get_one_by_ID($ID); |
|
391 | + $additional_hidden_fields = array('QST_ID'=>array('type'=>'hidden', 'value'=>$ID)); |
|
392 | 392 | $this->_set_add_edit_form_tags('update_question', $additional_hidden_fields); |
393 | - }else{ |
|
394 | - $question= EE_Question::new_instance(); |
|
393 | + } else { |
|
394 | + $question = EE_Question::new_instance(); |
|
395 | 395 | $question->set_order_to_latest(); |
396 | 396 | $this->_set_add_edit_form_tags('insert_question'); |
397 | 397 | } |
398 | - $question_types = $question->has_answers() ? $this->_question_model->question_types_in_same_category( $question->type() ) : $this->_question_model->allowed_question_types(); |
|
399 | - $this->_template_args['QST_ID']=$ID; |
|
400 | - $this->_template_args['question']=$question; |
|
401 | - $this->_template_args['question_types']= $question_types; |
|
402 | - $this->_template_args['max_max'] = EEM_Question::instance()->absolute_max_for_system_question( $question->system_ID() ); |
|
398 | + $question_types = $question->has_answers() ? $this->_question_model->question_types_in_same_category($question->type()) : $this->_question_model->allowed_question_types(); |
|
399 | + $this->_template_args['QST_ID'] = $ID; |
|
400 | + $this->_template_args['question'] = $question; |
|
401 | + $this->_template_args['question_types'] = $question_types; |
|
402 | + $this->_template_args['max_max'] = EEM_Question::instance()->absolute_max_for_system_question($question->system_ID()); |
|
403 | 403 | |
404 | - $this->_set_publish_post_box_vars( 'id', $ID ); |
|
405 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( REGISTRATION_FORM_TEMPLATE_PATH . 'questions_main_meta_box.template.php', $this->_template_args, TRUE ); |
|
404 | + $this->_set_publish_post_box_vars('id', $ID); |
|
405 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(REGISTRATION_FORM_TEMPLATE_PATH.'questions_main_meta_box.template.php', $this->_template_args, TRUE); |
|
406 | 406 | |
407 | 407 | // the details template wrapper |
408 | 408 | $this->display_admin_page_with_sidebar(); |
@@ -414,58 +414,58 @@ discard block |
||
414 | 414 | * @param bool|true $new_question |
415 | 415 | * @throws \EE_Error |
416 | 416 | */ |
417 | - protected function _insert_or_update_question( $new_question = TRUE) { |
|
418 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
419 | - $set_column_values=$this->_set_column_values_for($this->_question_model); |
|
420 | - if($new_question){ |
|
421 | - $ID=$this->_question_model->insert($set_column_values); |
|
417 | + protected function _insert_or_update_question($new_question = TRUE) { |
|
418 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
419 | + $set_column_values = $this->_set_column_values_for($this->_question_model); |
|
420 | + if ($new_question) { |
|
421 | + $ID = $this->_question_model->insert($set_column_values); |
|
422 | 422 | $success = $ID ? true : false; |
423 | 423 | $action_desc = 'added'; |
424 | - }else{ |
|
425 | - $ID=absint($this->_req_data['QST_ID']); |
|
426 | - $pk=$this->_question_model->primary_key_name(); |
|
427 | - $wheres=array($pk=>$ID); |
|
424 | + } else { |
|
425 | + $ID = absint($this->_req_data['QST_ID']); |
|
426 | + $pk = $this->_question_model->primary_key_name(); |
|
427 | + $wheres = array($pk=>$ID); |
|
428 | 428 | unset($set_column_values[$pk]); |
429 | - $success= $this->_question_model->update($set_column_values,array($wheres)); |
|
430 | - $action_desc='updated'; |
|
429 | + $success = $this->_question_model->update($set_column_values, array($wheres)); |
|
430 | + $action_desc = 'updated'; |
|
431 | 431 | } |
432 | 432 | |
433 | - if ($ID){ |
|
433 | + if ($ID) { |
|
434 | 434 | //save the related options |
435 | 435 | //trash removed options, save old ones |
436 | 436 | //get list of all options |
437 | 437 | /** @type EE_Question $question */ |
438 | - $question=$this->_question_model->get_one_by_ID($ID); |
|
439 | - $options=$question->options(); |
|
440 | - if(! empty($options)){ |
|
441 | - foreach($options as $option_ID=>$option){ |
|
442 | - $option_req_index=$this->_get_option_req_data_index($option_ID); |
|
443 | - if($option_req_index!==FALSE){ |
|
438 | + $question = $this->_question_model->get_one_by_ID($ID); |
|
439 | + $options = $question->options(); |
|
440 | + if ( ! empty($options)) { |
|
441 | + foreach ($options as $option_ID=>$option) { |
|
442 | + $option_req_index = $this->_get_option_req_data_index($option_ID); |
|
443 | + if ($option_req_index !== FALSE) { |
|
444 | 444 | $option->save($this->_req_data['question_options'][$option_req_index]); |
445 | - }else{ |
|
445 | + } else { |
|
446 | 446 | //not found, remove it |
447 | 447 | $option->delete(); |
448 | 448 | } |
449 | 449 | } |
450 | 450 | } |
451 | 451 | //save new related options |
452 | - foreach($this->_req_data['question_options'] as $index=>$option_req_data){ |
|
453 | - if( empty($option_req_data['QSO_ID'] ) && ( ( isset( $option_req_data['QSO_value'] ) && $option_req_data['QSO_value'] !== '' ) || ! empty( $option_req_data['QSO_desc'] ) ) ) {//no ID! save it! |
|
454 | - if( ! isset( $option_req_data['QSO_value'] ) || $option_req_data['QSO_value'] === '' ){ |
|
455 | - $option_req_data['QSO_value']=$option_req_data['QSO_desc']; |
|
452 | + foreach ($this->_req_data['question_options'] as $index=>$option_req_data) { |
|
453 | + if (empty($option_req_data['QSO_ID']) && ((isset($option_req_data['QSO_value']) && $option_req_data['QSO_value'] !== '') || ! empty($option_req_data['QSO_desc']))) {//no ID! save it! |
|
454 | + if ( ! isset($option_req_data['QSO_value']) || $option_req_data['QSO_value'] === '') { |
|
455 | + $option_req_data['QSO_value'] = $option_req_data['QSO_desc']; |
|
456 | 456 | } |
457 | - $new_option=EE_Question_Option::new_instance( array( 'QSO_value' => $option_req_data['QSO_value'], 'QSO_desc' => $option_req_data['QSO_desc'], 'QSO_order' => $option_req_data['QSO_order'], 'QST_ID' => $question->ID())); |
|
457 | + $new_option = EE_Question_Option::new_instance(array('QSO_value' => $option_req_data['QSO_value'], 'QSO_desc' => $option_req_data['QSO_desc'], 'QSO_order' => $option_req_data['QSO_order'], 'QST_ID' => $question->ID())); |
|
458 | 458 | $new_option->save(); |
459 | 459 | } |
460 | 460 | } |
461 | 461 | } |
462 | - $query_args = array( 'action' => 'edit_question', 'QST_ID' => $ID ); |
|
463 | - if ( $success !== FALSE ) { |
|
464 | - $msg = $new_question ? sprintf( __('The %s has been created', 'event_espresso'), $this->_question_model->item_name() ) : sprintf( __('The %s has been updated', 'event_espresso' ), $this->_question_model->item_name() ); |
|
465 | - EE_Error::add_success( $msg ); |
|
462 | + $query_args = array('action' => 'edit_question', 'QST_ID' => $ID); |
|
463 | + if ($success !== FALSE) { |
|
464 | + $msg = $new_question ? sprintf(__('The %s has been created', 'event_espresso'), $this->_question_model->item_name()) : sprintf(__('The %s has been updated', 'event_espresso'), $this->_question_model->item_name()); |
|
465 | + EE_Error::add_success($msg); |
|
466 | 466 | } |
467 | 467 | |
468 | - $this->_redirect_after_action( FALSE, '', $action_desc, $query_args, TRUE); |
|
468 | + $this->_redirect_after_action(FALSE, '', $action_desc, $query_args, TRUE); |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | |
@@ -478,10 +478,10 @@ discard block |
||
478 | 478 | * @param int $ID of the question option to find |
479 | 479 | * @return int index in question_options array if successful, FALSE if unsuccessful |
480 | 480 | */ |
481 | - protected function _get_option_req_data_index($ID){ |
|
482 | - $req_data_for_question_options=$this->_req_data['question_options']; |
|
483 | - foreach($req_data_for_question_options as $num=>$option_data){ |
|
484 | - if(array_key_exists('QSO_ID',$option_data) && intval($option_data['QSO_ID'])==$ID){ |
|
481 | + protected function _get_option_req_data_index($ID) { |
|
482 | + $req_data_for_question_options = $this->_req_data['question_options']; |
|
483 | + foreach ($req_data_for_question_options as $num=>$option_data) { |
|
484 | + if (array_key_exists('QSO_ID', $option_data) && intval($option_data['QSO_ID']) == $ID) { |
|
485 | 485 | return $num; |
486 | 486 | } |
487 | 487 | } |
@@ -503,25 +503,25 @@ discard block |
||
503 | 503 | * @param int $current_page |
504 | 504 | * @return array lik EEM_Base::get_all's $query_params parameter |
505 | 505 | */ |
506 | - protected function get_query_params($model, $per_page=10,$current_page=10){ |
|
506 | + protected function get_query_params($model, $per_page = 10, $current_page = 10) { |
|
507 | 507 | $query_params = array(); |
508 | - $offset=($current_page-1)*$per_page; |
|
509 | - $query_params['limit']=array($offset,$per_page); |
|
510 | - $order = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC'; |
|
508 | + $offset = ($current_page - 1) * $per_page; |
|
509 | + $query_params['limit'] = array($offset, $per_page); |
|
510 | + $order = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC'; |
|
511 | 511 | $orderby_field = $model instanceof EEM_Question ? 'QST_ID' : 'QSG_order'; |
512 | 512 | $field_to_order_by = empty($this->_req_data['orderby']) ? $orderby_field : $this->_req_data['orderby']; |
513 | - $query_params['order_by']=array( $field_to_order_by => $order ); |
|
514 | - $search_string = array_key_exists('s',$this->_req_data) ? $this->_req_data['s'] : null; |
|
515 | - if(! empty($search_string)){ |
|
516 | - if($model instanceof EEM_Question_Group){ |
|
517 | - $query_params[0]=array( |
|
513 | + $query_params['order_by'] = array($field_to_order_by => $order); |
|
514 | + $search_string = array_key_exists('s', $this->_req_data) ? $this->_req_data['s'] : null; |
|
515 | + if ( ! empty($search_string)) { |
|
516 | + if ($model instanceof EEM_Question_Group) { |
|
517 | + $query_params[0] = array( |
|
518 | 518 | 'OR'=>array( |
519 | - 'QSG_name'=>array('LIKE',"%$search_string%"), |
|
520 | - 'QSG_desc'=>array('LIKE',"%$search_string%")) |
|
519 | + 'QSG_name'=>array('LIKE', "%$search_string%"), |
|
520 | + 'QSG_desc'=>array('LIKE', "%$search_string%")) |
|
521 | 521 | ); |
522 | - }else{ |
|
523 | - $query_params[0]=array( |
|
524 | - 'QST_display_text'=>array('LIKE',"%$search_string%") |
|
522 | + } else { |
|
523 | + $query_params[0] = array( |
|
524 | + 'QST_display_text'=>array('LIKE', "%$search_string%") |
|
525 | 525 | ); |
526 | 526 | } |
527 | 527 | } |
@@ -569,13 +569,13 @@ discard block |
||
569 | 569 | * @param bool|false $count |
570 | 570 | * @return \EE_Soft_Delete_Base_Class[]|int |
571 | 571 | */ |
572 | - public function get_questions( $per_page=10, $current_page = 1, $count = FALSE ) { |
|
572 | + public function get_questions($per_page = 10, $current_page = 1, $count = FALSE) { |
|
573 | 573 | $QST = EEM_Question::instance(); |
574 | 574 | $query_params = $this->get_query_params($QST, $per_page, $current_page); |
575 | - if ($count){ |
|
576 | - $where = isset( $query_params[0] ) ? array( $query_params[0] ) : array(); |
|
575 | + if ($count) { |
|
576 | + $where = isset($query_params[0]) ? array($query_params[0]) : array(); |
|
577 | 577 | $results = $QST->count($where); |
578 | - }else{ |
|
578 | + } else { |
|
579 | 579 | $results = $QST->get_all($query_params); |
580 | 580 | } |
581 | 581 | return $results; |
@@ -590,10 +590,10 @@ discard block |
||
590 | 590 | * @param bool|false $count |
591 | 591 | * @return \EE_Soft_Delete_Base_Class[]|int |
592 | 592 | */ |
593 | - public function get_trashed_questions( $per_page, $current_page = 1, $count = FALSE ) { |
|
594 | - $query_params =$this->get_query_params( EEM_Question::instance(), $per_page, $current_page); |
|
595 | - $where = isset( $query_params[0] ) ? array($query_params[0]) : array(); |
|
596 | - $questions =$count ? EEM_Question::instance()->count_deleted($where) : EEM_Question::instance()->get_all_deleted($query_params); |
|
593 | + public function get_trashed_questions($per_page, $current_page = 1, $count = FALSE) { |
|
594 | + $query_params = $this->get_query_params(EEM_Question::instance(), $per_page, $current_page); |
|
595 | + $where = isset($query_params[0]) ? array($query_params[0]) : array(); |
|
596 | + $questions = $count ? EEM_Question::instance()->count_deleted($where) : EEM_Question::instance()->get_all_deleted($query_params); |
|
597 | 597 | return $questions; |
598 | 598 | } |
599 | 599 | |
@@ -605,11 +605,11 @@ discard block |
||
605 | 605 | * @param bool|false $count |
606 | 606 | * @return \EE_Soft_Delete_Base_Class[] |
607 | 607 | */ |
608 | - public function get_question_groups( $per_page, $current_page = 1, $count = FALSE ) { |
|
608 | + public function get_question_groups($per_page, $current_page = 1, $count = FALSE) { |
|
609 | 609 | /** @type EEM_Question_Group $questionGroupModel */ |
610 | - $questionGroupModel=EEM_Question_Group::instance(); |
|
611 | - $query_params=$this->get_query_params( $questionGroupModel, $per_page, $current_page ); |
|
612 | - $questionGroups=$questionGroupModel->get_all($query_params);//note: this a subclass of EEM_Soft_Delete_Base, so this is actually only getting non-trashed items |
|
610 | + $questionGroupModel = EEM_Question_Group::instance(); |
|
611 | + $query_params = $this->get_query_params($questionGroupModel, $per_page, $current_page); |
|
612 | + $questionGroups = $questionGroupModel->get_all($query_params); //note: this a subclass of EEM_Soft_Delete_Base, so this is actually only getting non-trashed items |
|
613 | 613 | return $questionGroups; |
614 | 614 | } |
615 | 615 | |
@@ -626,36 +626,36 @@ discard block |
||
626 | 626 | |
627 | 627 | $this->_template_args['values'] = $this->_yes_no_values; |
628 | 628 | |
629 | - $this->_template_args['use_captcha'] = isset( EE_Registry::instance()->CFG->registration->use_captcha ) ? EE_Registry::instance()->CFG->registration->use_captcha : FALSE; |
|
630 | - $this->_template_args['show_captcha_settings'] = $this->_template_args['use_captcha'] ? 'style="display:table-row;"': ''; |
|
629 | + $this->_template_args['use_captcha'] = isset(EE_Registry::instance()->CFG->registration->use_captcha) ? EE_Registry::instance()->CFG->registration->use_captcha : FALSE; |
|
630 | + $this->_template_args['show_captcha_settings'] = $this->_template_args['use_captcha'] ? 'style="display:table-row;"' : ''; |
|
631 | 631 | |
632 | - $this->_template_args['recaptcha_publickey'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_publickey ) ? stripslashes( EE_Registry::instance()->CFG->registration->recaptcha_publickey ) : ''; |
|
633 | - $this->_template_args['recaptcha_privatekey'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_privatekey ) ? stripslashes( EE_Registry::instance()->CFG->registration->recaptcha_privatekey ) : ''; |
|
634 | - $this->_template_args['recaptcha_width'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_width ) ? absint( EE_Registry::instance()->CFG->registration->recaptcha_width ) : 500; |
|
632 | + $this->_template_args['recaptcha_publickey'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_publickey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_publickey) : ''; |
|
633 | + $this->_template_args['recaptcha_privatekey'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) : ''; |
|
634 | + $this->_template_args['recaptcha_width'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_width) ? absint(EE_Registry::instance()->CFG->registration->recaptcha_width) : 500; |
|
635 | 635 | |
636 | 636 | $this->_template_args['recaptcha_theme_options'] = array( |
637 | - array('id' => 'red','text'=> __('Red', 'event_espresso')), |
|
638 | - array('id' => 'white','text'=> __('White', 'event_espresso')), |
|
639 | - array('id' => 'blackglass','text'=> __('Blackglass', 'event_espresso')), |
|
640 | - array('id' => 'clean','text'=> __('Clean', 'event_espresso')) |
|
637 | + array('id' => 'red', 'text'=> __('Red', 'event_espresso')), |
|
638 | + array('id' => 'white', 'text'=> __('White', 'event_espresso')), |
|
639 | + array('id' => 'blackglass', 'text'=> __('Blackglass', 'event_espresso')), |
|
640 | + array('id' => 'clean', 'text'=> __('Clean', 'event_espresso')) |
|
641 | 641 | ); |
642 | - $this->_template_args['recaptcha_theme'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_theme ) ? EE_Registry::instance()->CFG->registration->get_pretty( 'recaptcha_theme' ) : 'clean'; |
|
642 | + $this->_template_args['recaptcha_theme'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_theme) ? EE_Registry::instance()->CFG->registration->get_pretty('recaptcha_theme') : 'clean'; |
|
643 | 643 | |
644 | 644 | $this->_template_args['recaptcha_language_options'] = array( |
645 | - array('id' => 'en','text'=> __('English', 'event_espresso')), |
|
646 | - array('id' => 'es','text'=> __('Spanish', 'event_espresso')), |
|
647 | - array('id' => 'nl','text'=> __('Dutch', 'event_espresso')), |
|
648 | - array('id' => 'fr','text'=> __('French', 'event_espresso')), |
|
649 | - array('id' => 'de','text'=> __('German', 'event_espresso')), |
|
650 | - array('id' => 'pt','text'=> __('Portuguese', 'event_espresso')), |
|
651 | - array('id' => 'ru','text'=> __('Russian', 'event_espresso')), |
|
652 | - array('id' => 'tr','text'=> __('Turkish', 'event_espresso')) |
|
645 | + array('id' => 'en', 'text'=> __('English', 'event_espresso')), |
|
646 | + array('id' => 'es', 'text'=> __('Spanish', 'event_espresso')), |
|
647 | + array('id' => 'nl', 'text'=> __('Dutch', 'event_espresso')), |
|
648 | + array('id' => 'fr', 'text'=> __('French', 'event_espresso')), |
|
649 | + array('id' => 'de', 'text'=> __('German', 'event_espresso')), |
|
650 | + array('id' => 'pt', 'text'=> __('Portuguese', 'event_espresso')), |
|
651 | + array('id' => 'ru', 'text'=> __('Russian', 'event_espresso')), |
|
652 | + array('id' => 'tr', 'text'=> __('Turkish', 'event_espresso')) |
|
653 | 653 | ); |
654 | - $this->_template_args['recaptcha_language'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_language ) ? EE_Registry::instance()->CFG->registration->recaptcha_language : 'en'; |
|
654 | + $this->_template_args['recaptcha_language'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_language) ? EE_Registry::instance()->CFG->registration->recaptcha_language : 'en'; |
|
655 | 655 | |
656 | - $this->_set_add_edit_form_tags( 'update_reg_form_settings' ); |
|
657 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
658 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( REGISTRATION_FORM_TEMPLATE_PATH . 'reg_form_settings.template.php', $this->_template_args, TRUE ); |
|
656 | + $this->_set_add_edit_form_tags('update_reg_form_settings'); |
|
657 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
658 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(REGISTRATION_FORM_TEMPLATE_PATH.'reg_form_settings.template.php', $this->_template_args, TRUE); |
|
659 | 659 | $this->display_admin_page_with_sidebar(); |
660 | 660 | } |
661 | 661 |