@@ 151-155 (lines=5) @@ | ||
148 | // grab module name |
|
149 | $module_name = $module_method[0]; |
|
150 | // verify that a class method was registered properly |
|
151 | if ( ! isset( $module_method[1] )) { |
|
152 | $msg = sprintf( __( 'A class method for the %s route has not been properly registered.', 'event_espresso' ), $current_route ); |
|
153 | EE_Error::add_error( $msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
154 | return FALSE; |
|
155 | } |
|
156 | // grab method |
|
157 | $method = $module_method[1]; |
|
158 | // verify that class exists |
@@ 38-46 (lines=9) @@ | ||
35 | $add_wrapper = true |
|
36 | ) { |
|
37 | // check that incoming object implements the EEI_Address interface |
|
38 | if ( ! $obj_with_address instanceof EEI_Address ) { |
|
39 | $msg = __( 'The address could not be formatted.', 'event_espresso' ); |
|
40 | $dev_msg = __( |
|
41 | 'The Address Formatter requires passed objects to implement the EEI_Address interface.', |
|
42 | 'event_espresso' |
|
43 | ); |
|
44 | EE_Error::add_error( $msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
45 | return null; |
|
46 | } |
|
47 | // obtain an address formatter |
|
48 | $formatter = EEH_Address::_get_formatter( $type ); |
|
49 | // apply schema.org formatting ? |
@@ 104-109 (lines=6) @@ | ||
101 | $event->EE_Event = \EEM_Event::instance()->instantiate_class_from_post_object( $event ); |
|
102 | $this->event = $event->EE_Event; |
|
103 | } |
|
104 | } else { |
|
105 | $user_msg = __( 'No Event object or an invalid Event object was supplied.', 'event_espresso' ); |
|
106 | $dev_msg = $user_msg . __( |
|
107 | 'In order to generate a ticket selector, please ensure you are passing either an EE_Event object or a WP_Post object of the post type "espresso_event" to the EE_Ticket_Selector class constructor.', |
|
108 | 'event_espresso' |
|
109 | ); |
|
110 | \EE_Error::add_error( $user_msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
111 | return false; |
|
112 | } |
@@ 147-154 (lines=8) @@ | ||
144 | // load the shortcode class file |
|
145 | require_once($shortcode_path . $shortcode_class . $shortcode_ext); |
|
146 | // verify that class exists |
|
147 | if ( ! class_exists($shortcode_class)) { |
|
148 | $msg = sprintf( |
|
149 | esc_html__('The requested %s shortcode class does not exist.', 'event_espresso'), |
|
150 | $shortcode_class |
|
151 | ); |
|
152 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
153 | return false; |
|
154 | } |
|
155 | $shortcode = strtoupper($shortcode); |
|
156 | // add to array of registered shortcodes |
|
157 | $this->registry->shortcodes->{$shortcode} = $shortcode_path . $shortcode_class . $shortcode_ext; |
@@ 1271-1275 (lines=5) @@ | ||
1268 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1269 | return false; |
|
1270 | } |
|
1271 | if (empty($route)) { |
|
1272 | $msg = sprintf(__('No route has been supplied.', 'event_espresso'), $route); |
|
1273 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1274 | return false; |
|
1275 | } |
|
1276 | if ( ! method_exists('EED_' . $module, $method_name)) { |
|
1277 | $msg = sprintf( |
|
1278 | __('A valid class method for the %s route has not been supplied.', 'event_espresso'), |
|
@@ 1276-1280 (lines=5) @@ | ||
1273 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1274 | return false; |
|
1275 | } |
|
1276 | if ( ! method_exists('EED_' . $module, $method_name)) { |
|
1277 | $msg = sprintf( |
|
1278 | __('A valid class method for the %s route has not been supplied.', 'event_espresso'), |
|
1279 | $route |
|
1280 | ); |
|
1281 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1282 | return false; |
|
1283 | } |
|
@@ 1345-1349 (lines=5) @@ | ||
1342 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1343 | return false; |
|
1344 | } |
|
1345 | if (empty($forward)) { |
|
1346 | $msg = sprintf(__('No forwarding route has been supplied.', 'event_espresso'), $route); |
|
1347 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1348 | return false; |
|
1349 | } |
|
1350 | if (is_array($forward)) { |
|
1351 | if ( ! isset($forward[1])) { |
|
1352 | $msg = sprintf( |
|
@@ 1351-1355 (lines=5) @@ | ||
1348 | return false; |
|
1349 | } |
|
1350 | if (is_array($forward)) { |
|
1351 | if ( ! isset($forward[1])) { |
|
1352 | $msg = sprintf( |
|
1353 | __('A class method for the %s forwarding route has not been supplied.', 'event_espresso'), |
|
1354 | $route |
|
1355 | ); |
|
1356 | EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__); |
|
1357 | return false; |
|
1358 | } |