@@ -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 | /** |
@@ -98,34 +98,34 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | |
| 100 | 100 | protected function _start() { |
| 101 | - $content = '<h3>' . __('Edit Question', 'event_espresso') . '</h3>'; |
|
| 102 | - $content .= '<p>' . __('This tour of the Edit Question page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
| 101 | + $content = '<h3>'.__('Edit Question', 'event_espresso').'</h3>'; |
|
| 102 | + $content .= '<p>'.__('This tour of the Edit Question page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
| 103 | 103 | |
| 104 | 104 | return $content; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | protected function _qst_display_text_stop() { |
| 108 | - return '<p>' . __('This is the question that is displayed to registrants who are signing up for events.', 'event_espresso') . '</p>'; |
|
| 108 | + return '<p>'.__('This is the question that is displayed to registrants who are signing up for events.', 'event_espresso').'</p>'; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | protected function _qst_admin_label_stop() { |
| 112 | - return '<p>' . __('Helps you understand the difference between questions that may appear similar but are actually different.', 'event_espresso') . '</p>'; |
|
| 112 | + return '<p>'.__('Helps you understand the difference between questions that may appear similar but are actually different.', 'event_espresso').'</p>'; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | protected function _qst_admin_only_stop() { |
| 116 | - return '<p>' . __('Specify whether this question should be shown only to the admins.', 'event_espresso') . '</p>'; |
|
| 116 | + return '<p>'.__('Specify whether this question should be shown only to the admins.', 'event_espresso').'</p>'; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | protected function _qst_type_stop() { |
| 120 | - return '<p>' . __('Select the type of question. Available options are text, textarea, single, multiple, dropdown, and date.', 'event_espresso') . '</p>'; |
|
| 120 | + return '<p>'.__('Select the type of question. Available options are text, textarea, single, multiple, dropdown, and date.', 'event_espresso').'</p>'; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | protected function _qst_required_stop() { |
| 124 | - return '<p>' . __('Specify whether this question should be required.', 'event_espresso') . '</p>'; |
|
| 124 | + return '<p>'.__('Specify whether this question should be required.', 'event_espresso').'</p>'; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | protected function _qst_required_text_stop() { |
| 128 | - return '<p>' . __('Text to display when registrant does not answer question but is required to.', 'event_espresso') . '</p>'; |
|
| 128 | + return '<p>'.__('Text to display when registrant does not answer question but is required to.', 'event_espresso').'</p>'; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | } |
| 132 | 132 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
| 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 |
@@ -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 | /** |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ) |
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | - if ( $this->_is_caf ) { |
|
| 45 | + if ($this->_is_caf) { |
|
| 46 | 46 | $this->_stops[15] = array( |
| 47 | 47 | 'id' => 'id', |
| 48 | 48 | 'content' => $this->_id_stop(), |
@@ -111,45 +111,45 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | |
| 113 | 113 | protected function _start() { |
| 114 | - $content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>'; |
|
| 115 | - if ( $this->_is_caf ) { |
|
| 116 | - $content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
| 114 | + $content = '<h3>'.__('Question Groups', 'event_espresso').'</h3>'; |
|
| 115 | + if ($this->_is_caf) { |
|
| 116 | + $content .= '<p>'.__('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
| 117 | 117 | } else { |
| 118 | - $content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.', 'event_espresso') . '</p>'; |
|
| 118 | + $content .= '<p>'.__('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.', 'event_espresso').'</p>'; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return $content; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | protected function _id_stop() { |
| 125 | - return '<p>' . __('View the ID of the question group. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 125 | + return '<p>'.__('View the ID of the question group. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | protected function _name_stop() { |
| 129 | - return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.', 'event_espresso') . '</p>'; |
|
| 129 | + return '<p>'.__('View available questions groups. You can reorder your questions by dragging and dropping them.', 'event_espresso').'</p>'; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | protected function _description_stop() { |
| 133 | - return '<p>' . __('View the question group description.', 'event_espresso') . '</p>'; |
|
| 133 | + return '<p>'.__('View the question group description.', 'event_espresso').'</p>'; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | protected function _show_group_name_stop() { |
| 137 | - return '<p>' . __('View if the name of the question group should be shown to customers.', 'event_espresso') . '</p>'; |
|
| 137 | + return '<p>'.__('View if the name of the question group should be shown to customers.', 'event_espresso').'</p>'; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | protected function _show_group_description_stop() { |
| 141 | - return '<p>' . __('View if the description of the question group should be shown to customers.', 'event_espresso') . '</p>'; |
|
| 141 | + return '<p>'.__('View if the description of the question group should be shown to customers.', 'event_espresso').'</p>'; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | protected function _bulk_actions_stop() { |
| 145 | - return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>'; |
|
| 145 | + return '<p>'.__('Perform bulk actions to multiple question groups.', 'event_espresso').'</p>'; |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | protected function _search_stop() { |
| 149 | - return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.', 'event_espresso') . '</p>'; |
|
| 149 | + return '<p>'.__('Search through questions. The following sources will be searched: question group name and question group description.', 'event_espresso').'</p>'; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | protected function _add_new_question_group_stop() { |
| 153 | - return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>'; |
|
| 153 | + return '<p>'.__('Click here to create a new question group.', 'event_espresso').'</p>'; |
|
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
| 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 |
@@ -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 | /** |
@@ -116,30 +116,30 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | |
| 118 | 118 | protected function _start() { |
| 119 | - $content = '<h3>' . __('Questions Overview', 'event_espresso') . '</h3>'; |
|
| 120 | - $content .= '<p>' . __('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
| 119 | + $content = '<h3>'.__('Questions Overview', 'event_espresso').'</h3>'; |
|
| 120 | + $content .= '<p>'.__('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
| 121 | 121 | |
| 122 | 122 | return $content; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | protected function _display_text_stop() { |
| 126 | - return '<p>' . __('View available questions. You can reorder your questions by dragging and dropping them.', 'event_espresso') . '</p>'; |
|
| 126 | + return '<p>'.__('View available questions. You can reorder your questions by dragging and dropping them.', 'event_espresso').'</p>'; |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | protected function _admin_label_stop() { |
| 130 | - return '<p>' . __('View the admin label for your questions.', 'event_espresso') . '</p>'; |
|
| 130 | + return '<p>'.__('View the admin label for your questions.', 'event_espresso').'</p>'; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | protected function _type_stop() { |
| 134 | - return '<p>' . __('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.', 'event_espresso') . '</p>'; |
|
| 134 | + return '<p>'.__('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.', 'event_espresso').'</p>'; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | protected function _values_stop() { |
| 138 | - return '<p>' . __('View stored values for checkboxes, radio buttons, and select boxes.', 'event_espresso') . '</p>'; |
|
| 138 | + return '<p>'.__('View stored values for checkboxes, radio buttons, and select boxes.', 'event_espresso').'</p>'; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | protected function _required_stop() { |
| 142 | - return '<p>' . __('View if a question is required.', 'event_espresso') . '</p>'; |
|
| 142 | + return '<p>'.__('View if a question is required.', 'event_espresso').'</p>'; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /* protected function _bulk_actions_stop() { |
@@ -147,11 +147,11 @@ discard block |
||
| 147 | 147 | } */ |
| 148 | 148 | |
| 149 | 149 | protected function _search_stop() { |
| 150 | - return '<p>' . __('Search through questions. The following sources will be searched: Name of Question (display text).', 'event_espresso') . '</p>'; |
|
| 150 | + return '<p>'.__('Search through questions. The following sources will be searched: Name of Question (display text).', 'event_espresso').'</p>'; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | protected function _add_new_question_stop() { |
| 154 | - return '<p>' . __('Click here to add a new question.', 'event_espresso') . '</p>'; |
|
| 154 | + return '<p>'.__('Click here to add a new question.', 'event_espresso').'</p>'; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | } |
| 158 | 158 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
| 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 |
@@ -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 | /** |
@@ -98,34 +98,34 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | |
| 100 | 100 | protected function _start() { |
| 101 | - $content = '<h3>' . __('Registration Form Settings', 'event_espresso') . '</h3>'; |
|
| 102 | - $content .= '<p>' . __('This tour of the Registration Form Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
| 101 | + $content = '<h3>'.__('Registration Form Settings', 'event_espresso').'</h3>'; |
|
| 102 | + $content .= '<p>'.__('This tour of the Registration Form Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
| 103 | 103 | |
| 104 | 104 | return $content; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | protected function _use_recaptcha_stop() { |
| 108 | - return '<p>' . __('Specify whether reCAPTCHA should be enabled.', 'event_espresso') . '</p>'; |
|
| 108 | + return '<p>'.__('Specify whether reCAPTCHA should be enabled.', 'event_espresso').'</p>'; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | protected function _recaptcha_public_key_stop() { |
| 112 | - return '<p>' . __('Enter your public key for reCAPTCHA.', 'event_espresso') . '</p>'; |
|
| 112 | + return '<p>'.__('Enter your public key for reCAPTCHA.', 'event_espresso').'</p>'; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | protected function _recaptcha_private_key_stop() { |
| 116 | - return '<p>' . __('Enter your private key for reCAPTCHA.', 'event_espresso') . '</p>'; |
|
| 116 | + return '<p>'.__('Enter your private key for reCAPTCHA.', 'event_espresso').'</p>'; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | protected function _recaptcha_theme_stop() { |
| 120 | - return '<p>' . __('Select a theme (style) for your reCAPTCHA.', 'event_espresso') . '</p>'; |
|
| 120 | + return '<p>'.__('Select a theme (style) for your reCAPTCHA.', 'event_espresso').'</p>'; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | protected function _recaptcha_language_stop() { |
| 124 | - return '<p>' . __('Specify the language that should be used for reCAPTCHA.', 'event_espresso') . '</p>'; |
|
| 124 | + return '<p>'.__('Specify the language that should be used for reCAPTCHA.', 'event_espresso').'</p>'; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | protected function _recaptcha_width_stop() { |
| 128 | - return '<p>' . __('Specify how wide (in pixels) the reCAPTCHA form should be.', 'event_espresso') . '</p>'; |
|
| 128 | + return '<p>'.__('Specify how wide (in pixels) the reCAPTCHA form should be.', 'event_espresso').'</p>'; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | } |
| 132 | 132 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
| 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 |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | |
| 3 | 5 | |
| 4 | 6 | class EE_Attendee_Contact_List_Table extends EE_Admin_List_Table { |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | class EE_Attendee_Contact_List_Table extends EE_Admin_List_Table { |
| 5 | 5 | |
| 6 | 6 | |
| 7 | - public function __construct( $admin_page ) { |
|
| 7 | + public function __construct($admin_page) { |
|
| 8 | 8 | parent::__construct($admin_page); |
| 9 | 9 | } |
| 10 | 10 | |
@@ -12,8 +12,8 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | protected function _setup_data() { |
| 15 | - $this->_data = $this->_view != 'trash' ? $this->_admin_page->get_attendees( $this->_per_page ) : $this->_admin_page->get_attendees( $this->_per_page, FALSE, TRUE ); |
|
| 16 | - $this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_attendees( $this->_per_page, TRUE ) : $this->_admin_page->get_attendees( $this->_per_page,TRUE, TRUE ); |
|
| 15 | + $this->_data = $this->_view != 'trash' ? $this->_admin_page->get_attendees($this->_per_page) : $this->_admin_page->get_attendees($this->_per_page, FALSE, TRUE); |
|
| 16 | + $this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_attendees($this->_per_page, TRUE) : $this->_admin_page->get_attendees($this->_per_page, TRUE, TRUE); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | |
@@ -41,13 +41,13 @@ discard block |
||
| 41 | 41 | ); |
| 42 | 42 | |
| 43 | 43 | $this->_sortable_columns = array( |
| 44 | - 'ATT_ID' => array( 'ATT_ID' => FALSE ), |
|
| 45 | - 'ATT_lname' => array( 'ATT_lname' => TRUE ), //true means its already sorted |
|
| 46 | - 'ATT_fname' => array( 'ATT_fname' => FALSE ), |
|
| 47 | - 'ATT_email' => array( 'ATT_email' => FALSE ), |
|
| 48 | - 'ATT_city' => array( 'ATT_city' => FALSE ), |
|
| 49 | - 'STA_ID' => array( 'STA_ID' => FALSE ), |
|
| 50 | - 'CNT_ISO' => array( 'CNT_ISO' => FALSE ) |
|
| 44 | + 'ATT_ID' => array('ATT_ID' => FALSE), |
|
| 45 | + 'ATT_lname' => array('ATT_lname' => TRUE), //true means its already sorted |
|
| 46 | + 'ATT_fname' => array('ATT_fname' => FALSE), |
|
| 47 | + 'ATT_email' => array('ATT_email' => FALSE), |
|
| 48 | + 'ATT_city' => array('ATT_city' => FALSE), |
|
| 49 | + 'STA_ID' => array('STA_ID' => FALSE), |
|
| 50 | + 'CNT_ISO' => array('CNT_ISO' => FALSE) |
|
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | 53 | $this->_hidden_columns = array(); |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | |
| 66 | 66 | protected function _add_view_counts() { |
| 67 | - $this->_views['in_use']['count'] = $this->_admin_page->get_attendees( $this->_per_page, TRUE ); |
|
| 68 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_delete_registration' ) ) { |
|
| 69 | - $this->_views['trash']['count'] = $this->_admin_page->get_attendees( $this->_per_page,TRUE, TRUE ); |
|
| 67 | + $this->_views['in_use']['count'] = $this->_admin_page->get_attendees($this->_per_page, TRUE); |
|
| 68 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_delete_registration')) { |
|
| 69 | + $this->_views['trash']['count'] = $this->_admin_page->get_attendees($this->_per_page, TRUE, TRUE); |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | |
| 91 | 91 | function column_cb($item) { |
| 92 | - return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() ); |
|
| 92 | + return sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID()); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
@@ -97,9 +97,9 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | |
| 99 | 99 | function column_ATT_ID($item) { |
| 100 | - $content = $item->ID(); |
|
| 100 | + $content = $item->ID(); |
|
| 101 | 101 | $attendee_name = $item instanceof EE_Attendee ? $item->full_name() : ''; |
| 102 | - $content .= ' <span class="show-on-mobile-view-only">' . $attendee_name . '</span>'; |
|
| 102 | + $content .= ' <span class="show-on-mobile-view-only">'.$attendee_name.'</span>'; |
|
| 103 | 103 | return $content; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | function column_ATT_lname($item) { |
| 111 | 111 | |
| 112 | 112 | // edit attendee link |
| 113 | - $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 114 | - $name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->lname() . '</a>' : $item->lname(); |
|
| 113 | + $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL); |
|
| 114 | + $name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->lname().'</a>' : $item->lname(); |
|
| 115 | 115 | return $name_link; |
| 116 | 116 | |
| 117 | 117 | } |
@@ -124,30 +124,30 @@ discard block |
||
| 124 | 124 | //Build row actions |
| 125 | 125 | $actions = array(); |
| 126 | 126 | // edit attendee link |
| 127 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ) { |
|
| 128 | - $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 129 | - $actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>'; |
|
| 127 | + if (EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee')) { |
|
| 128 | + $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL); |
|
| 129 | + $actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - if ( $this->_view == 'in_use' ) { |
|
| 132 | + if ($this->_view == 'in_use') { |
|
| 133 | 133 | // trash attendee link |
| 134 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_trash_attendees' ) ) { |
|
| 135 | - $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_attendees', 'ATT_ID'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 136 | - $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Contact to Trash', 'event_espresso' ) . '">' . __( 'Trash', 'event_espresso' ) . '</a>'; |
|
| 134 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_trash_attendees')) { |
|
| 135 | + $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_attendees', 'ATT_ID'=>$item->ID()), REG_ADMIN_URL); |
|
| 136 | + $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Contact to Trash', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>'; |
|
| 137 | 137 | } |
| 138 | 138 | } else { |
| 139 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_restore_attendees' ) ) { |
|
| 139 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_restore_attendees')) { |
|
| 140 | 140 | // restore attendee link |
| 141 | - $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_attendees', 'ATT_ID'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 142 | - $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Contact', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>'; |
|
| 141 | + $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_attendees', 'ATT_ID'=>$item->ID()), REG_ADMIN_URL); |
|
| 142 | + $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Contact', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>'; |
|
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 147 | - $name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->fname() . '</a>' : $item->fname(); |
|
| 146 | + $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL); |
|
| 147 | + $name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->fname().'</a>' : $item->fname(); |
|
| 148 | 148 | |
| 149 | 149 | //Return the name contents |
| 150 | - return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions) ); |
|
| 150 | + return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions)); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | |
| 157 | 157 | function column_ATT_email($item) { |
| 158 | - return '<a href="mailto:' . $item->email() . '">' . $item->email() . '</a>'; |
|
| 158 | + return '<a href="mailto:'.$item->email().'">'.$item->email().'</a>'; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | |
@@ -175,8 +175,8 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | function column_STA_ID($item) { |
| 177 | 177 | $states = EEM_State::instance()->get_all_states(); |
| 178 | - $state = isset( $states[ $item->state_ID() ] ) ? $states[ $item->state_ID() ]->get( 'STA_name' ) : $item->state_ID(); |
|
| 179 | - return ! is_numeric( $state ) ? $state : ''; |
|
| 178 | + $state = isset($states[$item->state_ID()]) ? $states[$item->state_ID()]->get('STA_name') : $item->state_ID(); |
|
| 179 | + return ! is_numeric($state) ? $state : ''; |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | |
@@ -184,8 +184,8 @@ discard block |
||
| 184 | 184 | function column_CNT_ISO($item) { |
| 185 | 185 | $countries = EEM_Country::instance()->get_all_countries(); |
| 186 | 186 | //EEH_Debug_Tools::printr( $countries, '$countries <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
| 187 | - $country = isset( $countries[ $item->country_ID() ] ) ? $countries[ $item->country_ID() ]->get( 'CNT_name' ) : $item->country_ID(); |
|
| 188 | - return ! is_numeric( $country ) ? $country : ''; |
|
| 187 | + $country = isset($countries[$item->country_ID()]) ? $countries[$item->country_ID()]->get('CNT_name') : $item->country_ID(); |
|
| 188 | + return ! is_numeric($country) ? $country : ''; |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Event Espresso |
| 4 | 6 | * |
@@ -574,7 +576,7 @@ discard block |
||
| 574 | 576 | if($item->transaction()){ |
| 575 | 577 | $view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID() ), TXN_ADMIN_URL ); |
| 576 | 578 | return EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID() ) ? '<span class="reg-pad-rght"><a class="status-'. $item->transaction()->status_ID() .'" href="'.$view_txn_lnk_url.'" title="' . esc_attr__( 'View Transaction', 'event_espresso' ) . '">' . $item->transaction()->pretty_total() . '</a></span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_total() . '</span>'; |
| 577 | - }else{ |
|
| 579 | + } else{ |
|
| 578 | 580 | return __("None", "event_espresso"); |
| 579 | 581 | } |
| 580 | 582 | } |
@@ -374,18 +374,18 @@ discard block |
||
| 374 | 374 | * @return string |
| 375 | 375 | * @throws \EE_Error |
| 376 | 376 | */ |
| 377 | - public function column_cb($item){ |
|
| 378 | - /** checkbox/lock **/ |
|
| 379 | - $transaction = $item->get_first_related( 'Transaction' ); |
|
| 380 | - $payment_count = $transaction instanceof EE_Transaction ? $transaction->count_related( 'Payment' ) : 0; |
|
| 381 | - return $payment_count > 0 |
|
| 382 | - ? sprintf( '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID() ) |
|
| 383 | - . '<span class="ee-lock-icon"></span>' |
|
| 384 | - : sprintf( |
|
| 385 | - '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', |
|
| 386 | - $item->ID() |
|
| 387 | - ); |
|
| 388 | - } |
|
| 377 | + public function column_cb($item){ |
|
| 378 | + /** checkbox/lock **/ |
|
| 379 | + $transaction = $item->get_first_related( 'Transaction' ); |
|
| 380 | + $payment_count = $transaction instanceof EE_Transaction ? $transaction->count_related( 'Payment' ) : 0; |
|
| 381 | + return $payment_count > 0 |
|
| 382 | + ? sprintf( '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID() ) |
|
| 383 | + . '<span class="ee-lock-icon"></span>' |
|
| 384 | + : sprintf( |
|
| 385 | + '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', |
|
| 386 | + $item->ID() |
|
| 387 | + ); |
|
| 388 | + } |
|
| 389 | 389 | |
| 390 | 390 | |
| 391 | 391 | |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | * @throws \EE_Error |
| 399 | 399 | */ |
| 400 | 400 | public function column__REG_ID(EE_Registration $item){ |
| 401 | - $attendee = $item->attendee(); |
|
| 401 | + $attendee = $item->attendee(); |
|
| 402 | 402 | $content = $item->ID(); |
| 403 | 403 | $content .= '<div class="show-on-mobile-view-only">'; |
| 404 | 404 | $content .= '<br>'; |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | */ |
| 422 | 422 | public function column__REG_date(EE_Registration $item){ |
| 423 | 423 | $this->_set_related_details($item); |
| 424 | - //Build row actions |
|
| 424 | + //Build row actions |
|
| 425 | 425 | $view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=> $this->_transaction_details['id'] ), TXN_ADMIN_URL ); |
| 426 | 426 | $view_link = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a class="ee-status-color-' . $this->_transaction_details['status'] . '" href="'.$view_lnk_url.'" title="' . esc_attr( $this->_transaction_details['title_attr'] ) . '">' . $item->get_i18n_datetime( 'REG_date' ) . '</a>' : $item->get_i18n_datetime( 'REG_date' ); |
| 427 | 427 | $view_link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $this->_transaction_details['status'], false, 'sentence' ) . '</span>'; |
@@ -441,27 +441,27 @@ discard block |
||
| 441 | 441 | public function column_event_name(EE_Registration $item){ |
| 442 | 442 | $this->_set_related_details( $item ); |
| 443 | 443 | // page=espresso_events&action=edit_event&EVT_ID=2&edit_event_nonce=cf3a7e5b62 |
| 444 | - $EVT_ID = $item->event_ID(); |
|
| 445 | - $event_name = $item->event_name(); |
|
| 446 | - $event_name = $event_name ? $event_name : __("No Associated Event", 'event_espresso'); |
|
| 447 | - $event_name = wp_trim_words($event_name, 30, '...'); |
|
| 448 | - if ($EVT_ID) { |
|
| 449 | - $edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $EVT_ID), |
|
| 450 | - EVENTS_ADMIN_URL); |
|
| 451 | - $edit_event = EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'edit_event', $EVT_ID) |
|
| 452 | - ? '<a class="ee-status-color-' . $this->_event_details['status'] . '" href="' . $edit_event_url . '" title="' . esc_attr($this->_event_details['title_attr']) . '">' . $event_name . '</a>' |
|
| 453 | - : $event_name; |
|
| 454 | - $edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('event_id' => $EVT_ID), REG_ADMIN_URL); |
|
| 455 | - $actions['event_filter'] = '<a href="' . $edit_event_url . '" title="'; |
|
| 456 | - $actions['event_filter'] .= sprintf( |
|
| 457 | - esc_attr__('Filter this list to only show registrations for %s', 'event_espresso'), |
|
| 458 | - $event_name |
|
| 459 | - ); |
|
| 460 | - $actions['event_filter'] .= '">' . __('View Registrations', 'event_espresso') . '</a>'; |
|
| 461 | - } else { |
|
| 462 | - $edit_event = $event_name; |
|
| 463 | - $actions['event_filter'] = ''; |
|
| 464 | - } |
|
| 444 | + $EVT_ID = $item->event_ID(); |
|
| 445 | + $event_name = $item->event_name(); |
|
| 446 | + $event_name = $event_name ? $event_name : __("No Associated Event", 'event_espresso'); |
|
| 447 | + $event_name = wp_trim_words($event_name, 30, '...'); |
|
| 448 | + if ($EVT_ID) { |
|
| 449 | + $edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $EVT_ID), |
|
| 450 | + EVENTS_ADMIN_URL); |
|
| 451 | + $edit_event = EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'edit_event', $EVT_ID) |
|
| 452 | + ? '<a class="ee-status-color-' . $this->_event_details['status'] . '" href="' . $edit_event_url . '" title="' . esc_attr($this->_event_details['title_attr']) . '">' . $event_name . '</a>' |
|
| 453 | + : $event_name; |
|
| 454 | + $edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('event_id' => $EVT_ID), REG_ADMIN_URL); |
|
| 455 | + $actions['event_filter'] = '<a href="' . $edit_event_url . '" title="'; |
|
| 456 | + $actions['event_filter'] .= sprintf( |
|
| 457 | + esc_attr__('Filter this list to only show registrations for %s', 'event_espresso'), |
|
| 458 | + $event_name |
|
| 459 | + ); |
|
| 460 | + $actions['event_filter'] .= '">' . __('View Registrations', 'event_espresso') . '</a>'; |
|
| 461 | + } else { |
|
| 462 | + $edit_event = $event_name; |
|
| 463 | + $actions['event_filter'] = ''; |
|
| 464 | + } |
|
| 465 | 465 | |
| 466 | 466 | return sprintf('%1$s %2$s', $edit_event, $this->row_actions($actions) ); |
| 467 | 467 | } |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | } else { |
| 490 | 490 | return __( 'There is no ticket on this registration', 'event_espresso' ); |
| 491 | 491 | } |
| 492 | - } |
|
| 492 | + } |
|
| 493 | 493 | |
| 494 | 494 | |
| 495 | 495 | |
@@ -502,32 +502,32 @@ discard block |
||
| 502 | 502 | * @throws \EE_Error |
| 503 | 503 | */ |
| 504 | 504 | public function column_ATT_fname(EE_Registration $item){ |
| 505 | - $attendee = $item->attendee(); |
|
| 505 | + $attendee = $item->attendee(); |
|
| 506 | 506 | |
| 507 | 507 | $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL ); |
| 508 | 508 | $attendee_name = $attendee instanceof EE_Attendee ? $attendee->full_name() : ''; |
| 509 | 509 | $link = EE_Registry::instance()->CAP->current_user_can( |
| 510 | - 'ee_read_registration', |
|
| 511 | - 'espresso_registrations_view_registration', |
|
| 512 | - $item->ID() |
|
| 513 | - ) |
|
| 514 | - ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">' . $attendee_name . '</a>' |
|
| 515 | - : $attendee_name; |
|
| 510 | + 'ee_read_registration', |
|
| 511 | + 'espresso_registrations_view_registration', |
|
| 512 | + $item->ID() |
|
| 513 | + ) |
|
| 514 | + ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">' . $attendee_name . '</a>' |
|
| 515 | + : $attendee_name; |
|
| 516 | 516 | $link .= $item->count() === 1 |
| 517 | - ? ' <sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>' |
|
| 518 | - : ''; |
|
| 517 | + ? ' <sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>' |
|
| 518 | + : ''; |
|
| 519 | 519 | |
| 520 | 520 | $t = $item->get_first_related('Transaction'); |
| 521 | 521 | $payment_count = $t instanceof EE_Transaction ? $t->count_related('Payment') : 0; |
| 522 | 522 | |
| 523 | - //append group count to name |
|
| 524 | - $link .= ' ' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size()); |
|
| 523 | + //append group count to name |
|
| 524 | + $link .= ' ' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size()); |
|
| 525 | 525 | |
| 526 | - //append reg_code |
|
| 527 | - $link .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') ); |
|
| 526 | + //append reg_code |
|
| 527 | + $link .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') ); |
|
| 528 | 528 | |
| 529 | - //reg status text for accessibility |
|
| 530 | - $link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' ) . '</span>'; |
|
| 529 | + //reg status text for accessibility |
|
| 530 | + $link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' ) . '</span>'; |
|
| 531 | 531 | |
| 532 | 532 | //trash/restore/delete actions |
| 533 | 533 | $actions = array(); |
@@ -755,14 +755,14 @@ discard block |
||
| 755 | 755 | //message list table link (filtered by REG_ID |
| 756 | 756 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_global_messages', 'view_filtered_messages' ) ) { |
| 757 | 757 | $actions['filtered_messages_link'] = '<li>' |
| 758 | - . EEH_MSG_Template::get_message_action_link( |
|
| 758 | + . EEH_MSG_Template::get_message_action_link( |
|
| 759 | 759 | 'see_notifications_for', |
| 760 | 760 | null, |
| 761 | 761 | array( |
| 762 | 762 | '_REG_ID' => $item->ID() |
| 763 | 763 | ) |
| 764 | 764 | ) |
| 765 | - . '</li>'; |
|
| 765 | + . '</li>'; |
|
| 766 | 766 | } |
| 767 | 767 | $actions = apply_filters( 'FHEE__EE_Registrations_List_Table__column_actions__actions', $actions, $item, $this ); |
| 768 | 768 | return $this->_action_string( |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | /** |
| 55 | 55 | * @param \Registrations_Admin_Page $admin_page |
| 56 | 56 | */ |
| 57 | - public function __construct( Registrations_Admin_Page $admin_page ){ |
|
| 58 | - if ( ! empty( $_GET['event_id'] ) ) { |
|
| 57 | + public function __construct(Registrations_Admin_Page $admin_page) { |
|
| 58 | + if ( ! empty($_GET['event_id'])) { |
|
| 59 | 59 | $extra_query_args = array(); |
| 60 | - foreach ( $admin_page->get_views() as $key => $view_details ) { |
|
| 61 | - $extra_query_args[$view_details['slug']] = array( 'event_id' => $_GET['event_id'] ); |
|
| 60 | + foreach ($admin_page->get_views() as $key => $view_details) { |
|
| 61 | + $extra_query_args[$view_details['slug']] = array('event_id' => $_GET['event_id']); |
|
| 62 | 62 | } |
| 63 | - $this->_views = $admin_page->get_list_table_view_RLs( $extra_query_args ); |
|
| 63 | + $this->_views = $admin_page->get_list_table_view_RLs($extra_query_args); |
|
| 64 | 64 | } |
| 65 | 65 | parent::__construct($admin_page); |
| 66 | 66 | $this->_status = $this->_admin_page->get_registration_status_array(); |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | * @return void |
| 76 | 76 | */ |
| 77 | 77 | protected function _setup_data() { |
| 78 | - $this->_data = $this->_admin_page->get_registrations( $this->_per_page ); |
|
| 79 | - $this->_all_data_count = $this->_admin_page->get_registrations( $this->_per_page, TRUE, FALSE, FALSE ); |
|
| 78 | + $this->_data = $this->_admin_page->get_registrations($this->_per_page); |
|
| 79 | + $this->_all_data_count = $this->_admin_page->get_registrations($this->_per_page, TRUE, FALSE, FALSE); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | |
@@ -93,30 +93,30 @@ discard block |
||
| 93 | 93 | 'ajax' => TRUE, |
| 94 | 94 | 'screen' => $this->_admin_page->get_current_screen()->id |
| 95 | 95 | ); |
| 96 | - $ID_column_name = __( 'ID', 'event_espresso' ); |
|
| 96 | + $ID_column_name = __('ID', 'event_espresso'); |
|
| 97 | 97 | $ID_column_name .= ' : <span class="show-on-mobile-view-only" style="float:none">'; |
| 98 | - $ID_column_name .= __( 'Registrant Name', 'event_espresso' ); |
|
| 98 | + $ID_column_name .= __('Registrant Name', 'event_espresso'); |
|
| 99 | 99 | $ID_column_name .= '</span> '; |
| 100 | - if ( isset( $_GET['event_id'] )) { |
|
| 100 | + if (isset($_GET['event_id'])) { |
|
| 101 | 101 | $this->_columns = array( |
| 102 | 102 | 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text |
| 103 | 103 | '_REG_ID' => $ID_column_name, |
| 104 | - 'ATT_fname' => __( 'Name', 'event_espresso' ), |
|
| 104 | + 'ATT_fname' => __('Name', 'event_espresso'), |
|
| 105 | 105 | 'ATT_email' => __('Email', 'event_espresso'), |
| 106 | - '_REG_date' => __( 'Reg Date', 'event_espresso' ), |
|
| 107 | - 'PRC_amount' => __( 'TKT Price', 'event_espresso' ), |
|
| 108 | - '_REG_final_price' => __( 'Final Price', 'event_espresso' ), |
|
| 109 | - 'TXN_total' => __( 'Total Txn', 'event_espresso' ), |
|
| 106 | + '_REG_date' => __('Reg Date', 'event_espresso'), |
|
| 107 | + 'PRC_amount' => __('TKT Price', 'event_espresso'), |
|
| 108 | + '_REG_final_price' => __('Final Price', 'event_espresso'), |
|
| 109 | + 'TXN_total' => __('Total Txn', 'event_espresso'), |
|
| 110 | 110 | 'TXN_paid' => __('Paid', 'event_espresso'), |
| 111 | - 'actions' => __( 'Actions', 'event_espresso' ) |
|
| 111 | + 'actions' => __('Actions', 'event_espresso') |
|
| 112 | 112 | ); |
| 113 | 113 | $this->_bottom_buttons = array( |
| 114 | 114 | 'report'=> array( |
| 115 | 115 | 'route' => 'registrations_report', |
| 116 | 116 | 'extra_request' => |
| 117 | 117 | array( |
| 118 | - 'EVT_ID'=> isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : null, |
|
| 119 | - 'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) |
|
| 118 | + 'EVT_ID'=> isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : null, |
|
| 119 | + 'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") |
|
| 120 | 120 | ) |
| 121 | 121 | ), |
| 122 | 122 | ); |
@@ -124,19 +124,19 @@ discard block |
||
| 124 | 124 | $this->_columns = array( |
| 125 | 125 | 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text |
| 126 | 126 | '_REG_ID' => $ID_column_name, |
| 127 | - 'ATT_fname' => __( 'Name', 'event_espresso' ), |
|
| 128 | - '_REG_date' => __( 'TXN Date', 'event_espresso' ), |
|
| 129 | - 'event_name' => __( 'Event', 'event_espresso' ), |
|
| 130 | - 'DTT_EVT_start' => __( 'Event Date', 'event_espresso' ), |
|
| 131 | - '_REG_final_price' => __( 'Price', 'event_espresso' ), |
|
| 132 | - '_REG_paid' => __( 'Paid', 'event_espresso' ), |
|
| 133 | - 'actions' => __( 'Actions', 'event_espresso' ) |
|
| 127 | + 'ATT_fname' => __('Name', 'event_espresso'), |
|
| 128 | + '_REG_date' => __('TXN Date', 'event_espresso'), |
|
| 129 | + 'event_name' => __('Event', 'event_espresso'), |
|
| 130 | + 'DTT_EVT_start' => __('Event Date', 'event_espresso'), |
|
| 131 | + '_REG_final_price' => __('Price', 'event_espresso'), |
|
| 132 | + '_REG_paid' => __('Paid', 'event_espresso'), |
|
| 133 | + 'actions' => __('Actions', 'event_espresso') |
|
| 134 | 134 | ); |
| 135 | 135 | $this->_bottom_buttons = array( |
| 136 | 136 | 'report_all'=> array( |
| 137 | 137 | 'route' => 'registrations_report', |
| 138 | 138 | 'extra_request' => array( |
| 139 | - 'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) ) |
|
| 139 | + 'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") ) |
|
| 140 | 140 | ), |
| 141 | 141 | ); |
| 142 | 142 | } |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | $this->_primary_column = '_REG_ID'; |
| 145 | 145 | |
| 146 | 146 | $this->_sortable_columns = array( |
| 147 | - '_REG_date' => array( '_REG_date' => TRUE ), //true means its already sorted |
|
| 148 | - 'ATT_fname' => array( 'ATT_fname' => FALSE ), |
|
| 149 | - 'event_name' => array( 'event_name' => FALSE ), |
|
| 150 | - 'DTT_EVT_start' => array( 'DTT_EVT_start' => FALSE ), |
|
| 151 | - '_REG_ID' => array( '_REG_ID' => FALSE ), |
|
| 147 | + '_REG_date' => array('_REG_date' => TRUE), //true means its already sorted |
|
| 148 | + 'ATT_fname' => array('ATT_fname' => FALSE), |
|
| 149 | + 'event_name' => array('event_name' => FALSE), |
|
| 150 | + 'DTT_EVT_start' => array('DTT_EVT_start' => FALSE), |
|
| 151 | + '_REG_ID' => array('_REG_ID' => FALSE), |
|
| 152 | 152 | ); |
| 153 | 153 | |
| 154 | 154 | $this->_hidden_columns = array(); |
@@ -162,11 +162,11 @@ discard block |
||
| 162 | 162 | * @param EE_Registration $item the current item |
| 163 | 163 | * @return string |
| 164 | 164 | */ |
| 165 | - protected function _get_row_class( $item ) { |
|
| 166 | - $class = parent::_get_row_class( $item ); |
|
| 165 | + protected function _get_row_class($item) { |
|
| 166 | + $class = parent::_get_row_class($item); |
|
| 167 | 167 | //add status class |
| 168 | - $class .= ' ee-status-strip reg-status-' . $item->status_ID(); |
|
| 169 | - if ( $this->_has_checkbox_column ) { |
|
| 168 | + $class .= ' ee-status-strip reg-status-'.$item->status_ID(); |
|
| 169 | + if ($this->_has_checkbox_column) { |
|
| 170 | 170 | $class .= ' has-checkbox-column'; |
| 171 | 171 | } |
| 172 | 172 | return $class; |
@@ -180,9 +180,9 @@ discard block |
||
| 180 | 180 | * @param EE_Registration $registration |
| 181 | 181 | * @throws \EE_Error |
| 182 | 182 | */ |
| 183 | - protected function _set_related_details( EE_Registration $registration ) { |
|
| 183 | + protected function _set_related_details(EE_Registration $registration) { |
|
| 184 | 184 | |
| 185 | - $transaction = $registration->get_first_related( 'Transaction' ); |
|
| 185 | + $transaction = $registration->get_first_related('Transaction'); |
|
| 186 | 186 | $status = $transaction instanceof EE_Transaction |
| 187 | 187 | ? $transaction->status_ID() |
| 188 | 188 | : EEM_Transaction::failed_status_code; |
@@ -191,14 +191,14 @@ discard block |
||
| 191 | 191 | 'status' => $status, |
| 192 | 192 | 'id' => $transaction instanceof EE_Transaction ? $transaction->ID() : 0, |
| 193 | 193 | 'title_attr' => sprintf( |
| 194 | - __( 'View Transaction Details (%s)', 'event_espresso' ), |
|
| 195 | - EEH_Template::pretty_status( $status, false, 'sentence' ) |
|
| 194 | + __('View Transaction Details (%s)', 'event_espresso'), |
|
| 195 | + EEH_Template::pretty_status($status, false, 'sentence') |
|
| 196 | 196 | ) |
| 197 | 197 | ); |
| 198 | 198 | |
| 199 | 199 | try { |
| 200 | 200 | $event = $registration->event(); |
| 201 | - } catch( \EventEspresso\core\exceptions\EntityNotFoundException $e ) { |
|
| 201 | + } catch (\EventEspresso\core\exceptions\EntityNotFoundException $e) { |
|
| 202 | 202 | $event = null; |
| 203 | 203 | } |
| 204 | 204 | $status = $event instanceof EE_Event ? $event->get_active_status() : EE_Datetime::inactive; |
@@ -207,8 +207,8 @@ discard block |
||
| 207 | 207 | 'status' => $status, |
| 208 | 208 | 'id' => $event instanceof EE_Event ? $event->ID() : 0, |
| 209 | 209 | 'title_attr' => sprintf( |
| 210 | - __( 'Edit Event (%s)', 'event_espresso' ), |
|
| 211 | - EEH_Template::pretty_status( $status, false, 'sentence' ) |
|
| 210 | + __('Edit Event (%s)', 'event_espresso'), |
|
| 211 | + EEH_Template::pretty_status($status, false, 'sentence') |
|
| 212 | 212 | ) |
| 213 | 213 | ); |
| 214 | 214 | } |
@@ -225,30 +225,30 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | //todo we're currently using old functions here. We need to move things into the Events_Admin_Page() class as methods. |
| 227 | 227 | |
| 228 | - $cur_date = isset( $this->_req_data['month_range'] ) ? $this->_req_data['month_range'] : ''; |
|
| 229 | - $cur_category = isset( $this->_req_data['EVT_CAT'] ) ? $this->_req_data['EVT_CAT'] : -1; |
|
| 230 | - $reg_status = isset( $this->_req_data['_reg_status'] ) ? $this->_req_data['_reg_status'] : ''; |
|
| 228 | + $cur_date = isset($this->_req_data['month_range']) ? $this->_req_data['month_range'] : ''; |
|
| 229 | + $cur_category = isset($this->_req_data['EVT_CAT']) ? $this->_req_data['EVT_CAT'] : -1; |
|
| 230 | + $reg_status = isset($this->_req_data['_reg_status']) ? $this->_req_data['_reg_status'] : ''; |
|
| 231 | 231 | |
| 232 | - $filters[] = EEH_Form_Fields::generate_registration_months_dropdown( $cur_date, $reg_status, $cur_category ); |
|
| 233 | - $filters[] = EEH_Form_Fields::generate_event_category_dropdown( $cur_category ); |
|
| 232 | + $filters[] = EEH_Form_Fields::generate_registration_months_dropdown($cur_date, $reg_status, $cur_category); |
|
| 233 | + $filters[] = EEH_Form_Fields::generate_event_category_dropdown($cur_category); |
|
| 234 | 234 | |
| 235 | 235 | $status = array(); |
| 236 | - $status[] = array( 'id' => 0, 'text' => __('Select Status', 'event_espresso') ); |
|
| 237 | - foreach ( $this->_status as $key => $value ) { |
|
| 238 | - $status[] = array( 'id' => $key, 'text' => $value ); |
|
| 236 | + $status[] = array('id' => 0, 'text' => __('Select Status', 'event_espresso')); |
|
| 237 | + foreach ($this->_status as $key => $value) { |
|
| 238 | + $status[] = array('id' => $key, 'text' => $value); |
|
| 239 | 239 | } |
| 240 | - if ( $this->_view !== 'incomplete' ) { |
|
| 240 | + if ($this->_view !== 'incomplete') { |
|
| 241 | 241 | $filters[] = EEH_Form_Fields::select_input( |
| 242 | 242 | '_reg_status', |
| 243 | 243 | $status, |
| 244 | - isset( $this->_req_data['_reg_status'] ) |
|
| 245 | - ? strtoupper( sanitize_key( $this->_req_data['_reg_status'] )) |
|
| 244 | + isset($this->_req_data['_reg_status']) |
|
| 245 | + ? strtoupper(sanitize_key($this->_req_data['_reg_status'])) |
|
| 246 | 246 | : '' |
| 247 | 247 | ); |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | - if ( isset( $this->_req_data['event_id'] ) ) { |
|
| 251 | - $filters[] = EEH_Form_Fields::hidden_input( 'event_id', $this->_req_data['event_id'], 'reg_event_id' ); |
|
| 250 | + if (isset($this->_req_data['event_id'])) { |
|
| 251 | + $filters[] = EEH_Form_Fields::hidden_input('event_id', $this->_req_data['event_id'], 'reg_event_id'); |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | return $filters; |
@@ -267,9 +267,9 @@ discard block |
||
| 267 | 267 | $this->_views['all']['count'] = $this->_total_registrations(); |
| 268 | 268 | $this->_views['month']['count'] = $this->_total_registrations_this_month(); |
| 269 | 269 | $this->_views['today']['count'] = $this->_total_registrations_today(); |
| 270 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registrations', 'espresso_registrations_trash_registrations' ) ) { |
|
| 271 | - $this->_views['incomplete']['count'] = $this->_total_registrations( 'incomplete' ); |
|
| 272 | - $this->_views['trash']['count'] = $this->_total_registrations( 'trash' ); |
|
| 270 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registrations', 'espresso_registrations_trash_registrations')) { |
|
| 271 | + $this->_views['incomplete']['count'] = $this->_total_registrations('incomplete'); |
|
| 272 | + $this->_views['trash']['count'] = $this->_total_registrations('trash'); |
|
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | 275 | |
@@ -283,23 +283,23 @@ discard block |
||
| 283 | 283 | * @return int |
| 284 | 284 | * @throws \EE_Error |
| 285 | 285 | */ |
| 286 | - protected function _total_registrations( $view = '' ){ |
|
| 286 | + protected function _total_registrations($view = '') { |
|
| 287 | 287 | $_where = array(); |
| 288 | - $EVT_ID = isset( $this->_req_data['event_id'] ) ? absint( $this->_req_data['event_id'] ) : FALSE; |
|
| 289 | - if( $EVT_ID ) { |
|
| 288 | + $EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE; |
|
| 289 | + if ($EVT_ID) { |
|
| 290 | 290 | $_where['EVT_ID'] = $EVT_ID; |
| 291 | 291 | } |
| 292 | - switch ( $view ) { |
|
| 292 | + switch ($view) { |
|
| 293 | 293 | case 'trash' : |
| 294 | - return EEM_Registration::instance()->count_deleted( array( $_where )); |
|
| 294 | + return EEM_Registration::instance()->count_deleted(array($_where)); |
|
| 295 | 295 | break; |
| 296 | 296 | case 'incomplete' : |
| 297 | 297 | $_where['STS_ID'] = EEM_Registration::status_id_incomplete; |
| 298 | 298 | break; |
| 299 | 299 | default : |
| 300 | - $_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete ); |
|
| 300 | + $_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete); |
|
| 301 | 301 | } |
| 302 | - return EEM_Registration::instance()->count( array( $_where )); |
|
| 302 | + return EEM_Registration::instance()->count(array($_where)); |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | |
@@ -311,32 +311,32 @@ discard block |
||
| 311 | 311 | * @return int |
| 312 | 312 | * @throws \EE_Error |
| 313 | 313 | */ |
| 314 | - protected function _total_registrations_this_month(){ |
|
| 315 | - $EVT_ID = isset( $this->_req_data['event_id'] ) ? absint( $this->_req_data['event_id'] ) : FALSE; |
|
| 316 | - $_where = $EVT_ID ? array( 'EVT_ID' => $EVT_ID ) : array(); |
|
| 314 | + protected function _total_registrations_this_month() { |
|
| 315 | + $EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE; |
|
| 316 | + $_where = $EVT_ID ? array('EVT_ID' => $EVT_ID) : array(); |
|
| 317 | 317 | $this_year_r = date('Y', current_time('timestamp')); |
| 318 | 318 | $time_start = ' 00:00:00'; |
| 319 | 319 | $time_end = ' 23:59:59'; |
| 320 | 320 | $this_month_r = date('m', current_time('timestamp')); |
| 321 | - $days_this_month = date( 't', current_time('timestamp') ); |
|
| 321 | + $days_this_month = date('t', current_time('timestamp')); |
|
| 322 | 322 | //setup date query. |
| 323 | 323 | $beginning_string = EEM_Registration::instance()->convert_datetime_for_query( |
| 324 | 324 | 'REG_date', |
| 325 | - $this_year_r . '-' . $this_month_r . '-01' . ' ' . $time_start, |
|
| 325 | + $this_year_r.'-'.$this_month_r.'-01'.' '.$time_start, |
|
| 326 | 326 | 'Y-m-d H:i:s' |
| 327 | 327 | ); |
| 328 | 328 | $end_string = EEM_Registration::instance()->convert_datetime_for_query( |
| 329 | 329 | 'REG_date', |
| 330 | - $this_year_r . '-' . $this_month_r . '-' . $days_this_month . ' ' . $time_end, |
|
| 330 | + $this_year_r.'-'.$this_month_r.'-'.$days_this_month.' '.$time_end, |
|
| 331 | 331 | 'Y-m-d H:i:s' |
| 332 | 332 | ); |
| 333 | - $_where['REG_date']= array('BETWEEN', |
|
| 333 | + $_where['REG_date'] = array('BETWEEN', |
|
| 334 | 334 | array( |
| 335 | 335 | $beginning_string, |
| 336 | 336 | $end_string |
| 337 | 337 | )); |
| 338 | - $_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete ); |
|
| 339 | - return EEM_Registration::instance()->count(array( $_where ) ); |
|
| 338 | + $_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete); |
|
| 339 | + return EEM_Registration::instance()->count(array($_where)); |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | |
@@ -348,20 +348,20 @@ discard block |
||
| 348 | 348 | * @return int |
| 349 | 349 | * @throws \EE_Error |
| 350 | 350 | */ |
| 351 | - protected function _total_registrations_today(){ |
|
| 351 | + protected function _total_registrations_today() { |
|
| 352 | 352 | |
| 353 | - $EVT_ID = isset( $this->_req_data['event_id'] ) ? absint( $this->_req_data['event_id'] ) : FALSE; |
|
| 354 | - $_where = $EVT_ID ? array( 'EVT_ID' => $EVT_ID ) : array(); |
|
| 353 | + $EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : FALSE; |
|
| 354 | + $_where = $EVT_ID ? array('EVT_ID' => $EVT_ID) : array(); |
|
| 355 | 355 | $current_date = date('Y-m-d', current_time('timestamp')); |
| 356 | 356 | $time_start = ' 00:00:00'; |
| 357 | 357 | $time_end = ' 23:59:59'; |
| 358 | - $_where['REG_date']= array('BETWEEN', |
|
| 358 | + $_where['REG_date'] = array('BETWEEN', |
|
| 359 | 359 | array( |
| 360 | - EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $current_date . $time_start, 'Y-m-d H:i:s' ), |
|
| 361 | - EEM_Registration::instance()->convert_datetime_for_query( 'REG_date', $current_date . $time_end, 'Y-m-d H:i:s' ) |
|
| 360 | + EEM_Registration::instance()->convert_datetime_for_query('REG_date', $current_date.$time_start, 'Y-m-d H:i:s'), |
|
| 361 | + EEM_Registration::instance()->convert_datetime_for_query('REG_date', $current_date.$time_end, 'Y-m-d H:i:s') |
|
| 362 | 362 | )); |
| 363 | - $_where['STS_ID'] = array( '!=', EEM_Registration::status_id_incomplete ); |
|
| 364 | - return EEM_Registration::instance()->count(array( $_where ) ); |
|
| 363 | + $_where['STS_ID'] = array('!=', EEM_Registration::status_id_incomplete); |
|
| 364 | + return EEM_Registration::instance()->count(array($_where)); |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | |
@@ -374,12 +374,12 @@ discard block |
||
| 374 | 374 | * @return string |
| 375 | 375 | * @throws \EE_Error |
| 376 | 376 | */ |
| 377 | - public function column_cb($item){ |
|
| 377 | + public function column_cb($item) { |
|
| 378 | 378 | /** checkbox/lock **/ |
| 379 | - $transaction = $item->get_first_related( 'Transaction' ); |
|
| 380 | - $payment_count = $transaction instanceof EE_Transaction ? $transaction->count_related( 'Payment' ) : 0; |
|
| 379 | + $transaction = $item->get_first_related('Transaction'); |
|
| 380 | + $payment_count = $transaction instanceof EE_Transaction ? $transaction->count_related('Payment') : 0; |
|
| 381 | 381 | return $payment_count > 0 |
| 382 | - ? sprintf( '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID() ) |
|
| 382 | + ? sprintf('<input type="checkbox" name="_REG_ID[]" value="%1$s" />', $item->ID()) |
|
| 383 | 383 | . '<span class="ee-lock-icon"></span>' |
| 384 | 384 | : sprintf( |
| 385 | 385 | '<input type="checkbox" name="_REG_ID[]" value="%1$s" />', |
@@ -397,14 +397,14 @@ discard block |
||
| 397 | 397 | * @return string |
| 398 | 398 | * @throws \EE_Error |
| 399 | 399 | */ |
| 400 | - public function column__REG_ID(EE_Registration $item){ |
|
| 400 | + public function column__REG_ID(EE_Registration $item) { |
|
| 401 | 401 | $attendee = $item->attendee(); |
| 402 | 402 | $content = $item->ID(); |
| 403 | 403 | $content .= '<div class="show-on-mobile-view-only">'; |
| 404 | 404 | $content .= '<br>'; |
| 405 | 405 | $content .= $attendee instanceof EE_Attendee ? $attendee->full_name() : ''; |
| 406 | - $content .= ' ' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size()); |
|
| 407 | - $content .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') ); |
|
| 406 | + $content .= ' '.sprintf(__('(%1$s / %2$s)', 'event_espresso'), $item->count(), $item->group_size()); |
|
| 407 | + $content .= '<br>'.sprintf(__('Reg Code: %s', 'event_espresso'), $item->get('REG_code')); |
|
| 408 | 408 | $content .= '</div>'; |
| 409 | 409 | return $content; |
| 410 | 410 | } |
@@ -419,12 +419,12 @@ discard block |
||
| 419 | 419 | * @return string |
| 420 | 420 | * @throws \EE_Error |
| 421 | 421 | */ |
| 422 | - public function column__REG_date(EE_Registration $item){ |
|
| 422 | + public function column__REG_date(EE_Registration $item) { |
|
| 423 | 423 | $this->_set_related_details($item); |
| 424 | 424 | //Build row actions |
| 425 | - $view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=> $this->_transaction_details['id'] ), TXN_ADMIN_URL ); |
|
| 426 | - $view_link = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a class="ee-status-color-' . $this->_transaction_details['status'] . '" href="'.$view_lnk_url.'" title="' . esc_attr( $this->_transaction_details['title_attr'] ) . '">' . $item->get_i18n_datetime( 'REG_date' ) . '</a>' : $item->get_i18n_datetime( 'REG_date' ); |
|
| 427 | - $view_link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $this->_transaction_details['status'], false, 'sentence' ) . '</span>'; |
|
| 425 | + $view_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=> $this->_transaction_details['id']), TXN_ADMIN_URL); |
|
| 426 | + $view_link = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '<a class="ee-status-color-'.$this->_transaction_details['status'].'" href="'.$view_lnk_url.'" title="'.esc_attr($this->_transaction_details['title_attr']).'">'.$item->get_i18n_datetime('REG_date').'</a>' : $item->get_i18n_datetime('REG_date'); |
|
| 427 | + $view_link .= '<br><span class="ee-status-text-small">'.EEH_Template::pretty_status($this->_transaction_details['status'], false, 'sentence').'</span>'; |
|
| 428 | 428 | return $view_link; |
| 429 | 429 | } |
| 430 | 430 | |
@@ -438,8 +438,8 @@ discard block |
||
| 438 | 438 | * @return string |
| 439 | 439 | * @throws \EE_Error |
| 440 | 440 | */ |
| 441 | - public function column_event_name(EE_Registration $item){ |
|
| 442 | - $this->_set_related_details( $item ); |
|
| 441 | + public function column_event_name(EE_Registration $item) { |
|
| 442 | + $this->_set_related_details($item); |
|
| 443 | 443 | // page=espresso_events&action=edit_event&EVT_ID=2&edit_event_nonce=cf3a7e5b62 |
| 444 | 444 | $EVT_ID = $item->event_ID(); |
| 445 | 445 | $event_name = $item->event_name(); |
@@ -449,21 +449,21 @@ discard block |
||
| 449 | 449 | $edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $EVT_ID), |
| 450 | 450 | EVENTS_ADMIN_URL); |
| 451 | 451 | $edit_event = EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'edit_event', $EVT_ID) |
| 452 | - ? '<a class="ee-status-color-' . $this->_event_details['status'] . '" href="' . $edit_event_url . '" title="' . esc_attr($this->_event_details['title_attr']) . '">' . $event_name . '</a>' |
|
| 452 | + ? '<a class="ee-status-color-'.$this->_event_details['status'].'" href="'.$edit_event_url.'" title="'.esc_attr($this->_event_details['title_attr']).'">'.$event_name.'</a>' |
|
| 453 | 453 | : $event_name; |
| 454 | 454 | $edit_event_url = EE_Admin_Page::add_query_args_and_nonce(array('event_id' => $EVT_ID), REG_ADMIN_URL); |
| 455 | - $actions['event_filter'] = '<a href="' . $edit_event_url . '" title="'; |
|
| 455 | + $actions['event_filter'] = '<a href="'.$edit_event_url.'" title="'; |
|
| 456 | 456 | $actions['event_filter'] .= sprintf( |
| 457 | 457 | esc_attr__('Filter this list to only show registrations for %s', 'event_espresso'), |
| 458 | 458 | $event_name |
| 459 | 459 | ); |
| 460 | - $actions['event_filter'] .= '">' . __('View Registrations', 'event_espresso') . '</a>'; |
|
| 460 | + $actions['event_filter'] .= '">'.__('View Registrations', 'event_espresso').'</a>'; |
|
| 461 | 461 | } else { |
| 462 | 462 | $edit_event = $event_name; |
| 463 | 463 | $actions['event_filter'] = ''; |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | - return sprintf('%1$s %2$s', $edit_event, $this->row_actions($actions) ); |
|
| 466 | + return sprintf('%1$s %2$s', $edit_event, $this->row_actions($actions)); |
|
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | |
@@ -476,18 +476,18 @@ discard block |
||
| 476 | 476 | * @return string |
| 477 | 477 | * @throws \EE_Error |
| 478 | 478 | */ |
| 479 | - public function column_DTT_EVT_start(EE_Registration $item){ |
|
| 479 | + public function column_DTT_EVT_start(EE_Registration $item) { |
|
| 480 | 480 | $datetime_strings = array(); |
| 481 | - $ticket = $item->ticket( TRUE ); |
|
| 482 | - if ( $ticket instanceof EE_Ticket ) { |
|
| 481 | + $ticket = $item->ticket(TRUE); |
|
| 482 | + if ($ticket instanceof EE_Ticket) { |
|
| 483 | 483 | $remove_defaults = array('default_where_conditions' => 'none'); |
| 484 | 484 | $datetimes = $ticket->datetimes($remove_defaults); |
| 485 | - foreach($datetimes as $datetime){ |
|
| 486 | - $datetime_strings[] = $datetime->get_i18n_datetime( 'DTT_EVT_start' ); |
|
| 485 | + foreach ($datetimes as $datetime) { |
|
| 486 | + $datetime_strings[] = $datetime->get_i18n_datetime('DTT_EVT_start'); |
|
| 487 | 487 | } |
| 488 | - return implode("<br />",$datetime_strings); |
|
| 488 | + return implode("<br />", $datetime_strings); |
|
| 489 | 489 | } else { |
| 490 | - return __( 'There is no ticket on this registration', 'event_espresso' ); |
|
| 490 | + return __('There is no ticket on this registration', 'event_espresso'); |
|
| 491 | 491 | } |
| 492 | 492 | } |
| 493 | 493 | |
@@ -501,17 +501,17 @@ discard block |
||
| 501 | 501 | * @return string |
| 502 | 502 | * @throws \EE_Error |
| 503 | 503 | */ |
| 504 | - public function column_ATT_fname(EE_Registration $item){ |
|
| 504 | + public function column_ATT_fname(EE_Registration $item) { |
|
| 505 | 505 | $attendee = $item->attendee(); |
| 506 | 506 | |
| 507 | - $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 507 | + $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL); |
|
| 508 | 508 | $attendee_name = $attendee instanceof EE_Attendee ? $attendee->full_name() : ''; |
| 509 | 509 | $link = EE_Registry::instance()->CAP->current_user_can( |
| 510 | 510 | 'ee_read_registration', |
| 511 | 511 | 'espresso_registrations_view_registration', |
| 512 | 512 | $item->ID() |
| 513 | 513 | ) |
| 514 | - ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">' . $attendee_name . '</a>' |
|
| 514 | + ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'.$attendee_name.'</a>' |
|
| 515 | 515 | : $attendee_name; |
| 516 | 516 | $link .= $item->count() === 1 |
| 517 | 517 | ? ' <sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>' |
@@ -521,33 +521,33 @@ discard block |
||
| 521 | 521 | $payment_count = $t instanceof EE_Transaction ? $t->count_related('Payment') : 0; |
| 522 | 522 | |
| 523 | 523 | //append group count to name |
| 524 | - $link .= ' ' . sprintf(__( '(%1$s / %2$s)', 'event_espresso' ), $item->count(), $item->group_size()); |
|
| 524 | + $link .= ' '.sprintf(__('(%1$s / %2$s)', 'event_espresso'), $item->count(), $item->group_size()); |
|
| 525 | 525 | |
| 526 | 526 | //append reg_code |
| 527 | - $link .= '<br>' . sprintf( __( 'Reg Code: %s', 'event_espresso' ), $item->get('REG_code') ); |
|
| 527 | + $link .= '<br>'.sprintf(__('Reg Code: %s', 'event_espresso'), $item->get('REG_code')); |
|
| 528 | 528 | |
| 529 | 529 | //reg status text for accessibility |
| 530 | - $link .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' ) . '</span>'; |
|
| 530 | + $link .= '<br><span class="ee-status-text-small">'.EEH_Template::pretty_status($item->status_ID(), false, 'sentence').'</span>'; |
|
| 531 | 531 | |
| 532 | 532 | //trash/restore/delete actions |
| 533 | 533 | $actions = array(); |
| 534 | - if ( $this->_view !== 'trash' && $payment_count === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registration', 'espresso_registrations_trash_registrations', $item->ID() ) ) { |
|
| 535 | - $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_registrations', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 536 | - $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Trash Registration', 'event_espresso' ) . '">' . __( 'Trash', 'event_espresso' ) . '</a>'; |
|
| 537 | - } elseif ( $this->_view === 'trash' ) { |
|
| 534 | + if ($this->_view !== 'trash' && $payment_count === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_registration', 'espresso_registrations_trash_registrations', $item->ID())) { |
|
| 535 | + $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_registrations', '_REG_ID'=>$item->ID()), REG_ADMIN_URL); |
|
| 536 | + $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Trash Registration', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>'; |
|
| 537 | + } elseif ($this->_view === 'trash') { |
|
| 538 | 538 | // restore registration link |
| 539 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registration', 'espresso_registrations_restore_registrations', $item->ID() ) ) { |
|
| 540 | - $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_registrations', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 541 | - $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Registration', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>'; |
|
| 539 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registration', 'espresso_registrations_restore_registrations', $item->ID())) { |
|
| 540 | + $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_registrations', '_REG_ID'=>$item->ID()), REG_ADMIN_URL); |
|
| 541 | + $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Registration', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>'; |
|
| 542 | 542 | } |
| 543 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_registration', 'espresso_registrations_ee_delete_registrations', $item->ID() ) ) { |
|
| 544 | - $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_registrations', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 543 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_registration', 'espresso_registrations_ee_delete_registrations', $item->ID())) { |
|
| 544 | + $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_registrations', '_REG_ID'=>$item->ID()), REG_ADMIN_URL); |
|
| 545 | 545 | |
| 546 | - $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Registration Permanently', 'event_espresso' ). '">' . __( 'Delete', 'event_espresso' ) . '</a>'; |
|
| 546 | + $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Registration Permanently', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>'; |
|
| 547 | 547 | } |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | - return sprintf('%1$s %2$s', $link, $this->row_actions($actions) ); |
|
| 550 | + return sprintf('%1$s %2$s', $link, $this->row_actions($actions)); |
|
| 551 | 551 | } |
| 552 | 552 | |
| 553 | 553 | |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | * @return string |
| 561 | 561 | * @throws \EE_Error |
| 562 | 562 | */ |
| 563 | - public function column_ATT_email( EE_Registration $item ) { |
|
| 563 | + public function column_ATT_email(EE_Registration $item) { |
|
| 564 | 564 | $attendee = $item->get_first_related('Attendee'); |
| 565 | 565 | return ! $attendee instanceof EE_Attendee ? __('No attached contact record.', 'event_espresso') : $attendee->email(); |
| 566 | 566 | } |
@@ -574,8 +574,8 @@ discard block |
||
| 574 | 574 | * @param \EE_Registration $item |
| 575 | 575 | * @return string |
| 576 | 576 | */ |
| 577 | - public function column__REG_count(EE_Registration $item){ |
|
| 578 | - return sprintf(__( '%1$s / %2$s', 'event_espresso' ), $item->count(), $item->group_size()); |
|
| 577 | + public function column__REG_count(EE_Registration $item) { |
|
| 578 | + return sprintf(__('%1$s / %2$s', 'event_espresso'), $item->count(), $item->group_size()); |
|
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | |
@@ -587,16 +587,16 @@ discard block |
||
| 587 | 587 | * @param \EE_Registration $item |
| 588 | 588 | * @return string |
| 589 | 589 | */ |
| 590 | - public function column_PRC_amount(EE_Registration $item){ |
|
| 590 | + public function column_PRC_amount(EE_Registration $item) { |
|
| 591 | 591 | $ticket = $item->ticket(); |
| 592 | 592 | |
| 593 | - $content = isset( $_GET['event_id'] ) && $ticket instanceof EE_Ticket ? '<span class="TKT_name">' . $ticket->name() . '</span><br />' : ''; |
|
| 593 | + $content = isset($_GET['event_id']) && $ticket instanceof EE_Ticket ? '<span class="TKT_name">'.$ticket->name().'</span><br />' : ''; |
|
| 594 | 594 | |
| 595 | - if ( $item->final_price() > 0 ) { |
|
| 596 | - $content .= '<span class="reg-pad-rght">' . $item->pretty_final_price() . '</span>'; |
|
| 595 | + if ($item->final_price() > 0) { |
|
| 596 | + $content .= '<span class="reg-pad-rght">'.$item->pretty_final_price().'</span>'; |
|
| 597 | 597 | } else { |
| 598 | 598 | // free event |
| 599 | - $content .= '<span class="reg-overview-free-event-spn reg-pad-rght">' . __( 'free', 'event_espresso' ) . '</span>'; |
|
| 599 | + $content .= '<span class="reg-overview-free-event-spn reg-pad-rght">'.__('free', 'event_espresso').'</span>'; |
|
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | return $content; |
@@ -612,11 +612,11 @@ discard block |
||
| 612 | 612 | * @param \EE_Registration $item |
| 613 | 613 | * @return string |
| 614 | 614 | */ |
| 615 | - public function column__REG_final_price(EE_Registration $item){ |
|
| 615 | + public function column__REG_final_price(EE_Registration $item) { |
|
| 616 | 616 | $ticket = $item->ticket(); |
| 617 | - $content = isset( $_GET['event_id'] ) || ! $ticket instanceof EE_Ticket ? '' : '<span class="TKT_name">' . $ticket->name() . '</span><br />'; |
|
| 617 | + $content = isset($_GET['event_id']) || ! $ticket instanceof EE_Ticket ? '' : '<span class="TKT_name">'.$ticket->name().'</span><br />'; |
|
| 618 | 618 | |
| 619 | - $content .= '<span class="reg-pad-rght">' . $item->pretty_final_price() . '</span>'; |
|
| 619 | + $content .= '<span class="reg-pad-rght">'.$item->pretty_final_price().'</span>'; |
|
| 620 | 620 | return $content; |
| 621 | 621 | |
| 622 | 622 | } |
@@ -630,13 +630,13 @@ discard block |
||
| 630 | 630 | * @param \EE_Registration $item |
| 631 | 631 | * @return string |
| 632 | 632 | */ |
| 633 | - public function column__REG_paid(EE_Registration $item){ |
|
| 633 | + public function column__REG_paid(EE_Registration $item) { |
|
| 634 | 634 | $payment_method = $item->payment_method(); |
| 635 | - $payment_method_name = $payment_method instanceof EE_Payment_Method ? $payment_method->admin_name() : __( 'Unknown', 'event_espresso' ); |
|
| 635 | + $payment_method_name = $payment_method instanceof EE_Payment_Method ? $payment_method->admin_name() : __('Unknown', 'event_espresso'); |
|
| 636 | 636 | |
| 637 | - $content = '<span class="reg-pad-rght">' . $item->pretty_paid() . '</span>'; |
|
| 638 | - if ( $item->paid() > 0 ) { |
|
| 639 | - $content .= '<br><span class="ee-status-text-small">' . sprintf( __( '...via %s', 'event_espresso' ), $payment_method_name ) . '</span>'; |
|
| 637 | + $content = '<span class="reg-pad-rght">'.$item->pretty_paid().'</span>'; |
|
| 638 | + if ($item->paid() > 0) { |
|
| 639 | + $content .= '<br><span class="ee-status-text-small">'.sprintf(__('...via %s', 'event_espresso'), $payment_method_name).'</span>'; |
|
| 640 | 640 | } |
| 641 | 641 | return $content; |
| 642 | 642 | } |
@@ -651,11 +651,11 @@ discard block |
||
| 651 | 651 | * @return string |
| 652 | 652 | * @throws \EE_Error |
| 653 | 653 | */ |
| 654 | - public function column_TXN_total(EE_Registration $item){ |
|
| 655 | - if($item->transaction()){ |
|
| 656 | - $view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID() ), TXN_ADMIN_URL ); |
|
| 657 | - return EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID() ) ? '<span class="reg-pad-rght"><a class="status-'. $item->transaction()->status_ID() .'" href="'.$view_txn_lnk_url.'" title="' . esc_attr__( 'View Transaction', 'event_espresso' ) . '">' . $item->transaction()->pretty_total() . '</a></span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_total() . '</span>'; |
|
| 658 | - }else{ |
|
| 654 | + public function column_TXN_total(EE_Registration $item) { |
|
| 655 | + if ($item->transaction()) { |
|
| 656 | + $view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID()), TXN_ADMIN_URL); |
|
| 657 | + return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID()) ? '<span class="reg-pad-rght"><a class="status-'.$item->transaction()->status_ID().'" href="'.$view_txn_lnk_url.'" title="'.esc_attr__('View Transaction', 'event_espresso').'">'.$item->transaction()->pretty_total().'</a></span>' : '<span class="reg-pad-rght">'.$item->transaction()->pretty_total().'</span>'; |
|
| 658 | + } else { |
|
| 659 | 659 | return __("None", "event_espresso"); |
| 660 | 660 | } |
| 661 | 661 | } |
@@ -670,15 +670,15 @@ discard block |
||
| 670 | 670 | * @return string |
| 671 | 671 | * @throws \EE_Error |
| 672 | 672 | */ |
| 673 | - public function column_TXN_paid(EE_Registration $item){ |
|
| 673 | + public function column_TXN_paid(EE_Registration $item) { |
|
| 674 | 674 | |
| 675 | - if ( $item->count() === 1 ) { |
|
| 675 | + if ($item->count() === 1) { |
|
| 676 | 676 | $transaction = $item->transaction() ? $item->transaction() : EE_Transaction::new_instance(); |
| 677 | - if ( $transaction->paid() >= $transaction->total() ) { |
|
| 677 | + if ($transaction->paid() >= $transaction->total()) { |
|
| 678 | 678 | return '<span class="reg-pad-rght"><div class="dashicons dashicons-yes green-icon"></div></span>'; |
| 679 | 679 | } else { |
| 680 | - $view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID() ), TXN_ADMIN_URL ); |
|
| 681 | - return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID() ) ? '<span class="reg-pad-rght"><a class="status-'. $transaction->status_ID() .'" href="'.$view_txn_lnk_url.'" title="' . esc_attr__( 'View Transaction', 'event_espresso' ) . '">' . $item->transaction()->pretty_paid() . '</a><span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_paid() . '</span>'; |
|
| 680 | + $view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$item->transaction_ID()), TXN_ADMIN_URL); |
|
| 681 | + return EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $item->transaction_ID()) ? '<span class="reg-pad-rght"><a class="status-'.$transaction->status_ID().'" href="'.$view_txn_lnk_url.'" title="'.esc_attr__('View Transaction', 'event_espresso').'">'.$item->transaction()->pretty_paid().'</a><span>' : '<span class="reg-pad-rght">'.$item->transaction()->pretty_paid().'</span>'; |
|
| 682 | 682 | } |
| 683 | 683 | } |
| 684 | 684 | |
@@ -699,42 +699,42 @@ discard block |
||
| 699 | 699 | public function column_actions(EE_Registration $item) { |
| 700 | 700 | $actions = array(); |
| 701 | 701 | $attendee = $item->attendee(); |
| 702 | - $this->_set_related_details( $item ); |
|
| 702 | + $this->_set_related_details($item); |
|
| 703 | 703 | |
| 704 | 704 | //Build row actions |
| 705 | - $view_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL ); |
|
| 706 | - $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->attendee_ID() ), REG_ADMIN_URL ); |
|
| 705 | + $view_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL); |
|
| 706 | + $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->attendee_ID()), REG_ADMIN_URL); |
|
| 707 | 707 | |
| 708 | 708 | // page=attendees&event_admin_reports=resend_email®istration_id=43653465634&event_id=2&form_action=resend_email |
| 709 | 709 | //$resend_reg_lnk_url_params = array( 'action'=>'resend_registration', '_REG_ID'=>$item->REG_ID ); |
| 710 | - $resend_reg_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'resend_registration', '_REG_ID'=>$item->ID() ), REG_ADMIN_URL, true ); |
|
| 710 | + $resend_reg_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'resend_registration', '_REG_ID'=>$item->ID()), REG_ADMIN_URL, true); |
|
| 711 | 711 | |
| 712 | 712 | |
| 713 | 713 | //Build row actions |
| 714 | - $actions['view_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID() ) ? ' |
|
| 714 | + $actions['view_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID()) ? ' |
|
| 715 | 715 | <li> |
| 716 | - <a href="'.$view_lnk_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '" class="tiny-text"> |
|
| 716 | + <a href="'.$view_lnk_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'" class="tiny-text"> |
|
| 717 | 717 | <div class="dashicons dashicons-clipboard"></div> |
| 718 | 718 | </a> |
| 719 | 719 | </li>' : ''; |
| 720 | - $actions['edit_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee' ) && $attendee instanceof EE_Attendee ?' |
|
| 720 | + $actions['edit_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') && $attendee instanceof EE_Attendee ? ' |
|
| 721 | 721 | <li> |
| 722 | - <a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact Details', 'event_espresso' ) . '" class="tiny-text"> |
|
| 722 | + <a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact Details', 'event_espresso').'" class="tiny-text"> |
|
| 723 | 723 | <div class="ee-icon ee-icon-user-edit ee-icon-size-16"></div> |
| 724 | 724 | </a> |
| 725 | 725 | </li>' : ''; |
| 726 | - $actions['resend_reg_lnk'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_registrations_resend_registration', $item->ID() ) ? ' |
|
| 726 | + $actions['resend_reg_lnk'] = $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_registrations_resend_registration', $item->ID()) ? ' |
|
| 727 | 727 | <li> |
| 728 | - <a href="'.$resend_reg_lnk_url.'" title="' . esc_attr__( 'Resend Registration Details', 'event_espresso' ) . '" class="tiny-text"> |
|
| 728 | + <a href="'.$resend_reg_lnk_url.'" title="'.esc_attr__('Resend Registration Details', 'event_espresso').'" class="tiny-text"> |
|
| 729 | 729 | <div class="dashicons dashicons-email-alt"></div> |
| 730 | 730 | </a> |
| 731 | 731 | </li>' : ''; |
| 732 | 732 | |
| 733 | 733 | // page=transactions&action=view_transaction&txn=256&_wpnonce=6414da4dbb |
| 734 | - $view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$this->_transaction_details['id'] ), TXN_ADMIN_URL ); |
|
| 735 | - $actions['view_txn_lnk'] = EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction', $this->_transaction_details['id'] ) ? ' |
|
| 734 | + $view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$this->_transaction_details['id']), TXN_ADMIN_URL); |
|
| 735 | + $actions['view_txn_lnk'] = EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction', $this->_transaction_details['id']) ? ' |
|
| 736 | 736 | <li> |
| 737 | - <a class="ee-status-color-' . $this->_transaction_details['status'] . ' tiny-text" href="'.$view_txn_lnk_url.'" title="' . $this->_transaction_details['title_attr'] . '"> |
|
| 737 | + <a class="ee-status-color-' . $this->_transaction_details['status'].' tiny-text" href="'.$view_txn_lnk_url.'" title="'.$this->_transaction_details['title_attr'].'"> |
|
| 738 | 738 | <div class="dashicons dashicons-cart"></div> |
| 739 | 739 | </a> |
| 740 | 740 | </li>' : ''; |
@@ -743,17 +743,17 @@ discard block |
||
| 743 | 743 | $actions['dl_invoice_lnk'] = ''; |
| 744 | 744 | $dl_invoice_lnk_url = $item->invoice_url(); |
| 745 | 745 | //only show invoice link if message type is active. |
| 746 | - if ( $attendee instanceof EE_Attendee && $item->is_primary_registrant() && EEH_MSG_Template::is_mt_active( 'invoice' ) ) { |
|
| 746 | + if ($attendee instanceof EE_Attendee && $item->is_primary_registrant() && EEH_MSG_Template::is_mt_active('invoice')) { |
|
| 747 | 747 | $actions['dl_invoice_lnk'] = ' |
| 748 | 748 | <li> |
| 749 | - <a title="' . esc_attr__( 'View Transaction Invoice', 'event_espresso' ) . '" target="_blank" href="'.$dl_invoice_lnk_url.'" class="tiny-text"> |
|
| 749 | + <a title="' . esc_attr__('View Transaction Invoice', 'event_espresso').'" target="_blank" href="'.$dl_invoice_lnk_url.'" class="tiny-text"> |
|
| 750 | 750 | <span class="dashicons dashicons-media-spreadsheet ee-icon-size-18"></span> |
| 751 | 751 | </a> |
| 752 | 752 | </li>'; |
| 753 | 753 | } |
| 754 | 754 | $actions['filtered_messages_link'] = ''; |
| 755 | 755 | //message list table link (filtered by REG_ID |
| 756 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_global_messages', 'view_filtered_messages' ) ) { |
|
| 756 | + if (EE_Registry::instance()->CAP->current_user_can('ee_read_global_messages', 'view_filtered_messages')) { |
|
| 757 | 757 | $actions['filtered_messages_link'] = '<li>' |
| 758 | 758 | . EEH_MSG_Template::get_message_action_link( |
| 759 | 759 | 'see_notifications_for', |
@@ -764,9 +764,9 @@ discard block |
||
| 764 | 764 | ) |
| 765 | 765 | . '</li>'; |
| 766 | 766 | } |
| 767 | - $actions = apply_filters( 'FHEE__EE_Registrations_List_Table__column_actions__actions', $actions, $item, $this ); |
|
| 767 | + $actions = apply_filters('FHEE__EE_Registrations_List_Table__column_actions__actions', $actions, $item, $this); |
|
| 768 | 768 | return $this->_action_string( |
| 769 | - implode( '', $actions ), |
|
| 769 | + implode('', $actions), |
|
| 770 | 770 | $item, |
| 771 | 771 | 'ul', |
| 772 | 772 | 'reg-overview-actions-ul' |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | /** |
| 215 | 215 | * _get_table_filters |
| 216 | 216 | * @access protected |
| 217 | - * @return array |
|
| 217 | + * @return string[] |
|
| 218 | 218 | */ |
| 219 | 219 | protected function _get_table_filters() { |
| 220 | 220 | $filters = array(); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * ------------------------------------------------------------------------ |
| 23 | 23 | */ |
| 24 | -class Registrations_Admin_Page_Init extends EE_Admin_Page_CPT_Init { |
|
| 24 | +class Registrations_Admin_Page_Init extends EE_Admin_Page_CPT_Init { |
|
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | |
@@ -34,16 +34,16 @@ discard block |
||
| 34 | 34 | * @return void |
| 35 | 35 | */ |
| 36 | 36 | public function __construct() { |
| 37 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
| 38 | - if ( ! defined( 'REG_PG_SLUG' ) ) { |
|
| 39 | - define( 'REG_PG_SLUG', 'espresso_registrations' ); |
|
| 40 | - define( 'REG_PG_NAME', ucwords( str_replace( '_', '', REG_PG_SLUG ))); |
|
| 41 | - define( 'REG_ADMIN', EE_ADMIN_PAGES . 'registrations' . DS ); |
|
| 42 | - define( 'REG_ADMIN_URL', admin_url( 'admin.php?page=' . REG_PG_SLUG )); |
|
| 43 | - define( 'REG_ASSETS_PATH', REG_ADMIN . 'assets' . DS ); |
|
| 44 | - define( 'REG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registrations/assets/' ); |
|
| 45 | - define( 'REG_TEMPLATE_PATH', REG_ADMIN . 'templates' . DS ); |
|
| 46 | - define( 'REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registrations/templates/' ); |
|
| 37 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
| 38 | + if ( ! defined('REG_PG_SLUG')) { |
|
| 39 | + define('REG_PG_SLUG', 'espresso_registrations'); |
|
| 40 | + define('REG_PG_NAME', ucwords(str_replace('_', '', REG_PG_SLUG))); |
|
| 41 | + define('REG_ADMIN', EE_ADMIN_PAGES.'registrations'.DS); |
|
| 42 | + define('REG_ADMIN_URL', admin_url('admin.php?page='.REG_PG_SLUG)); |
|
| 43 | + define('REG_ASSETS_PATH', REG_ADMIN.'assets'.DS); |
|
| 44 | + define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL.'registrations/assets/'); |
|
| 45 | + define('REG_TEMPLATE_PATH', REG_ADMIN.'templates'.DS); |
|
| 46 | + define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'registrations/templates/'); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | parent::__construct(); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | protected function _set_menu_map() { |
| 62 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
| 62 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
| 63 | 63 | 'menu_group' => 'main', |
| 64 | 64 | 'menu_order' => 40, |
| 65 | 65 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Event Espresso |
| 4 | 6 | * |
@@ -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 | /** |
@@ -153,57 +153,57 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | |
| 155 | 155 | protected function _start() { |
| 156 | - $content = '<h3>' . __('Contact List', 'event_espresso') . '</h3>'; |
|
| 157 | - $content .= '<p>' . __('This tour of the Contact List page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
| 156 | + $content = '<h3>'.__('Contact List', 'event_espresso').'</h3>'; |
|
| 157 | + $content .= '<p>'.__('This tour of the Contact List page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
| 158 | 158 | return $content; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | protected function _attendee_id_stop() { |
| 162 | - return '<p>' . __('View ID for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 162 | + return '<p>'.__('View ID for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | protected function _attendee_name_stop() { |
| 166 | - return '<p>' . __('View first name for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 166 | + return '<p>'.__('View first name for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | protected function _att_lname_stop() { |
| 170 | - return '<p>' . __('View last name for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 170 | + return '<p>'.__('View last name for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | protected function _att_email_stop() { |
| 174 | - return '<p>' . __('View email address for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 174 | + return '<p>'.__('View email address for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | protected function _att_phone_stop() { |
| 178 | - return '<p>' . __('View phone number for registrants.', 'event_espresso') . '</p>'; |
|
| 178 | + return '<p>'.__('View phone number for registrants.', 'event_espresso').'</p>'; |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | protected function _att_address_stop() { |
| 182 | - return '<p>' . __('View address for registrants.', 'event_espresso') . '</p>'; |
|
| 182 | + return '<p>'.__('View address for registrants.', 'event_espresso').'</p>'; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | protected function _att_city_stop() { |
| 186 | - return '<p>' . __('View city for registrants.', 'event_espresso') . '</p>'; |
|
| 186 | + return '<p>'.__('View city for registrants.', 'event_espresso').'</p>'; |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | protected function _sta_id_stop() { |
| 190 | - return '<p>' . __('View state/province for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 190 | + return '<p>'.__('View state/province for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | protected function _cnt_iso_stop() { |
| 194 | - return '<p>' . __('View country for registrants. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 194 | + return '<p>'.__('View country for registrants. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | protected function _bulkactions_stop() { |
| 198 | - return '<p>' . __('Perform a bulk action to multiple registrants.', 'event_espresso') . '</p>'; |
|
| 198 | + return '<p>'.__('Perform a bulk action to multiple registrants.', 'event_espresso').'</p>'; |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | protected function _search_stop() { |
| 202 | - return '<p>' . __('Search through contacts. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, and Registration Code.', 'event_espresso') . '</p>'; |
|
| 202 | + return '<p>'.__('Search through contacts. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, and Registration Code.', 'event_espresso').'</p>'; |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | protected function _contact_list_csv_export_stop() { |
| 206 | - return '<p>' . __('Export your contact list to a CSV file.', 'event_espresso') . '</p>'; |
|
| 206 | + return '<p>'.__('Export your contact list to a CSV file.', 'event_espresso').'</p>'; |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | } |
| 210 | 210 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
| 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 |
@@ -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 | /** |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | protected function _set_tour_properties() { |
| 33 | 33 | $this->_label = __('Event Check-in Tour', 'event_espresso'); |
| 34 | - if ( isset( $this->_req_data['event_id'] ) ) |
|
| 34 | + if (isset($this->_req_data['event_id'])) |
|
| 35 | 35 | $this->_slug = 'event-checkin-overview-joyride'; |
| 36 | 36 | else |
| 37 | 37 | $this->_slug = 'all-event-checkin-overview-joyride'; |
@@ -183,73 +183,73 @@ discard block |
||
| 183 | 183 | |
| 184 | 184 | |
| 185 | 185 | protected function _start() { |
| 186 | - $content = '<h3>' . __('Event Check-in', 'event_espresso') . '</h3>'; |
|
| 187 | - if ( isset( $this->_req_data['event_id'] ) ) { |
|
| 188 | - $content .= '<p>' . __('This tour of the Event Check-in page will go over different areas of the screen to help you understand what they are used for.<br /><br /> Note: You are currently viewing the check-in for a specific event so you can toggle the check-in status for attendees.', 'event_espresso') . '</p>'; |
|
| 186 | + $content = '<h3>'.__('Event Check-in', 'event_espresso').'</h3>'; |
|
| 187 | + if (isset($this->_req_data['event_id'])) { |
|
| 188 | + $content .= '<p>'.__('This tour of the Event Check-in page will go over different areas of the screen to help you understand what they are used for.<br /><br /> Note: You are currently viewing the check-in for a specific event so you can toggle the check-in status for attendees.', 'event_espresso').'</p>'; |
|
| 189 | 189 | } else { |
| 190 | - $content .= '<p>' . __('This tour of the event check-in page will go over different areas of the screen to help you understand what they are used for. <br /><br /> Note: You must select an event from the dropdown menu before you can toggle the check-in status for an attendee.', 'event_espresso') . '</p>'; |
|
| 190 | + $content .= '<p>'.__('This tour of the event check-in page will go over different areas of the screen to help you understand what they are used for. <br /><br /> Note: You must select an event from the dropdown menu before you can toggle the check-in status for an attendee.', 'event_espresso').'</p>'; |
|
| 191 | 191 | } |
| 192 | 192 | return $content; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | protected function _reg_count_stop() { |
| 196 | - return '<p>' . __('View registration number.', 'event_espresso') . '</p>'; |
|
| 196 | + return '<p>'.__('View registration number.', 'event_espresso').'</p>'; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | protected function _attendee_name_stop() { |
| 200 | - return '<p>' . __('View name of registrant. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 200 | + return '<p>'.__('View name of registrant. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | protected function _attendee_email_stop() { |
| 204 | - return '<p>' . __('View email address for a registrant.', 'event_espresso') . '</p>'; |
|
| 204 | + return '<p>'.__('View email address for a registrant.', 'event_espresso').'</p>'; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | protected function _reg_date_stop() { |
| 208 | - return '<p>' . __('View registration date. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 208 | + return '<p>'.__('View registration date. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | protected function _reg_code_stop() { |
| 212 | - return '<p>' . __('View registration code. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
| 212 | + return '<p>'.__('View registration code. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | protected function _reg_final_price_stop() { |
| 216 | - return '<p>' . __('View price for ticket.', 'event_espresso') . '</p>'; |
|
| 216 | + return '<p>'.__('View price for ticket.', 'event_espresso').'</p>'; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | protected function _txn_paid_stop() { |
| 220 | - return '<p>' . __('View if registrant has paid for ticket.', 'event_espresso') . '</p>'; |
|
| 220 | + return '<p>'.__('View if registrant has paid for ticket.', 'event_espresso').'</p>'; |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | protected function _txn_total_stop() { |
| 224 | - return '<p>' . __('View total amount paid.', 'event_espresso') . '</p>'; |
|
| 224 | + return '<p>'.__('View total amount paid.', 'event_espresso').'</p>'; |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | protected function _prc_name_stop() { |
| 228 | - return '<p>' . __('View type of ticket.', 'event_espresso') . '</p>'; |
|
| 228 | + return '<p>'.__('View type of ticket.', 'event_espresso').'</p>'; |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | protected function _actions_stop() { |
| 232 | - return '<p>' . __('Perform an action to a registration. See legend in bottom left corner.', 'event_espresso') . '</p>'; |
|
| 232 | + return '<p>'.__('Perform an action to a registration. See legend in bottom left corner.', 'event_espresso').'</p>'; |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | protected function _legend_stop() { |
| 236 | - return '<p>' . __('This is the legend that describes the different check-in statuses. Also shows available status for registrations.', 'event_espresso') . '</p>'; |
|
| 236 | + return '<p>'.__('This is the legend that describes the different check-in statuses. Also shows available status for registrations.', 'event_espresso').'</p>'; |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | protected function _bulkactions_stop() { |
| 240 | - return '<p>' . __('Perform a bulk action to multiple registrations (only available when viewing check-in for a specific event).', 'event_espresso') . '</p>'; |
|
| 240 | + return '<p>'.__('Perform a bulk action to multiple registrations (only available when viewing check-in for a specific event).', 'event_espresso').'</p>'; |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | protected function _event_selector_stop() { |
| 244 | - return '<p>' . __('Select an event from this dropdown and click the filter button to see the check-in registration list for a specific event. You will then be able to toggle the check-in status for a registration.', 'event_espresso') . '</p>'; |
|
| 244 | + return '<p>'.__('Select an event from this dropdown and click the filter button to see the check-in registration list for a specific event. You will then be able to toggle the check-in status for a registration.', 'event_espresso').'</p>'; |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | protected function _dtt_selector_stop() { |
| 248 | - return '<p>' . __('This dropdown shows you the date and time that a displayed registration is attached to. You can switch to a different event by selecting another date and clicking on the filter button. You can also switch out of this view by clicking on the reset filters button.', 'event_espresso') . '</p>'; |
|
| 248 | + return '<p>'.__('This dropdown shows you the date and time that a displayed registration is attached to. You can switch to a different event by selecting another date and clicking on the filter button. You can also switch out of this view by clicking on the reset filters button.', 'event_espresso').'</p>'; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | protected function _search_stop() { |
| 252 | - return '<p>' . __('Search through registrations. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, and Ticket Description.', 'event_espresso') . '</p>'; |
|
| 252 | + return '<p>'.__('Search through registrations. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, and Ticket Description.', 'event_espresso').'</p>'; |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | } |
| 256 | 256 | \ No newline at end of file |
@@ -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 |
@@ -31,10 +32,11 @@ discard block |
||
| 31 | 32 | |
| 32 | 33 | protected function _set_tour_properties() { |
| 33 | 34 | $this->_label = __('Event Check-in Tour', 'event_espresso'); |
| 34 | - if ( isset( $this->_req_data['event_id'] ) ) |
|
| 35 | - $this->_slug = 'event-checkin-overview-joyride'; |
|
| 36 | - else |
|
| 37 | - $this->_slug = 'all-event-checkin-overview-joyride'; |
|
| 35 | + if ( isset( $this->_req_data['event_id'] ) ) { |
|
| 36 | + $this->_slug = 'event-checkin-overview-joyride'; |
|
| 37 | + } else { |
|
| 38 | + $this->_slug = 'all-event-checkin-overview-joyride'; |
|
| 39 | + } |
|
| 38 | 40 | } |
| 39 | 41 | |
| 40 | 42 | |