@@ -6,27 +6,27 @@ |
||
6 | 6 | <?php |
7 | 7 | $settings_array = array( |
8 | 8 | 'max_registrants' => '<p> |
9 | - <label for="max-registrants">' . __('Maximum number of tickets allowed per order for this event: ', 'event_espresso') . '</label> |
|
10 | - <input class="ee-numeric" type="text" id="max-registrants" name="additional_limit" value="' . $additional_limit . '" size="4" /> |
|
9 | + <label for="max-registrants">' . __('Maximum number of tickets allowed per order for this event: ', 'event_espresso').'</label> |
|
10 | + <input class="ee-numeric" type="text" id="max-registrants" name="additional_limit" value="' . $additional_limit.'" size="4" /> |
|
11 | 11 | </p>', |
12 | 12 | 'additional_registration_options' => $additional_registration_options, |
13 | 13 | 'display_ticket_selector' => '<p> |
14 | - <label>' . __('Display Ticket Selector', 'event_espresso') . '</label>' . $display_ticket_selector . '</p>', |
|
14 | + <label>' . __('Display Ticket Selector', 'event_espresso').'</label>'.$display_ticket_selector.'</p>', |
|
15 | 15 | 'alternative_registration_page' => '<p> |
16 | - <label>' . __('Alternative Registration Page', 'event_espresso') . '</label> |
|
17 | - <input name="externalURL" size="20" type="text" value="' . $_event->external_url() . '"> |
|
16 | + <label>' . __('Alternative Registration Page', 'event_espresso').'</label> |
|
17 | + <input name="externalURL" size="20" type="text" value="' . $_event->external_url().'"> |
|
18 | 18 | </p>', |
19 | 19 | 'event_phone_number' => '<p> |
20 | - <label>' . __('Event Phone Number', 'event_espresso') . '</label> |
|
21 | - <input name="event_phone" size="20" type="text" value="' . $_event->phone() . '"> |
|
20 | + <label>' . __('Event Phone Number', 'event_espresso').'</label> |
|
21 | + <input name="event_phone" size="20" type="text" value="' . $_event->phone().'"> |
|
22 | 22 | </p>', |
23 | 23 | 'default_registration_status' => '<p> |
24 | - <label>' . __('Default Registration Status', 'event_espresso') . '</label>' . $EVT_default_registration_status . '</p>' |
|
24 | + <label>' . __('Default Registration Status', 'event_espresso').'</label>'.$EVT_default_registration_status.'</p>' |
|
25 | 25 | ); |
26 | 26 | //filter |
27 | - $settings_array = apply_filters( 'FHEE__caffeinated_event_registration_options__template__settings', $settings_array ); |
|
27 | + $settings_array = apply_filters('FHEE__caffeinated_event_registration_options__template__settings', $settings_array); |
|
28 | 28 | |
29 | 29 | //echo |
30 | - foreach ( $settings_array as $item ) { |
|
30 | + foreach ($settings_array as $item) { |
|
31 | 31 | echo $item; |
32 | 32 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <div class="import-area"> |
2 | 2 | <div class="important-notice"> |
3 | - <?php _e( 'The import feature has been disabled because of bugs. It is expected to be put back in place soon.', 'event_espresso' );?> |
|
3 | + <?php _e('The import feature has been disabled because of bugs. It is expected to be put back in place soon.', 'event_espresso'); ?> |
|
4 | 4 | </div> |
5 | 5 | <?php // echo $form?> |
6 | 6 | </div> |
@@ -5,6 +5,6 @@ |
||
5 | 5 | ?> |
6 | 6 | <div class="padding"> |
7 | 7 | |
8 | - <?php do_action( 'AHEE__template_settings__template__before_settings_form' ); ?> |
|
8 | + <?php do_action('AHEE__template_settings__template__before_settings_form'); ?> |
|
9 | 9 | |
10 | 10 | </div> |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | <?php echo EEH_Template::get_help_tab_link('full_logging_info'); ?> |
12 | 12 | </th> |
13 | 13 | <td> |
14 | - <?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging ); ?> |
|
14 | + <?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging); ?> |
|
15 | 15 | <p class="description"> |
16 | 16 | <span class="reminder-spn"> |
17 | 17 | <?php _e('Please use caution when using this feature. These files may be publicly available.', 'event_espresso'); ?> |
18 | 18 | </span><br/> |
19 | - <?php echo sprintf( __('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/' . EE_Registry::instance()->CFG->admin->log_file_name() . '</b>' ); ?> |
|
19 | + <?php echo sprintf(__('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/'.EE_Registry::instance()->CFG->admin->log_file_name().'</b>'); ?> |
|
20 | 20 | </p> |
21 | 21 | |
22 | 22 | </td> |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | <?php echo EEH_Template::get_help_tab_link('remote_logging_info'); ?> |
29 | 29 | </th> |
30 | 30 | <td> |
31 | - <?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging ); ?> |
|
31 | + <?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging); ?> |
|
32 | 32 | <p class="description"> |
33 | 33 | <?php _e('Send debugging data to the remote URL below.', 'event_espresso'); ?> |
34 | 34 | </p> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | <?php echo EEH_Template::get_help_tab_link('remote_logging_url_info'); ?> |
42 | 42 | </th> |
43 | 43 | <td> |
44 | - <input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url;?>" /> |
|
44 | + <input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url; ?>" /> |
|
45 | 45 | <p class="description"> |
46 | 46 | <?php _e('Example: http://requestb.in/MY_UNIQUE_ID', 'event_espresso'); ?> |
47 | 47 |
@@ -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 |
@@ -134,8 +135,9 @@ discard block |
||
134 | 135 | } |
135 | 136 | |
136 | 137 | //first we consider whether this template has override set. If it does then that means no custom templates can be created from this template as a base. So let's just skip the button creation. |
137 | - if ( $item->get('MTP_is_override' ) ) |
|
138 | - return ''; |
|
138 | + if ( $item->get('MTP_is_override' ) ) { |
|
139 | + return ''; |
|
140 | + } |
|
139 | 141 | |
140 | 142 | |
141 | 143 | $create_args = array( |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -31,18 +31,18 @@ discard block |
||
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | - public function __construct( $routing = TRUE ) { |
|
35 | - parent::__construct( $routing ); |
|
36 | - if ( !defined( 'EE_MSG_CAF_ASSETS_PATH' ) ) { |
|
37 | - define( 'EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/' ); |
|
38 | - define( 'EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/' ); |
|
39 | - define( 'EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/' ); |
|
40 | - define( 'EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/' ); |
|
34 | + public function __construct($routing = TRUE) { |
|
35 | + parent::__construct($routing); |
|
36 | + if ( ! defined('EE_MSG_CAF_ASSETS_PATH')) { |
|
37 | + define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/assets/'); |
|
38 | + define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/assets/'); |
|
39 | + define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/templates/'); |
|
40 | + define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/templates/'); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | 44 | protected function _extend_page_config() { |
45 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages'; |
|
45 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'messages'; |
|
46 | 46 | $this->_page_routes['custom_mtps'] = array( |
47 | 47 | 'func' => '_ee_custom_messages_overview_list_table', |
48 | 48 | 'capability' => 'ee_read_messages' ); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'require_nonce' => FALSE |
71 | 71 | ); |
72 | 72 | |
73 | - add_action( 'current_screen', array( $this, 'dynamic_screen_hooks' ), 10 ); |
|
73 | + add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | public function dynamic_screen_hooks() { |
88 | 88 | global $admin_page_hooks; |
89 | 89 | |
90 | - if ( !empty( $admin_page_hooks['espresso_events'] ) ) { |
|
90 | + if ( ! empty($admin_page_hooks['espresso_events'])) { |
|
91 | 91 | //we're on a EE specific page... good stuff! |
92 | 92 | $hook_prefix = $admin_page_hooks['espresso_events']; |
93 | - $filter_ref = $hook_prefix . '_page_' . $this->page_slug; |
|
94 | - add_filter( 'FHEE_manage_' . $filter_ref . '_columns', array( $this, 'add_custom_mtps_columns' ), 10, 2 ); |
|
95 | - add_action( 'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref, array( $this, 'custom_mtp_create_button_column'), 10, 2 ); |
|
93 | + $filter_ref = $hook_prefix.'_page_'.$this->page_slug; |
|
94 | + add_filter('FHEE_manage_'.$filter_ref.'_columns', array($this, 'add_custom_mtps_columns'), 10, 2); |
|
95 | + add_action('AHEE__EE_Admin_List_Table__column_actions__'.$filter_ref, array($this, 'custom_mtp_create_button_column'), 10, 2); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | * @param array $columns Original defined list of columns |
107 | 107 | * @param string $screen_id The unique screen id for the page. |
108 | 108 | */ |
109 | - public function add_custom_mtps_columns( $columns, $screen_id ) { |
|
110 | - if ( $screen_id !== 'espresso_messages_global_mtps' ) { |
|
109 | + public function add_custom_mtps_columns($columns, $screen_id) { |
|
110 | + if ($screen_id !== 'espresso_messages_global_mtps') { |
|
111 | 111 | return $columns; |
112 | 112 | } |
113 | 113 | |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @return string html content for the page. |
130 | 130 | */ |
131 | - public function custom_mtp_create_button_column( $item, $screen_id ) { |
|
132 | - if ( $screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'espresso_messages_add_new_message_template' ) ) { |
|
131 | + public function custom_mtp_create_button_column($item, $screen_id) { |
|
132 | + if ($screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'espresso_messages_add_new_message_template')) { |
|
133 | 133 | return ''; |
134 | 134 | } |
135 | 135 | |
136 | 136 | //first we consider whether this template has override set. If it does then that means no custom templates can be created from this template as a base. So let's just skip the button creation. |
137 | - if ( $item->get('MTP_is_override' ) ) |
|
137 | + if ($item->get('MTP_is_override')) |
|
138 | 138 | return ''; |
139 | 139 | |
140 | 140 | |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | 'message_type' => $item->message_type(), |
145 | 145 | 'action' => 'add_new_message_template' |
146 | 146 | ); |
147 | - $create_link = EE_Admin_Page::add_query_args_and_nonce( $create_args, EE_MSG_ADMIN_URL ); |
|
148 | - echo sprintf( '<a href="%s" class="button button-small">%s</a>', $create_link, __('Create Custom', 'event_espresso') ); |
|
147 | + $create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL); |
|
148 | + echo sprintf('<a href="%s" class="button button-small">%s</a>', $create_link, __('Create Custom', 'event_espresso')); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | ) |
179 | 179 | ) |
180 | 180 | ); |
181 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_messages', 'espresso_messages_trash_message_template' ) ) { |
|
181 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_messages', 'espresso_messages_trash_message_template')) { |
|
182 | 182 | $this->_views['trashed'] = array( |
183 | 183 | 'slug' => 'trashed', |
184 | 184 | 'label' => __('Trash', 'event_espresso'), |
@@ -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 | * |
@@ -123,8 +125,9 @@ discard block |
||
123 | 125 | } |
124 | 126 | |
125 | 127 | //if no reg id then get out cause need a reg id |
126 | - if ( empty( $REG_ID ) || empty( $DTT_ID ) ) |
|
127 | - throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') ); |
|
128 | + if ( empty( $REG_ID ) || empty( $DTT_ID ) ) { |
|
129 | + throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') ); |
|
130 | + } |
|
128 | 131 | |
129 | 132 | //set orderby |
130 | 133 | $orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value. |
@@ -147,8 +150,9 @@ discard block |
||
147 | 150 | $query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit ); |
148 | 151 | |
149 | 152 | //if no per_page value then we just want to return a count of all Check-ins |
150 | - if ( $count ) |
|
151 | - return EEM_Checkin::instance()->count( array( $_where ) ); |
|
153 | + if ( $count ) { |
|
154 | + return EEM_Checkin::instance()->count( array( $_where ) ); |
|
155 | + } |
|
152 | 156 | |
153 | 157 | return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params); |
154 | 158 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | |
30 | 30 | |
31 | - public function __construct( $admin_page ) { |
|
31 | + public function __construct($admin_page) { |
|
32 | 32 | parent::__construct($admin_page); |
33 | 33 | } |
34 | 34 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | |
37 | 37 | |
38 | 38 | protected function _setup_data() { |
39 | - $this->_data = $this->_get_checkins( $this->_per_page ); |
|
40 | - $this->_all_data_count = $this->_get_checkins( $this->_per_page, TRUE ); |
|
39 | + $this->_data = $this->_get_checkins($this->_per_page); |
|
40 | + $this->_all_data_count = $this->_get_checkins($this->_per_page, TRUE); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | ); |
59 | 59 | |
60 | 60 | $this->_sortable_columns = array( |
61 | - 'CHK_timestamp' => array( 'CHK_timestamp' => TRUE ) |
|
61 | + 'CHK_timestamp' => array('CHK_timestamp' => TRUE) |
|
62 | 62 | ); |
63 | 63 | |
64 | 64 | $this->_primary_column = 'CHK_in'; |
@@ -82,25 +82,25 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | |
85 | - function column_cb($item ) { |
|
86 | - return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', $item->ID() ); |
|
85 | + function column_cb($item) { |
|
86 | + return sprintf('<input type="checkbox" name="checkbox[%1$s]" />', $item->ID()); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | |
90 | - function column_CHK_in( EE_Checkin $item ) { |
|
90 | + function column_CHK_in(EE_Checkin $item) { |
|
91 | 91 | $checkinstatus = $item->get('CHK_in'); |
92 | 92 | $checkinstatus = $checkinstatus ? EE_Registration::checkin_status_in : EE_Registration::checkin_status_out; |
93 | - return '<span class="checkin-icons checkedin-status-' . $checkinstatus . '"></span><span class="show-on-mobile-view-only">' . $item->get_datetime('CHK_timestamp') . '</span>'; |
|
93 | + return '<span class="checkin-icons checkedin-status-'.$checkinstatus.'"></span><span class="show-on-mobile-view-only">'.$item->get_datetime('CHK_timestamp').'</span>'; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | |
97 | 97 | |
98 | - function column_CHK_timestamp( EE_Checkin $item ) { |
|
98 | + function column_CHK_timestamp(EE_Checkin $item) { |
|
99 | 99 | $actions = array(); |
100 | - $delete_url = EE_Admin_Page::add_query_args_and_nonce( array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID() ) ); |
|
101 | - $actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can( 'ee_delete_checkins', 'espresso_registrations_delete_checkin_row' ) ? '<a href="' . $delete_url . '" title="' . esc_attr__('Click here to delete this check-in record', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>' : ''; |
|
100 | + $delete_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID())); |
|
101 | + $actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can('ee_delete_checkins', 'espresso_registrations_delete_checkin_row') ? '<a href="'.$delete_url.'" title="'.esc_attr__('Click here to delete this check-in record', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>' : ''; |
|
102 | 102 | |
103 | - return sprintf( '%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions) ); |
|
103 | + return sprintf('%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions)); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | |
@@ -115,30 +115,30 @@ discard block |
||
115 | 115 | * @param bool $count Whether to return a count or not |
116 | 116 | * @return EE_Checkin[]|int |
117 | 117 | */ |
118 | - protected function _get_checkins( $per_page = 10, $count = FALSE ) { |
|
119 | - $REG_ID = isset( $this->_req_data['_REGID'] ) ? $this->_req_data['_REGID'] : FALSE; |
|
120 | - $DTT_ID = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : FALSE; |
|
118 | + protected function _get_checkins($per_page = 10, $count = FALSE) { |
|
119 | + $REG_ID = isset($this->_req_data['_REGID']) ? $this->_req_data['_REGID'] : FALSE; |
|
120 | + $DTT_ID = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : FALSE; |
|
121 | 121 | |
122 | 122 | //if user does not have the capability for the checkins for this registration then get out! |
123 | - if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID ) ) { |
|
123 | + if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $REG_ID)) { |
|
124 | 124 | return $count ? 0 : array(); |
125 | 125 | } |
126 | 126 | |
127 | 127 | //if no reg id then get out cause need a reg id |
128 | - if ( empty( $REG_ID ) || empty( $DTT_ID ) ) |
|
129 | - throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso') ); |
|
128 | + if (empty($REG_ID) || empty($DTT_ID)) |
|
129 | + throw new EE_Error(__('This route cannot be viewed unless registration and datetime IDs are included in the request (via REG_ID and DTT_ID parameters)', 'event_espresso')); |
|
130 | 130 | |
131 | 131 | //set orderby |
132 | 132 | $orderby = 'CHK_timestamp'; //note that with this table we're only providing the option to orderby the timestamp value. |
133 | 133 | |
134 | - $order = !empty( $this->_req_data['order'] ) ? $this->_req_data['order'] : 'ASC'; |
|
134 | + $order = ! empty($this->_req_data['order']) ? $this->_req_data['order'] : 'ASC'; |
|
135 | 135 | |
136 | - $current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1; |
|
137 | - $per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page; |
|
136 | + $current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1; |
|
137 | + $per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page; |
|
138 | 138 | $limit = NULL; |
139 | - if ( !$count ) { |
|
140 | - $offset = ($current_page-1)*$per_page; |
|
141 | - $limit = array( $offset, $per_page ); |
|
139 | + if ( ! $count) { |
|
140 | + $offset = ($current_page - 1) * $per_page; |
|
141 | + $limit = array($offset, $per_page); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | $_where = array( |
@@ -146,13 +146,13 @@ discard block |
||
146 | 146 | 'DTT_ID' => $DTT_ID |
147 | 147 | ); |
148 | 148 | |
149 | - $query_params = array( $_where, 'order_by' => array( $orderby => $order ), 'limit' => $limit ); |
|
149 | + $query_params = array($_where, 'order_by' => array($orderby => $order), 'limit' => $limit); |
|
150 | 150 | |
151 | 151 | //if no per_page value then we just want to return a count of all Check-ins |
152 | - if ( $count ) |
|
153 | - return EEM_Checkin::instance()->count( array( $_where ) ); |
|
152 | + if ($count) |
|
153 | + return EEM_Checkin::instance()->count(array($_where)); |
|
154 | 154 | |
155 | - return $count ? EEM_Checkin::instance()->count( array( $_where ) ) : EEM_Checkin::instance()->get_all($query_params); |
|
155 | + return $count ? EEM_Checkin::instance()->count(array($_where)) : EEM_Checkin::instance()->get_all($query_params); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | } //end class EE_Registration_CheckIn_List_Table |
@@ -32,7 +32,7 @@ |
||
32 | 32 | <input type="hidden" id="get_newsletter_form_content_nonce" name="get_newsletter_form_content_nonce" value="<?php echo $ajax_nonce; ?>"> |
33 | 33 | <input type="hidden" name="batch_message[id_type]" value="<?php echo $id_type; ?>"> |
34 | 34 | <input id="newsletter-batch-ids" type="hidden" name="batch_message[ids]" value=""> |
35 | - <h3 class="newsletter-send-form-title"><?php printf( __('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]' ); ?></h3> |
|
35 | + <h3 class="newsletter-send-form-title"><?php printf(__('Sending batch message to %s people...', 'event_espresso'), '[NUMPEOPLE]'); ?></h3> |
|
36 | 36 | <label for="batch-message-template-selector"><?php _e('Select Template:', 'event_espresso'); ?></label> |
37 | 37 | <?php echo $template_selector; ?> |
38 | 38 | <div class="batch-message-edit-fields" style="display:none;"> |
@@ -38,7 +38,7 @@ |
||
38 | 38 | </dt> |
39 | 39 | <dd> |
40 | 40 | <p> |
41 | - <?php printf( __('You can add the events or venues page as items to the navigation menu by going to Appearance --> Menus and check the boxes found under the %sEvent Espresso Pages%s section. Then click the Add to Menu button and finally click on the Save Menu button.', 'event_espresso'), '<strong>', '</strong>' ); ?> |
|
41 | + <?php printf(__('You can add the events or venues page as items to the navigation menu by going to Appearance --> Menus and check the boxes found under the %sEvent Espresso Pages%s section. Then click the Add to Menu button and finally click on the Save Menu button.', 'event_espresso'), '<strong>', '</strong>'); ?> |
|
42 | 42 | <br /> |
43 | 43 | <?php _e('Quick Link:', 'event_espresso'); ?> |
44 | 44 | <a href="<?php echo site_url('/wp-admin/nav-menus.php'); ?>"><?php _e('Menu Manager', 'event_espresso'); ?></a> |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | */ |
29 | 29 | class Price_Types_List_Table extends EE_Admin_List_Table { |
30 | 30 | |
31 | - public function __construct( $admin_page ) { |
|
31 | + public function __construct($admin_page) { |
|
32 | 32 | parent::__construct($admin_page); |
33 | - require_once(EE_MODELS . 'EEM_Price_Type.model.php'); |
|
33 | + require_once(EE_MODELS.'EEM_Price_Type.model.php'); |
|
34 | 34 | $this->_PRT = EEM_Price_Type::instance(); |
35 | 35 | } |
36 | 36 | |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | |
40 | 40 | protected function _setup_data() { |
41 | 41 | $trashed = $this->_admin_page->get_view() == 'trashed' ? TRUE : FALSE; |
42 | - $this->_data = $this->_admin_page->get_price_types_overview_data( $this->_per_page, FALSE, $trashed ); |
|
43 | - $this->_all_data_count = $this->_admin_page->get_price_types_overview_data( $this->_per_page, TRUE, FALSE ); |
|
44 | - $this->_trashed_count = $this->_admin_page->get_price_types_overview_data( $this->_per_page, TRUE, TRUE ); |
|
42 | + $this->_data = $this->_admin_page->get_price_types_overview_data($this->_per_page, FALSE, $trashed); |
|
43 | + $this->_all_data_count = $this->_admin_page->get_price_types_overview_data($this->_per_page, TRUE, FALSE); |
|
44 | + $this->_trashed_count = $this->_admin_page->get_price_types_overview_data($this->_per_page, TRUE, TRUE); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
@@ -57,14 +57,14 @@ discard block |
||
57 | 57 | $this->_columns = array( |
58 | 58 | 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text |
59 | 59 | 'name' => __('Name', 'event_espresso'), |
60 | - 'base_type' => '<div class="jst-cntr">' . __('Base Type', 'event_espresso') . '</div>', |
|
61 | - 'percent' => '<div class="jst-cntr">' . __('Applied', 'event_espresso') . '<br/>' . __('as ', 'event_espresso') . '<span class="big-text">' . __('%', 'event_espresso') . '</span>' . __(' or ', 'event_espresso') . '<span class="big-text">' . __('$', 'event_espresso') . '</span></div>', |
|
62 | - 'order' => '<div class="jst-cntr">' . __('Order of', 'event_espresso') . '<br/>' . __('Application', 'event_espresso') . '</div>' |
|
60 | + 'base_type' => '<div class="jst-cntr">'.__('Base Type', 'event_espresso').'</div>', |
|
61 | + 'percent' => '<div class="jst-cntr">'.__('Applied', 'event_espresso').'<br/>'.__('as ', 'event_espresso').'<span class="big-text">'.__('%', 'event_espresso').'</span>'.__(' or ', 'event_espresso').'<span class="big-text">'.__('$', 'event_espresso').'</span></div>', |
|
62 | + 'order' => '<div class="jst-cntr">'.__('Order of', 'event_espresso').'<br/>'.__('Application', 'event_espresso').'</div>' |
|
63 | 63 | ); |
64 | 64 | |
65 | 65 | $this->_sortable_columns = array( |
66 | 66 | // TRUE means its already sorted |
67 | - 'name' => array( 'name' => FALSE ) |
|
67 | + 'name' => array('name' => FALSE) |
|
68 | 68 | ); |
69 | 69 | |
70 | 70 | $this->_hidden_columns = array(); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | protected function _add_view_counts() { |
84 | 84 | $this->_views['all']['count'] = $this->_all_data_count; |
85 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_types', 'pricing_trash_price_type' ) ) { |
|
85 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_types', 'pricing_trash_price_type')) { |
|
86 | 86 | $this->_views['trashed']['count'] = $this->_trashed_count; |
87 | 87 | } |
88 | 88 | } |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | |
93 | 93 | |
94 | 94 | function column_cb($item) { |
95 | - if ( $item->base_type() !== 1 ) |
|
96 | - return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID() ); |
|
95 | + if ($item->base_type() !== 1) |
|
96 | + return sprintf('<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID()); |
|
97 | 97 | return ''; |
98 | 98 | } |
99 | 99 | |
@@ -106,30 +106,30 @@ discard block |
||
106 | 106 | //Build row actions |
107 | 107 | $actions = array(); |
108 | 108 | // edit price link |
109 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID() ) ) { |
|
110 | - $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_price_type', 'id'=>$item->ID() ), PRICING_ADMIN_URL ); |
|
111 | - $actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Price Type', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>'; |
|
109 | + if (EE_Registry::instance()->CAP->current_user_can('ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID())) { |
|
110 | + $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_price_type', 'id'=>$item->ID()), PRICING_ADMIN_URL); |
|
111 | + $actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Price Type', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'; |
|
112 | 112 | } |
113 | 113 | |
114 | - $name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID() ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Price Type', 'event_espresso' ) . '">' . stripslashes( $item->name() ) . '</a>' : $item->name(); |
|
114 | + $name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_default_price_type', 'pricing_edit_price_type', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Price Type', 'event_espresso').'">'.stripslashes($item->name()).'</a>' : $item->name(); |
|
115 | 115 | |
116 | - if ( $item->base_type() !== 1 ) { |
|
117 | - if ( $this->_view == 'all' ) { |
|
116 | + if ($item->base_type() !== 1) { |
|
117 | + if ($this->_view == 'all') { |
|
118 | 118 | // trash price link |
119 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_type', 'pricing_trash_price_type', $item->ID() ) ) { |
|
120 | - $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_price_type', 'id'=>$item->ID(), 'noheader' => TRUE ), PRICING_ADMIN_URL ); |
|
121 | - $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Price Type to Trash', 'event_espresso' ) . '">' . __( 'Move to Trash', 'event_espresso' ) . '</a>'; |
|
119 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_type', 'pricing_trash_price_type', $item->ID())) { |
|
120 | + $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_price_type', 'id'=>$item->ID(), 'noheader' => TRUE), PRICING_ADMIN_URL); |
|
121 | + $actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Price Type to Trash', 'event_espresso').'">'.__('Move to Trash', 'event_espresso').'</a>'; |
|
122 | 122 | } |
123 | 123 | } else { |
124 | 124 | // restore price link |
125 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_type', 'pricing_restore_price_type', $item->ID() ) ) { |
|
126 | - $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_price_type', 'id'=>$item->ID(), 'noheader' => TRUE ), PRICING_ADMIN_URL ); |
|
127 | - $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Price Type', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>'; |
|
125 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_type', 'pricing_restore_price_type', $item->ID())) { |
|
126 | + $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_price_type', 'id'=>$item->ID(), 'noheader' => TRUE), PRICING_ADMIN_URL); |
|
127 | + $actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Price Type', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>'; |
|
128 | 128 | } |
129 | 129 | // delete price link |
130 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_default_price_type', 'pricing_delete_price_type', $item->ID() ) ) { |
|
131 | - $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'delete_price_type', 'id'=>$item->ID(), 'noheader' => TRUE ), PRICING_ADMIN_URL ); |
|
132 | - $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="' . esc_attr__( 'Delete Price Type Permanently', 'event_espresso' ) . '">' . __( 'Delete Permanently', 'event_espresso' ) . '</a>'; |
|
130 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_default_price_type', 'pricing_delete_price_type', $item->ID())) { |
|
131 | + $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_price_type', 'id'=>$item->ID(), 'noheader' => TRUE), PRICING_ADMIN_URL); |
|
132 | + $actions['delete'] = '<a href="'.$delete_lnk_url.'" title="'.esc_attr__('Delete Price Type Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>'; |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | } |
@@ -147,14 +147,14 @@ discard block |
||
147 | 147 | |
148 | 148 | |
149 | 149 | function column_base_type($item) { |
150 | - return '<div class="jst-cntr">' . $item->base_type_name() . '</div>'; |
|
150 | + return '<div class="jst-cntr">'.$item->base_type_name().'</div>'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | |
154 | 154 | |
155 | 155 | |
156 | 156 | function column_percent($item) { |
157 | - return '<div class="jst-cntr">' . ( $item->is_percent() ? '%' : EE_Registry::instance()->CFG->currency->sign ) . '</div>'; |
|
157 | + return '<div class="jst-cntr">'.($item->is_percent() ? '%' : EE_Registry::instance()->CFG->currency->sign).'</div>'; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | |
164 | 164 | function column_order($item) { |
165 | - return '<div class="jst-cntr">' . $item->order() . '</div>'; |
|
165 | + return '<div class="jst-cntr">'.$item->order().'</div>'; |
|
166 | 166 | } |
167 | 167 | |
168 | 168 |
@@ -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 | /** |
4 | 6 | * Event Espresso |
@@ -92,8 +94,9 @@ discard block |
||
92 | 94 | |
93 | 95 | |
94 | 96 | function column_cb($item) { |
95 | - if ( $item->base_type() !== 1 ) |
|
96 | - return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID() ); |
|
97 | + if ( $item->base_type() !== 1 ) { |
|
98 | + return sprintf( '<input type="checkbox" name="checkbox[%1$s]" />', /* $1%s */ $item->ID() ); |
|
99 | + } |
|
97 | 100 | return ''; |
98 | 101 | } |
99 | 102 |