@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | class Support_Admin_Page extends EE_Admin_Page { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $routing = TRUE ) { |
|
34 | - parent::__construct( $routing ); |
|
33 | + public function __construct($routing = TRUE) { |
|
34 | + parent::__construct($routing); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | 'nav' => array( |
82 | 82 | 'label' => __('Shortcodes', 'event_espresso'), |
83 | 83 | 'order' => 30), |
84 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_shortcodes_boxes' ) ), |
|
84 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_shortcodes_boxes')), |
|
85 | 85 | 'require_nonce' => FALSE |
86 | 86 | ), |
87 | 87 | 'contact_support' => array( |
88 | 88 | 'nav' => array( |
89 | 89 | 'label' => __('Support', 'event_espresso'), |
90 | 90 | 'order' => 40), |
91 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_support_boxes' ) ), |
|
91 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_support_boxes')), |
|
92 | 92 | 'require_nonce' => FALSE |
93 | 93 | ), |
94 | 94 | ); |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | |
110 | 110 | |
111 | 111 | protected function _installation() { |
112 | - $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php'; |
|
113 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, '', TRUE); |
|
112 | + $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_installation.template.php'; |
|
113 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, '', TRUE); |
|
114 | 114 | $this->display_admin_page_with_sidebar(); |
115 | 115 | } |
116 | 116 | |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | 'other_resources' => __('Other Resources', 'event_espresso') |
136 | 136 | ); |
137 | 137 | |
138 | - foreach ( $boxes as $box => $label ) { |
|
139 | - $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php'; |
|
138 | + foreach ($boxes as $box => $label) { |
|
139 | + $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php'; |
|
140 | 140 | $callback_args = array('template_path' => $template_path); |
141 | - add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args); |
|
141 | + add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args); |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
@@ -163,10 +163,10 @@ discard block |
||
163 | 163 | /*'shortcodes_attendee_listings' => __('Attendee Listings', 'event_espresso'),*/ |
164 | 164 | ); |
165 | 165 | |
166 | - foreach ( $boxes as $box => $label ) { |
|
167 | - $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php'; |
|
166 | + foreach ($boxes as $box => $label) { |
|
167 | + $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php'; |
|
168 | 168 | $callback_args = array('template_path' => $template_path); |
169 | - add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args); |
|
169 | + add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args); |
|
170 | 170 | } |
171 | 171 | } |
172 | 172 | |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | 'important_information' => __('Important Information', 'event_espresso') |
186 | 186 | ); |
187 | 187 | |
188 | - foreach ( $boxes as $box => $label ) { |
|
189 | - $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php'; |
|
188 | + foreach ($boxes as $box => $label) { |
|
189 | + $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php'; |
|
190 | 190 | $callback_args = array('template_path' => $template_path, 'template_args' => $this->_template_args); |
191 | - add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], $metabox["args"]["template_args"], TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args); |
|
191 | + add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], $metabox["args"]["template_args"], TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args); |
|
192 | 192 | } |
193 | 193 | } |
194 | 194 |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -32,16 +32,16 @@ discard block |
||
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | - public function __construct( $routing = TRUE ) { |
|
36 | - parent::__construct( $routing ); |
|
37 | - define( 'GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/' ); |
|
35 | + public function __construct($routing = TRUE) { |
|
36 | + parent::__construct($routing); |
|
37 | + define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'general_settings/templates/'); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
41 | 41 | |
42 | 42 | protected function _extend_page_config() { |
43 | 43 | |
44 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings'; |
|
44 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'general_settings'; |
|
45 | 45 | |
46 | 46 | $new_page_routes = array( |
47 | 47 | 'update_template_settings' => array( |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | ) |
61 | 61 | ); |
62 | 62 | |
63 | - $this->_page_routes = array_merge( $this->_page_routes, $new_page_routes ); |
|
63 | + $this->_page_routes = array_merge($this->_page_routes, $new_page_routes); |
|
64 | 64 | |
65 | 65 | $new_page_config = array( |
66 | 66 | //template settings |
@@ -69,14 +69,14 @@ discard block |
||
69 | 69 | 'label' => __('Templates'), |
70 | 70 | 'order' => 30 |
71 | 71 | ), |
72 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_publish_post_box' ) ), |
|
72 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
73 | 73 | 'help_tabs' => array( |
74 | 74 | 'general_settings_templates_help_tab' => array( |
75 | 75 | 'title' => __('Templates', 'event_espresso'), |
76 | 76 | 'filename' => 'general_settings_templates' |
77 | 77 | ) |
78 | 78 | ), |
79 | - 'help_tour' => array( 'Templates_Help_Tour' ), |
|
79 | + 'help_tour' => array('Templates_Help_Tour'), |
|
80 | 80 | 'require_nonce' => FALSE |
81 | 81 | ), |
82 | 82 | 'google_map_settings' => array( |
@@ -84,32 +84,32 @@ discard block |
||
84 | 84 | 'label' => __('Google Maps'), |
85 | 85 | 'order' => 40 |
86 | 86 | ), |
87 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_publish_post_box' ) ), |
|
87 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
88 | 88 | 'help_tabs' => array( |
89 | 89 | 'general_settings_google_maps_help_tab' => array( |
90 | 90 | 'title' => __('Google Maps', 'event_espresso'), |
91 | 91 | 'filename' => 'general_settings_google_maps' |
92 | 92 | ) |
93 | 93 | ), |
94 | - 'help_tour' => array( 'Google_Maps_Help_Tour' ), |
|
94 | + 'help_tour' => array('Google_Maps_Help_Tour'), |
|
95 | 95 | 'require_nonce' => FALSE |
96 | 96 | ) |
97 | 97 | ); |
98 | - $this->_page_config = array_merge( $this->_page_config, $new_page_config ); |
|
98 | + $this->_page_config = array_merge($this->_page_config, $new_page_config); |
|
99 | 99 | |
100 | 100 | //filters and action hooks here |
101 | - add_action('AHEE__admin_option_settings__template__before', array( $this, 'use_venue_and_staff_manager_settings'), 10 ); |
|
102 | - add_action( 'AHEE__admin_option_settings__template__before', array( $this, 'debug_logging_options' ), 9 ); |
|
103 | - add_filter( 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', array( $this, 'update_debug_logging_options' ), 10, 1 ); |
|
101 | + add_action('AHEE__admin_option_settings__template__before', array($this, 'use_venue_and_staff_manager_settings'), 10); |
|
102 | + add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9); |
|
103 | + add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin', array($this, 'update_debug_logging_options'), 10, 1); |
|
104 | 104 | |
105 | 105 | } |
106 | 106 | |
107 | 107 | |
108 | 108 | |
109 | - public function use_venue_and_staff_manager_settings( $template_args ) { |
|
110 | - $_args['use_personnel_manager_select'] = EEH_Form_Fields::select_input('use_personnel_manager', $template_args['values'], $template_args['use_personnel_manager'] ); |
|
111 | - $template = GEN_SET_CAF_TEMPLATE_PATH . 'use_venue_and_staff_manager_settings.template.php'; |
|
112 | - EEH_Template::display_template( $template, $_args ); |
|
109 | + public function use_venue_and_staff_manager_settings($template_args) { |
|
110 | + $_args['use_personnel_manager_select'] = EEH_Form_Fields::select_input('use_personnel_manager', $template_args['values'], $template_args['use_personnel_manager']); |
|
111 | + $template = GEN_SET_CAF_TEMPLATE_PATH.'use_venue_and_staff_manager_settings.template.php'; |
|
112 | + EEH_Template::display_template($template, $_args); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | |
@@ -126,31 +126,31 @@ discard block |
||
126 | 126 | * @param bool $show_errors |
127 | 127 | * @return bool |
128 | 128 | */ |
129 | - protected function _request_filesystem_credentials( $show_errors = TRUE ) { |
|
130 | - |
|
131 | - require_once( ABSPATH . 'wp-admin/includes/file.php' ); |
|
132 | - $url = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'request_filesystem_credentials' ), $this->_admin_base_url ); |
|
133 | - $credentials = request_filesystem_credentials( $url ); |
|
134 | - if ( $credentials == FALSE ) { |
|
135 | - if ( $show_errors ) { |
|
136 | - EE_Error::get_notices( FALSE ); |
|
129 | + protected function _request_filesystem_credentials($show_errors = TRUE) { |
|
130 | + |
|
131 | + require_once(ABSPATH.'wp-admin/includes/file.php'); |
|
132 | + $url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'request_filesystem_credentials'), $this->_admin_base_url); |
|
133 | + $credentials = request_filesystem_credentials($url); |
|
134 | + if ($credentials == FALSE) { |
|
135 | + if ($show_errors) { |
|
136 | + EE_Error::get_notices(FALSE); |
|
137 | 137 | EE_Error::reset_notices(); |
138 | - EE_Error::add_error( __('Connection settings are missing or incorrect. Please verify that the connection settings below are correct.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
139 | - add_filter( 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false' ); |
|
138 | + EE_Error::add_error(__('Connection settings are missing or incorrect. Please verify that the connection settings below are correct.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
139 | + add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false'); |
|
140 | 140 | } |
141 | 141 | return FALSE; |
142 | 142 | } |
143 | 143 | // now we have some credentials, try to get the wp_filesystem running |
144 | - $WP_Filesystem = WP_Filesystem( $credentials ); |
|
145 | - if ( ! $WP_Filesystem ) { |
|
146 | - if ( $show_errors ) { |
|
147 | - EE_Error::get_notices( FALSE ); |
|
144 | + $WP_Filesystem = WP_Filesystem($credentials); |
|
145 | + if ( ! $WP_Filesystem) { |
|
146 | + if ($show_errors) { |
|
147 | + EE_Error::get_notices(FALSE); |
|
148 | 148 | EE_Error::reset_notices(); |
149 | - EE_Error::add_error( __('There was an error connecting to the server. Please verify that the connection settings below are correct.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
150 | - add_filter( 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false' ); |
|
149 | + EE_Error::add_error(__('There was an error connecting to the server. Please verify that the connection settings below are correct.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
150 | + add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false'); |
|
151 | 151 | } |
152 | 152 | // our credentials were no good, ask the user for them again |
153 | - request_filesystem_credentials( $url ); |
|
153 | + request_filesystem_credentials($url); |
|
154 | 154 | return FALSE; |
155 | 155 | } |
156 | 156 | EE_Registry::instance()->CFG->admin->use_full_logging = TRUE; |
@@ -165,21 +165,21 @@ discard block |
||
165 | 165 | * @param array $template_args |
166 | 166 | * @return void |
167 | 167 | */ |
168 | - public function debug_logging_options( $template_args = array() ) { |
|
169 | - if ( EE_Registry::instance()->CFG->admin->use_full_logging === NULL ) { |
|
170 | - $this->_request_filesystem_credentials( FALSE ); |
|
168 | + public function debug_logging_options($template_args = array()) { |
|
169 | + if (EE_Registry::instance()->CFG->admin->use_full_logging === NULL) { |
|
170 | + $this->_request_filesystem_credentials(FALSE); |
|
171 | 171 | $template_args['use_full_logging'] = TRUE; |
172 | - EE_Error::get_notices( FALSE ); |
|
172 | + EE_Error::get_notices(FALSE); |
|
173 | 173 | EE_Error::reset_notices(); |
174 | - EE_Error::add_attention( __('In order to enable Full Logging, the connection settings below are required.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
174 | + EE_Error::add_attention(__('In order to enable Full Logging, the connection settings below are required.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
175 | 175 | echo EE_Error::get_notices(); |
176 | 176 | } else { |
177 | 177 | $template_args['use_full_logging'] = EE_Registry::instance()->CFG->admin->use_full_logging; |
178 | 178 | } |
179 | - $template_args['use_remote_logging'] = isset( EE_Registry::instance()->CFG->admin->use_remote_logging ) ? absint( EE_Registry::instance()->CFG->admin->use_remote_logging ) : FALSE; |
|
180 | - $template_args['remote_logging_url'] = isset( EE_Registry::instance()->CFG->admin->remote_logging_url ) && ! empty( EE_Registry::instance()->CFG->admin->remote_logging_url ) ? stripslashes( EE_Registry::instance()->CFG->admin->remote_logging_url ) : ''; |
|
181 | - $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php'; |
|
182 | - EEH_Template::display_template( $template, $template_args ); |
|
179 | + $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(EE_Registry::instance()->CFG->admin->use_remote_logging) : FALSE; |
|
180 | + $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : ''; |
|
181 | + $template = GEN_SET_CAF_TEMPLATE_PATH.'debug_log_settings.template.php'; |
|
182 | + EEH_Template::display_template($template, $template_args); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | |
@@ -190,24 +190,24 @@ discard block |
||
190 | 190 | * @param array $admin_options |
191 | 191 | * @return array |
192 | 192 | */ |
193 | - public function update_debug_logging_options( $admin_options = array() ) { |
|
194 | - $use_full_logging = isset( $this->_req_data['use_full_logging'] ) ? (bool)absint( $this->_req_data['use_full_logging'] ) : $admin_options->use_full_logging; |
|
193 | + public function update_debug_logging_options($admin_options = array()) { |
|
194 | + $use_full_logging = isset($this->_req_data['use_full_logging']) ? (bool) absint($this->_req_data['use_full_logging']) : $admin_options->use_full_logging; |
|
195 | 195 | // trying to enable full logging for the first time? |
196 | - if ( $use_full_logging && $use_full_logging !== $admin_options->use_full_logging ) { |
|
196 | + if ($use_full_logging && $use_full_logging !== $admin_options->use_full_logging) { |
|
197 | 197 | $admin_options->use_full_logging = $this->_request_filesystem_credentials() ? TRUE : NULL; |
198 | - if ( $admin_options->use_full_logging === NULL ) { |
|
199 | - add_filter( 'FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false' ); |
|
198 | + if ($admin_options->use_full_logging === NULL) { |
|
199 | + add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false'); |
|
200 | 200 | } |
201 | 201 | } else { |
202 | 202 | $admin_options->use_full_logging = $use_full_logging; |
203 | 203 | } |
204 | - if ( $use_full_logging === FALSE ) { |
|
205 | - EE_Error::get_notices( FALSE ); |
|
204 | + if ($use_full_logging === FALSE) { |
|
205 | + EE_Error::get_notices(FALSE); |
|
206 | 206 | EE_Error::reset_notices(); |
207 | 207 | } |
208 | 208 | |
209 | - $admin_options->use_remote_logging = isset( $this->_req_data['use_remote_logging'] ) ? absint( $this->_req_data['use_remote_logging'] ) : $admin_options->use_remote_logging; |
|
210 | - $admin_options->remote_logging_url = isset( $this->_req_data['remote_logging_url'] ) ? esc_url_raw( $this->_req_data['remote_logging_url'] ) : $admin_options->remote_logging_url; |
|
209 | + $admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint($this->_req_data['use_remote_logging']) : $admin_options->use_remote_logging; |
|
210 | + $admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw($this->_req_data['remote_logging_url']) : $admin_options->remote_logging_url; |
|
211 | 211 | return $admin_options; |
212 | 212 | } |
213 | 213 | |
@@ -218,10 +218,10 @@ discard block |
||
218 | 218 | |
219 | 219 | protected function _template_settings() { |
220 | 220 | $this->_template_args['values'] = $this->_yes_no_values; |
221 | - $this->_template_args = apply_filters( 'FHEE__General_Settings_Admin_Page__template_settings__template_args', $this->_template_args ); |
|
222 | - $this->_set_add_edit_form_tags( 'update_template_settings' ); |
|
223 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
224 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( GEN_SET_CAF_TEMPLATE_PATH . 'template_settings.template.php', $this->_template_args, TRUE ); |
|
221 | + $this->_template_args = apply_filters('FHEE__General_Settings_Admin_Page__template_settings__template_args', $this->_template_args); |
|
222 | + $this->_set_add_edit_form_tags('update_template_settings'); |
|
223 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
224 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_CAF_TEMPLATE_PATH.'template_settings.template.php', $this->_template_args, TRUE); |
|
225 | 225 | $this->display_admin_page_with_sidebar(); |
226 | 226 | } |
227 | 227 | |
@@ -229,11 +229,11 @@ discard block |
||
229 | 229 | |
230 | 230 | protected function _update_template_settings() { |
231 | 231 | |
232 | - EE_Registry::instance()->CFG->template_settings = apply_filters( 'FHEE__General_Settings_Admin_Page__update_template_settings__data', EE_Registry::instance()->CFG->template_settings, $this->_req_data ); |
|
232 | + EE_Registry::instance()->CFG->template_settings = apply_filters('FHEE__General_Settings_Admin_Page__update_template_settings__data', EE_Registry::instance()->CFG->template_settings, $this->_req_data); |
|
233 | 233 | |
234 | 234 | $what = 'Template Settings'; |
235 | - $success = $this->_update_espresso_configuration( $what, EE_Registry::instance()->CFG->template_settings, __FILE__, __FUNCTION__, __LINE__ ); |
|
236 | - $this->_redirect_after_action( $success, $what, 'updated', array( 'action' => 'template_settings' ) ); |
|
235 | + $success = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG->template_settings, __FILE__, __FUNCTION__, __LINE__); |
|
236 | + $this->_redirect_after_action($success, $what, 'updated', array('action' => 'template_settings')); |
|
237 | 237 | |
238 | 238 | } |
239 | 239 | |
@@ -249,115 +249,115 @@ discard block |
||
249 | 249 | $default_map_settings = new stdClass(); |
250 | 250 | $default_map_settings->use_google_maps = TRUE; |
251 | 251 | // for event details pages (reg page) |
252 | - $default_map_settings->event_details_map_width = 585; // ee_map_width_single |
|
253 | - $default_map_settings->event_details_map_height = 362; // ee_map_height_single |
|
254 | - $default_map_settings->event_details_map_zoom = 14; // ee_map_zoom_single |
|
255 | - $default_map_settings->event_details_display_nav = TRUE; // ee_map_nav_display_single |
|
256 | - $default_map_settings->event_details_nav_size = FALSE; // ee_map_nav_size_single |
|
257 | - $default_map_settings->event_details_control_type = 'default'; // ee_map_type_control_single |
|
258 | - $default_map_settings->event_details_map_align = 'center'; // ee_map_align_single |
|
252 | + $default_map_settings->event_details_map_width = 585; // ee_map_width_single |
|
253 | + $default_map_settings->event_details_map_height = 362; // ee_map_height_single |
|
254 | + $default_map_settings->event_details_map_zoom = 14; // ee_map_zoom_single |
|
255 | + $default_map_settings->event_details_display_nav = TRUE; // ee_map_nav_display_single |
|
256 | + $default_map_settings->event_details_nav_size = FALSE; // ee_map_nav_size_single |
|
257 | + $default_map_settings->event_details_control_type = 'default'; // ee_map_type_control_single |
|
258 | + $default_map_settings->event_details_map_align = 'center'; // ee_map_align_single |
|
259 | 259 | // for event list pages |
260 | - $default_map_settings->event_list_map_width = 300; // ee_map_width |
|
261 | - $default_map_settings->event_list_map_height = 185; // ee_map_height |
|
262 | - $default_map_settings->event_list_map_zoom = 12; // ee_map_zoom |
|
263 | - $default_map_settings->event_list_display_nav = FALSE; // ee_map_nav_display |
|
264 | - $default_map_settings->event_list_nav_size = TRUE; // ee_map_nav_size |
|
265 | - $default_map_settings->event_list_control_type = 'dropdown'; // ee_map_type_control |
|
266 | - $default_map_settings->event_list_map_align = 'center'; // ee_map_align |
|
260 | + $default_map_settings->event_list_map_width = 300; // ee_map_width |
|
261 | + $default_map_settings->event_list_map_height = 185; // ee_map_height |
|
262 | + $default_map_settings->event_list_map_zoom = 12; // ee_map_zoom |
|
263 | + $default_map_settings->event_list_display_nav = FALSE; // ee_map_nav_display |
|
264 | + $default_map_settings->event_list_nav_size = TRUE; // ee_map_nav_size |
|
265 | + $default_map_settings->event_list_control_type = 'dropdown'; // ee_map_type_control |
|
266 | + $default_map_settings->event_list_map_align = 'center'; // ee_map_align |
|
267 | 267 | |
268 | 268 | $this->_template_args['map_settings'] = |
269 | - isset( EE_Registry::instance()->CFG->map_settings ) && ! empty( EE_Registry::instance()->CFG->map_settings ) |
|
270 | - ? (object)array_merge( (array)$default_map_settings, (array)EE_Registry::instance()->CFG->map_settings ) |
|
269 | + isset(EE_Registry::instance()->CFG->map_settings) && ! empty(EE_Registry::instance()->CFG->map_settings) |
|
270 | + ? (object) array_merge((array) $default_map_settings, (array) EE_Registry::instance()->CFG->map_settings) |
|
271 | 271 | : $default_map_settings; |
272 | 272 | |
273 | - $this->_set_add_edit_form_tags( 'update_google_map_settings' ); |
|
274 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
275 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( GEN_SET_CAF_TEMPLATE_PATH . 'google_map.template.php', $this->_template_args, TRUE ); |
|
273 | + $this->_set_add_edit_form_tags('update_google_map_settings'); |
|
274 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
275 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_CAF_TEMPLATE_PATH.'google_map.template.php', $this->_template_args, TRUE); |
|
276 | 276 | $this->display_admin_page_with_sidebar(); |
277 | 277 | } |
278 | 278 | |
279 | 279 | protected function _update_google_map_settings() { |
280 | 280 | |
281 | 281 | EE_Registry::instance()->CFG->map_settings->use_google_maps = |
282 | - isset( $this->_req_data['use_google_maps'] ) |
|
283 | - ? absint( $this->_req_data['use_google_maps'] ) |
|
282 | + isset($this->_req_data['use_google_maps']) |
|
283 | + ? absint($this->_req_data['use_google_maps']) |
|
284 | 284 | : EE_Registry::instance()->CFG->map_settings->use_google_maps; |
285 | 285 | |
286 | 286 | EE_Registry::instance()->CFG->map_settings->event_details_map_width = |
287 | - isset( $this->_req_data['event_details_map_width'] ) |
|
288 | - ? absint( $this->_req_data['event_details_map_width'] ) |
|
287 | + isset($this->_req_data['event_details_map_width']) |
|
288 | + ? absint($this->_req_data['event_details_map_width']) |
|
289 | 289 | : EE_Registry::instance()->CFG->map_settings->event_details_map_width; |
290 | 290 | |
291 | 291 | EE_Registry::instance()->CFG->map_settings->event_details_map_height = |
292 | - isset( $this->_req_data['event_details_map_height'] ) |
|
293 | - ? absint( $this->_req_data['event_details_map_height'] ) |
|
292 | + isset($this->_req_data['event_details_map_height']) |
|
293 | + ? absint($this->_req_data['event_details_map_height']) |
|
294 | 294 | : EE_Registry::instance()->CFG->map_settings->event_details_map_height; |
295 | 295 | |
296 | 296 | EE_Registry::instance()->CFG->map_settings->event_details_map_zoom = |
297 | - isset( $this->_req_data['event_details_map_zoom'] ) |
|
298 | - ? absint( $this->_req_data['event_details_map_zoom'] ) |
|
297 | + isset($this->_req_data['event_details_map_zoom']) |
|
298 | + ? absint($this->_req_data['event_details_map_zoom']) |
|
299 | 299 | : EE_Registry::instance()->CFG->map_settings->event_details_map_zoom; |
300 | 300 | |
301 | 301 | EE_Registry::instance()->CFG->map_settings->event_details_display_nav = |
302 | - isset( $this->_req_data['event_details_display_nav'] ) |
|
303 | - ? absint( $this->_req_data['event_details_display_nav'] ) |
|
302 | + isset($this->_req_data['event_details_display_nav']) |
|
303 | + ? absint($this->_req_data['event_details_display_nav']) |
|
304 | 304 | : EE_Registry::instance()->CFG->map_settings->event_details_display_nav; |
305 | 305 | |
306 | 306 | EE_Registry::instance()->CFG->map_settings->event_details_nav_size = |
307 | - isset( $this->_req_data['event_details_nav_size'] ) |
|
308 | - ? absint( $this->_req_data['event_details_nav_size'] ) |
|
307 | + isset($this->_req_data['event_details_nav_size']) |
|
308 | + ? absint($this->_req_data['event_details_nav_size']) |
|
309 | 309 | : EE_Registry::instance()->CFG->map_settings->event_details_nav_size; |
310 | 310 | |
311 | 311 | EE_Registry::instance()->CFG->map_settings->event_details_control_type = |
312 | - isset( $this->_req_data['event_details_control_type'] ) |
|
313 | - ? sanitize_text_field( $this->_req_data['event_details_control_type'] ) |
|
312 | + isset($this->_req_data['event_details_control_type']) |
|
313 | + ? sanitize_text_field($this->_req_data['event_details_control_type']) |
|
314 | 314 | : EE_Registry::instance()->CFG->map_settings->event_details_control_type; |
315 | 315 | |
316 | 316 | EE_Registry::instance()->CFG->map_settings->event_details_map_align = |
317 | - isset( $this->_req_data['event_details_map_align'] ) |
|
318 | - ? sanitize_text_field( $this->_req_data['event_details_map_align'] ) |
|
317 | + isset($this->_req_data['event_details_map_align']) |
|
318 | + ? sanitize_text_field($this->_req_data['event_details_map_align']) |
|
319 | 319 | : EE_Registry::instance()->CFG->map_settings->event_details_map_align; |
320 | 320 | |
321 | 321 | EE_Registry::instance()->CFG->map_settings->event_list_map_width = |
322 | - isset( $this->_req_data['event_list_map_width'] ) |
|
323 | - ? absint( $this->_req_data['event_list_map_width'] ) |
|
322 | + isset($this->_req_data['event_list_map_width']) |
|
323 | + ? absint($this->_req_data['event_list_map_width']) |
|
324 | 324 | : EE_Registry::instance()->CFG->map_settings->event_list_map_width; |
325 | 325 | |
326 | 326 | EE_Registry::instance()->CFG->map_settings->event_list_map_height = |
327 | - isset( $this->_req_data['event_list_map_height'] ) |
|
328 | - ? absint( $this->_req_data['event_list_map_height'] ) |
|
327 | + isset($this->_req_data['event_list_map_height']) |
|
328 | + ? absint($this->_req_data['event_list_map_height']) |
|
329 | 329 | : EE_Registry::instance()->CFG->map_settings->event_list_map_height; |
330 | 330 | |
331 | 331 | EE_Registry::instance()->CFG->map_settings->event_list_map_zoom = |
332 | - isset( $this->_req_data['event_list_map_zoom'] ) |
|
333 | - ? absint( $this->_req_data['event_list_map_zoom'] ) |
|
332 | + isset($this->_req_data['event_list_map_zoom']) |
|
333 | + ? absint($this->_req_data['event_list_map_zoom']) |
|
334 | 334 | : EE_Registry::instance()->CFG->map_settings->event_list_map_zoom; |
335 | 335 | |
336 | 336 | EE_Registry::instance()->CFG->map_settings->event_list_display_nav = |
337 | - isset( $this->_req_data['event_list_display_nav'] ) |
|
338 | - ? absint( $this->_req_data['event_list_display_nav'] ) |
|
337 | + isset($this->_req_data['event_list_display_nav']) |
|
338 | + ? absint($this->_req_data['event_list_display_nav']) |
|
339 | 339 | : EE_Registry::instance()->CFG->map_settings->event_list_display_nav; |
340 | 340 | |
341 | 341 | EE_Registry::instance()->CFG->map_settings->event_list_nav_size = |
342 | - isset( $this->_req_data['event_list_nav_size'] ) |
|
343 | - ? absint( $this->_req_data['event_list_nav_size'] ) |
|
342 | + isset($this->_req_data['event_list_nav_size']) |
|
343 | + ? absint($this->_req_data['event_list_nav_size']) |
|
344 | 344 | : EE_Registry::instance()->CFG->map_settings->event_list_nav_size; |
345 | 345 | |
346 | 346 | EE_Registry::instance()->CFG->map_settings->event_list_control_type = |
347 | - isset( $this->_req_data['event_list_control_type'] ) |
|
348 | - ? sanitize_text_field( $this->_req_data['event_list_control_type'] ) |
|
347 | + isset($this->_req_data['event_list_control_type']) |
|
348 | + ? sanitize_text_field($this->_req_data['event_list_control_type']) |
|
349 | 349 | : EE_Registry::instance()->CFG->map_settings->event_list_control_type; |
350 | 350 | |
351 | 351 | EE_Registry::instance()->CFG->map_settings->event_list_map_align = |
352 | - isset( $this->_req_data['event_list_map_align'] ) |
|
353 | - ? sanitize_text_field( $this->_req_data['event_list_map_align'] ) |
|
352 | + isset($this->_req_data['event_list_map_align']) |
|
353 | + ? sanitize_text_field($this->_req_data['event_list_map_align']) |
|
354 | 354 | : EE_Registry::instance()->CFG->map_settings->event_list_map_align; |
355 | 355 | |
356 | - 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 ); |
|
356 | + 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); |
|
357 | 357 | |
358 | 358 | $what = 'Google Map Settings'; |
359 | - $success = $this->_update_espresso_configuration( $what, EE_Registry::instance()->CFG->map_settings, __FILE__, __FUNCTION__, __LINE__ ); |
|
360 | - $this->_redirect_after_action( $success, $what, 'updated', array( 'action' => 'google_map_settings' ) ); |
|
359 | + $success = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG->map_settings, __FILE__, __FUNCTION__, __LINE__); |
|
360 | + $this->_redirect_after_action($success, $what, 'updated', array('action' => 'google_map_settings')); |
|
361 | 361 | |
362 | 362 | } |
363 | 363 |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -125,46 +125,46 @@ discard block |
||
125 | 125 | |
126 | 126 | |
127 | 127 | protected function _start() { |
128 | - $content = '<h3>' . __('Questions Overview', 'event_espresso') . '</h3>'; |
|
129 | - $content .= '<p>' . __('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
128 | + $content = '<h3>'.__('Questions Overview', 'event_espresso').'</h3>'; |
|
129 | + $content .= '<p>'.__('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
130 | 130 | |
131 | 131 | return $content; |
132 | 132 | } |
133 | 133 | |
134 | 134 | protected function _question_id_stop() { |
135 | - return '<p>' . __('View the question ID. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>'; |
|
135 | + return '<p>'.__('View the question ID. Can be sorted in ascending or descending order.', 'event_espresso').'</p>'; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | protected function _display_text_stop() { |
139 | - return '<p>' . __('View available questions. You can reorder your questions by dragging and dropping them.', 'event_espresso') . '</p>'; |
|
139 | + return '<p>'.__('View available questions. You can reorder your questions by dragging and dropping them.', 'event_espresso').'</p>'; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | protected function _admin_label_stop() { |
143 | - return '<p>' . __('View the admin label for your questions.', 'event_espresso') . '</p>'; |
|
143 | + return '<p>'.__('View the admin label for your questions.', 'event_espresso').'</p>'; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | protected function _type_stop() { |
147 | - return '<p>' . __('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.', 'event_espresso') . '</p>'; |
|
147 | + return '<p>'.__('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.', 'event_espresso').'</p>'; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | protected function _values_stop() { |
151 | - return '<p>' . __('View stored values for checkboxes, radio buttons, and select boxes.', 'event_espresso') . '</p>'; |
|
151 | + return '<p>'.__('View stored values for checkboxes, radio buttons, and select boxes.', 'event_espresso').'</p>'; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | protected function _required_stop() { |
155 | - return '<p>' . __('View if a question is required.', 'event_espresso') . '</p>'; |
|
155 | + return '<p>'.__('View if a question is required.', 'event_espresso').'</p>'; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | protected function _bulk_actions_stop() { |
159 | - return '<p>' . __('Perform bulk actions to multiple questions.', 'event_espresso') . '</p>'; |
|
159 | + return '<p>'.__('Perform bulk actions to multiple questions.', 'event_espresso').'</p>'; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | protected function _search_stop() { |
163 | - return '<p>' . __('Search through questions. The following sources will be searched: Name of Question (display text).', 'event_espresso') . '</p>'; |
|
163 | + return '<p>'.__('Search through questions. The following sources will be searched: Name of Question (display text).', 'event_espresso').'</p>'; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | protected function _add_new_question_stop() { |
167 | - return '<p>' . __('Click here to add a new question.', 'event_espresso') . '</p>'; |
|
167 | + return '<p>'.__('Click here to add a new question.', 'event_espresso').'</p>'; |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | } |
171 | 171 | \ No newline at end of file |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -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(); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | public function column_cb($item) { |
102 | 102 | |
103 | - return $item->count_related('Event') > 0 ? '<span class="ee-lock-icon"></span>' : sprintf( '<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID()); |
|
103 | + return $item->count_related('Event') > 0 ? '<span class="ee-lock-icon"></span>' : sprintf('<input type="checkbox" name="venue_id[]" value="%s" />', $item->ID()); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | |
@@ -122,23 +122,23 @@ 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 ); |
|
126 | - $delete_link = EE_Admin_Page::add_query_args_and_nonce( $delete_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 | + $delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EE_VENUES_ADMIN_URL); |
|
127 | 127 | |
128 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_venue', 'espresso_venues_edit', $item->ID() ) ) { |
|
128 | + if (EE_Registry::instance()->CAP->current_user_can('ee_edit_venue', 'espresso_venues_edit', $item->ID())) { |
|
129 | 129 | $actions = array( |
130 | - 'edit' => '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Venue', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>' |
|
130 | + 'edit' => '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Venue', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>' |
|
131 | 131 | ); |
132 | 132 | } |
133 | 133 | |
134 | - if ( $item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_venue', 'espresso_venues_delete_venue', $item->ID() ) ) { |
|
135 | - $actions['delete'] = '<a href="' . $delete_link . '" title="' . esc_attr__('Delete Venue', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>'; |
|
134 | + if ($item->count_related('Event') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_venue', 'espresso_venues_delete_venue', $item->ID())) { |
|
135 | + $actions['delete'] = '<a href="'.$delete_link.'" title="'.esc_attr__('Delete Venue', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>'; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | $statuses = EEM_Venue::instance()->get_status_array(); |
139 | 139 | |
140 | - $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(); |
|
141 | - $content .= $item->status() == 'draft' ? ' - <span class="post-state">' . $statuses['draft'] . '</span>' : ''; |
|
140 | + $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(); |
|
141 | + $content .= $item->status() == 'draft' ? ' - <span class="post-state">'.$statuses['draft'].'</span>' : ''; |
|
142 | 142 | $content .= $this->row_actions($actions); |
143 | 143 | return $content; |
144 | 144 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | |
166 | 166 | public function column_shortcode($item) { |
167 | - $content = '[ESPRESSO_VENUE id=' . $item->ID() . ']'; |
|
167 | + $content = '[ESPRESSO_VENUE id='.$item->ID().']'; |
|
168 | 168 | return $content; |
169 | 169 | } |
170 | 170 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
48 | 48 | 'required' => array('[EVENT_LIST]') |
49 | 49 | ); |
50 | - $this->_MSGR->set_validator_config( $new_config ); |
|
50 | + $this->_MSGR->set_validator_config($new_config); |
|
51 | 51 | |
52 | - if ( $this->_context != 'admin' ) |
|
52 | + if ($this->_context != 'admin') |
|
53 | 53 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
54 | 54 | |
55 | 55 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * Event Espresso |
@@ -49,8 +50,9 @@ discard block |
||
49 | 50 | ); |
50 | 51 | $this->_MSGR->set_validator_config( $new_config ); |
51 | 52 | |
52 | - if ( $this->_context != 'admin' ) |
|
53 | - $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
53 | + if ( $this->_context != 'admin' ) { |
|
54 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
56 | 58 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
48 | 48 | 'required' => array('[EVENT_LIST]') |
49 | 49 | ); |
50 | - $this->_MSGR->set_validator_config( $new_config ); |
|
50 | + $this->_MSGR->set_validator_config($new_config); |
|
51 | 51 | |
52 | - if ( $this->_context != 'admin' ) |
|
52 | + if ($this->_context != 'admin') |
|
53 | 53 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
54 | 54 | |
55 | 55 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * Event Espresso |
@@ -49,8 +50,9 @@ discard block |
||
49 | 50 | ); |
50 | 51 | $this->_MSGR->set_validator_config( $new_config ); |
51 | 52 | |
52 | - if ( $this->_context != 'admin' ) |
|
53 | - $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
53 | + if ( $this->_context != 'admin' ) { |
|
54 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
56 | 58 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Payment_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'payment'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | |
46 | 46 | //modify just event_list |
47 | 47 | $new_config['event_list'] = array( |
48 | - 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
48 | + 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list') |
|
49 | 49 | ); |
50 | 50 | $new_config['ticket_list'] = array( |
51 | 51 | 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction') |
52 | 52 | ); |
53 | 53 | $new_config['content'] = array( |
54 | - 'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
54 | + 'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger') |
|
55 | 55 | ); |
56 | - $this->_MSGR->set_validator_config( $new_config ); |
|
56 | + $this->_MSGR->set_validator_config($new_config); |
|
57 | 57 | |
58 | - if ( $this->_context != 'admin' ) |
|
58 | + if ($this->_context != 'admin') |
|
59 | 59 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
60 | 60 | |
61 | 61 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * Event Espresso |
@@ -49,8 +50,9 @@ discard block |
||
49 | 50 | ); |
50 | 51 | $this->_MSGR->set_validator_config( $new_config ); |
51 | 52 | |
52 | - if ( $this->_context != 'admin' ) |
|
53 | - $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
53 | + if ( $this->_context != 'admin' ) { |
|
54 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
56 | 58 | } |