@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | -add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' ); |
|
2 | +add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); |
|
3 | 3 | |
4 | -$values = EEH_Form_Fields::prep_answer_options( array( |
|
5 | - array( 'id' => 1, 'text' => __('Yes', 'event_espresso')), |
|
6 | - array( 'id' => 0, 'text' => __('No', 'event_espresso')) |
|
4 | +$values = EEH_Form_Fields::prep_answer_options(array( |
|
5 | + array('id' => 1, 'text' => __('Yes', 'event_espresso')), |
|
6 | + array('id' => 0, 'text' => __('No', 'event_espresso')) |
|
7 | 7 | )); |
8 | 8 | |
9 | -$description = EEH_Form_Fields::prep_answer_options( array( |
|
10 | - array( 'id' => 0, 'text' => __('none', 'event_espresso')), |
|
11 | - array( 'id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')), |
|
12 | - array( 'id' => 2, 'text' => __('full description', 'event_espresso')) |
|
9 | +$description = EEH_Form_Fields::prep_answer_options(array( |
|
10 | + array('id' => 0, 'text' => __('none', 'event_espresso')), |
|
11 | + array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')), |
|
12 | + array('id' => 2, 'text' => __('full description', 'event_espresso')) |
|
13 | 13 | )); |
14 | 14 | |
15 | 15 | ?> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <tr> |
28 | 28 | <th> |
29 | 29 | <label for="event_listings_url"> |
30 | - <?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info');?> |
|
30 | + <?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info'); ?> |
|
31 | 31 | </label> |
32 | 32 | </th> |
33 | 33 | <td> |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | </label> |
43 | 43 | </th> |
44 | 44 | <td> |
45 | - <p><?php echo site_url() . '/ ' . EEH_Form_Fields::text( 'not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular' ); ?></p> |
|
45 | + <p><?php echo site_url().'/ '.EEH_Form_Fields::text('not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular'); ?></p> |
|
46 | 46 | <p class="description"><?php _e('This allows you to configure what slug is used for the url of all event pages.', 'event_espresso'); ?></p> |
47 | - <?php if ( has_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite' ) ) : ?> |
|
47 | + <?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?> |
|
48 | 48 | <p class="important-notice"> |
49 | 49 | <?php |
50 | 50 | sprintf( |
51 | - __( 'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected. Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso' ), |
|
51 | + __('Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected. Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso'), |
|
52 | 52 | '<code>', |
53 | 53 | '</code>' |
54 | 54 | ); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | </label> |
66 | 66 | </th> |
67 | 67 | <td> |
68 | - <?php echo EEH_Form_Fields::select( 'display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner' );?> |
|
68 | + <?php echo EEH_Form_Fields::select('display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner'); ?> |
|
69 | 69 | <p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.', 'event_espresso'); ?></p> |
70 | 70 | </td> |
71 | 71 | </tr> |
@@ -73,55 +73,55 @@ discard block |
||
73 | 73 | <tr> |
74 | 74 | <th> |
75 | 75 | <label for="EED_Events_Archive_display_description"> |
76 | - <?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info');?> |
|
76 | + <?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info'); ?> |
|
77 | 77 | </label> |
78 | 78 | </th> |
79 | 79 | <td> |
80 | - <?php echo EEH_Form_Fields::select( 'description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description' );?> |
|
80 | + <?php echo EEH_Form_Fields::select('description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description'); ?> |
|
81 | 81 | </td> |
82 | 82 | </tr> |
83 | 83 | |
84 | 84 | <tr> |
85 | 85 | <th> |
86 | 86 | <label for="EED_Events_Archive_display_ticket_selector"> |
87 | - <?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info');?> |
|
87 | + <?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info'); ?> |
|
88 | 88 | </label> |
89 | 89 | </th> |
90 | 90 | <td> |
91 | - <?php echo EEH_Form_Fields::select( 'ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector' );?> |
|
91 | + <?php echo EEH_Form_Fields::select('ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector'); ?> |
|
92 | 92 | </td> |
93 | 93 | </tr> |
94 | 94 | |
95 | 95 | <tr> |
96 | 96 | <th> |
97 | 97 | <label for="EED_Events_Archive_display_datetimes"> |
98 | - <?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info');?> |
|
98 | + <?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info'); ?> |
|
99 | 99 | </label> |
100 | 100 | </th> |
101 | 101 | <td> |
102 | - <?php echo EEH_Form_Fields::select( 'venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes' );?> |
|
102 | + <?php echo EEH_Form_Fields::select('venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes'); ?> |
|
103 | 103 | </td> |
104 | 104 | </tr> |
105 | 105 | |
106 | 106 | <tr> |
107 | 107 | <th> |
108 | 108 | <label for="EED_Events_Archive_display_venue"> |
109 | - <?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info');?> |
|
109 | + <?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info'); ?> |
|
110 | 110 | </label> |
111 | 111 | </th> |
112 | 112 | <td> |
113 | - <?php echo EEH_Form_Fields::select( 'display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue' );?> |
|
113 | + <?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue'); ?> |
|
114 | 114 | </td> |
115 | 115 | </tr> |
116 | 116 | |
117 | 117 | <tr> |
118 | 118 | <th> |
119 | 119 | <label for="EED_Events_Archive_display_expired_events"> |
120 | - <?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info');?> |
|
120 | + <?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info'); ?> |
|
121 | 121 | </label> |
122 | 122 | </th> |
123 | 123 | <td> |
124 | - <?php echo EEH_Form_Fields::select( 'expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events' );?> |
|
124 | + <?php echo EEH_Form_Fields::select('expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events'); ?> |
|
125 | 125 | </td> |
126 | 126 | </tr> |
127 | 127 | |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | </label> |
133 | 133 | </th> |
134 | 134 | <td> |
135 | - <?php echo EEH_Form_Fields::select( 'use_sortable_display_order', $use_sortable_display_order, $values, 'EED_Events_Archive_use_sortable_display_order', 'EED_Events_Archive_use_sortable_display_order' );?> |
|
135 | + <?php echo EEH_Form_Fields::select('use_sortable_display_order', $use_sortable_display_order, $values, 'EED_Events_Archive_use_sortable_display_order', 'EED_Events_Archive_use_sortable_display_order'); ?> |
|
136 | 136 | <p class="description "> |
137 | 137 | <?php |
138 | 138 | echo sprintf( |
139 | - __( '%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Archive listings, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso' ), |
|
139 | + __('%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Archive listings, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso'), |
|
140 | 140 | '<span class="important-notice">', |
141 | 141 | '</span>', |
142 | 142 | '<br />' |
@@ -148,14 +148,14 @@ discard block |
||
148 | 148 | |
149 | 149 | <tr> |
150 | 150 | <th> |
151 | - <?php _e( 'Display Order', 'event_espresso' ); ?><?php //echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?> |
|
151 | + <?php _e('Display Order', 'event_espresso'); ?><?php //echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?> |
|
152 | 152 | </th> |
153 | 153 | <td> |
154 | 154 | |
155 | - <?php wp_nonce_field( 'espresso_update_event_archive_order', 'espresso_update_event_archive_order_nonce', false ); ?> |
|
155 | + <?php wp_nonce_field('espresso_update_event_archive_order', 'espresso_update_event_archive_order_nonce', false); ?> |
|
156 | 156 | <?php echo $event_archive_display_order; ?> |
157 | 157 | |
158 | - <p class="description"><?php _e( 'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', 'event_espresso' ); ?></p> |
|
158 | + <p class="description"><?php _e('Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', 'event_espresso'); ?></p> |
|
159 | 159 | |
160 | 160 | </td> |
161 | 161 | </tr> |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | <tr> |
164 | 164 | <th> |
165 | 165 | <label for="EED_Events_Archive_reset_event_list_settings"> |
166 | - <?php _e( 'Reset Event List Settings', 'event_espresso' ); ?> |
|
166 | + <?php _e('Reset Event List Settings', 'event_espresso'); ?> |
|
167 | 167 | </label> |
168 | 168 | </th> |
169 | 169 | <td> |
170 | - <?php echo EEH_Form_Fields::select( 'reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings' ); ?> |
|
170 | + <?php echo EEH_Form_Fields::select('reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings'); ?> |
|
171 | 171 | </td> |
172 | 172 | </tr> |
173 | 173 |
@@ -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 | /** |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | * |
26 | 26 | * ------------------------------------------------------------------------ |
27 | 27 | */ |
28 | -class EE_Form_Section_HTML_From_Template extends EE_Form_Section_HTML{ |
|
29 | - public function __construct($template_file,$args = array(), $options_array = array()) { |
|
30 | - $html = EEH_Template::locate_template( $template_file, $args ); |
|
28 | +class EE_Form_Section_HTML_From_Template extends EE_Form_Section_HTML { |
|
29 | + public function __construct($template_file, $args = array(), $options_array = array()) { |
|
30 | + $html = EEH_Template::locate_template($template_file, $args); |
|
31 | 31 | |
32 | 32 | // echo " filepath:$template_file html $html"; |
33 | 33 | parent::__construct($html, $options_array); |
@@ -1,7 +1,8 @@ |
||
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 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if (!defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
|
2 | 2 | /** |
3 | 3 | * |
4 | 4 | * EE_Billing_Info_Form |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @author Mike Nelson |
12 | 12 | * |
13 | 13 | */ |
14 | -class EE_Billing_Info_Form extends EE_Form_Section_Proper{ |
|
14 | +class EE_Billing_Info_Form extends EE_Form_Section_Proper { |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * The payment method this billing form is for |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | * @param EE_Payment_Method $payment_method |
27 | 27 | * @param array $options_array @see EE_Form_Section_Proper::__construct() |
28 | 28 | */ |
29 | - public function __construct( EE_Payment_Method $payment_method, $options_array= array()){ |
|
29 | + public function __construct(EE_Payment_Method $payment_method, $options_array = array()) { |
|
30 | 30 | $this->_pm_instance = $payment_method; |
31 | 31 | $this->_layout_strategy = new EE_Div_Per_Section_Layout(); |
32 | - parent::__construct( $options_array ); |
|
32 | + parent::__construct($options_array); |
|
33 | 33 | |
34 | 34 | } |
35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @param EE_Payment_Method $payment_method |
41 | 41 | * @return void |
42 | 42 | */ |
43 | - public function set_payment_method( EE_Payment_Method $payment_method ){ |
|
43 | + public function set_payment_method(EE_Payment_Method $payment_method) { |
|
44 | 44 | $this->_pm_instance = $payment_method; |
45 | 45 | } |
46 | 46 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * Returns the instance of the payment method this billing form is for |
51 | 51 | * @return EE_Payment_Method |
52 | 52 | */ |
53 | - public function payment_method(){ |
|
53 | + public function payment_method() { |
|
54 | 54 | return $this->_pm_instance; |
55 | 55 | } |
56 | 56 | |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | * payment_fields_autofilled_notice_html |
61 | 61 | * @return string |
62 | 62 | */ |
63 | - public function payment_fields_autofilled_notice_html(){ |
|
63 | + public function payment_fields_autofilled_notice_html() { |
|
64 | 64 | return new EE_Form_Section_HTML( |
65 | 65 | EEH_HTML::p( |
66 | - apply_filters( 'FHEE__EE_Billing_Info_Form__payment_fields_autofilled_notice_html_text', __( 'Payment fields have been autofilled because you are in debug mode', 'event_espresso' )), |
|
66 | + apply_filters('FHEE__EE_Billing_Info_Form__payment_fields_autofilled_notice_html_text', __('Payment fields have been autofilled because you are in debug mode', 'event_espresso')), |
|
67 | 67 | '', |
68 | 68 | 'important-notice' |
69 | 69 | ) |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | /** |
76 | 76 | * @return string |
77 | 77 | */ |
78 | - public function html_class(){ |
|
79 | - return ! empty( $this->_html_class ) ? $this->_html_class . ' ee-billing-form' : 'ee-billing-form'; |
|
78 | + public function html_class() { |
|
79 | + return ! empty($this->_html_class) ? $this->_html_class.' ee-billing-form' : 'ee-billing-form'; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
4 | - exit( 'No direct script access allowed' ); |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
4 | + exit('No direct script access allowed'); |
|
5 | 5 | } |
6 | 6 | |
7 | 7 | |
@@ -35,24 +35,24 @@ discard block |
||
35 | 35 | $add_wrapper = true |
36 | 36 | ) { |
37 | 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' ); |
|
38 | + if ( ! $obj_with_address instanceof EEI_Address) { |
|
39 | + $msg = __('The address could not be formatted.', 'event_espresso'); |
|
40 | 40 | $dev_msg = __( |
41 | 41 | 'The Address Formatter requires passed objects to implement the EEI_Address interface.', |
42 | 42 | 'event_espresso' |
43 | 43 | ); |
44 | - EE_Error::add_error( $msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
44 | + EE_Error::add_error($msg.'||'.$dev_msg, __FILE__, __FUNCTION__, __LINE__); |
|
45 | 45 | return null; |
46 | 46 | } |
47 | 47 | // obtain an address formatter |
48 | - $formatter = EEH_Address::_get_formatter( $type ); |
|
48 | + $formatter = EEH_Address::_get_formatter($type); |
|
49 | 49 | // apply schema.org formatting ? |
50 | 50 | $use_schema = ! is_admin() ? $use_schema : false; |
51 | 51 | $formatted_address = $use_schema |
52 | - ? EEH_Address::_schema_formatting( $formatter, $obj_with_address ) |
|
53 | - : EEH_Address::_regular_formatting( $formatter, $obj_with_address, $add_wrapper ); |
|
52 | + ? EEH_Address::_schema_formatting($formatter, $obj_with_address) |
|
53 | + : EEH_Address::_regular_formatting($formatter, $obj_with_address, $add_wrapper); |
|
54 | 54 | $formatted_address = $add_wrapper && ! $use_schema |
55 | - ? '<div class="espresso-address-dv">' . $formatted_address . '</div>' |
|
55 | + ? '<div class="espresso-address-dv">'.$formatted_address.'</div>' |
|
56 | 56 | : $formatted_address; |
57 | 57 | // return the formatted address |
58 | 58 | return $formatted_address; |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | * @param string $type how the address is formatted. for example: 'multiline' or 'inline' |
68 | 68 | * @return EEI_Address_Formatter |
69 | 69 | */ |
70 | - private static function _get_formatter( $type ) { |
|
71 | - switch ( $type ) { |
|
70 | + private static function _get_formatter($type) { |
|
71 | + switch ($type) { |
|
72 | 72 | case 'multiline' : |
73 | 73 | return new EventEspresso\core\services\address\formatters\MultiLineAddressFormatter(); |
74 | 74 | case 'inline' : |
@@ -121,15 +121,15 @@ discard block |
||
121 | 121 | * @param object EEI_Address $obj_with_address |
122 | 122 | * @return string |
123 | 123 | */ |
124 | - private static function _schema_formatting( EEI_Address_Formatter $formatter, EEI_Address $obj_with_address ) { |
|
124 | + private static function _schema_formatting(EEI_Address_Formatter $formatter, EEI_Address $obj_with_address) { |
|
125 | 125 | $formatted_address = '<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">'; |
126 | 126 | $formatted_address .= $formatter->format( |
127 | - EEH_Schema::streetAddress( $obj_with_address ), |
|
128 | - EEH_Schema::postOfficeBoxNumber( $obj_with_address ), |
|
129 | - EEH_Schema::addressLocality( $obj_with_address ), |
|
130 | - EEH_Schema::addressRegion( $obj_with_address ), |
|
131 | - EEH_Schema::postalCode( $obj_with_address ), |
|
132 | - EEH_Schema::addressCountry( $obj_with_address ), |
|
127 | + EEH_Schema::streetAddress($obj_with_address), |
|
128 | + EEH_Schema::postOfficeBoxNumber($obj_with_address), |
|
129 | + EEH_Schema::addressLocality($obj_with_address), |
|
130 | + EEH_Schema::addressRegion($obj_with_address), |
|
131 | + EEH_Schema::postalCode($obj_with_address), |
|
132 | + EEH_Schema::addressCountry($obj_with_address), |
|
133 | 133 | $obj_with_address->country_ID() |
134 | 134 | ); |
135 | 135 | $formatted_address .= '</div>'; |
@@ -39,15 +39,15 @@ discard block |
||
39 | 39 | * @param array $arguments |
40 | 40 | * @return \EE_CPT_Venue_Strategy |
41 | 41 | */ |
42 | - public function __construct( $arguments = array() ) { |
|
43 | - $this->CPT = isset( $arguments['CPT'] ) ? $arguments['CPT'] : NULL; |
|
44 | - $WP_Query = isset( $arguments['WP_Query'] ) ? $arguments['WP_Query'] : NULL; |
|
45 | - if ( $WP_Query instanceof WP_Query && ! $WP_Query->is_tag ) { |
|
46 | - $WP_Query->is_espresso_venue_single = is_singular() && isset( $WP_Query->query->post_type ) && $WP_Query->query->post_type == 'espresso_venues' ? TRUE : FALSE; |
|
42 | + public function __construct($arguments = array()) { |
|
43 | + $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : NULL; |
|
44 | + $WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : NULL; |
|
45 | + if ($WP_Query instanceof WP_Query && ! $WP_Query->is_tag) { |
|
46 | + $WP_Query->is_espresso_venue_single = is_singular() && isset($WP_Query->query->post_type) && $WP_Query->query->post_type == 'espresso_venues' ? TRUE : FALSE; |
|
47 | 47 | $WP_Query->is_espresso_venue_archive = is_post_type_archive('espresso_venues') ? TRUE : FALSE; |
48 | - $WP_Query->is_espresso_venue_taxonomy = is_tax( 'espresso_venue_categories' ) ? TRUE : FALSE; |
|
48 | + $WP_Query->is_espresso_venue_taxonomy = is_tax('espresso_venue_categories') ? TRUE : FALSE; |
|
49 | 49 | } |
50 | - add_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 ); |
|
50 | + add_filter('the_posts', array($this, 'the_posts'), 1, 2); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | * @param WP_Query $wp_query |
61 | 61 | * @return void |
62 | 62 | */ |
63 | - public function the_posts( $posts, WP_Query $wp_query) { |
|
63 | + public function the_posts($posts, WP_Query $wp_query) { |
|
64 | 64 | // automagically load the EEH_Venue_View helper so that it's functions are available |
65 | - if ( isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) && EE_Registry::instance()->CFG->map_settings->use_google_maps ) { |
|
65 | + if (isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) && EE_Registry::instance()->CFG->map_settings->use_google_maps) { |
|
66 | 66 | EEH_Maps::espresso_google_map_js(); |
67 | 67 | } |
68 | - remove_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 ); |
|
68 | + remove_filter('the_posts', array($this, 'the_posts'), 1, 2); |
|
69 | 69 | return $posts; |
70 | 70 | } |
71 | 71 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Event Espresso |
4 | 6 | * |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\services\address\formatters; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param string $CNT_ISO |
29 | 29 | * @return string |
30 | 30 | */ |
31 | - public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) { |
|
31 | + public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) { |
|
32 | 32 | return null; |
33 | 33 | } |
34 | 34 |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\services\address\formatters; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | // swap address part placeholders for the real text |
42 | 42 | $formatted_address = str_replace( |
43 | 43 | // find |
44 | - array( '{address}', '{address2}', '{city}', '{state}', '{zip}', '{country}' ), |
|
44 | + array('{address}', '{address2}', '{city}', '{state}', '{zip}', '{country}'), |
|
45 | 45 | // replace |
46 | - array( $address, $address2, $city, $state, $zip, $country ), |
|
46 | + array($address, $address2, $city, $state, $zip, $country), |
|
47 | 47 | // string |
48 | 48 | $formatted_address |
49 | 49 | ); |
50 | 50 | // remove placeholder from start and end, reduce repeating placeholders to singles, then replace with HTML line breaks |
51 | - return preg_replace( '/%+/', $sub, trim( $formatted_address, '%' ) ); |
|
51 | + return preg_replace('/%+/', $sub, trim($formatted_address, '%')); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\services\address\formatters; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @param string $CNT_ISO |
30 | 30 | * @return string |
31 | 31 | */ |
32 | - public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) { |
|
32 | + public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) { |
|
33 | 33 | $address_formats = apply_filters( |
34 | 34 | 'FHEE__EE_MultiLine_Address_Formatter__address_formats', |
35 | 35 | array( |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | ) |
41 | 41 | ); |
42 | 42 | // if the incoming country has a set format, use that, else use the default |
43 | - $formatted_address = isset( $address_formats[ $CNT_ISO ] ) ? $address_formats[ $CNT_ISO ] |
|
43 | + $formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO] |
|
44 | 44 | : $address_formats['ZZ']; |
45 | 45 | return $this->parse_formatted_address( |
46 | 46 | $address, |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\services\address\formatters; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param string $CNT_ISO |
29 | 29 | * @return string |
30 | 30 | */ |
31 | - public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) { |
|
31 | + public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) { |
|
32 | 32 | $address_formats = apply_filters( |
33 | 33 | 'FHEE__EE_Inline_Address_Formatter__address_formats', |
34 | 34 | array( |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | ) |
40 | 40 | ); |
41 | 41 | // if the incoming country has a set format, use that, else use the default |
42 | - $formatted_address = isset( $address_formats[ $CNT_ISO ] ) ? $address_formats[ $CNT_ISO ] |
|
42 | + $formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO] |
|
43 | 43 | : $address_formats['ZZZ']; |
44 | 44 | return $this->parse_formatted_address( |
45 | 45 | $address, |