@@ -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 | class Venues_Admin_List_Table extends EE_Admin_List_Table { |
33 | 33 | |
34 | - public function __construct( $admin_page ) { |
|
34 | + public function __construct($admin_page) { |
|
35 | 35 | parent::__construct($admin_page); |
36 | 36 | } |
37 | 37 | |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | |
41 | 41 | protected function _setup_data() { |
42 | - $this->_data = $this->_admin_page->get_venues( $this->_per_page); |
|
43 | - $this->_all_data_count = $this->_admin_page->get_venues( $this->_per_page, TRUE ); |
|
42 | + $this->_data = $this->_admin_page->get_venues($this->_per_page); |
|
43 | + $this->_all_data_count = $this->_admin_page->get_venues($this->_per_page, TRUE); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function _set_properties() { |
51 | 51 | $this->_wp_list_args = array( |
52 | - 'singular' => __('Event Venue', 'event_espresso' ), |
|
53 | - 'plural' => __('Event Venues', 'event_espresso' ), |
|
52 | + 'singular' => __('Event Venue', 'event_espresso'), |
|
53 | + 'plural' => __('Event Venues', 'event_espresso'), |
|
54 | 54 | 'ajax' => TRUE, //for now, |
55 | 55 | 'screen' => $this->_admin_page->get_current_screen()->id |
56 | 56 | ); |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | ); |
67 | 67 | |
68 | 68 | $this->_sortable_columns = array( |
69 | - 'id' => array( 'id' => true ), |
|
70 | - 'name' => array( 'name' => false ), |
|
71 | - 'city' => array( 'city' => false ), |
|
72 | - 'capacity' => array( 'capacity' => false ) |
|
69 | + 'id' => array('id' => true), |
|
70 | + 'name' => array('name' => false), |
|
71 | + 'city' => array('city' => false), |
|
72 | + 'capacity' => array('capacity' => false) |
|
73 | 73 | ); |
74 | 74 | |
75 | 75 | $this->_hidden_columns = array(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | protected function _add_view_counts() { |
93 | 93 | $this->_views['all']['count'] = EEM_Venue::instance()->count(); |
94 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venues', 'espresso_venues_trash_venues' ) ) { |
|
94 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venues', 'espresso_venues_trash_venues')) { |
|
95 | 95 | $this->_views['trash']['count'] = EEM_Venue::instance()->count_deleted(); |
96 | 96 | } |
97 | 97 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | public function column_cb($item) { |
105 | 105 | |
106 | - return $item->count_related('Event') > 0 && $item->get( 'status' ) === 'trash' ? '<span class="ee-lock-icon"></span>' : sprintf( '<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID()); |
|
106 | + return $item->count_related('Event') > 0 && $item->get('status') === 'trash' ? '<span class="ee-lock-icon"></span>' : sprintf('<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID()); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | public function column_id($item) { |
113 | 113 | $content = $item->ID(); |
114 | - $content .= ' <span class="show-on-mobile-view-only">' . $item->name() . '</span>'; |
|
114 | + $content .= ' <span class="show-on-mobile-view-only">'.$item->name().'</span>'; |
|
115 | 115 | return $content; |
116 | 116 | } |
117 | 117 | |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | 'post' => $item->ID() |
123 | 123 | ); |
124 | 124 | |
125 | - $edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL ); |
|
125 | + $edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL); |
|
126 | 126 | |
127 | 127 | $statuses = EEM_Venue::instance()->get_status_array(); |
128 | - $actions = $this->_column_name_action_setup( $item ); |
|
129 | - $content = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_venue', 'espresso_venues_edit', $item->ID() ) ? '<strong><a class="row-title" href="' . $edit_link . '">' . stripslashes_deep($item->name()) . '</a></strong>' : $item->name(); |
|
130 | - $content .= $item->status() == 'draft' ? ' - <span class="post-state">' . $statuses['draft'] . '</span>' : ''; |
|
128 | + $actions = $this->_column_name_action_setup($item); |
|
129 | + $content = EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID()) ? '<strong><a class="row-title" href="'.$edit_link.'">'.stripslashes_deep($item->name()).'</a></strong>' : $item->name(); |
|
130 | + $content .= $item->status() == 'draft' ? ' - <span class="post-state">'.$statuses['draft'].'</span>' : ''; |
|
131 | 131 | $content .= $this->row_actions($actions); |
132 | 132 | return $content; |
133 | 133 | } |
@@ -138,59 +138,59 @@ discard block |
||
138 | 138 | * @param EE_Venue $item |
139 | 139 | * @return array() |
140 | 140 | */ |
141 | - protected function _column_name_action_setup( EE_Venue $item ) { |
|
141 | + protected function _column_name_action_setup(EE_Venue $item) { |
|
142 | 142 | $actions = array(); |
143 | 143 | |
144 | - if ( EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID() ) ) { |
|
144 | + if (EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID())) { |
|
145 | 145 | $edit_query_args = array( |
146 | 146 | 'action' => 'edit', |
147 | 147 | 'post' => $item->ID() |
148 | 148 | ); |
149 | - $edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EE_VENUES_ADMIN_URL ); |
|
150 | - $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Venue', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'; |
|
149 | + $edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_VENUES_ADMIN_URL); |
|
150 | + $actions['edit'] = '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Venue', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'; |
|
151 | 151 | |
152 | 152 | } |
153 | 153 | |
154 | 154 | |
155 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_trash_venue', $item->ID() ) ) { |
|
155 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_trash_venue', $item->ID())) { |
|
156 | 156 | $trash_event_query_arg = array( |
157 | 157 | 'action' => 'trash_venue', |
158 | 158 | 'VNU_ID' => $item->ID() |
159 | 159 | ); |
160 | - $trash_venue_link = EE_Admin_Page::add_query_args_and_nonce( $trash_event_query_arg, EE_VENUES_ADMIN_URL ); |
|
160 | + $trash_venue_link = EE_Admin_Page::add_query_args_and_nonce($trash_event_query_arg, EE_VENUES_ADMIN_URL); |
|
161 | 161 | } |
162 | 162 | |
163 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_restore_venue', $item->ID() ) ) { |
|
163 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_restore_venue', $item->ID())) { |
|
164 | 164 | $restore_venue_query_args = array( |
165 | 165 | 'action' => 'restore_venue', |
166 | 166 | 'VNU_ID' => $item->ID() |
167 | 167 | ); |
168 | - $restore_venue_link = EE_Admin_Page::add_query_args_and_nonce( $restore_venue_query_args, EE_VENUES_ADMIN_URL ); |
|
168 | + $restore_venue_link = EE_Admin_Page::add_query_args_and_nonce($restore_venue_query_args, EE_VENUES_ADMIN_URL); |
|
169 | 169 | } |
170 | 170 | |
171 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_delete_venue', $item->ID() ) ) { |
|
171 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_delete_venue', $item->ID())) { |
|
172 | 172 | $delete_venue_query_args = array( |
173 | 173 | 'action' => 'delete_venue', |
174 | 174 | 'VNU_ID' => $item->ID() |
175 | 175 | ); |
176 | - $delete_venue_link = EE_Admin_Page::add_query_args_and_nonce( $delete_venue_query_args, EE_VENUES_ADMIN_URL ); |
|
176 | + $delete_venue_link = EE_Admin_Page::add_query_args_and_nonce($delete_venue_query_args, EE_VENUES_ADMIN_URL); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | $view_link = get_permalink($item->ID()); |
180 | 180 | |
181 | - switch ( $item->get( 'status' ) ) { |
|
181 | + switch ($item->get('status')) { |
|
182 | 182 | case 'trash' : |
183 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_restore_venue', $item->ID() ) ) { |
|
184 | - $actions['restore_from_trash'] = '<a href="' . $restore_venue_link . '" title="' . esc_attr__('Restore from Trash', 'event_espresso') . '">' . __('Restore from Trash', 'event_espresso') . '</a>'; |
|
183 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_restore_venue', $item->ID())) { |
|
184 | + $actions['restore_from_trash'] = '<a href="'.$restore_venue_link.'" title="'.esc_attr__('Restore from Trash', 'event_espresso').'">'.__('Restore from Trash', 'event_espresso').'</a>'; |
|
185 | 185 | } |
186 | - if ( $item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_delete_venue', $item->ID() ) ) { |
|
187 | - $actions['delete permanently'] = '<a href="' . $delete_venue_link . '" title="' . esc_attr__('Delete Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>'; |
|
186 | + if ($item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_delete_venue', $item->ID())) { |
|
187 | + $actions['delete permanently'] = '<a href="'.$delete_venue_link.'" title="'.esc_attr__('Delete Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>'; |
|
188 | 188 | } |
189 | 189 | break; |
190 | 190 | default : |
191 | - $actions['view'] = '<a href="' . $view_link . '" title="' . esc_attr__('View Venue', 'event_espresso') . '">' . __('View', 'event_espresso') . '</a>'; |
|
192 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_trash_venue', $item->ID() ) ) { |
|
193 | - $actions['move to trash'] = '<a href="' . $trash_venue_link . '" title="' . esc_attr__('Trash Event', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>'; |
|
191 | + $actions['view'] = '<a href="'.$view_link.'" title="'.esc_attr__('View Venue', 'event_espresso').'">'.__('View', 'event_espresso').'</a>'; |
|
192 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_trash_venue', $item->ID())) { |
|
193 | + $actions['move to trash'] = '<a href="'.$trash_venue_link.'" title="'.esc_attr__('Trash Event', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>'; |
|
194 | 194 | } |
195 | 195 | } |
196 | 196 | return $actions; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | |
219 | 219 | public function column_shortcode($item) { |
220 | - $content = '[ESPRESSO_VENUE id=' . $item->ID() . ']'; |
|
220 | + $content = '[ESPRESSO_VENUE id='.$item->ID().']'; |
|
221 | 221 | return $content; |
222 | 222 | } |
223 | 223 |
@@ -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,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 |
@@ -893,8 +894,9 @@ discard block |
||
893 | 894 | } |
894 | 895 | $action = $venue_status == 'trash' ? 'moved to the trash' : 'restored from the trash'; |
895 | 896 | |
896 | - if ( $redirect_after ) |
|
897 | - $this->_redirect_after_action($success, 'Venue', $action, array('action' => 'default')); |
|
897 | + if ( $redirect_after ) { |
|
898 | + $this->_redirect_after_action($success, 'Venue', $action, array('action' => 'default')); |
|
899 | + } |
|
898 | 900 | |
899 | 901 | } |
900 | 902 | |
@@ -1013,8 +1015,9 @@ discard block |
||
1013 | 1015 | $msg = __('An error occurred. An venue could not be deleted because a valid venue ID was not not supplied.', 'event_espresso'); |
1014 | 1016 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
1015 | 1017 | } |
1016 | - if ( $redirect_after ) |
|
1017 | - $this->_redirect_after_action($success, 'Venue', 'deleted', array('action' => 'default')); |
|
1018 | + if ( $redirect_after ) { |
|
1019 | + $this->_redirect_after_action($success, 'Venue', 'deleted', array('action' => 'default')); |
|
1020 | + } |
|
1018 | 1021 | } |
1019 | 1022 | |
1020 | 1023 | |
@@ -1185,8 +1188,10 @@ discard block |
||
1185 | 1188 | * @return void |
1186 | 1189 | */ |
1187 | 1190 | private function _set_category_object() { |
1188 | - if ( isset( $this->_category->id ) && !empty( $this->_category->id ) ) |
|
1189 | - return; //already have the category object so get out. |
|
1191 | + if ( isset( $this->_category->id ) && !empty( $this->_category->id ) ) { |
|
1192 | + return; |
|
1193 | + } |
|
1194 | + //already have the category object so get out. |
|
1190 | 1195 | |
1191 | 1196 | //set default category object |
1192 | 1197 | $this->_set_empty_category_object(); |
@@ -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 | /** |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | |
63 | 63 | |
64 | 64 | protected function _init_page_props() { |
65 | - require_once( EE_MODELS . 'EEM_Venue.model.php' ); |
|
65 | + require_once(EE_MODELS.'EEM_Venue.model.php'); |
|
66 | 66 | $this->page_slug = EE_VENUES_PG_SLUG; |
67 | 67 | $this->_admin_base_url = EE_VENUES_ADMIN_URL; |
68 | - $this->_admin_base_path = EE_ADMIN_PAGES . 'venues'; |
|
68 | + $this->_admin_base_path = EE_ADMIN_PAGES.'venues'; |
|
69 | 69 | $this->page_label = __('Event Venues', 'event_espresso'); |
70 | 70 | $this->_cpt_model_names = array( |
71 | 71 | 'create_new' => 'EEM_Venue', |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'edit' => __('Update Venue', 'event_espresso'), |
109 | 109 | 'add_category' => __('Save New Category', 'event_espresso'), |
110 | 110 | 'edit_category' => __('Update Category', 'event_espresso'), |
111 | - 'google_map_settings' => __( 'Update Settings', 'event_espresso' ) |
|
111 | + 'google_map_settings' => __('Update Settings', 'event_espresso') |
|
112 | 112 | ) |
113 | 113 | ); |
114 | 114 | } |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | //load field generator helper |
124 | 124 | |
125 | 125 | //is there a vnu_id in the request? |
126 | - $vnu_id = ! empty( $this->_req_data['VNU_ID'] ) && ! is_array( $this->_req_data['VNU_ID'] ) ? $this->_req_data['VNU_ID'] : 0; |
|
127 | - $vnu_id = ! empty( $this->_req_data['post'] ) ? $this->_req_data['post'] : $vnu_id; |
|
126 | + $vnu_id = ! empty($this->_req_data['VNU_ID']) && ! is_array($this->_req_data['VNU_ID']) ? $this->_req_data['VNU_ID'] : 0; |
|
127 | + $vnu_id = ! empty($this->_req_data['post']) ? $this->_req_data['post'] : $vnu_id; |
|
128 | 128 | |
129 | 129 | $this->_page_routes = array( |
130 | 130 | 'default' => array( |
@@ -142,27 +142,27 @@ discard block |
||
142 | 142 | ), |
143 | 143 | 'trash_venue' => array( |
144 | 144 | 'func' => '_trash_or_restore_venue', |
145 | - 'args' => array( 'venue_status' => 'trash' ), |
|
145 | + 'args' => array('venue_status' => 'trash'), |
|
146 | 146 | 'noheader' => TRUE, |
147 | 147 | 'capability' => 'ee_delete_venue', |
148 | 148 | 'obj_id' => $vnu_id |
149 | 149 | ), |
150 | 150 | 'trash_venues' => array( |
151 | 151 | 'func' => '_trash_or_restore_venues', |
152 | - 'args' => array( 'venue_status' => 'trash' ), |
|
152 | + 'args' => array('venue_status' => 'trash'), |
|
153 | 153 | 'noheader' => TRUE, |
154 | 154 | 'capability' => 'ee_delete_venues' |
155 | 155 | ), |
156 | 156 | 'restore_venue' => array( |
157 | 157 | 'func' => '_trash_or_restore_venue', |
158 | - 'args' => array( 'venue_status' => 'draft' ), |
|
158 | + 'args' => array('venue_status' => 'draft'), |
|
159 | 159 | 'noheader' => TRUE, |
160 | 160 | 'capability' => 'ee_delete_venue', |
161 | 161 | 'obj_id' => $vnu_id |
162 | 162 | ), |
163 | 163 | 'restore_venues' => array( |
164 | 164 | 'func' => '_trash_or_restore_venues', |
165 | - 'args' => array( 'venue_status' => 'draft' ), |
|
165 | + 'args' => array('venue_status' => 'draft'), |
|
166 | 166 | 'noheader' => TRUE, |
167 | 167 | 'capability' => 'ee_delete_venues' |
168 | 168 | ), |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | 'filename' => 'venues_overview_views_bulk_actions_search' |
265 | 265 | ) |
266 | 266 | ), |
267 | - 'help_tour' => array( 'Venues_Overview_Help_Tour' ), |
|
267 | + 'help_tour' => array('Venues_Overview_Help_Tour'), |
|
268 | 268 | 'metaboxes' => array('_espresso_news_post_box', '_espresso_links_post_box'), |
269 | 269 | 'require_nonce' => FALSE |
270 | 270 | ), |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | 'filename' => 'venues_editor_other' |
301 | 301 | ) |
302 | 302 | ), |
303 | - 'help_tour' => array( 'Venues_Add_Venue_Help_Tour' ), |
|
303 | + 'help_tour' => array('Venues_Add_Venue_Help_Tour'), |
|
304 | 304 | 'metaboxes' => array('_venue_editor_metaboxes'), |
305 | 305 | 'require_nonce' => FALSE |
306 | 306 | ), |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | 'label' => __('Edit Venue', 'event_espresso'), |
310 | 310 | 'order' => 5, |
311 | 311 | 'persistent' => FALSE, |
312 | - 'url' => isset($this->_req_data['post']) ? add_query_arg(array('post' => $this->_req_data['post'] ), $this->_current_page_view_url ) : $this->_admin_base_url |
|
312 | + 'url' => isset($this->_req_data['post']) ? add_query_arg(array('post' => $this->_req_data['post']), $this->_current_page_view_url) : $this->_admin_base_url |
|
313 | 313 | ), |
314 | 314 | 'help_tabs' => array( |
315 | 315 | 'venues_editor_help_tab' => array( |
@@ -346,14 +346,14 @@ discard block |
||
346 | 346 | 'label' => __('Google Maps'), |
347 | 347 | 'order' => 40 |
348 | 348 | ), |
349 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_publish_post_box' ) ), |
|
349 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
350 | 350 | 'help_tabs' => array( |
351 | 351 | 'general_settings_google_maps_help_tab' => array( |
352 | 352 | 'title' => __('Google Maps', 'event_espresso'), |
353 | 353 | 'filename' => 'general_settings_google_maps' |
354 | 354 | ) |
355 | 355 | ), |
356 | - 'help_tour' => array( 'Google_Maps_Help_Tour' ), |
|
356 | + 'help_tour' => array('Google_Maps_Help_Tour'), |
|
357 | 357 | 'require_nonce' => FALSE |
358 | 358 | ), |
359 | 359 | //venue category stuff |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | 'filename' => 'venues_add_category' |
370 | 370 | ) |
371 | 371 | ), |
372 | - 'help_tour' => array( 'Venues_Add_Category_Help_Tour' ), |
|
372 | + 'help_tour' => array('Venues_Add_Category_Help_Tour'), |
|
373 | 373 | 'require_nonce' => FALSE |
374 | 374 | ), |
375 | 375 | 'edit_category' => array( |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | 'label' => __('Edit Category', 'event_espresso'), |
378 | 378 | 'order' => 15, |
379 | 379 | 'persistent' => FALSE, |
380 | - 'url' => isset($this->_req_data['EVT_CAT_ID']) ? add_query_arg(array('EVT_CAT_ID' => $this->_req_data['EVT_CAT_ID'] ), $this->_current_page_view_url ) : $this->_admin_base_url |
|
380 | + 'url' => isset($this->_req_data['EVT_CAT_ID']) ? add_query_arg(array('EVT_CAT_ID' => $this->_req_data['EVT_CAT_ID']), $this->_current_page_view_url) : $this->_admin_base_url |
|
381 | 381 | ), |
382 | 382 | 'metaboxes' => array('_publish_post_box'), |
383 | 383 | 'help_tabs' => array( |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | 'filename' => 'venues_categories_other' |
414 | 414 | ) |
415 | 415 | ), |
416 | - 'help_tour' => array( 'Venues_Categories_Help_Tour' ), |
|
416 | + 'help_tour' => array('Venues_Categories_Help_Tour'), |
|
417 | 417 | 'metaboxes' => $this->_default_espresso_metaboxes, |
418 | 418 | 'require_nonce' => FALSE |
419 | 419 | ) |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | |
471 | 471 | |
472 | 472 | public function load_scripts_styles() { |
473 | - wp_register_style('ee-cat-admin', EVENTS_ASSETS_URL . 'ee-cat-admin.css', array(), EVENT_ESPRESSO_VERSION ); |
|
473 | + wp_register_style('ee-cat-admin', EVENTS_ASSETS_URL.'ee-cat-admin.css', array(), EVENT_ESPRESSO_VERSION); |
|
474 | 474 | wp_enqueue_style('ee-cat-admin'); |
475 | 475 | } |
476 | 476 | |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | public function load_scripts_styles_edit() { |
494 | 494 | //styles |
495 | 495 | wp_enqueue_style('espresso-ui-theme'); |
496 | - wp_register_style( 'espresso_venues', EE_VENUES_ASSETS_URL . 'ee-venues-admin.css', array(), EVENT_ESPRESSO_VERSION ); |
|
496 | + wp_register_style('espresso_venues', EE_VENUES_ASSETS_URL.'ee-venues-admin.css', array(), EVENT_ESPRESSO_VERSION); |
|
497 | 497 | wp_enqueue_style('espresso_venues'); |
498 | 498 | } |
499 | 499 | |
@@ -512,13 +512,13 @@ discard block |
||
512 | 512 | ) |
513 | 513 | ); |
514 | 514 | |
515 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venues', 'espresso_venues_trash_venues' ) ) { |
|
515 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_venues', 'espresso_venues_trash_venues')) { |
|
516 | 516 | $this->_views['all']['bulk_action'] = array( |
517 | 517 | 'trash_venues' => __('Move to Trash', 'event_espresso') |
518 | 518 | ); |
519 | 519 | $this->_views['trash'] = array( |
520 | 520 | 'slug' => 'trash', |
521 | - 'label' => __( 'Trash', 'event_espresso' ), |
|
521 | + 'label' => __('Trash', 'event_espresso'), |
|
522 | 522 | 'count' => 0, |
523 | 523 | 'bulk_action' => array( |
524 | 524 | 'restore_venues' => __('Restore from Trash', 'event_espresso'), |
@@ -551,8 +551,8 @@ discard block |
||
551 | 551 | |
552 | 552 | |
553 | 553 | protected function _overview_list_table() { |
554 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
555 | - $this->_template_args['after_list_table'] = EEH_Template::get_button_or_link( get_post_type_archive_link('espresso_venues'), __("View Venue Archive Page", "event_espresso"), 'button' ); |
|
554 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
555 | + $this->_template_args['after_list_table'] = EEH_Template::get_button_or_link(get_post_type_archive_link('espresso_venues'), __("View Venue Archive Page", "event_espresso"), 'button'); |
|
556 | 556 | $this->_admin_page_title .= $this->get_action_link_or_button('create_new', 'add', array(), 'add-new-h2'); |
557 | 557 | $this->_search_btn_label = __('Venues', 'event_espresso'); |
558 | 558 | $this->display_admin_list_table_page_with_sidebar(); |
@@ -566,8 +566,8 @@ discard block |
||
566 | 566 | 'vnu_url' => $this->_cpt_model_obj->venue_url(), |
567 | 567 | 'vnu_phone' => $this->_cpt_model_obj->phone() |
568 | 568 | ); |
569 | - $template = EE_VENUES_TEMPLATE_PATH . 'venue_publish_box_extras.template.php'; |
|
570 | - EEH_Template::display_template( $template, $extra_rows ); |
|
569 | + $template = EE_VENUES_TEMPLATE_PATH.'venue_publish_box_extras.template.php'; |
|
570 | + EEH_Template::display_template($template, $extra_rows); |
|
571 | 571 | } |
572 | 572 | |
573 | 573 | |
@@ -582,115 +582,115 @@ discard block |
||
582 | 582 | $default_map_settings = new stdClass(); |
583 | 583 | $default_map_settings->use_google_maps = TRUE; |
584 | 584 | // for event details pages (reg page) |
585 | - $default_map_settings->event_details_map_width = 585; // ee_map_width_single |
|
586 | - $default_map_settings->event_details_map_height = 362; // ee_map_height_single |
|
587 | - $default_map_settings->event_details_map_zoom = 14; // ee_map_zoom_single |
|
588 | - $default_map_settings->event_details_display_nav = TRUE; // ee_map_nav_display_single |
|
589 | - $default_map_settings->event_details_nav_size = FALSE; // ee_map_nav_size_single |
|
590 | - $default_map_settings->event_details_control_type = 'default'; // ee_map_type_control_single |
|
591 | - $default_map_settings->event_details_map_align = 'center'; // ee_map_align_single |
|
585 | + $default_map_settings->event_details_map_width = 585; // ee_map_width_single |
|
586 | + $default_map_settings->event_details_map_height = 362; // ee_map_height_single |
|
587 | + $default_map_settings->event_details_map_zoom = 14; // ee_map_zoom_single |
|
588 | + $default_map_settings->event_details_display_nav = TRUE; // ee_map_nav_display_single |
|
589 | + $default_map_settings->event_details_nav_size = FALSE; // ee_map_nav_size_single |
|
590 | + $default_map_settings->event_details_control_type = 'default'; // ee_map_type_control_single |
|
591 | + $default_map_settings->event_details_map_align = 'center'; // ee_map_align_single |
|
592 | 592 | // for event list pages |
593 | - $default_map_settings->event_list_map_width = 300; // ee_map_width |
|
594 | - $default_map_settings->event_list_map_height = 185; // ee_map_height |
|
595 | - $default_map_settings->event_list_map_zoom = 12; // ee_map_zoom |
|
596 | - $default_map_settings->event_list_display_nav = FALSE; // ee_map_nav_display |
|
597 | - $default_map_settings->event_list_nav_size = TRUE; // ee_map_nav_size |
|
598 | - $default_map_settings->event_list_control_type = 'dropdown'; // ee_map_type_control |
|
599 | - $default_map_settings->event_list_map_align = 'center'; // ee_map_align |
|
593 | + $default_map_settings->event_list_map_width = 300; // ee_map_width |
|
594 | + $default_map_settings->event_list_map_height = 185; // ee_map_height |
|
595 | + $default_map_settings->event_list_map_zoom = 12; // ee_map_zoom |
|
596 | + $default_map_settings->event_list_display_nav = FALSE; // ee_map_nav_display |
|
597 | + $default_map_settings->event_list_nav_size = TRUE; // ee_map_nav_size |
|
598 | + $default_map_settings->event_list_control_type = 'dropdown'; // ee_map_type_control |
|
599 | + $default_map_settings->event_list_map_align = 'center'; // ee_map_align |
|
600 | 600 | |
601 | 601 | $this->_template_args['map_settings'] = |
602 | - isset( EE_Registry::instance()->CFG->map_settings ) && ! empty( EE_Registry::instance()->CFG->map_settings ) |
|
603 | - ? (object)array_merge( (array)$default_map_settings, (array)EE_Registry::instance()->CFG->map_settings ) |
|
602 | + isset(EE_Registry::instance()->CFG->map_settings) && ! empty(EE_Registry::instance()->CFG->map_settings) |
|
603 | + ? (object) array_merge((array) $default_map_settings, (array) EE_Registry::instance()->CFG->map_settings) |
|
604 | 604 | : $default_map_settings; |
605 | 605 | |
606 | - $this->_set_add_edit_form_tags( 'update_google_map_settings' ); |
|
607 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
608 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( EE_VENUES_TEMPLATE_PATH . 'google_map.template.php', $this->_template_args, TRUE ); |
|
606 | + $this->_set_add_edit_form_tags('update_google_map_settings'); |
|
607 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
608 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(EE_VENUES_TEMPLATE_PATH.'google_map.template.php', $this->_template_args, TRUE); |
|
609 | 609 | $this->display_admin_page_with_sidebar(); |
610 | 610 | } |
611 | 611 | |
612 | 612 | protected function _update_google_map_settings() { |
613 | 613 | |
614 | 614 | EE_Registry::instance()->CFG->map_settings->use_google_maps = |
615 | - isset( $this->_req_data['use_google_maps'] ) |
|
616 | - ? absint( $this->_req_data['use_google_maps'] ) |
|
615 | + isset($this->_req_data['use_google_maps']) |
|
616 | + ? absint($this->_req_data['use_google_maps']) |
|
617 | 617 | : EE_Registry::instance()->CFG->map_settings->use_google_maps; |
618 | 618 | |
619 | 619 | EE_Registry::instance()->CFG->map_settings->event_details_map_width = |
620 | - isset( $this->_req_data['event_details_map_width'] ) |
|
621 | - ? absint( $this->_req_data['event_details_map_width'] ) |
|
620 | + isset($this->_req_data['event_details_map_width']) |
|
621 | + ? absint($this->_req_data['event_details_map_width']) |
|
622 | 622 | : EE_Registry::instance()->CFG->map_settings->event_details_map_width; |
623 | 623 | |
624 | 624 | EE_Registry::instance()->CFG->map_settings->event_details_map_height = |
625 | - isset( $this->_req_data['event_details_map_height'] ) |
|
626 | - ? absint( $this->_req_data['event_details_map_height'] ) |
|
625 | + isset($this->_req_data['event_details_map_height']) |
|
626 | + ? absint($this->_req_data['event_details_map_height']) |
|
627 | 627 | : EE_Registry::instance()->CFG->map_settings->event_details_map_height; |
628 | 628 | |
629 | 629 | EE_Registry::instance()->CFG->map_settings->event_details_map_zoom = |
630 | - isset( $this->_req_data['event_details_map_zoom'] ) |
|
631 | - ? absint( $this->_req_data['event_details_map_zoom'] ) |
|
630 | + isset($this->_req_data['event_details_map_zoom']) |
|
631 | + ? absint($this->_req_data['event_details_map_zoom']) |
|
632 | 632 | : EE_Registry::instance()->CFG->map_settings->event_details_map_zoom; |
633 | 633 | |
634 | 634 | EE_Registry::instance()->CFG->map_settings->event_details_display_nav = |
635 | - isset( $this->_req_data['event_details_display_nav'] ) |
|
636 | - ? absint( $this->_req_data['event_details_display_nav'] ) |
|
635 | + isset($this->_req_data['event_details_display_nav']) |
|
636 | + ? absint($this->_req_data['event_details_display_nav']) |
|
637 | 637 | : EE_Registry::instance()->CFG->map_settings->event_details_display_nav; |
638 | 638 | |
639 | 639 | EE_Registry::instance()->CFG->map_settings->event_details_nav_size = |
640 | - isset( $this->_req_data['event_details_nav_size'] ) |
|
641 | - ? absint( $this->_req_data['event_details_nav_size'] ) |
|
640 | + isset($this->_req_data['event_details_nav_size']) |
|
641 | + ? absint($this->_req_data['event_details_nav_size']) |
|
642 | 642 | : EE_Registry::instance()->CFG->map_settings->event_details_nav_size; |
643 | 643 | |
644 | 644 | EE_Registry::instance()->CFG->map_settings->event_details_control_type = |
645 | - isset( $this->_req_data['event_details_control_type'] ) |
|
646 | - ? sanitize_text_field( $this->_req_data['event_details_control_type'] ) |
|
645 | + isset($this->_req_data['event_details_control_type']) |
|
646 | + ? sanitize_text_field($this->_req_data['event_details_control_type']) |
|
647 | 647 | : EE_Registry::instance()->CFG->map_settings->event_details_control_type; |
648 | 648 | |
649 | 649 | EE_Registry::instance()->CFG->map_settings->event_details_map_align = |
650 | - isset( $this->_req_data['event_details_map_align'] ) |
|
651 | - ? sanitize_text_field( $this->_req_data['event_details_map_align'] ) |
|
650 | + isset($this->_req_data['event_details_map_align']) |
|
651 | + ? sanitize_text_field($this->_req_data['event_details_map_align']) |
|
652 | 652 | : EE_Registry::instance()->CFG->map_settings->event_details_map_align; |
653 | 653 | |
654 | 654 | EE_Registry::instance()->CFG->map_settings->event_list_map_width = |
655 | - isset( $this->_req_data['event_list_map_width'] ) |
|
656 | - ? absint( $this->_req_data['event_list_map_width'] ) |
|
655 | + isset($this->_req_data['event_list_map_width']) |
|
656 | + ? absint($this->_req_data['event_list_map_width']) |
|
657 | 657 | : EE_Registry::instance()->CFG->map_settings->event_list_map_width; |
658 | 658 | |
659 | 659 | EE_Registry::instance()->CFG->map_settings->event_list_map_height = |
660 | - isset( $this->_req_data['event_list_map_height'] ) |
|
661 | - ? absint( $this->_req_data['event_list_map_height'] ) |
|
660 | + isset($this->_req_data['event_list_map_height']) |
|
661 | + ? absint($this->_req_data['event_list_map_height']) |
|
662 | 662 | : EE_Registry::instance()->CFG->map_settings->event_list_map_height; |
663 | 663 | |
664 | 664 | EE_Registry::instance()->CFG->map_settings->event_list_map_zoom = |
665 | - isset( $this->_req_data['event_list_map_zoom'] ) |
|
666 | - ? absint( $this->_req_data['event_list_map_zoom'] ) |
|
665 | + isset($this->_req_data['event_list_map_zoom']) |
|
666 | + ? absint($this->_req_data['event_list_map_zoom']) |
|
667 | 667 | : EE_Registry::instance()->CFG->map_settings->event_list_map_zoom; |
668 | 668 | |
669 | 669 | EE_Registry::instance()->CFG->map_settings->event_list_display_nav = |
670 | - isset( $this->_req_data['event_list_display_nav'] ) |
|
671 | - ? absint( $this->_req_data['event_list_display_nav'] ) |
|
670 | + isset($this->_req_data['event_list_display_nav']) |
|
671 | + ? absint($this->_req_data['event_list_display_nav']) |
|
672 | 672 | : EE_Registry::instance()->CFG->map_settings->event_list_display_nav; |
673 | 673 | |
674 | 674 | EE_Registry::instance()->CFG->map_settings->event_list_nav_size = |
675 | - isset( $this->_req_data['event_list_nav_size'] ) |
|
676 | - ? absint( $this->_req_data['event_list_nav_size'] ) |
|
675 | + isset($this->_req_data['event_list_nav_size']) |
|
676 | + ? absint($this->_req_data['event_list_nav_size']) |
|
677 | 677 | : EE_Registry::instance()->CFG->map_settings->event_list_nav_size; |
678 | 678 | |
679 | 679 | EE_Registry::instance()->CFG->map_settings->event_list_control_type = |
680 | - isset( $this->_req_data['event_list_control_type'] ) |
|
681 | - ? sanitize_text_field( $this->_req_data['event_list_control_type'] ) |
|
680 | + isset($this->_req_data['event_list_control_type']) |
|
681 | + ? sanitize_text_field($this->_req_data['event_list_control_type']) |
|
682 | 682 | : EE_Registry::instance()->CFG->map_settings->event_list_control_type; |
683 | 683 | |
684 | 684 | EE_Registry::instance()->CFG->map_settings->event_list_map_align = |
685 | - isset( $this->_req_data['event_list_map_align'] ) |
|
686 | - ? sanitize_text_field( $this->_req_data['event_list_map_align'] ) |
|
685 | + isset($this->_req_data['event_list_map_align']) |
|
686 | + ? sanitize_text_field($this->_req_data['event_list_map_align']) |
|
687 | 687 | : EE_Registry::instance()->CFG->map_settings->event_list_map_align; |
688 | 688 | |
689 | - EE_Registry::instance()->CFG->map_settings = apply_filters( 'FHEE__Extend_General_Settings_Admin_Page___update_google_map_settings__CFG_map_settings', EE_Registry::instance()->CFG->map_settings ); |
|
689 | + EE_Registry::instance()->CFG->map_settings = apply_filters('FHEE__Extend_General_Settings_Admin_Page___update_google_map_settings__CFG_map_settings', EE_Registry::instance()->CFG->map_settings); |
|
690 | 690 | |
691 | 691 | $what = 'Google Map Settings'; |
692 | - $success = $this->_update_espresso_configuration( $what, EE_Registry::instance()->CFG->map_settings, __FILE__, __FUNCTION__, __LINE__ ); |
|
693 | - $this->_redirect_after_action( $success, $what, 'updated', array( 'action' => 'google_map_settings' ) ); |
|
692 | + $success = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG->map_settings, __FILE__, __FUNCTION__, __LINE__); |
|
693 | + $this->_redirect_after_action($success, $what, 'updated', array('action' => 'google_map_settings')); |
|
694 | 694 | |
695 | 695 | } |
696 | 696 | |
@@ -699,9 +699,9 @@ discard block |
||
699 | 699 | protected function _venue_editor_metaboxes() { |
700 | 700 | $this->verify_cpt_object(); |
701 | 701 | |
702 | - add_meta_box( 'espresso_venue_address_options', __('Physical Location', 'event_espresso'), array( $this, 'venue_address_metabox'), $this->page_slug, 'side', 'default' ); |
|
703 | - add_meta_box( 'espresso_venue_gmap_options', __('Google Map', 'event_espresso'), array( $this, 'venue_gmap_metabox'), $this->page_slug, 'side', 'default' ); |
|
704 | - add_meta_box( 'espresso_venue_virtual_loc_options', __('Virtual Location', 'event_espresso'), array( $this, 'venue_virtual_loc_metabox'), $this->page_slug, 'side', 'default' ); |
|
702 | + add_meta_box('espresso_venue_address_options', __('Physical Location', 'event_espresso'), array($this, 'venue_address_metabox'), $this->page_slug, 'side', 'default'); |
|
703 | + add_meta_box('espresso_venue_gmap_options', __('Google Map', 'event_espresso'), array($this, 'venue_gmap_metabox'), $this->page_slug, 'side', 'default'); |
|
704 | + add_meta_box('espresso_venue_virtual_loc_options', __('Virtual Location', 'event_espresso'), array($this, 'venue_virtual_loc_metabox'), $this->page_slug, 'side', 'default'); |
|
705 | 705 | |
706 | 706 | } |
707 | 707 | |
@@ -709,23 +709,23 @@ discard block |
||
709 | 709 | |
710 | 710 | public function venue_gmap_metabox() { |
711 | 711 | $template_args = array( |
712 | - 'vnu_enable_for_gmap' => EEH_Form_Fields::select_input('vnu_enable_for_gmap', $this->get_yes_no_values(), $this->_cpt_model_obj->enable_for_gmap() ), |
|
712 | + 'vnu_enable_for_gmap' => EEH_Form_Fields::select_input('vnu_enable_for_gmap', $this->get_yes_no_values(), $this->_cpt_model_obj->enable_for_gmap()), |
|
713 | 713 | 'vnu_google_map_link' => $this->_cpt_model_obj->google_map_link(), |
714 | 714 | ); |
715 | - $template = EE_VENUES_TEMPLATE_PATH . 'venue_gmap_metabox_content.template.php'; |
|
716 | - EEH_Template::display_template( $template, $template_args ); |
|
715 | + $template = EE_VENUES_TEMPLATE_PATH.'venue_gmap_metabox_content.template.php'; |
|
716 | + EEH_Template::display_template($template, $template_args); |
|
717 | 717 | } |
718 | 718 | |
719 | 719 | |
720 | 720 | |
721 | 721 | public function venue_address_metabox() { |
722 | 722 | |
723 | - $template_args['_venue'] =$this->_cpt_model_obj; |
|
723 | + $template_args['_venue'] = $this->_cpt_model_obj; |
|
724 | 724 | |
725 | 725 | $template_args['states_dropdown'] = EEH_Form_Fields::generate_form_input( |
726 | 726 | $QFI = new EE_Question_Form_Input( |
727 | - EE_Question::new_instance( array( 'QST_display_text' => 'State', 'QST_system' => 'state' )), |
|
728 | - EE_Answer::new_instance( array( 'ANS_value'=> $this->_cpt_model_obj->state_ID() )), |
|
727 | + EE_Question::new_instance(array('QST_display_text' => 'State', 'QST_system' => 'state')), |
|
728 | + EE_Answer::new_instance(array('ANS_value'=> $this->_cpt_model_obj->state_ID())), |
|
729 | 729 | array( |
730 | 730 | 'input_name' => 'sta_id', |
731 | 731 | 'input_id' => 'sta_id', |
@@ -737,8 +737,8 @@ discard block |
||
737 | 737 | ); |
738 | 738 | $template_args['countries_dropdown'] = EEH_Form_Fields::generate_form_input( |
739 | 739 | $QFI = new EE_Question_Form_Input( |
740 | - EE_Question::new_instance( array( 'QST_display_text' => 'Country', 'QST_system' => 'country' )), |
|
741 | - EE_Answer::new_instance( array( 'ANS_value'=> $this->_cpt_model_obj->country_ID() )), |
|
740 | + EE_Question::new_instance(array('QST_display_text' => 'Country', 'QST_system' => 'country')), |
|
741 | + EE_Answer::new_instance(array('ANS_value'=> $this->_cpt_model_obj->country_ID())), |
|
742 | 742 | array( |
743 | 743 | 'input_name' => 'cnt_iso', |
744 | 744 | 'input_id' => 'cnt_iso', |
@@ -749,8 +749,8 @@ discard block |
||
749 | 749 | ) |
750 | 750 | ); |
751 | 751 | |
752 | - $template = EE_VENUES_TEMPLATE_PATH . 'venue_address_metabox_content.template.php'; |
|
753 | - EEH_Template::display_template( $template, $template_args ); |
|
752 | + $template = EE_VENUES_TEMPLATE_PATH.'venue_address_metabox_content.template.php'; |
|
753 | + EEH_Template::display_template($template, $template_args); |
|
754 | 754 | } |
755 | 755 | |
756 | 756 | |
@@ -762,8 +762,8 @@ discard block |
||
762 | 762 | $template_args = array( |
763 | 763 | '_venue' => $this->_cpt_model_obj |
764 | 764 | ); |
765 | - $template = EE_VENUES_TEMPLATE_PATH . 'venue_virtual_location_metabox_content.template.php'; |
|
766 | - EEH_Template::display_template( $template, $template_args ); |
|
765 | + $template = EE_VENUES_TEMPLATE_PATH.'venue_virtual_location_metabox_content.template.php'; |
|
766 | + EEH_Template::display_template($template, $template_args); |
|
767 | 767 | } |
768 | 768 | |
769 | 769 | |
@@ -786,52 +786,52 @@ discard block |
||
786 | 786 | * @param object $post Post object (with "blessed" WP properties) |
787 | 787 | * @return void |
788 | 788 | */ |
789 | - protected function _insert_update_cpt_item( $post_id, $post ) { |
|
789 | + protected function _insert_update_cpt_item($post_id, $post) { |
|
790 | 790 | |
791 | - if ( $post instanceof WP_Post && $post->post_type !== 'espresso_venues' ) { |
|
792 | - return;// get out we're not processing the saving of venues. |
|
791 | + if ($post instanceof WP_Post && $post->post_type !== 'espresso_venues') { |
|
792 | + return; // get out we're not processing the saving of venues. |
|
793 | 793 | } |
794 | 794 | |
795 | - $wheres = array( $this->_venue_model->primary_key_name() => $post_id ); |
|
795 | + $wheres = array($this->_venue_model->primary_key_name() => $post_id); |
|
796 | 796 | |
797 | 797 | $venue_values = array( |
798 | - 'VNU_address' => !empty( $this->_req_data['vnu_address'] ) ? $this->_req_data['vnu_address'] : NULL, |
|
799 | - 'VNU_address2' => !empty( $this->_req_data['vnu_address2'] ) ? $this->_req_data['vnu_address2'] : NULL, |
|
800 | - 'VNU_city' => !empty( $this->_req_data['vnu_city'] ) ? $this->_req_data['vnu_city'] : NULL, |
|
801 | - 'STA_ID' => !empty( $this->_req_data['sta_id'] ) ? $this->_req_data['sta_id'] : NULL, |
|
802 | - 'CNT_ISO' => !empty( $this->_req_data['cnt_iso'] ) ? $this->_req_data['cnt_iso'] : NULL, |
|
803 | - 'VNU_zip' => !empty( $this->_req_data['vnu_zip'] ) ? $this->_req_data['vnu_zip'] : NULL, |
|
804 | - 'VNU_phone' => !empty( $this->_req_data['vnu_phone'] ) ? $this->_req_data['vnu_phone'] : NULL, |
|
805 | - 'VNU_capacity' => !empty( $this->_req_data['vnu_capacity'] ) ? str_replace( ',', '', $this->_req_data['vnu_capacity'] ) : EE_INF, |
|
806 | - 'VNU_url' => !empty( $this->_req_data['vnu_url'] ) ? $this->_req_data['vnu_url'] : NULL, |
|
807 | - 'VNU_virtual_phone' => !empty( $this->_req_data['vnu_virtual_phone'] ) ? $this->_req_data['vnu_virtual_phone'] : NULL, |
|
808 | - 'VNU_virtual_url' => !empty( $this->_req_data['vnu_virtual_url'] ) ? $this->_req_data['vnu_virtual_url'] : NULL, |
|
809 | - 'VNU_enable_for_gmap' => !empty( $this->_req_data['vnu_enable_for_gmap'] ) ? TRUE : FALSE, |
|
810 | - 'VNU_google_map_link' => !empty( $this->_req_data['vnu_google_map_link'] ) ? $this->_req_data['vnu_google_map_link'] : NULL |
|
798 | + 'VNU_address' => ! empty($this->_req_data['vnu_address']) ? $this->_req_data['vnu_address'] : NULL, |
|
799 | + 'VNU_address2' => ! empty($this->_req_data['vnu_address2']) ? $this->_req_data['vnu_address2'] : NULL, |
|
800 | + 'VNU_city' => ! empty($this->_req_data['vnu_city']) ? $this->_req_data['vnu_city'] : NULL, |
|
801 | + 'STA_ID' => ! empty($this->_req_data['sta_id']) ? $this->_req_data['sta_id'] : NULL, |
|
802 | + 'CNT_ISO' => ! empty($this->_req_data['cnt_iso']) ? $this->_req_data['cnt_iso'] : NULL, |
|
803 | + 'VNU_zip' => ! empty($this->_req_data['vnu_zip']) ? $this->_req_data['vnu_zip'] : NULL, |
|
804 | + 'VNU_phone' => ! empty($this->_req_data['vnu_phone']) ? $this->_req_data['vnu_phone'] : NULL, |
|
805 | + 'VNU_capacity' => ! empty($this->_req_data['vnu_capacity']) ? str_replace(',', '', $this->_req_data['vnu_capacity']) : EE_INF, |
|
806 | + 'VNU_url' => ! empty($this->_req_data['vnu_url']) ? $this->_req_data['vnu_url'] : NULL, |
|
807 | + 'VNU_virtual_phone' => ! empty($this->_req_data['vnu_virtual_phone']) ? $this->_req_data['vnu_virtual_phone'] : NULL, |
|
808 | + 'VNU_virtual_url' => ! empty($this->_req_data['vnu_virtual_url']) ? $this->_req_data['vnu_virtual_url'] : NULL, |
|
809 | + 'VNU_enable_for_gmap' => ! empty($this->_req_data['vnu_enable_for_gmap']) ? TRUE : FALSE, |
|
810 | + 'VNU_google_map_link' => ! empty($this->_req_data['vnu_google_map_link']) ? $this->_req_data['vnu_google_map_link'] : NULL |
|
811 | 811 | ); |
812 | 812 | |
813 | 813 | //update venue |
814 | - $success = $this->_venue_model->update( $venue_values, array( $wheres ) ); |
|
814 | + $success = $this->_venue_model->update($venue_values, array($wheres)); |
|
815 | 815 | |
816 | 816 | //get venue_object for other metaboxes that might be added via the filter... though it would seem to make sense to just use $this->_venue_model->get_one_by_ID( $post_id ).. i have to setup where conditions to override the filters in the model that filter out autodraft and inherit statuses so we GET the inherit id! |
817 | - $get_one_where = array( $this->_venue_model->primary_key_name() => $post_id, 'status' => $post->post_status ); |
|
818 | - $venue = $this->_venue_model->get_one( array( $get_one_where ) ); |
|
817 | + $get_one_where = array($this->_venue_model->primary_key_name() => $post_id, 'status' => $post->post_status); |
|
818 | + $venue = $this->_venue_model->get_one(array($get_one_where)); |
|
819 | 819 | |
820 | 820 | //notice we've applied a filter for venue metabox callbacks but we don't actually have any default venue metaboxes in use. So this is just here for addons to more easily hook into venue saves. |
821 | - $venue_update_callbacks = apply_filters( 'FHEE__Venues_Admin_Page___insert_update_cpt_item__venue_update_callbacks', array() ); |
|
821 | + $venue_update_callbacks = apply_filters('FHEE__Venues_Admin_Page___insert_update_cpt_item__venue_update_callbacks', array()); |
|
822 | 822 | |
823 | 823 | $att_success = TRUE; |
824 | 824 | |
825 | - foreach ( $venue_update_callbacks as $v_callback ) { |
|
826 | - $_succ = call_user_func_array( $v_callback, array( $venue, $this->_req_data ) ); |
|
827 | - $att_success = !$att_success ? $att_success : $_succ; //if ANY of these updates fail then we want the appropriate global error message |
|
825 | + foreach ($venue_update_callbacks as $v_callback) { |
|
826 | + $_succ = call_user_func_array($v_callback, array($venue, $this->_req_data)); |
|
827 | + $att_success = ! $att_success ? $att_success : $_succ; //if ANY of these updates fail then we want the appropriate global error message |
|
828 | 828 | } |
829 | 829 | |
830 | 830 | //any errors? |
831 | - if ( $success && !$att_success ) { |
|
832 | - EE_Error::add_error( __('Venue Details saved successfully but something went wrong with saving attachments.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
833 | - } else if ( $success === FALSE ) { |
|
834 | - EE_Error::add_error( __('Venue Details did not save successfully.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
831 | + if ($success && ! $att_success) { |
|
832 | + EE_Error::add_error(__('Venue Details saved successfully but something went wrong with saving attachments.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
833 | + } else if ($success === FALSE) { |
|
834 | + EE_Error::add_error(__('Venue Details did not save successfully.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
835 | 835 | } |
836 | 836 | } |
837 | 837 | |
@@ -839,9 +839,9 @@ discard block |
||
839 | 839 | |
840 | 840 | |
841 | 841 | |
842 | - public function trash_cpt_item( $post_id ) { |
|
842 | + public function trash_cpt_item($post_id) { |
|
843 | 843 | $this->_req_data['VNU_ID'] = $post_id; |
844 | - $this->_trash_or_restore_venue( 'trash', FALSE ); |
|
844 | + $this->_trash_or_restore_venue('trash', FALSE); |
|
845 | 845 | } |
846 | 846 | |
847 | 847 | |
@@ -849,18 +849,18 @@ discard block |
||
849 | 849 | |
850 | 850 | |
851 | 851 | |
852 | - public function restore_cpt_item( $post_id ) { |
|
852 | + public function restore_cpt_item($post_id) { |
|
853 | 853 | $this->_req_data['VNU_ID'] = $post_id; |
854 | - $this->_trash_or_restore_venue( 'draft', FALSE ); |
|
854 | + $this->_trash_or_restore_venue('draft', FALSE); |
|
855 | 855 | } |
856 | 856 | |
857 | 857 | |
858 | 858 | |
859 | 859 | |
860 | 860 | |
861 | - public function delete_cpt_item( $post_id ) { |
|
861 | + public function delete_cpt_item($post_id) { |
|
862 | 862 | $this->_req_data['VNU_ID'] = $post_id; |
863 | - $this->_delete_venue( FALSE ); |
|
863 | + $this->_delete_venue(FALSE); |
|
864 | 864 | } |
865 | 865 | |
866 | 866 | |
@@ -875,15 +875,15 @@ discard block |
||
875 | 875 | |
876 | 876 | |
877 | 877 | |
878 | - protected function _trash_or_restore_venue( $venue_status = 'trash', $redirect_after = TRUE ) { |
|
879 | - $VNU_ID = isset( $this->_req_data['VNU_ID'] ) ? absint( $this->_req_data['VNU_ID'] ) : FALSE; |
|
878 | + protected function _trash_or_restore_venue($venue_status = 'trash', $redirect_after = TRUE) { |
|
879 | + $VNU_ID = isset($this->_req_data['VNU_ID']) ? absint($this->_req_data['VNU_ID']) : FALSE; |
|
880 | 880 | |
881 | 881 | //loop thru venues |
882 | - if ( $VNU_ID ) { |
|
882 | + if ($VNU_ID) { |
|
883 | 883 | //clean status |
884 | - $venue_status = sanitize_key( $venue_status ); |
|
884 | + $venue_status = sanitize_key($venue_status); |
|
885 | 885 | // grab status |
886 | - if (!empty($venue_status)) { |
|
886 | + if ( ! empty($venue_status)) { |
|
887 | 887 | $success = $this->_change_venue_status($VNU_ID, $venue_status); |
888 | 888 | } else { |
889 | 889 | $success = FALSE; |
@@ -897,7 +897,7 @@ discard block |
||
897 | 897 | } |
898 | 898 | $action = $venue_status == 'trash' ? 'moved to the trash' : 'restored from the trash'; |
899 | 899 | |
900 | - if ( $redirect_after ) |
|
900 | + if ($redirect_after) |
|
901 | 901 | $this->_redirect_after_action($success, 'Venue', $action, array('action' => 'default')); |
902 | 902 | |
903 | 903 | } |
@@ -906,11 +906,11 @@ discard block |
||
906 | 906 | |
907 | 907 | |
908 | 908 | |
909 | - protected function _trash_or_restore_venues( $venue_status = 'trash' ) { |
|
909 | + protected function _trash_or_restore_venues($venue_status = 'trash') { |
|
910 | 910 | // clean status |
911 | 911 | $venue_status = sanitize_key($venue_status); |
912 | 912 | // grab status |
913 | - if (!empty($venue_status)) { |
|
913 | + if ( ! empty($venue_status)) { |
|
914 | 914 | $success = TRUE; |
915 | 915 | //determine the event id and set to array. |
916 | 916 | $VNU_IDs = isset($this->_req_data['venue_id']) ? (array) $this->_req_data['venue_id'] : array(); |
@@ -950,20 +950,20 @@ discard block |
||
950 | 950 | * @param string $venue_status |
951 | 951 | * @return void |
952 | 952 | */ |
953 | - private function _change_venue_status( $VNU_ID = 0, $venue_status = '' ) { |
|
953 | + private function _change_venue_status($VNU_ID = 0, $venue_status = '') { |
|
954 | 954 | // grab venue id |
955 | - if (! $VNU_ID) { |
|
955 | + if ( ! $VNU_ID) { |
|
956 | 956 | $msg = __('An error occurred. No Venue ID or an invalid Venue ID was received.', 'event_espresso'); |
957 | 957 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
958 | 958 | return FALSE; |
959 | 959 | } |
960 | 960 | |
961 | - $this->_cpt_model_obj = EEM_Venue::instance()->get_one_by_ID( $VNU_ID ); |
|
961 | + $this->_cpt_model_obj = EEM_Venue::instance()->get_one_by_ID($VNU_ID); |
|
962 | 962 | |
963 | 963 | // clean status |
964 | 964 | $venue_status = sanitize_key($venue_status); |
965 | 965 | // grab status |
966 | - if ( ! $venue_status ) { |
|
966 | + if ( ! $venue_status) { |
|
967 | 967 | $msg = __('An error occurred. No Venue Status or an invalid Venue Status was received.', 'event_espresso'); |
968 | 968 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
969 | 969 | return FALSE; |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | $hook = FALSE; |
985 | 985 | } |
986 | 986 | //use class to change status |
987 | - $this->_cpt_model_obj->set_status( $venue_status ); |
|
987 | + $this->_cpt_model_obj->set_status($venue_status); |
|
988 | 988 | $success = $this->_cpt_model_obj->save(); |
989 | 989 | |
990 | 990 | if ($success === FALSE) { |
@@ -1003,21 +1003,21 @@ discard block |
||
1003 | 1003 | * @param bool $redirect_after |
1004 | 1004 | * @return void |
1005 | 1005 | */ |
1006 | - protected function _delete_venue( $redirect_after = true ) { |
|
1006 | + protected function _delete_venue($redirect_after = true) { |
|
1007 | 1007 | //determine the venue id and set to array. |
1008 | 1008 | $VNU_ID = isset($this->_req_data['VNU_ID']) ? absint($this->_req_data['VNU_ID']) : NULL; |
1009 | - $VNU_ID = isset( $this->_req_data['post'] ) ? absint( $this->_req_data['post'] ) : $VNU_ID; |
|
1009 | + $VNU_ID = isset($this->_req_data['post']) ? absint($this->_req_data['post']) : $VNU_ID; |
|
1010 | 1010 | |
1011 | 1011 | |
1012 | 1012 | // loop thru venues |
1013 | 1013 | if ($VNU_ID) { |
1014 | - $success = $this->_delete_or_trash_venue( $VNU_ID ); |
|
1014 | + $success = $this->_delete_or_trash_venue($VNU_ID); |
|
1015 | 1015 | } else { |
1016 | 1016 | $success = FALSE; |
1017 | 1017 | $msg = __('An error occurred. An venue could not be deleted because a valid venue ID was not not supplied.', 'event_espresso'); |
1018 | 1018 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
1019 | 1019 | } |
1020 | - if ( $redirect_after ) |
|
1020 | + if ($redirect_after) |
|
1021 | 1021 | $this->_redirect_after_action($success, 'Venue', 'deleted', array('action' => 'default')); |
1022 | 1022 | } |
1023 | 1023 | |
@@ -1049,7 +1049,7 @@ discard block |
||
1049 | 1049 | //todo: put in parent |
1050 | 1050 | private function _delete_or_trash_venue($VNU_ID = FALSE) { |
1051 | 1051 | // grab event id |
1052 | - if (!$VNU_ID = absint($VNU_ID)) { |
|
1052 | + if ( ! $VNU_ID = absint($VNU_ID)) { |
|
1053 | 1053 | $msg = __('An error occurred. No Venue ID or an invalid Venue ID was received.', 'event_espresso'); |
1054 | 1054 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
1055 | 1055 | return FALSE; |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
1070 | 1070 | return FALSE; |
1071 | 1071 | } |
1072 | - do_action( 'AHEE__Venues_Admin_Page___delete_or_trash_venue__after_venue_deleted' ); |
|
1072 | + do_action('AHEE__Venues_Admin_Page___delete_or_trash_venue__after_venue_deleted'); |
|
1073 | 1073 | return TRUE; |
1074 | 1074 | } |
1075 | 1075 | |
@@ -1080,11 +1080,11 @@ discard block |
||
1080 | 1080 | /* QUERIES */ |
1081 | 1081 | |
1082 | 1082 | |
1083 | - public function get_venues( $per_page = 10, $count = FALSE ) { |
|
1083 | + public function get_venues($per_page = 10, $count = FALSE) { |
|
1084 | 1084 | |
1085 | - $_orderby = !empty( $this->_req_data['orderby'] ) ? $this->_req_data['orderby'] : ''; |
|
1085 | + $_orderby = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : ''; |
|
1086 | 1086 | |
1087 | - switch ( $_orderby ) { |
|
1087 | + switch ($_orderby) { |
|
1088 | 1088 | case 'id': |
1089 | 1089 | $orderby = 'VNU_ID'; |
1090 | 1090 | break; |
@@ -1102,43 +1102,43 @@ discard block |
||
1102 | 1102 | } |
1103 | 1103 | |
1104 | 1104 | |
1105 | - $sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'ASC'; |
|
1105 | + $sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'ASC'; |
|
1106 | 1106 | |
1107 | - $current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1; |
|
1108 | - $per_page = isset( $per_page ) && !empty( $per_page ) ? $per_page : 10; |
|
1109 | - $per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page; |
|
1107 | + $current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1; |
|
1108 | + $per_page = isset($per_page) && ! empty($per_page) ? $per_page : 10; |
|
1109 | + $per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page; |
|
1110 | 1110 | |
1111 | 1111 | |
1112 | - $offset = ($current_page-1)*$per_page; |
|
1112 | + $offset = ($current_page - 1) * $per_page; |
|
1113 | 1113 | $limit = array($offset, $per_page); |
1114 | 1114 | |
1115 | - $category = isset( $this->_req_data['category'] ) && $this->_req_data['category'] > 0 ? $this->_req_data['category'] : NULL; |
|
1115 | + $category = isset($this->_req_data['category']) && $this->_req_data['category'] > 0 ? $this->_req_data['category'] : NULL; |
|
1116 | 1116 | $where = array(); |
1117 | 1117 | |
1118 | 1118 | //only set initial status if it is in the incoming request. Otherwise the "all" view display's all statuses. |
1119 | - if ( isset( $this->_req_data['status'] ) && $this->_req_data['status'] != 'all' ) { |
|
1119 | + if (isset($this->_req_data['status']) && $this->_req_data['status'] != 'all') { |
|
1120 | 1120 | $where['status'] = $this->_req_data['status']; |
1121 | 1121 | } |
1122 | 1122 | |
1123 | - if ( isset( $this->_req_data['venue_status'] ) ) { |
|
1123 | + if (isset($this->_req_data['venue_status'])) { |
|
1124 | 1124 | $where['status'] = $this->_req_data['venue_status']; |
1125 | 1125 | } |
1126 | 1126 | |
1127 | 1127 | |
1128 | - if ( $category ) { |
|
1128 | + if ($category) { |
|
1129 | 1129 | $where['Term_Taxonomy.taxonomy'] = 'espresso_venue_categories'; |
1130 | 1130 | $where['Term_Taxonomy.term_id'] = $category; |
1131 | 1131 | } |
1132 | 1132 | |
1133 | 1133 | |
1134 | - if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_venues', 'get_venues' ) ) { |
|
1135 | - $where['VNU_wp_user'] = get_current_user_id(); |
|
1134 | + if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) { |
|
1135 | + $where['VNU_wp_user'] = get_current_user_id(); |
|
1136 | 1136 | } else { |
1137 | - if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_venues', 'get_venues' ) ) { |
|
1137 | + if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) { |
|
1138 | 1138 | $where['OR'] = array( |
1139 | - 'status*restrict_private' => array( '!=', 'private' ), |
|
1139 | + 'status*restrict_private' => array('!=', 'private'), |
|
1140 | 1140 | 'AND' => array( |
1141 | - 'status*inclusive' => array( '=', 'private' ), |
|
1141 | + 'status*inclusive' => array('=', 'private'), |
|
1142 | 1142 | 'VNU_wp_user' => get_current_user_id() |
1143 | 1143 | ) |
1144 | 1144 | ); |
@@ -1148,30 +1148,30 @@ discard block |
||
1148 | 1148 | |
1149 | 1149 | |
1150 | 1150 | |
1151 | - if ( isset( $this->_req_data['s'] ) ) { |
|
1152 | - $sstr = '%' . $this->_req_data['s'] . '%'; |
|
1151 | + if (isset($this->_req_data['s'])) { |
|
1152 | + $sstr = '%'.$this->_req_data['s'].'%'; |
|
1153 | 1153 | $where['OR'] = array( |
1154 | - 'VNU_name' => array('LIKE',$sstr ), |
|
1155 | - 'VNU_desc' => array('LIKE',$sstr ), |
|
1156 | - 'VNU_short_desc' => array( 'LIKE',$sstr ), |
|
1157 | - 'VNU_address' => array( 'LIKE', $sstr ), |
|
1158 | - 'VNU_address2' => array( 'LIKE', $sstr ), |
|
1159 | - 'VNU_city' => array( 'LIKE', $sstr ), |
|
1160 | - 'VNU_zip' => array( 'LIKE', $sstr ), |
|
1161 | - 'VNU_phone' => array( 'LIKE', $sstr ), |
|
1162 | - 'VNU_url' => array( 'LIKE', $sstr ), |
|
1163 | - 'VNU_virtual_phone' => array( 'LIKE', $sstr ), |
|
1164 | - 'VNU_virtual_url' => array( 'LIKE', $sstr ), |
|
1165 | - 'VNU_google_map_link' => array( 'LIKE', $sstr ), |
|
1166 | - 'Event.EVT_name' => array('LIKE', $sstr ), |
|
1167 | - 'Event.EVT_desc' => array('LIKE', $sstr ), |
|
1168 | - 'Event.EVT_phone' => array('LIKE', $sstr ), |
|
1169 | - 'Event.EVT_external_URL' => array('LIKE', $sstr ), |
|
1154 | + 'VNU_name' => array('LIKE', $sstr), |
|
1155 | + 'VNU_desc' => array('LIKE', $sstr), |
|
1156 | + 'VNU_short_desc' => array('LIKE', $sstr), |
|
1157 | + 'VNU_address' => array('LIKE', $sstr), |
|
1158 | + 'VNU_address2' => array('LIKE', $sstr), |
|
1159 | + 'VNU_city' => array('LIKE', $sstr), |
|
1160 | + 'VNU_zip' => array('LIKE', $sstr), |
|
1161 | + 'VNU_phone' => array('LIKE', $sstr), |
|
1162 | + 'VNU_url' => array('LIKE', $sstr), |
|
1163 | + 'VNU_virtual_phone' => array('LIKE', $sstr), |
|
1164 | + 'VNU_virtual_url' => array('LIKE', $sstr), |
|
1165 | + 'VNU_google_map_link' => array('LIKE', $sstr), |
|
1166 | + 'Event.EVT_name' => array('LIKE', $sstr), |
|
1167 | + 'Event.EVT_desc' => array('LIKE', $sstr), |
|
1168 | + 'Event.EVT_phone' => array('LIKE', $sstr), |
|
1169 | + 'Event.EVT_external_URL' => array('LIKE', $sstr), |
|
1170 | 1170 | ); |
1171 | 1171 | } |
1172 | 1172 | |
1173 | 1173 | |
1174 | - $venues = $count ? $this->_venue_model->count( array($where), 'VNU_ID' ) : $this->_venue_model->get_all( array( $where, 'limit' => $limit, 'order_by' => $orderby, 'order' => $sort ) ); |
|
1174 | + $venues = $count ? $this->_venue_model->count(array($where), 'VNU_ID') : $this->_venue_model->get_all(array($where, 'limit' => $limit, 'order_by' => $orderby, 'order' => $sort)); |
|
1175 | 1175 | |
1176 | 1176 | return $venues; |
1177 | 1177 | |
@@ -1189,22 +1189,22 @@ discard block |
||
1189 | 1189 | * @return void |
1190 | 1190 | */ |
1191 | 1191 | private function _set_category_object() { |
1192 | - if ( isset( $this->_category->id ) && !empty( $this->_category->id ) ) |
|
1192 | + if (isset($this->_category->id) && ! empty($this->_category->id)) |
|
1193 | 1193 | return; //already have the category object so get out. |
1194 | 1194 | |
1195 | 1195 | //set default category object |
1196 | 1196 | $this->_set_empty_category_object(); |
1197 | 1197 | |
1198 | 1198 | //only set if we've got an id |
1199 | - if ( !isset($this->_req_data['VEN_CAT_ID'] ) ) { |
|
1199 | + if ( ! isset($this->_req_data['VEN_CAT_ID'])) { |
|
1200 | 1200 | return; |
1201 | 1201 | } |
1202 | 1202 | |
1203 | 1203 | $category_id = absint($this->_req_data['VEN_CAT_ID']); |
1204 | - $term = get_term( $category_id, 'espresso_venue_categories' ); |
|
1204 | + $term = get_term($category_id, 'espresso_venue_categories'); |
|
1205 | 1205 | |
1206 | 1206 | |
1207 | - if ( !empty( $term ) ) { |
|
1207 | + if ( ! empty($term)) { |
|
1208 | 1208 | $this->_category->category_name = $term->name; |
1209 | 1209 | $this->_category->category_identifier = $term->slug; |
1210 | 1210 | $this->_category->category_desc = $term->description; |
@@ -1218,14 +1218,14 @@ discard block |
||
1218 | 1218 | |
1219 | 1219 | private function _set_empty_category_object() { |
1220 | 1220 | $this->_category = new stdClass(); |
1221 | - $this->_category->category_name = $this->_category->category_identifier = $this->_category->category_desc = ''; |
|
1221 | + $this->_category->category_name = $this->_category->category_identifier = $this->_category->category_desc = ''; |
|
1222 | 1222 | $this->_category->id = $this->_category->parent = 0; |
1223 | 1223 | } |
1224 | 1224 | |
1225 | 1225 | |
1226 | 1226 | |
1227 | 1227 | protected function _category_list_table() { |
1228 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
1228 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
1229 | 1229 | $this->_admin_page_title .= $this->get_action_link_or_button('add_category', 'add_category', array(), 'add-new-h2'); |
1230 | 1230 | $this->_search_btn_label = __('Venue Categories', 'event_espresso'); |
1231 | 1231 | $this->display_admin_list_table_page_with_sidebar(); |
@@ -1241,13 +1241,13 @@ discard block |
||
1241 | 1241 | $this->_set_add_edit_form_tags($route); |
1242 | 1242 | |
1243 | 1243 | $this->_set_category_object(); |
1244 | - $id = !empty($this->_category->id) ? $this->_category->id : ''; |
|
1244 | + $id = ! empty($this->_category->id) ? $this->_category->id : ''; |
|
1245 | 1245 | |
1246 | 1246 | $delete_action = 'delete_category'; |
1247 | 1247 | |
1248 | - $redirect = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'category_list' ), $this->_admin_base_url ); |
|
1248 | + $redirect = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'category_list'), $this->_admin_base_url); |
|
1249 | 1249 | |
1250 | - $this->_set_publish_post_box_vars( 'VEN_CAT_ID', $id, $delete_action, $redirect ); |
|
1250 | + $this->_set_publish_post_box_vars('VEN_CAT_ID', $id, $delete_action, $redirect); |
|
1251 | 1251 | |
1252 | 1252 | //take care of contents |
1253 | 1253 | $this->_template_args['admin_page_content'] = $this->_category_details_content(); |
@@ -1261,25 +1261,25 @@ discard block |
||
1261 | 1261 | 'type' => 'wp_editor', |
1262 | 1262 | 'value' => EEH_Formatter::admin_format_content($this->_category->category_desc), |
1263 | 1263 | 'class' => 'my_editor_custom', |
1264 | - 'wpeditor_args' => array( 'media_buttons' => FALSE ) |
|
1264 | + 'wpeditor_args' => array('media_buttons' => FALSE) |
|
1265 | 1265 | ); |
1266 | - $_wp_editor = $this->_generate_admin_form_fields( $editor_args, 'array' ); |
|
1266 | + $_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array'); |
|
1267 | 1267 | |
1268 | - $all_terms = get_terms( array('espresso_venue_categories' ), array( 'hide_empty' => 0, 'exclude' => array( $this->_category->id ) ) ); |
|
1268 | + $all_terms = get_terms(array('espresso_venue_categories'), array('hide_empty' => 0, 'exclude' => array($this->_category->id))); |
|
1269 | 1269 | |
1270 | 1270 | //setup category select for term parents. |
1271 | 1271 | $category_select_values[] = array( |
1272 | 1272 | 'text' => __('No Parent', 'event_espresso'), |
1273 | 1273 | 'id' => 0 |
1274 | 1274 | ); |
1275 | - foreach ( $all_terms as $term ) { |
|
1275 | + foreach ($all_terms as $term) { |
|
1276 | 1276 | $category_select_values[] = array( |
1277 | 1277 | 'text' => $term->name, |
1278 | 1278 | 'id' => $term->term_id |
1279 | 1279 | ); |
1280 | 1280 | } |
1281 | 1281 | |
1282 | - $category_select = EEH_Form_Fields::select_input( 'category_parent', $category_select_values, $this->_category->parent ); |
|
1282 | + $category_select = EEH_Form_Fields::select_input('category_parent', $category_select_values, $this->_category->parent); |
|
1283 | 1283 | $template_args = array( |
1284 | 1284 | 'category' => $this->_category, |
1285 | 1285 | 'category_select' => $category_select, |
@@ -1288,15 +1288,15 @@ discard block |
||
1288 | 1288 | 'disable' => '', |
1289 | 1289 | 'disabled_message' =>FALSE |
1290 | 1290 | ); |
1291 | - $template = EVENTS_TEMPLATE_PATH . 'event_category_details.template.php'; |
|
1292 | - return EEH_Template::display_template($template, $template_args, TRUE ); |
|
1291 | + $template = EVENTS_TEMPLATE_PATH.'event_category_details.template.php'; |
|
1292 | + return EEH_Template::display_template($template, $template_args, TRUE); |
|
1293 | 1293 | } |
1294 | 1294 | |
1295 | 1295 | |
1296 | 1296 | protected function _delete_categories() { |
1297 | - $cat_ids = isset( $this->_req_data['VEN_CAT_ID'] ) ? (array) $this->_req_data['VEN_CAT_ID'] : (array) $this->_req_data['category_id']; |
|
1297 | + $cat_ids = isset($this->_req_data['VEN_CAT_ID']) ? (array) $this->_req_data['VEN_CAT_ID'] : (array) $this->_req_data['category_id']; |
|
1298 | 1298 | |
1299 | - foreach ( $cat_ids as $cat_id ) { |
|
1299 | + foreach ($cat_ids as $cat_id) { |
|
1300 | 1300 | $this->_delete_category($cat_id); |
1301 | 1301 | } |
1302 | 1302 | |
@@ -1304,7 +1304,7 @@ discard block |
||
1304 | 1304 | $query_args = array( |
1305 | 1305 | 'action' => 'category_list' |
1306 | 1306 | ); |
1307 | - $this->_redirect_after_action(0,'','',$query_args); |
|
1307 | + $this->_redirect_after_action(0, '', '', $query_args); |
|
1308 | 1308 | |
1309 | 1309 | } |
1310 | 1310 | |
@@ -1313,58 +1313,58 @@ discard block |
||
1313 | 1313 | |
1314 | 1314 | |
1315 | 1315 | protected function _delete_category($cat_id) { |
1316 | - $cat_id = absint( $cat_id ); |
|
1317 | - wp_delete_term( $cat_id, 'espresso_venue_categories' ); |
|
1316 | + $cat_id = absint($cat_id); |
|
1317 | + wp_delete_term($cat_id, 'espresso_venue_categories'); |
|
1318 | 1318 | } |
1319 | 1319 | |
1320 | 1320 | |
1321 | 1321 | |
1322 | 1322 | protected function _insert_or_update_category($new_category) { |
1323 | 1323 | |
1324 | - $cat_id = $new_category ? $this->_insert_category() : $this->_insert_category( TRUE ); |
|
1324 | + $cat_id = $new_category ? $this->_insert_category() : $this->_insert_category(TRUE); |
|
1325 | 1325 | $success = 0; //we already have a success message so lets not send another. |
1326 | - if ( $cat_id ) { |
|
1326 | + if ($cat_id) { |
|
1327 | 1327 | $query_args = array( |
1328 | 1328 | 'action' => 'edit_category', |
1329 | 1329 | 'VEN_CAT_ID' => $cat_id |
1330 | 1330 | ); |
1331 | 1331 | } else { |
1332 | - $query_args = array( 'action' => 'add_category' ); |
|
1332 | + $query_args = array('action' => 'add_category'); |
|
1333 | 1333 | } |
1334 | - $this->_redirect_after_action( $success, '','', $query_args, TRUE ); |
|
1334 | + $this->_redirect_after_action($success, '', '', $query_args, TRUE); |
|
1335 | 1335 | |
1336 | 1336 | } |
1337 | 1337 | |
1338 | 1338 | |
1339 | 1339 | |
1340 | - private function _insert_category( $update = FALSE ) { |
|
1340 | + private function _insert_category($update = FALSE) { |
|
1341 | 1341 | $cat_id = $update ? $this->_req_data['VEN_CAT_ID'] : ''; |
1342 | - $category_name= isset( $this->_req_data['category_name'] ) ? $this->_req_data['category_name'] : ''; |
|
1343 | - $category_desc= isset( $this->_req_data['category_desc'] ) ? $this->_req_data['category_desc'] : ''; |
|
1344 | - $category_parent = isset( $this->_req_data['category_parent'] ) ? $this->_req_data['category_parent'] : 0; |
|
1342 | + $category_name = isset($this->_req_data['category_name']) ? $this->_req_data['category_name'] : ''; |
|
1343 | + $category_desc = isset($this->_req_data['category_desc']) ? $this->_req_data['category_desc'] : ''; |
|
1344 | + $category_parent = isset($this->_req_data['category_parent']) ? $this->_req_data['category_parent'] : 0; |
|
1345 | 1345 | |
1346 | - if ( empty( $category_name ) ) { |
|
1347 | - $msg = __( 'You must add a name for the category.', 'event_espresso' ); |
|
1348 | - EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
1346 | + if (empty($category_name)) { |
|
1347 | + $msg = __('You must add a name for the category.', 'event_espresso'); |
|
1348 | + EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
|
1349 | 1349 | return false; |
1350 | 1350 | } |
1351 | 1351 | |
1352 | 1352 | |
1353 | - $term_args=array( |
|
1353 | + $term_args = array( |
|
1354 | 1354 | 'name'=>$category_name, |
1355 | 1355 | 'description'=>$category_desc, |
1356 | 1356 | 'parent'=>$category_parent |
1357 | 1357 | ); |
1358 | 1358 | |
1359 | - $insert_ids = $update ? wp_update_term( $cat_id, 'espresso_venue_categories', $term_args ) :wp_insert_term( $category_name, 'espresso_venue_categories', $term_args ); |
|
1359 | + $insert_ids = $update ? wp_update_term($cat_id, 'espresso_venue_categories', $term_args) : wp_insert_term($category_name, 'espresso_venue_categories', $term_args); |
|
1360 | 1360 | |
1361 | - if ( !is_array( $insert_ids ) ) { |
|
1362 | - $msg = __( 'An error occurred and the category has not been saved to the database.', 'event_espresso' ); |
|
1363 | - EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
1361 | + if ( ! is_array($insert_ids)) { |
|
1362 | + $msg = __('An error occurred and the category has not been saved to the database.', 'event_espresso'); |
|
1363 | + EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
|
1364 | 1364 | } else { |
1365 | 1365 | $cat_id = $insert_ids['term_id']; |
1366 | - $msg = sprintf ( __('The category %s was successfuly created', 'event_espresso'), $category_name ); |
|
1367 | - EE_Error::add_success( $msg ); |
|
1366 | + $msg = sprintf(__('The category %s was successfuly created', 'event_espresso'), $category_name); |
|
1367 | + EE_Error::add_success($msg); |
|
1368 | 1368 | } |
1369 | 1369 | |
1370 | 1370 | return $cat_id; |
@@ -1384,11 +1384,11 @@ discard block |
||
1384 | 1384 | 'category_ids' => $this->_req_data['VEN_CAT_ID'] |
1385 | 1385 | ); |
1386 | 1386 | |
1387 | - $this->_req_data = array_merge( $this->_req_data, $new_request_args ); |
|
1387 | + $this->_req_data = array_merge($this->_req_data, $new_request_args); |
|
1388 | 1388 | |
1389 | - if ( is_readable( EE_CLASSES . 'EE_Export.class.php') ) { |
|
1390 | - require_once( EE_CLASSES . 'EE_Export.class.php'); |
|
1391 | - $EE_Export = EE_Export::instance( $this->_req_data ); |
|
1389 | + if (is_readable(EE_CLASSES.'EE_Export.class.php')) { |
|
1390 | + require_once(EE_CLASSES.'EE_Export.class.php'); |
|
1391 | + $EE_Export = EE_Export::instance($this->_req_data); |
|
1392 | 1392 | $EE_Export->export(); |
1393 | 1393 | } |
1394 | 1394 | |
@@ -1400,7 +1400,7 @@ discard block |
||
1400 | 1400 | |
1401 | 1401 | protected function _import_categories() { |
1402 | 1402 | |
1403 | - require_once(EE_CLASSES . 'EE_Import.class.php'); |
|
1403 | + require_once(EE_CLASSES.'EE_Import.class.php'); |
|
1404 | 1404 | EE_Import::instance()->import(); |
1405 | 1405 | |
1406 | 1406 | } |
@@ -1408,29 +1408,29 @@ discard block |
||
1408 | 1408 | |
1409 | 1409 | |
1410 | 1410 | |
1411 | - public function get_categories( $per_page = 10, $current_page = 1, $count = FALSE ) { |
|
1411 | + public function get_categories($per_page = 10, $current_page = 1, $count = FALSE) { |
|
1412 | 1412 | |
1413 | 1413 | //testing term stuff |
1414 | - $orderby = isset( $this->_req_data['orderby'] ) ? $this->_req_data['orderby'] : 'Term.term_id'; |
|
1415 | - $order = isset( $this->_req_data['order'] ) ? $this->_req_data['order'] : 'DESC'; |
|
1416 | - $limit = ($current_page-1)*$per_page; |
|
1417 | - $where = array( 'taxonomy' => 'espresso_venue_categories' ); |
|
1418 | - if ( isset( $this->_req_data['s'] ) ) { |
|
1419 | - $sstr = '%' . $this->_req_data['s'] . '%'; |
|
1414 | + $orderby = isset($this->_req_data['orderby']) ? $this->_req_data['orderby'] : 'Term.term_id'; |
|
1415 | + $order = isset($this->_req_data['order']) ? $this->_req_data['order'] : 'DESC'; |
|
1416 | + $limit = ($current_page - 1) * $per_page; |
|
1417 | + $where = array('taxonomy' => 'espresso_venue_categories'); |
|
1418 | + if (isset($this->_req_data['s'])) { |
|
1419 | + $sstr = '%'.$this->_req_data['s'].'%'; |
|
1420 | 1420 | $where['OR'] = array( |
1421 | - 'Term.name' => array( 'LIKE', $sstr), |
|
1422 | - 'description' => array( 'LIKE', $sstr ) |
|
1421 | + 'Term.name' => array('LIKE', $sstr), |
|
1422 | + 'description' => array('LIKE', $sstr) |
|
1423 | 1423 | ); |
1424 | 1424 | } |
1425 | 1425 | |
1426 | 1426 | $query_params = array( |
1427 | 1427 | $where, |
1428 | - 'order_by' => array( $orderby => $order ), |
|
1429 | - 'limit' => $limit . ',' . $per_page, |
|
1428 | + 'order_by' => array($orderby => $order), |
|
1429 | + 'limit' => $limit.','.$per_page, |
|
1430 | 1430 | 'force_join' => array('Term') |
1431 | 1431 | ); |
1432 | 1432 | |
1433 | - $categories = $count ? EEM_Term_Taxonomy::instance()->count( $query_params, 'term_id' ) :EEM_Term_Taxonomy::instance()->get_all( $query_params ); |
|
1433 | + $categories = $count ? EEM_Term_Taxonomy::instance()->count($query_params, 'term_id') : EEM_Term_Taxonomy::instance()->get_all($query_params); |
|
1434 | 1434 | |
1435 | 1435 | return $categories; |
1436 | 1436 | } |
@@ -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 | /** |
@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | |
33 | 33 | public function __construct() { |
34 | 34 | //define some event categories related constants |
35 | - define( 'EE_VENUES_PG_SLUG', 'espresso_venues' ); |
|
36 | - define( 'EE_VENUES_ADMIN_URL', admin_url('admin.php?page=' . EE_VENUES_PG_SLUG )); |
|
37 | - define( 'EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL . 'venues/assets/'); |
|
38 | - define( 'EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES . 'venues/templates/' ); |
|
35 | + define('EE_VENUES_PG_SLUG', 'espresso_venues'); |
|
36 | + define('EE_VENUES_ADMIN_URL', admin_url('admin.php?page='.EE_VENUES_PG_SLUG)); |
|
37 | + define('EE_VENUES_ASSETS_URL', EE_ADMIN_PAGES_URL.'venues/assets/'); |
|
38 | + define('EE_VENUES_TEMPLATE_PATH', EE_ADMIN_PAGES.'venues/templates/'); |
|
39 | 39 | |
40 | 40 | parent::__construct(); |
41 | - $this->_folder_path = EE_ADMIN_PAGES . $this->_folder_name . DS; |
|
41 | + $this->_folder_path = EE_ADMIN_PAGES.$this->_folder_name.DS; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | protected function _set_init_properties() { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | |
51 | 51 | protected function _set_menu_map() { |
52 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
52 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
53 | 53 | 'menu_group' => 'management', |
54 | 54 | 'menu_order' => 40, |
55 | 55 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
@@ -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 | /** |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | protected $_event; |
34 | 34 | |
35 | 35 | |
36 | - public function __construct( EE_Admin_Page $admin_page ) { |
|
37 | - parent::__construct( $admin_page ); |
|
36 | + public function __construct(EE_Admin_Page $admin_page) { |
|
37 | + parent::__construct($admin_page); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
@@ -49,18 +49,18 @@ discard block |
||
49 | 49 | 'priority' => 'high', |
50 | 50 | 'context' => 'normal' |
51 | 51 | ) |
52 | - );/**/ |
|
52 | + ); /**/ |
|
53 | 53 | |
54 | 54 | $this->_scripts_styles = array( |
55 | 55 | 'registers' => array( |
56 | 56 | 'ee_event_venues' => array( |
57 | 57 | 'type' => 'js', |
58 | - 'url' => EE_VENUES_ASSETS_URL . 'ee-event-venues-admin.js', |
|
58 | + 'url' => EE_VENUES_ASSETS_URL.'ee-event-venues-admin.js', |
|
59 | 59 | 'depends' => array('jquery') |
60 | 60 | ), |
61 | 61 | 'ee_event_venues_css' => array( |
62 | 62 | 'type' => 'css', |
63 | - 'url' => EE_VENUES_ASSETS_URL . 'ee-event-venues-admin.css', |
|
63 | + 'url' => EE_VENUES_ASSETS_URL.'ee-event-venues-admin.css', |
|
64 | 64 | ) |
65 | 65 | ), |
66 | 66 | 'enqueues' => array( |
@@ -70,24 +70,24 @@ discard block |
||
70 | 70 | ); |
71 | 71 | |
72 | 72 | //hook into the handler for saving venue |
73 | - add_filter( 'FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array( $this, 'modify_callbacks' ), 10 ); |
|
73 | + add_filter('FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks', array($this, 'modify_callbacks'), 10); |
|
74 | 74 | |
75 | 75 | //remove default ee_autosave returns for DECAF venues (not needed for CAF venues cause we have a dropdown selector) |
76 | - add_filter( 'FHEE__Events_Admin_Page__ee_autosave_edit_do_decaf_venue_save', '__return_false' ); |
|
76 | + add_filter('FHEE__Events_Admin_Page__ee_autosave_edit_do_decaf_venue_save', '__return_false'); |
|
77 | 77 | |
78 | 78 | } |
79 | 79 | |
80 | 80 | |
81 | - public function modify_callbacks( $callbacks ) { |
|
81 | + public function modify_callbacks($callbacks) { |
|
82 | 82 | // first remove default venue callback |
83 | - foreach ( $callbacks as $key => $callback ) { |
|
84 | - if ( $callback[1] == '_default_venue_update' ) { |
|
85 | - unset( $callbacks[$key] ); |
|
83 | + foreach ($callbacks as $key => $callback) { |
|
84 | + if ($callback[1] == '_default_venue_update') { |
|
85 | + unset($callbacks[$key]); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
89 | 89 | //now let's add the caf version |
90 | - $callbacks[] = array( $this, 'caf_venue_update' ); |
|
90 | + $callbacks[] = array($this, 'caf_venue_update'); |
|
91 | 91 | return $callbacks; |
92 | 92 | } |
93 | 93 | |
@@ -103,69 +103,69 @@ discard block |
||
103 | 103 | $evt_id = $evt_obj->ID(); |
104 | 104 | |
105 | 105 | //first let's see if we have a venue already |
106 | - $evt_venues = !empty( $evt_id ) ? $evt_obj->venues() : array(); |
|
107 | - $evt_venue = $evt_venues && is_array( $evt_venues ) ? reset( $evt_venues ) : null; |
|
106 | + $evt_venues = ! empty($evt_id) ? $evt_obj->venues() : array(); |
|
107 | + $evt_venue = $evt_venues && is_array($evt_venues) ? reset($evt_venues) : null; |
|
108 | 108 | $evt_venue_id = $evt_venue instanceof EE_Venue ? $evt_venue->ID() : null; |
109 | 109 | |
110 | 110 | //possibly private venues. |
111 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_venues', 'get_venues' ) ) { |
|
112 | - $vnu_where['status']= array( 'IN' , array( 'publish', 'private' ) ); |
|
111 | + if (EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) { |
|
112 | + $vnu_where['status'] = array('IN', array('publish', 'private')); |
|
113 | 113 | } else { |
114 | 114 | $vnu_where['status'] = 'publish'; |
115 | 115 | } |
116 | 116 | |
117 | 117 | //cap checks |
118 | - if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_venues', 'get_venues' ) ) { |
|
118 | + if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) { |
|
119 | 119 | $vnu_where['VNU_wp_user'] = get_current_user_id(); |
120 | 120 | } |
121 | 121 | |
122 | - $vnumdl = EE_Registry::instance()->load_model( 'Venue' ); |
|
123 | - $venues = $vnumdl->get_all( array( $vnu_where, 'order_by' => array( 'VNU_name' => 'ASC' ) ) ); |
|
122 | + $vnumdl = EE_Registry::instance()->load_model('Venue'); |
|
123 | + $venues = $vnumdl->get_all(array($vnu_where, 'order_by' => array('VNU_name' => 'ASC'))); |
|
124 | 124 | |
125 | 125 | $ven_select = array(); |
126 | 126 | $ven_select[0] = __('Select a Venue', 'event_espresso'); |
127 | 127 | //setup venues for selector |
128 | - foreach ( $venues as $venue ) { |
|
128 | + foreach ($venues as $venue) { |
|
129 | 129 | $ven_select[$venue->ID()] = $venue->name(); |
130 | 130 | } |
131 | 131 | |
132 | 132 | //if $ven_select does not have the existing venue attached to event then let's add that because we'll always |
133 | 133 | //show existing attached venues even if it's trashed (or some other restricted status). |
134 | 134 | |
135 | - if ( $evt_venue_id && ! isset( $ven_select[$evt_venue_id] ) ) { |
|
135 | + if ($evt_venue_id && ! isset($ven_select[$evt_venue_id])) { |
|
136 | 136 | $ven_select[$evt_venue_id] = $evt_venue->name(); |
137 | - $venues = array_merge( $venues, array( $evt_venue ) ); |
|
137 | + $venues = array_merge($venues, array($evt_venue)); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $template_args['venues'] = $venues; |
141 | 141 | $template_args['evt_venue_id'] = $evt_venue_id; |
142 | - $template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"' ); |
|
143 | - $template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object( $evt_venue ) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"'); |
|
144 | - $template_path = empty( $venues ) ? EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content_from_manager.template.php'; |
|
145 | - EEH_Template::display_template( $template_path, $template_args ); |
|
142 | + $template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"'); |
|
143 | + $template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object($evt_venue) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"'); |
|
144 | + $template_path = empty($venues) ? EE_VENUES_TEMPLATE_PATH.'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH.'event_venues_metabox_content_from_manager.template.php'; |
|
145 | + EEH_Template::display_template($template_path, $template_args); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | |
149 | 149 | |
150 | 150 | |
151 | - public function caf_venue_update( $evtobj, $data ) { |
|
151 | + public function caf_venue_update($evtobj, $data) { |
|
152 | 152 | EE_Registry::instance()->load_model('Venue'); |
153 | - $venue_id = !empty( $data['venue_id'] ) ? $data['venue_id'] : NULL; |
|
153 | + $venue_id = ! empty($data['venue_id']) ? $data['venue_id'] : NULL; |
|
154 | 154 | |
155 | 155 | |
156 | 156 | //first let's check if the selected venue matches any existing venue attached to the event |
157 | 157 | $evt_venue = $evtobj->venues(); |
158 | - $evt_venue = !empty( $evt_venue ) ? array_shift( $evt_venue ) : NULL; |
|
158 | + $evt_venue = ! empty($evt_venue) ? array_shift($evt_venue) : NULL; |
|
159 | 159 | |
160 | - if ( !empty( $evt_venue ) && $evt_venue->ID() != $venue_id ) |
|
161 | - $evtobj->_remove_relation_to( $evt_venue->ID(), 'Venue' ); |
|
160 | + if ( ! empty($evt_venue) && $evt_venue->ID() != $venue_id) |
|
161 | + $evtobj->_remove_relation_to($evt_venue->ID(), 'Venue'); |
|
162 | 162 | |
163 | - if ( empty( $venue_id ) ) |
|
163 | + if (empty($venue_id)) |
|
164 | 164 | return TRUE; //no venue to attach |
165 | 165 | |
166 | 166 | // this should take care of adding to revisions as well as main post object |
167 | - $success = $evtobj->_add_relation_to( $venue_id, 'Venue' ); |
|
168 | - return !empty($success) ? TRUE : FALSE; |
|
167 | + $success = $evtobj->_add_relation_to($venue_id, 'Venue'); |
|
168 | + return ! empty($success) ? TRUE : FALSE; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 |
@@ -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 |
@@ -163,11 +164,14 @@ discard block |
||
163 | 164 | $evt_venue = $evtobj->venues(); |
164 | 165 | $evt_venue = !empty( $evt_venue ) ? array_shift( $evt_venue ) : NULL; |
165 | 166 | |
166 | - if ( !empty( $evt_venue ) && $evt_venue->ID() != $venue_id ) |
|
167 | - $evtobj->_remove_relation_to( $evt_venue->ID(), 'Venue' ); |
|
167 | + if ( !empty( $evt_venue ) && $evt_venue->ID() != $venue_id ) { |
|
168 | + $evtobj->_remove_relation_to( $evt_venue->ID(), 'Venue' ); |
|
169 | + } |
|
168 | 170 | |
169 | - if ( empty( $venue_id ) ) |
|
170 | - return TRUE; //no venue to attach |
|
171 | + if ( empty( $venue_id ) ) { |
|
172 | + return TRUE; |
|
173 | + } |
|
174 | + //no venue to attach |
|
171 | 175 | |
172 | 176 | // this should take care of adding to revisions as well as main post object |
173 | 177 | $success = $evtobj->_add_relation_to( $venue_id, 'Venue' ); |
@@ -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 | /** |
@@ -71,21 +71,21 @@ discard block |
||
71 | 71 | |
72 | 72 | |
73 | 73 | protected function _start() { |
74 | - $content = '<h3>' . __('Google Maps Settings', 'event_espresso') . '</h3>'; |
|
75 | - $content .= '<p>' . __('This tour of the Google Maps page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
74 | + $content = '<h3>'.__('Google Maps Settings', 'event_espresso').'</h3>'; |
|
75 | + $content .= '<p>'.__('This tour of the Google Maps page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
76 | 76 | return $content; |
77 | 77 | } |
78 | 78 | |
79 | 79 | protected function _use_google_maps_stop() { |
80 | - return '<p>' . __('Turn Google maps on or off site wide for Event Espresso.', 'event_espresso') . '</p>'; |
|
80 | + return '<p>'.__('Turn Google maps on or off site wide for Event Espresso.', 'event_espresso').'</p>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | protected function _reg_page_map_settings_stop() { |
84 | - return '<p>' . __('These settings affect the single registration page maps only.', 'event_espresso') . '</p>'; |
|
84 | + return '<p>'.__('These settings affect the single registration page maps only.', 'event_espresso').'</p>'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | protected function _event_list_map_stop() { |
88 | - return '<p>' . __('These setting affect the event list page maps.', 'event_espresso') . '</p>'; |
|
88 | + return '<p>'.__('These setting affect the event list page maps.', 'event_espresso').'</p>'; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | } |
92 | 92 | \ 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 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $this->_slug = 'venue-add-category-joyride'; |
35 | 35 | } |
36 | 36 | |
37 | - protected function _set_tour_stops() { |
|
37 | + protected function _set_tour_stops() { |
|
38 | 38 | $this->_stops = array( |
39 | 39 | 10 => array( |
40 | 40 | 'content' => $this->_stop_one(), |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'options' => array( |
55 | 55 | 'tipLocation' => 'right', |
56 | 56 | 'tipAdjustmentY' => -55, |
57 | - 'tipAdjustmentX' => 5 |
|
57 | + 'tipAdjustmentX' => 5 |
|
58 | 58 | ) |
59 | 59 | ), |
60 | 60 | 40 => array( |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | 'options' => array( |
64 | 64 | 'tipLocation' => 'top', |
65 | 65 | 'tipAdjustmentY' => -75, |
66 | - 'tipAdjustmentX' => 250 |
|
66 | + 'tipAdjustmentX' => 250 |
|
67 | 67 | ) |
68 | 68 | ) |
69 | 69 | ); |
@@ -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 | /** |
@@ -71,21 +71,21 @@ discard block |
||
71 | 71 | |
72 | 72 | |
73 | 73 | protected function _stop_one() { |
74 | - $content = '<h3>' . __('Add New Venue Category', 'event_espresso') . '</h3>'; |
|
75 | - $content .= '<p>' . __('This tour of the Add New Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
74 | + $content = '<h3>'.__('Add New Venue Category', 'event_espresso').'</h3>'; |
|
75 | + $content .= '<p>'.__('This tour of the Add New Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
76 | 76 | return $content; |
77 | 77 | } |
78 | 78 | |
79 | 79 | protected function _category_name_stop() { |
80 | - return '<p>' . __('Enter a name for your new venue category.', 'event_espresso') . '</p>'; |
|
80 | + return '<p>'.__('Enter a name for your new venue category.', 'event_espresso').'</p>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | protected function _category_id_stop() { |
84 | - return '<p>' . __('Enter a unique ID for your new venue category.', 'event_espresso') . '</p>'; |
|
84 | + return '<p>'.__('Enter a unique ID for your new venue category.', 'event_espresso').'</p>'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | protected function _category_editor_stop() { |
88 | - return '<p>' . __('The rich text editor can be used to add information about your venue category. Images and links can also be added along with your text.', 'event_espresso') . '</p>'; |
|
88 | + return '<p>'.__('The rich text editor can be used to add information about your venue category. Images and links can also be added along with your text.', 'event_espresso').'</p>'; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | } |
92 | 92 | \ 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 | /** |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | |
110 | 110 | |
111 | 111 | protected function _stop_one() { |
112 | - $content = '<h3>' . __('Add Venue', 'event_espresso') . '</h3>'; |
|
113 | - $content .= '<p>' . __('This tour of the Venue Editor page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
112 | + $content = '<h3>'.__('Add Venue', 'event_espresso').'</h3>'; |
|
113 | + $content .= '<p>'.__('This tour of the Venue Editor page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
114 | 114 | return $content; |
115 | 115 | } |
116 | 116 | |
@@ -119,35 +119,35 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | protected function _venue_editor_stop() { |
122 | - return '<p>' . __('The rich text editor can be used to add information about your venue. Images and links can also be added along with your text.', 'event_espresso') . '</p>'; |
|
122 | + return '<p>'.__('The rich text editor can be used to add information about your venue. Images and links can also be added along with your text.', 'event_espresso').'</p>'; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | protected function _venue_tags_stop() { |
126 | - return '<p>' . __('Quickly add tags to your venue.', 'event_espresso') . '</p>'; |
|
126 | + return '<p>'.__('Quickly add tags to your venue.', 'event_espresso').'</p>'; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | protected function _venue_categories_stop() { |
130 | - return '<p>' . __('Venues can also be categorized if you wish.', 'event_espresso') . '</p>'; |
|
130 | + return '<p>'.__('Venues can also be categorized if you wish.', 'event_espresso').'</p>'; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | protected function _venue_physical_location_stop() { |
134 | - return '<p>' . __('Add a physical address for your venue.', 'event_espresso') . '</p>'; |
|
134 | + return '<p>'.__('Add a physical address for your venue.', 'event_espresso').'</p>'; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | protected function _venue_gmap_stop() { |
138 | - return '<p>' . __('Enable or disable a Google Map for your venue.', 'event_espresso') . '</p>'; |
|
138 | + return '<p>'.__('Enable or disable a Google Map for your venue.', 'event_espresso').'</p>'; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | protected function _venue_virtual_location_stop() { |
142 | - return '<p>' . __('Setup a virtual location for your venue.', 'event_espresso') . '</p>'; |
|
142 | + return '<p>'.__('Setup a virtual location for your venue.', 'event_espresso').'</p>'; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | protected function _stop_featured_image() { |
146 | - return '<p>' . __('Set a feature image for your venue here.', 'event_espresso') . '</p>'; |
|
146 | + return '<p>'.__('Set a feature image for your venue here.', 'event_espresso').'</p>'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | protected function _stop_publish_box() { |
150 | - return '<p>' . __('Easily control the status of your venue. The main options are Published, Pending Review, and Draft.', 'event_espresso') . '</p>'; |
|
150 | + return '<p>'.__('Easily control the status of your venue. The main options are Published, Pending Review, and Draft.', 'event_espresso').'</p>'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | } |
154 | 154 | \ 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 | /** |
@@ -107,36 +107,36 @@ discard block |
||
107 | 107 | |
108 | 108 | |
109 | 109 | protected function _start() { |
110 | - $content = '<h3>' . __('Venue Overview', 'event_espresso') . '</h3>'; |
|
111 | - $content .= '<p>' . __('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
110 | + $content = '<h3>'.__('Venue Overview', 'event_espresso').'</h3>'; |
|
111 | + $content .= '<p>'.__('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
112 | 112 | return $content; |
113 | 113 | } |
114 | 114 | |
115 | 115 | protected function _id_stop() { |
116 | - return '<p>' . __('View the venue category ID. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
116 | + return '<p>'.__('View the venue category ID. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | protected function _name_stop() { |
120 | - return '<p>' . __('View the name of each venue category. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
120 | + return '<p>'.__('View the name of each venue category. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | protected function _shortcode_stop() { |
124 | - return '<p>' . __('View the shortcode for a venue category. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso') . '</p>'; |
|
124 | + return '<p>'.__('View the shortcode for a venue category. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso').'</p>'; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | protected function _count_stop() { |
128 | - return '<p>' . __('View the number of venues that are associated with a category.', 'event_espresso') . '</p>'; |
|
128 | + return '<p>'.__('View the number of venues that are associated with a category.', 'event_espresso').'</p>'; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | protected function _bulk_actions_stop() { |
132 | - return '<p>' . __('Perform bulk actions to multiple venue categories.', 'event_espresso') . '</p>'; |
|
132 | + return '<p>'.__('Perform bulk actions to multiple venue categories.', 'event_espresso').'</p>'; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | protected function _search_stop() { |
136 | - return '<p>' . __('Search through venues categories. The following sources will be searched: Venue Category ID, Venue Category Name, Venue Shortcode, and Venue Count.', 'event_espresso') . '</p>'; |
|
136 | + return '<p>'.__('Search through venues categories. The following sources will be searched: Venue Category ID, Venue Category Name, Venue Shortcode, and Venue Count.', 'event_espresso').'</p>'; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | protected function _new_category_stop() { |
140 | - return '<p>' . __('Click here to add a new venue category.', 'event_espresso') . '</p>'; |
|
140 | + return '<p>'.__('Click here to add a new venue category.', 'event_espresso').'</p>'; |
|
141 | 141 | } |
142 | 142 | } |
143 | 143 | \ 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 | /** |
@@ -71,21 +71,21 @@ discard block |
||
71 | 71 | |
72 | 72 | |
73 | 73 | protected function _stop_one() { |
74 | - $content = '<h3>' . __('Edit Venue Category', 'event_espresso') . '</h3>'; |
|
75 | - $content .= '<p>' . __('This tour of the Edit Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
74 | + $content = '<h3>'.__('Edit Venue Category', 'event_espresso').'</h3>'; |
|
75 | + $content .= '<p>'.__('This tour of the Edit Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
76 | 76 | return $content; |
77 | 77 | } |
78 | 78 | |
79 | 79 | protected function _category_name_stop() { |
80 | - return '<p>' . __('Edit the name for your venue category.', 'event_espresso') . '</p>'; |
|
80 | + return '<p>'.__('Edit the name for your venue category.', 'event_espresso').'</p>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | protected function _category_id_stop() { |
84 | - return '<p>' . __('View the unique ID for your category (cannot be changed).', 'event_espresso') . '</p>'; |
|
84 | + return '<p>'.__('View the unique ID for your category (cannot be changed).', 'event_espresso').'</p>'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | protected function _category_editor_stop() { |
88 | - return '<p>' . __('The rich text editor can be used to edit information about your venue category. Images and links can also be added or removed along with your text.', 'event_espresso') . '</p>'; |
|
88 | + return '<p>'.__('The rich text editor can be used to edit information about your venue category. Images and links can also be added or removed along with your text.', 'event_espresso').'</p>'; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | } |
92 | 92 | \ No newline at end of file |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'options' => array( |
56 | 56 | 'tipLocation' => 'right', |
57 | 57 | 'tipAdjustmentY' => -55, |
58 | - 'tipAdjustmentX' => 5 |
|
58 | + 'tipAdjustmentX' => 5 |
|
59 | 59 | ) |
60 | 60 | ), |
61 | 61 | 40 => array( |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | 'options' => array( |
65 | 65 | 'tipLocation' => 'top', |
66 | 66 | 'tipAdjustmentY' => -75, |
67 | - 'tipAdjustmentX' => 250 |
|
67 | + 'tipAdjustmentX' => 250 |
|
68 | 68 | ) |
69 | 69 | ) |
70 | 70 | ); |
@@ -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 |