@@ -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 | * |
@@ -32,20 +32,20 @@ |
||
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | - /** |
|
35 | + /** |
|
36 | 36 | * set_hooks - for hooking into EE Core, other modules, etc |
37 | 37 | * |
38 | 38 | * @access public |
39 | 39 | * @return void |
40 | 40 | */ |
41 | 41 | public static function set_hooks() { |
42 | - $custom_post_types = EE_Register_CPTs::get_CPTs(); |
|
43 | - EE_Config::register_route( |
|
44 | - $custom_post_types['espresso_venues']['singular_slug'], |
|
45 | - 'Venue_Single', |
|
46 | - 'run' |
|
47 | - ); |
|
48 | - } |
|
42 | + $custom_post_types = EE_Register_CPTs::get_CPTs(); |
|
43 | + EE_Config::register_route( |
|
44 | + $custom_post_types['espresso_venues']['singular_slug'], |
|
45 | + 'Venue_Single', |
|
46 | + 'run' |
|
47 | + ); |
|
48 | + } |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @return EED_Venue_Single |
28 | 28 | */ |
29 | 29 | public static function instance() { |
30 | - return parent::get_instance( __CLASS__ ); |
|
30 | + return parent::get_instance(__CLASS__); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | * @access public |
65 | 65 | * @param \WP $WP |
66 | 66 | */ |
67 | - public function run( $WP ) { |
|
67 | + public function run($WP) { |
|
68 | 68 | // check what template is loaded |
69 | - add_filter( 'template_include', array( $this, 'template_include' ), 999, 1 ); |
|
70 | - add_action('wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 10 ); |
|
69 | + add_filter('template_include', array($this, 'template_include'), 999, 1); |
|
70 | + add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 10); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | |
@@ -79,15 +79,15 @@ discard block |
||
79 | 79 | * @param string $template |
80 | 80 | * @return string |
81 | 81 | */ |
82 | - public function template_include( $template ) { |
|
82 | + public function template_include($template) { |
|
83 | 83 | // not a custom template? |
84 | - if ( EE_Registry::instance()->load_core( 'Front_Controller', array(), false, true )->get_selected_template() != 'single-espresso_venues.php' ) { |
|
84 | + if (EE_Registry::instance()->load_core('Front_Controller', array(), false, true)->get_selected_template() != 'single-espresso_venues.php') { |
|
85 | 85 | EEH_Template::load_espresso_theme_functions(); |
86 | 86 | // then add extra event data via hooks |
87 | - add_filter( 'the_title', array( $this, 'the_title' ), 100, 1 ); |
|
88 | - add_filter( 'the_content', array( $this, 'venue_details' ), 100 ); |
|
87 | + add_filter('the_title', array($this, 'the_title'), 100, 1); |
|
88 | + add_filter('the_content', array($this, 'venue_details'), 100); |
|
89 | 89 | // don't display entry meta because the existing theme will take car of that |
90 | - add_filter( 'FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false' ); |
|
90 | + add_filter('FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false'); |
|
91 | 91 | } |
92 | 92 | return $template; |
93 | 93 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @param string $title |
102 | 102 | * @return string |
103 | 103 | */ |
104 | - public function the_title( $title = '' ) { |
|
104 | + public function the_title($title = '') { |
|
105 | 105 | return $title; |
106 | 106 | } |
107 | 107 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * @param string $content |
114 | 114 | * @return string |
115 | 115 | */ |
116 | - public function venue_details( $content ) { |
|
116 | + public function venue_details($content) { |
|
117 | 117 | global $post; |
118 | 118 | if ( |
119 | 119 | $post->post_type == 'espresso_venues' |
@@ -123,16 +123,16 @@ discard block |
||
123 | 123 | // it uses the_content() for displaying the $post->post_content |
124 | 124 | // so in order to load a template that uses the_content() from within a callback being used to filter the_content(), |
125 | 125 | // we need to first remove this callback from being applied to the_content() (otherwise it will recurse and blow up the interweb) |
126 | - remove_filter( 'the_content', array( $this, 'venue_details' ), 100 ); |
|
126 | + remove_filter('the_content', array($this, 'venue_details'), 100); |
|
127 | 127 | // add filters we want |
128 | - add_filter( 'the_content', array( $this, 'venue_location' ), 110 ); |
|
128 | + add_filter('the_content', array($this, 'venue_location'), 110); |
|
129 | 129 | // now load our template |
130 | - $template = EEH_Template::locate_template( 'content-espresso_venues-details.php' ); |
|
130 | + $template = EEH_Template::locate_template('content-espresso_venues-details.php'); |
|
131 | 131 | // remove other filters we added so they won't get applied to the next post |
132 | - remove_filter( 'the_content', array( $this, 'venue_location' ), 110 ); |
|
132 | + remove_filter('the_content', array($this, 'venue_location'), 110); |
|
133 | 133 | } |
134 | 134 | // we're not returning the $content directly because the template we are loading uses the_content (or the_excerpt) |
135 | - return ! empty( $template ) ? $template : $content; |
|
135 | + return ! empty($template) ? $template : $content; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | * @param string $content |
145 | 145 | * @return string |
146 | 146 | */ |
147 | - public function venue_location( $content ) { |
|
148 | - return $content . EEH_Template::locate_template( 'content-espresso_venues-location.php' ); |
|
147 | + public function venue_location($content) { |
|
148 | + return $content.EEH_Template::locate_template('content-espresso_venues-location.php'); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | |
@@ -158,16 +158,16 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function wp_enqueue_scripts() { |
160 | 160 | // get some style |
161 | - if ( apply_filters( 'FHEE_enable_default_espresso_css', TRUE ) && is_single() ) { |
|
161 | + if (apply_filters('FHEE_enable_default_espresso_css', TRUE) && is_single()) { |
|
162 | 162 | // first check theme folder |
163 | - if ( is_readable( get_stylesheet_directory() . $this->theme . DS . 'style.css' )) { |
|
164 | - wp_register_style( $this->theme, get_stylesheet_directory_uri() . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) ); |
|
165 | - } else if ( is_readable( EE_TEMPLATES . $this->theme . DS . 'style.css' )) { |
|
166 | - wp_register_style( $this->theme, EE_TEMPLATES_URL . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) ); |
|
163 | + if (is_readable(get_stylesheet_directory().$this->theme.DS.'style.css')) { |
|
164 | + wp_register_style($this->theme, get_stylesheet_directory_uri().$this->theme.DS.'style.css', array('dashicons', 'espresso_default')); |
|
165 | + } else if (is_readable(EE_TEMPLATES.$this->theme.DS.'style.css')) { |
|
166 | + wp_register_style($this->theme, EE_TEMPLATES_URL.$this->theme.DS.'style.css', array('dashicons', 'espresso_default')); |
|
167 | 167 | } |
168 | - wp_enqueue_style( $this->theme ); |
|
169 | - if ( EE_Registry::instance()->CFG->map_settings->use_google_maps ) { |
|
170 | - add_action('wp_enqueue_scripts', array( 'EEH_Maps', 'espresso_google_map_js' ), 11 ); |
|
168 | + wp_enqueue_style($this->theme); |
|
169 | + if (EE_Registry::instance()->CFG->map_settings->use_google_maps) { |
|
170 | + add_action('wp_enqueue_scripts', array('EEH_Maps', 'espresso_google_map_js'), 11); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | //Get the CSS file |
73 | 73 | if( isset( $themes[ $theme_requested ] ) ) { |
74 | 74 | $template_args['invoice_css'] = $themes[ $theme_requested ]; |
75 | - }else{ |
|
75 | + } else{ |
|
76 | 76 | $template_args['invoice_css'] = $this->invoice_payment_method->get_extra_meta( 'legacy_invoice_css', TRUE, 'simple.css' ); |
77 | 77 | } |
78 | 78 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $attendee_state = $primary_attendee->state_obj(); |
101 | 101 | if($attendee_state){ |
102 | 102 | $attendee_state_name = $attendee_state->name(); |
103 | - }else{ |
|
103 | + } else{ |
|
104 | 104 | $attendee_state_name = ''; |
105 | 105 | } |
106 | 106 | $template_args['attendee_state'] = $attendee_state_name; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $template_args['questions_to_skip'] = $questions_to_skip; |
171 | 171 | // d($template_args); |
172 | 172 | $template_args['download_link'] = $this->registration->receipt_url('download'); |
173 | - }else{ |
|
173 | + } else{ |
|
174 | 174 | //it's just an invoice we're accessing |
175 | 175 | $template_args['download_link'] = $this->registration->invoice_url('download'); |
176 | 176 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $template_header = EEH_Template::locate_template( $templates_relative_path . 'invoice_header.template.php', $template_args, TRUE, TRUE ); |
181 | 181 | if(isset($_GET['receipt'])){ |
182 | 182 | $template_body = EEH_Template::locate_template( $templates_relative_path . 'receipt_body.template.php', $template_args, TRUE, TRUE ); |
183 | - }else{ |
|
183 | + } else{ |
|
184 | 184 | $template_body = EEH_Template::locate_template( $templates_relative_path . 'invoice_body.template.php', $template_args, TRUE, TRUE ); |
185 | 185 | } |
186 | 186 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | //Create the PDF |
206 | 206 | if(array_key_exists('html',$_GET)){ |
207 | 207 | echo $content; |
208 | - }else{ |
|
208 | + } else{ |
|
209 | 209 | //only load dompdf if nobody else has yet... |
210 | 210 | if( ! defined('DOMPDF_DIR')){ |
211 | 211 | define('DOMPDF_ENABLE_REMOTE', TRUE); |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | function check_if_any_line_items_have_a_description(EE_Line_Item $line_item){ |
230 | 230 | if($line_item->desc()){ |
231 | 231 | return true; |
232 | - }else{ |
|
232 | + } else{ |
|
233 | 233 | foreach($line_item->children() as $child_line_item){ |
234 | 234 | if($this->check_if_any_line_items_have_a_description($child_line_item)){ |
235 | 235 | return true; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $org_state = EE_Registry::instance()->load_model( 'State' )->get_one_by_ID( $EE->CFG->organization->STA_ID ); |
274 | 274 | if($org_state){ |
275 | 275 | $org_state_name = $org_state->name(); |
276 | - }else{ |
|
276 | + } else{ |
|
277 | 277 | $org_state_name = ''; |
278 | 278 | } |
279 | 279 | $ReplaceValues = array( |
@@ -300,8 +300,9 @@ discard block |
||
300 | 300 | public function espressoLoadData($items) { |
301 | 301 | $lines = $items; |
302 | 302 | $data = array(); |
303 | - foreach ($lines as $line) |
|
304 | - $data[] = explode(';', chop($line)); |
|
303 | + foreach ($lines as $line) { |
|
304 | + $data[] = explode(';', chop($line)); |
|
305 | + } |
|
305 | 306 | |
306 | 307 | return $data; |
307 | 308 | } |
@@ -43,23 +43,23 @@ discard block |
||
43 | 43 | '4.9.12', |
44 | 44 | '5.0.0' |
45 | 45 | ); |
46 | - if ( $this->registration = EE_Registry::instance()->load_model( 'Registration' )->get_registration_for_reg_url_link( $url_link)) { |
|
46 | + if ($this->registration = EE_Registry::instance()->load_model('Registration')->get_registration_for_reg_url_link($url_link)) { |
|
47 | 47 | $this->transaction = $this->registration->transaction(); |
48 | 48 | |
49 | - $payment_settings = EE_Config::instance()->gateway->payment_settings;//get_user_meta(EE_Registry::instance()->CFG->wp_user, 'payment_settings', TRUE); |
|
50 | - $this->invoice_payment_method = EEM_Payment_Method::instance()->get_one_of_type( 'Invoice' ); |
|
49 | + $payment_settings = EE_Config::instance()->gateway->payment_settings; //get_user_meta(EE_Registry::instance()->CFG->wp_user, 'payment_settings', TRUE); |
|
50 | + $this->invoice_payment_method = EEM_Payment_Method::instance()->get_one_of_type('Invoice'); |
|
51 | 51 | } else { |
52 | - EE_Error::add_error( __( 'Your request appears to be missing some required data, and no information for your transaction could be retrieved.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
52 | + EE_Error::add_error(__('Your request appears to be missing some required data, and no information for your transaction could be retrieved.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | } |
56 | 56 | |
57 | - public function send_invoice( $download = FALSE ) { |
|
57 | + public function send_invoice($download = FALSE) { |
|
58 | 58 | $template_args = array(); |
59 | 59 | $EE = EE_Registry::instance(); |
60 | 60 | |
61 | 61 | //allow the request to override the default theme defined in the invoice settings |
62 | - $theme_requested = ( isset( $_REQUEST['theme'] ) && $_REQUEST['theme'] > 0 && $_REQUEST['theme'] < 8 ) ? absint( $_REQUEST['theme'] ) : null; |
|
62 | + $theme_requested = (isset($_REQUEST['theme']) && $_REQUEST['theme'] > 0 && $_REQUEST['theme'] < 8) ? absint($_REQUEST['theme']) : null; |
|
63 | 63 | $themes = array( |
64 | 64 | 1 => "simple.css", |
65 | 65 | 2 => "bauhaus.css", |
@@ -70,26 +70,26 @@ discard block |
||
70 | 70 | 7 => "union.css" |
71 | 71 | ); |
72 | 72 | //Get the CSS file |
73 | - if( isset( $themes[ $theme_requested ] ) ) { |
|
74 | - $template_args['invoice_css'] = $themes[ $theme_requested ]; |
|
75 | - }else{ |
|
76 | - $template_args['invoice_css'] = $this->invoice_payment_method->get_extra_meta( 'legacy_invoice_css', TRUE, 'simple.css' ); |
|
73 | + if (isset($themes[$theme_requested])) { |
|
74 | + $template_args['invoice_css'] = $themes[$theme_requested]; |
|
75 | + } else { |
|
76 | + $template_args['invoice_css'] = $this->invoice_payment_method->get_extra_meta('legacy_invoice_css', TRUE, 'simple.css'); |
|
77 | 77 | } |
78 | 78 | |
79 | - if (is_dir(EVENT_ESPRESSO_GATEWAY_DIR . '/invoice')) { |
|
80 | - $template_args['base_url'] = EVENT_ESPRESSO_GATEWAY_URL . 'Invoice/lib/templates/'; |
|
79 | + if (is_dir(EVENT_ESPRESSO_GATEWAY_DIR.'/invoice')) { |
|
80 | + $template_args['base_url'] = EVENT_ESPRESSO_GATEWAY_URL.'Invoice/lib/templates/'; |
|
81 | 81 | } else { |
82 | - $template_args['base_url'] = EE_GATEWAYS . '/Invoice/lib/templates/'; |
|
82 | + $template_args['base_url'] = EE_GATEWAYS.'/Invoice/lib/templates/'; |
|
83 | 83 | } |
84 | 84 | $primary_attendee = $this->transaction->primary_registration()->attendee(); |
85 | 85 | |
86 | - $template_args['organization'] = $EE->CFG->organization->get_pretty( 'name' ); |
|
87 | - $template_args['street'] = empty( $EE->CFG->organization->address_2 ) ? $EE->CFG->organization->get_pretty( 'address_1' ) : $EE->CFG->organization->get_pretty( 'address_1' ) . '<br>' . $EE->CFG->organization->get_pretty( 'address_2' ); |
|
88 | - $template_args['city'] = $EE->CFG->organization->get_pretty( 'city' ); |
|
89 | - $template_args['state'] = EE_Registry::instance()->load_model( 'State' )->get_one_by_ID( $EE->CFG->organization->STA_ID ); |
|
90 | - $template_args['country'] = EE_Registry::instance()->load_model( 'Country' )->get_one_by_ID( $EE->CFG->organization->CNT_ISO ); |
|
91 | - $template_args['zip'] = $EE->CFG->organization->get_pretty( 'zip' ); |
|
92 | - $template_args['email'] = $EE->CFG->organization->get_pretty( 'email' ); |
|
86 | + $template_args['organization'] = $EE->CFG->organization->get_pretty('name'); |
|
87 | + $template_args['street'] = empty($EE->CFG->organization->address_2) ? $EE->CFG->organization->get_pretty('address_1') : $EE->CFG->organization->get_pretty('address_1').'<br>'.$EE->CFG->organization->get_pretty('address_2'); |
|
88 | + $template_args['city'] = $EE->CFG->organization->get_pretty('city'); |
|
89 | + $template_args['state'] = EE_Registry::instance()->load_model('State')->get_one_by_ID($EE->CFG->organization->STA_ID); |
|
90 | + $template_args['country'] = EE_Registry::instance()->load_model('Country')->get_one_by_ID($EE->CFG->organization->CNT_ISO); |
|
91 | + $template_args['zip'] = $EE->CFG->organization->get_pretty('zip'); |
|
92 | + $template_args['email'] = $EE->CFG->organization->get_pretty('email'); |
|
93 | 93 | |
94 | 94 | $template_args['registration_code'] = $this->registration->reg_code(); |
95 | 95 | $template_args['registration_date'] = $this->registration->date(); |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | $template_args['attendee_address2'] = $primary_attendee->address2(); |
99 | 99 | $template_args['attendee_city'] = $primary_attendee->city(); |
100 | 100 | $attendee_state = $primary_attendee->state_obj(); |
101 | - if($attendee_state){ |
|
101 | + if ($attendee_state) { |
|
102 | 102 | $attendee_state_name = $attendee_state->name(); |
103 | - }else{ |
|
103 | + } else { |
|
104 | 104 | $attendee_state_name = ''; |
105 | 105 | } |
106 | 106 | $template_args['attendee_state'] = $attendee_state_name; |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | if ($template_args['amount_pd'] != $template_args['total_cost']) { |
125 | 125 | //$template_args['net_total'] = $this->espressoInvoiceTotals( __('SubTotal', 'event_espresso'), $this->transaction->total());//$this->session_data['cart']['REG']['sub_total']); |
126 | 126 | $tax_items = $this->transaction->tax_items(); |
127 | - if(!empty($tax_items) ){ |
|
127 | + if ( ! empty($tax_items)) { |
|
128 | 128 | foreach ($tax_items as $tax) { |
129 | - $template_args['net_total'] .= $this->espressoInvoiceTotals( $tax->name(), $tax->total()); |
|
129 | + $template_args['net_total'] .= $this->espressoInvoiceTotals($tax->name(), $tax->total()); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
@@ -136,30 +136,30 @@ discard block |
||
136 | 136 | } else { |
137 | 137 | $text = __('Extra', 'event_espresso'); |
138 | 138 | } |
139 | - $template_args['discount'] = $this->espressoInvoiceTotals( $text, $difference ); |
|
139 | + $template_args['discount'] = $this->espressoInvoiceTotals($text, $difference); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $template_args['currency_symbol'] = $EE->CFG->currency->sign; |
143 | - $template_args['template_payment_instructions'] = wpautop(stripslashes_deep(html_entity_decode($this->invoice_payment_method->get_extra_meta( 'pdf_instructions', TRUE ), ENT_QUOTES))); |
|
144 | - $template_args['shameless_plug'] = apply_filters( 'FHEE_Invoice__send_invoice__shameless_plug',true ); |
|
145 | - if(isset($_GET['receipt'])){ |
|
143 | + $template_args['template_payment_instructions'] = wpautop(stripslashes_deep(html_entity_decode($this->invoice_payment_method->get_extra_meta('pdf_instructions', TRUE), ENT_QUOTES))); |
|
144 | + $template_args['shameless_plug'] = apply_filters('FHEE_Invoice__send_invoice__shameless_plug', true); |
|
145 | + if (isset($_GET['receipt'])) { |
|
146 | 146 | //receipt-specific stuff |
147 | 147 | $events_for_txn = EEM_Event::instance()->get_all(array(array('Registration.TXN_ID'=>$this->transaction->ID()))); |
148 | 148 | $ticket_line_items_per_event = array(); |
149 | 149 | $registrations_per_line_item = array(); |
150 | 150 | $venues_for_events = array(); |
151 | - foreach($events_for_txn as $event_id => $event){ |
|
152 | - $line_items_for_this_event = EEM_Line_Item::instance()->get_all(array(array('Ticket.Datetime.EVT_ID'=>$event_id,'TXN_ID'=>$this->transaction->ID()))); |
|
151 | + foreach ($events_for_txn as $event_id => $event) { |
|
152 | + $line_items_for_this_event = EEM_Line_Item::instance()->get_all(array(array('Ticket.Datetime.EVT_ID'=>$event_id, 'TXN_ID'=>$this->transaction->ID()))); |
|
153 | 153 | $ticket_line_items_per_event[$event_id] = $line_items_for_this_event; |
154 | - foreach($line_items_for_this_event as $line_item_id => $line_item){ |
|
154 | + foreach ($line_items_for_this_event as $line_item_id => $line_item) { |
|
155 | 155 | $ticket = $line_item->ticket(); |
156 | - $registrations_for_this_ticket = EEM_Registration::instance()->get_all(array(array('TKT_ID'=>$ticket->ID(),'TXN_ID'=>$this->transaction->ID()))); |
|
156 | + $registrations_for_this_ticket = EEM_Registration::instance()->get_all(array(array('TKT_ID'=>$ticket->ID(), 'TXN_ID'=>$this->transaction->ID()))); |
|
157 | 157 | $registrations_per_line_item[$line_item_id] = $registrations_for_this_ticket; |
158 | 158 | } |
159 | 159 | $venues_for_events = array_merge($venues_for_events, $event->venues()); |
160 | 160 | } |
161 | - $tax_total_line_item = EEM_Line_Item::instance()->get_one(array(array('TXN_ID'=>$this->transaction->ID(),'LIN_type'=> EEM_Line_Item::type_tax_sub_total))); |
|
162 | - $questions_to_skip = array(EEM_Attendee::system_question_fname,EEM_Attendee::system_question_lname, EEM_Attendee::system_question_email); |
|
161 | + $tax_total_line_item = EEM_Line_Item::instance()->get_one(array(array('TXN_ID'=>$this->transaction->ID(), 'LIN_type'=> EEM_Line_Item::type_tax_sub_total))); |
|
162 | + $questions_to_skip = array(EEM_Attendee::system_question_fname, EEM_Attendee::system_question_lname, EEM_Attendee::system_question_email); |
|
163 | 163 | |
164 | 164 | |
165 | 165 | $template_args['events_for_txn'] = $events_for_txn; |
@@ -170,53 +170,53 @@ discard block |
||
170 | 170 | $template_args['questions_to_skip'] = $questions_to_skip; |
171 | 171 | // d($template_args); |
172 | 172 | $template_args['download_link'] = $this->registration->receipt_url('download'); |
173 | - }else{ |
|
173 | + } else { |
|
174 | 174 | //it's just an invoice we're accessing |
175 | 175 | $template_args['download_link'] = $this->registration->invoice_url('download'); |
176 | 176 | } |
177 | 177 | |
178 | 178 | //Get the HTML as an object |
179 | 179 | $templates_relative_path = 'modules/gateways/Invoice/lib/templates/'; |
180 | - $template_header = EEH_Template::locate_template( $templates_relative_path . 'invoice_header.template.php', $template_args, TRUE, TRUE ); |
|
181 | - if(isset($_GET['receipt'])){ |
|
182 | - $template_body = EEH_Template::locate_template( $templates_relative_path . 'receipt_body.template.php', $template_args, TRUE, TRUE ); |
|
183 | - }else{ |
|
184 | - $template_body = EEH_Template::locate_template( $templates_relative_path . 'invoice_body.template.php', $template_args, TRUE, TRUE ); |
|
180 | + $template_header = EEH_Template::locate_template($templates_relative_path.'invoice_header.template.php', $template_args, TRUE, TRUE); |
|
181 | + if (isset($_GET['receipt'])) { |
|
182 | + $template_body = EEH_Template::locate_template($templates_relative_path.'receipt_body.template.php', $template_args, TRUE, TRUE); |
|
183 | + } else { |
|
184 | + $template_body = EEH_Template::locate_template($templates_relative_path.'invoice_body.template.php', $template_args, TRUE, TRUE); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | |
188 | - $template_footer = EEH_Template::locate_template( $templates_relative_path . 'invoice_footer.template.php', $template_args, TRUE, TRUE ); |
|
188 | + $template_footer = EEH_Template::locate_template($templates_relative_path.'invoice_footer.template.php', $template_args, TRUE, TRUE); |
|
189 | 189 | |
190 | - $copies = ! empty( $_REQUEST['copies'] ) ? $_REQUEST['copies'] : 1; |
|
190 | + $copies = ! empty($_REQUEST['copies']) ? $_REQUEST['copies'] : 1; |
|
191 | 191 | |
192 | 192 | $content = $this->espresso_replace_invoice_shortcodes($template_header); |
193 | - for( $x = 1; $x <= $copies; $x++ ) { |
|
193 | + for ($x = 1; $x <= $copies; $x++) { |
|
194 | 194 | $content .= $this->espresso_replace_invoice_shortcodes($template_body); |
195 | 195 | } |
196 | 196 | $content .= $this->espresso_replace_invoice_shortcodes($template_footer); |
197 | 197 | |
198 | 198 | //Check if debugging or mobile is set |
199 | - if (!empty($_REQUEST['html'])) { |
|
199 | + if ( ! empty($_REQUEST['html'])) { |
|
200 | 200 | echo $content; |
201 | 201 | exit(0); |
202 | 202 | } |
203 | - $invoice_name = $template_args['organization'] . ' ' . __('Invoice #', 'event_espresso') . $template_args['registration_code'] . __(' for ', 'event_espresso') . $template_args['name']; |
|
204 | - $invoice_name = str_replace( ' ', '_', $invoice_name ); |
|
203 | + $invoice_name = $template_args['organization'].' '.__('Invoice #', 'event_espresso').$template_args['registration_code'].__(' for ', 'event_espresso').$template_args['name']; |
|
204 | + $invoice_name = str_replace(' ', '_', $invoice_name); |
|
205 | 205 | //Create the PDF |
206 | - if(array_key_exists('html',$_GET)){ |
|
206 | + if (array_key_exists('html', $_GET)) { |
|
207 | 207 | echo $content; |
208 | - }else{ |
|
208 | + } else { |
|
209 | 209 | //only load dompdf if nobody else has yet... |
210 | - if( ! defined('DOMPDF_DIR')){ |
|
210 | + if ( ! defined('DOMPDF_DIR')) { |
|
211 | 211 | define('DOMPDF_ENABLE_REMOTE', TRUE); |
212 | 212 | define('DOMPDF_ENABLE_JAVASCRIPT', FALSE); |
213 | 213 | define('DOMPDF_ENABLE_CSS_FLOAT', TRUE); |
214 | - require_once(EE_THIRD_PARTY . 'dompdf/dompdf_config.inc.php'); |
|
214 | + require_once(EE_THIRD_PARTY.'dompdf/dompdf_config.inc.php'); |
|
215 | 215 | } |
216 | 216 | $dompdf = new DOMPDF(); |
217 | 217 | $dompdf->load_html($content); |
218 | 218 | $dompdf->render(); |
219 | - $dompdf->stream($invoice_name . ".pdf", array( 'Attachment' => $download )); |
|
219 | + $dompdf->stream($invoice_name.".pdf", array('Attachment' => $download)); |
|
220 | 220 | } |
221 | 221 | exit(0); |
222 | 222 | } |
@@ -226,12 +226,12 @@ discard block |
||
226 | 226 | * @param EE_Line_Item $line_item |
227 | 227 | * @return boolean |
228 | 228 | */ |
229 | - function check_if_any_line_items_have_a_description(EE_Line_Item $line_item){ |
|
230 | - if($line_item->desc()){ |
|
229 | + function check_if_any_line_items_have_a_description(EE_Line_Item $line_item) { |
|
230 | + if ($line_item->desc()) { |
|
231 | 231 | return true; |
232 | - }else{ |
|
233 | - foreach($line_item->children() as $child_line_item){ |
|
234 | - if($this->check_if_any_line_items_have_a_description($child_line_item)){ |
|
232 | + } else { |
|
233 | + foreach ($line_item->children() as $child_line_item) { |
|
234 | + if ($this->check_if_any_line_items_have_a_description($child_line_item)) { |
|
235 | 235 | return true; |
236 | 236 | } |
237 | 237 | } |
@@ -241,14 +241,14 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | //Perform the shortcode replacement |
244 | - function espresso_replace_invoice_shortcodes( $content ) { |
|
244 | + function espresso_replace_invoice_shortcodes($content) { |
|
245 | 245 | |
246 | 246 | $EE = EE_Registry::instance(); |
247 | 247 | //Create the logo |
248 | - $invoice_logo_url = $this->invoice_payment_method->get_extra_meta('pdf_logo_image', TRUE, $EE->CFG->organization->logo_url ); |
|
249 | - if (!empty($invoice_logo_url)) { |
|
248 | + $invoice_logo_url = $this->invoice_payment_method->get_extra_meta('pdf_logo_image', TRUE, $EE->CFG->organization->logo_url); |
|
249 | + if ( ! empty($invoice_logo_url)) { |
|
250 | 250 | $image_size = getimagesize($invoice_logo_url); |
251 | - $invoice_logo_image = '<img class="logo screen" src="' . $invoice_logo_url . '" ' . $image_size[3] . ' alt="logo" /> '; |
|
251 | + $invoice_logo_image = '<img class="logo screen" src="'.$invoice_logo_url.'" '.$image_size[3].' alt="logo" /> '; |
|
252 | 252 | } else { |
253 | 253 | $invoice_logo_image = ''; |
254 | 254 | } |
@@ -270,28 +270,28 @@ discard block |
||
270 | 270 | "[instructions]", |
271 | 271 | ); |
272 | 272 | $primary_attendee = $this->transaction->primary_registration()->attendee(); |
273 | - $org_state = EE_Registry::instance()->load_model( 'State' )->get_one_by_ID( $EE->CFG->organization->STA_ID ); |
|
274 | - if($org_state){ |
|
273 | + $org_state = EE_Registry::instance()->load_model('State')->get_one_by_ID($EE->CFG->organization->STA_ID); |
|
274 | + if ($org_state) { |
|
275 | 275 | $org_state_name = $org_state->name(); |
276 | - }else{ |
|
276 | + } else { |
|
277 | 277 | $org_state_name = ''; |
278 | 278 | } |
279 | 279 | $ReplaceValues = array( |
280 | - $EE->CFG->organization->get_pretty( 'name' ), |
|
280 | + $EE->CFG->organization->get_pretty('name'), |
|
281 | 281 | $this->registration->reg_code(), |
282 | 282 | $this->transaction->ID(), |
283 | 283 | $primary_attendee->full_name(), |
284 | - (is_dir(EVENT_ESPRESSO_GATEWAY_DIR . '/invoice')) ? EVENT_ESPRESSO_GATEWAY_URL . 'Invoice/lib/templates/' : EE_GATEWAYS_URL . 'Invoice/lib/templates/', |
|
285 | - $this->registration->invoice_url(),//home_url() . '/?download_invoice=true&id=' . $this->registration->reg_url_link(), |
|
284 | + (is_dir(EVENT_ESPRESSO_GATEWAY_DIR.'/invoice')) ? EVENT_ESPRESSO_GATEWAY_URL . 'Invoice/lib/templates/' : EE_GATEWAYS_URL.'Invoice/lib/templates/', |
|
285 | + $this->registration->invoice_url(), //home_url() . '/?download_invoice=true&id=' . $this->registration->reg_url_link(), |
|
286 | 286 | $invoice_logo_image, |
287 | - empty( $EE->CFG->organization->address_2 ) ? $EE->CFG->organization->get_pretty( 'address_1' ) : $EE->CFG->organization->get_pretty( 'address_1' ) . '<br>' . $EE->CFG->organization->get_pretty( 'address_2' ), |
|
288 | - $EE->CFG->organization->get_pretty( 'city' ), |
|
287 | + empty($EE->CFG->organization->address_2) ? $EE->CFG->organization->get_pretty('address_1') : $EE->CFG->organization->get_pretty('address_1').'<br>'.$EE->CFG->organization->get_pretty('address_2'), |
|
288 | + $EE->CFG->organization->get_pretty('city'), |
|
289 | 289 | $org_state_name, |
290 | - $EE->CFG->organization->get_pretty( 'zip' ), |
|
291 | - $EE->CFG->organization->get_pretty( 'email' ), |
|
290 | + $EE->CFG->organization->get_pretty('zip'), |
|
291 | + $EE->CFG->organization->get_pretty('email'), |
|
292 | 292 | $EE->CFG->organization->vat, |
293 | - $this->registration->get_i18n_datetime( 'REG_date', get_option( 'date_format' ) ), |
|
294 | - $this->invoice_payment_method->get_extra_meta( 'pdf_instructions', TRUE ), |
|
293 | + $this->registration->get_i18n_datetime('REG_date', get_option('date_format')), |
|
294 | + $this->invoice_payment_method->get_extra_meta('pdf_instructions', TRUE), |
|
295 | 295 | ); |
296 | 296 | |
297 | 297 | return str_replace($SearchValues, $ReplaceValues, $content); |
@@ -314,12 +314,12 @@ discard block |
||
314 | 314 | if ($total_cost < 0) { |
315 | 315 | $total_cost = (-1) * $total_cost; |
316 | 316 | } |
317 | - $find = array( ' ' ); |
|
318 | - $replace = array( '-' ); |
|
319 | - $row_id = strtolower( str_replace( $find, $replace, $text )); |
|
317 | + $find = array(' '); |
|
318 | + $replace = array('-'); |
|
319 | + $row_id = strtolower(str_replace($find, $replace, $text)); |
|
320 | 320 | $html .= '<tr id="'.$row_id.'-tr"><td colspan="4"> </td>'; |
321 | - $html .= '<td class="item_r">' . $text . '</td>'; |
|
322 | - $html .= '<td class="item_r">' . $total_cost . '</td>'; |
|
321 | + $html .= '<td class="item_r">'.$text.'</td>'; |
|
322 | + $html .= '<td class="item_r">'.$total_cost.'</td>'; |
|
323 | 323 | $html .= '</tr>'; |
324 | 324 | return $html; |
325 | 325 | } |
@@ -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 | * |
@@ -39,14 +39,14 @@ |
||
39 | 39 | * @return void |
40 | 40 | */ |
41 | 41 | public static function set_hooks() { |
42 | - $post_type = get_post_type_object('espresso_venues'); |
|
43 | - $custom_post_types = EE_Register_CPTs::get_CPTs(); |
|
44 | - EE_Config::register_route( |
|
45 | - $custom_post_types['espresso_venues']['plural_slug'], |
|
46 | - 'Venues_Archive', |
|
47 | - 'run' |
|
48 | - ); |
|
49 | - } |
|
42 | + $post_type = get_post_type_object('espresso_venues'); |
|
43 | + $custom_post_types = EE_Register_CPTs::get_CPTs(); |
|
44 | + EE_Config::register_route( |
|
45 | + $custom_post_types['espresso_venues']['plural_slug'], |
|
46 | + 'Venues_Archive', |
|
47 | + 'run' |
|
48 | + ); |
|
49 | + } |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @return EED_Venues_Archive |
28 | 28 | */ |
29 | 29 | public static function instance() { |
30 | - return parent::get_instance( __CLASS__ ); |
|
30 | + return parent::get_instance(__CLASS__); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | * @access public |
66 | 66 | * @param \WP $WP |
67 | 67 | */ |
68 | - public function run( $WP ) { |
|
68 | + public function run($WP) { |
|
69 | 69 | // check what template is loaded |
70 | - add_filter( 'template_include', array( $this, 'template_include' ), 999, 1 ); |
|
71 | - add_action('wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 10 ); |
|
70 | + add_filter('template_include', array($this, 'template_include'), 999, 1); |
|
71 | + add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 10); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -80,18 +80,18 @@ discard block |
||
80 | 80 | * @param string $template |
81 | 81 | * @return string |
82 | 82 | */ |
83 | - public function template_include( $template ) { |
|
83 | + public function template_include($template) { |
|
84 | 84 | // not a custom template? |
85 | - if ( EE_Registry::instance()->load_core( 'Front_Controller', array(), false, true )->get_selected_template() != 'archive-espresso_venues.php' ) { |
|
85 | + if (EE_Registry::instance()->load_core('Front_Controller', array(), false, true)->get_selected_template() != 'archive-espresso_venues.php') { |
|
86 | 86 | EEH_Template::load_espresso_theme_functions(); |
87 | 87 | // then add extra event data via hooks |
88 | - add_filter( 'the_title', array( $this, 'the_title' ), 100, 1 ); |
|
88 | + add_filter('the_title', array($this, 'the_title'), 100, 1); |
|
89 | 89 | // don't know if theme uses the_excerpt |
90 | - add_filter( 'the_excerpt', array( $this, 'venue_details' ), 100 ); |
|
90 | + add_filter('the_excerpt', array($this, 'venue_details'), 100); |
|
91 | 91 | // or the_content |
92 | - add_filter( 'the_content', array( $this, 'venue_details' ), 100 ); |
|
92 | + add_filter('the_content', array($this, 'venue_details'), 100); |
|
93 | 93 | // don't display entry meta because the existing theme will take care of that |
94 | - add_filter( 'FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false' ); |
|
94 | + add_filter('FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false'); |
|
95 | 95 | } |
96 | 96 | return $template; |
97 | 97 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @param string $title |
106 | 106 | * @return string |
107 | 107 | */ |
108 | - public function the_title( $title = '' ) { |
|
108 | + public function the_title($title = '') { |
|
109 | 109 | return $title; |
110 | 110 | } |
111 | 111 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param string $content |
118 | 118 | * @return string |
119 | 119 | */ |
120 | - public function venue_details( $content ) { |
|
120 | + public function venue_details($content) { |
|
121 | 121 | global $post; |
122 | 122 | if ( |
123 | 123 | $post->post_type == 'espresso_venues' |
@@ -127,22 +127,22 @@ discard block |
||
127 | 127 | // it uses the_content() for displaying the $post->post_content |
128 | 128 | // so in order to load a template that uses the_content() from within a callback being used to filter the_content(), |
129 | 129 | // we need to first remove this callback from being applied to the_content() (otherwise it will recurse and blow up the interweb) |
130 | - remove_filter( 'the_excerpt', array( $this, 'venue_details' ), 100 ); |
|
131 | - remove_filter( 'the_content', array( $this, 'venue_details' ), 100 ); |
|
130 | + remove_filter('the_excerpt', array($this, 'venue_details'), 100); |
|
131 | + remove_filter('the_content', array($this, 'venue_details'), 100); |
|
132 | 132 | // add filters we want |
133 | - add_filter( 'the_content', array( $this, 'venue_location' ), 110 ); |
|
134 | - add_filter( 'the_excerpt', array( $this, 'venue_location' ), 110 ); |
|
133 | + add_filter('the_content', array($this, 'venue_location'), 110); |
|
134 | + add_filter('the_excerpt', array($this, 'venue_location'), 110); |
|
135 | 135 | // now load our template |
136 | - $template = EEH_Template::locate_template( 'content-espresso_venues-details.php' ); |
|
136 | + $template = EEH_Template::locate_template('content-espresso_venues-details.php'); |
|
137 | 137 | //now add our filter back in, plus some others |
138 | - add_filter( 'the_excerpt', array( $this, 'venue_details' ), 100 ); |
|
139 | - add_filter( 'the_content', array( $this, 'venue_details' ), 100 ); |
|
138 | + add_filter('the_excerpt', array($this, 'venue_details'), 100); |
|
139 | + add_filter('the_content', array($this, 'venue_details'), 100); |
|
140 | 140 | // remove other filters we added so they won't get applied to the next post |
141 | - remove_filter( 'the_content', array( $this, 'venue_location' ), 110 ); |
|
142 | - remove_filter( 'the_excerpt', array( $this, 'venue_location' ), 110 ); |
|
141 | + remove_filter('the_content', array($this, 'venue_location'), 110); |
|
142 | + remove_filter('the_excerpt', array($this, 'venue_location'), 110); |
|
143 | 143 | // we're not returning the $content directly because the template we are loading uses the_content (or the_excerpt) |
144 | 144 | } |
145 | - return ! empty( $template ) ? $template : $content; |
|
145 | + return ! empty($template) ? $template : $content; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | * @param string $content |
155 | 155 | * @return string |
156 | 156 | */ |
157 | - public function venue_location( $content ) { |
|
158 | - return $content . EEH_Template::locate_template( 'content-espresso_venues-location.php' ); |
|
157 | + public function venue_location($content) { |
|
158 | + return $content.EEH_Template::locate_template('content-espresso_venues-location.php'); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | |
@@ -169,14 +169,14 @@ discard block |
||
169 | 169 | */ |
170 | 170 | public function wp_enqueue_scripts() { |
171 | 171 | // get some style |
172 | - if ( apply_filters( 'FHEE_enable_default_espresso_css', TRUE ) && is_archive() ) { |
|
172 | + if (apply_filters('FHEE_enable_default_espresso_css', TRUE) && is_archive()) { |
|
173 | 173 | // first check theme folder |
174 | - if ( is_readable( get_stylesheet_directory() . $this->theme . DS . 'style.css' )) { |
|
175 | - wp_register_style( $this->theme, get_stylesheet_directory_uri() . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) ); |
|
176 | - } else if ( is_readable( EE_TEMPLATES . $this->theme . DS . 'style.css' )) { |
|
177 | - wp_register_style( $this->theme, EE_TEMPLATES_URL . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) ); |
|
174 | + if (is_readable(get_stylesheet_directory().$this->theme.DS.'style.css')) { |
|
175 | + wp_register_style($this->theme, get_stylesheet_directory_uri().$this->theme.DS.'style.css', array('dashicons', 'espresso_default')); |
|
176 | + } else if (is_readable(EE_TEMPLATES.$this->theme.DS.'style.css')) { |
|
177 | + wp_register_style($this->theme, EE_TEMPLATES_URL.$this->theme.DS.'style.css', array('dashicons', 'espresso_default')); |
|
178 | 178 | } |
179 | - wp_enqueue_style( $this->theme ); |
|
179 | + wp_enqueue_style($this->theme); |
|
180 | 180 | } |
181 | 181 | } |
182 | 182 |
@@ -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 | * |
@@ -118,40 +118,40 @@ |
||
118 | 118 | * @return EE_Template_Config |
119 | 119 | */ |
120 | 120 | public static function update_template_settings(EE_Template_Config $CFG, $REQ ) { |
121 | - if(! $CFG->EED_Event_Single instanceof EE_Event_Single_Config){ |
|
122 | - $CFG->EED_Event_Single = new EE_Event_Single_Config(); |
|
123 | - } |
|
124 | - $display_order_event = $CFG->EED_Event_Single->display_order_event !== null |
|
125 | - ? $CFG->EED_Event_Single->display_order_event |
|
126 | - : EED_Event_Single::EVENT_DETAILS_PRIORITY; |
|
121 | + if(! $CFG->EED_Event_Single instanceof EE_Event_Single_Config){ |
|
122 | + $CFG->EED_Event_Single = new EE_Event_Single_Config(); |
|
123 | + } |
|
124 | + $display_order_event = $CFG->EED_Event_Single->display_order_event !== null |
|
125 | + ? $CFG->EED_Event_Single->display_order_event |
|
126 | + : EED_Event_Single::EVENT_DETAILS_PRIORITY; |
|
127 | 127 | $display_order_datetimes = $CFG->EED_Event_Single->display_order_datetimes !== null |
128 | - ? $CFG->EED_Event_Single->display_order_datetimes |
|
129 | - : EED_Event_Single::EVENT_DATETIMES_PRIORITY; |
|
130 | - $display_order_tickets = $CFG->EED_Event_Single->display_order_tickets !== null |
|
131 | - ? $CFG->EED_Event_Single->display_order_tickets |
|
132 | - : EED_Event_Single::EVENT_TICKETS_PRIORITY; |
|
128 | + ? $CFG->EED_Event_Single->display_order_datetimes |
|
129 | + : EED_Event_Single::EVENT_DATETIMES_PRIORITY; |
|
130 | + $display_order_tickets = $CFG->EED_Event_Single->display_order_tickets !== null |
|
131 | + ? $CFG->EED_Event_Single->display_order_tickets |
|
132 | + : EED_Event_Single::EVENT_TICKETS_PRIORITY; |
|
133 | 133 | $display_order_venue = $CFG->EED_Event_Single->display_order_venue !== null |
134 | - ? $CFG->EED_Event_Single->display_order_venue |
|
135 | - : EED_Event_Single::EVENT_VENUES_PRIORITY; |
|
134 | + ? $CFG->EED_Event_Single->display_order_venue |
|
135 | + : EED_Event_Single::EVENT_VENUES_PRIORITY; |
|
136 | 136 | $CFG->EED_Event_Single = new EE_Event_Single_Config(); |
137 | 137 | $CFG->EED_Event_Single->display_status_banner_single = ! empty( $REQ['display_status_banner_single'] ) |
138 | - && $REQ['display_status_banner_single']; |
|
138 | + && $REQ['display_status_banner_single']; |
|
139 | 139 | $CFG->EED_Event_Single->display_venue = ! empty( $REQ['display_venue'] ) && $REQ['display_venue']; |
140 | 140 | $CFG->EED_Event_Single->use_sortable_display_order = ! empty( $REQ[ 'EED_Events_Single_use_sortable_display_order' ] ) |
141 | - ? absint( $REQ[ 'EED_Events_Single_use_sortable_display_order' ] ) |
|
142 | - : 0; |
|
141 | + ? absint( $REQ[ 'EED_Events_Single_use_sortable_display_order' ] ) |
|
142 | + : 0; |
|
143 | 143 | $CFG->EED_Event_Single->display_order_event = $CFG->EED_Event_Single->use_sortable_display_order |
144 | - ? $display_order_event |
|
145 | - : EED_Event_Single::EVENT_DETAILS_PRIORITY; |
|
144 | + ? $display_order_event |
|
145 | + : EED_Event_Single::EVENT_DETAILS_PRIORITY; |
|
146 | 146 | $CFG->EED_Event_Single->display_order_datetimes = $CFG->EED_Event_Single->use_sortable_display_order |
147 | - ? $display_order_datetimes |
|
148 | - : EED_Event_Single::EVENT_DATETIMES_PRIORITY; |
|
147 | + ? $display_order_datetimes |
|
148 | + : EED_Event_Single::EVENT_DATETIMES_PRIORITY; |
|
149 | 149 | $CFG->EED_Event_Single->display_order_tickets = $CFG->EED_Event_Single->use_sortable_display_order |
150 | - ? $display_order_tickets |
|
151 | - : EED_Event_Single::EVENT_TICKETS_PRIORITY; |
|
150 | + ? $display_order_tickets |
|
151 | + : EED_Event_Single::EVENT_TICKETS_PRIORITY; |
|
152 | 152 | $CFG->EED_Event_Single->display_order_venue = $CFG->EED_Event_Single->use_sortable_display_order |
153 | - ? $display_order_venue |
|
154 | - : EED_Event_Single::EVENT_VENUES_PRIORITY; |
|
153 | + ? $display_order_venue |
|
154 | + : EED_Event_Single::EVENT_VENUES_PRIORITY; |
|
155 | 155 | do_action( 'AHEE__EED_Event_Single__update_template_settings__after_update', $CFG, $REQ ); |
156 | 156 | return $CFG; |
157 | 157 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @return EED_Event_Single_Caff |
30 | 30 | */ |
31 | 31 | public static function instance() { |
32 | - return parent::get_instance( __CLASS__ ); |
|
32 | + return parent::get_instance(__CLASS__); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -50,34 +50,34 @@ discard block |
||
50 | 50 | * @return void |
51 | 51 | */ |
52 | 52 | public static function set_hooks_admin() { |
53 | - define( 'EVENT_SINGLE_CAFF_TEMPLATES_PATH', plugin_dir_path( __FILE__ ) . 'templates' . DS ); |
|
54 | - define( 'EVENT_SINGLE_CAFF_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS ); |
|
53 | + define('EVENT_SINGLE_CAFF_TEMPLATES_PATH', plugin_dir_path(__FILE__).'templates'.DS); |
|
54 | + define('EVENT_SINGLE_CAFF_ASSETS_URL', plugin_dir_url(__FILE__).'assets'.DS); |
|
55 | 55 | add_action( |
56 | 56 | 'FHEE__EE_Admin_Page___load_page_dependencies__after_load__espresso_events__template_settings', |
57 | - array( 'EED_Event_Single_Caff', 'load_scripts_styles' ), |
|
57 | + array('EED_Event_Single_Caff', 'load_scripts_styles'), |
|
58 | 58 | 10 |
59 | 59 | ); |
60 | - add_action( 'AHEE__template_settings__template__before_settings_form', array( 'EED_Event_Single_Caff', 'template_settings_form' ), 10 ); |
|
61 | - add_filter( 'FHEE__General_Settings_Admin_Page__update_template_settings__data', array( 'EED_Event_Single_Caff', 'update_template_settings' ), 10, 2 ); |
|
60 | + add_action('AHEE__template_settings__template__before_settings_form', array('EED_Event_Single_Caff', 'template_settings_form'), 10); |
|
61 | + add_filter('FHEE__General_Settings_Admin_Page__update_template_settings__data', array('EED_Event_Single_Caff', 'update_template_settings'), 10, 2); |
|
62 | 62 | // AJAX |
63 | - add_action( 'wp_ajax_espresso_update_event_single_order', array( 'EED_Event_Single_Caff', 'update_event_single_order' ) ); |
|
64 | - add_action( 'wp_ajax_nopriv_espresso_update_event_single_order', array( 'EED_Event_Single_Caff', 'update_event_single_order' ) ); |
|
63 | + add_action('wp_ajax_espresso_update_event_single_order', array('EED_Event_Single_Caff', 'update_event_single_order')); |
|
64 | + add_action('wp_ajax_nopriv_espresso_update_event_single_order', array('EED_Event_Single_Caff', 'update_event_single_order')); |
|
65 | 65 | |
66 | 66 | } |
67 | 67 | |
68 | 68 | |
69 | 69 | |
70 | 70 | public static function load_scripts_styles() { |
71 | - add_action( 'admin_enqueue_scripts', array( 'EED_Event_Single_Caff', 'enqueue_scripts_styles' ), 10 ); |
|
71 | + add_action('admin_enqueue_scripts', array('EED_Event_Single_Caff', 'enqueue_scripts_styles'), 10); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
75 | 75 | |
76 | 76 | public static function enqueue_scripts_styles() { |
77 | - wp_register_style( 'eed-event-single-sortable', EVENT_SINGLE_CAFF_ASSETS_URL . 'eed_event_single_sortable.css', array(), EVENT_ESPRESSO_VERSION ); |
|
78 | - wp_enqueue_style( 'eed-event-single-sortable' ); |
|
79 | - wp_register_script( 'eed-event-single-sortable', EVENT_SINGLE_CAFF_ASSETS_URL . 'eed_event_single_sortable.js', array( 'jquery-ui-sortable' ), EVENT_ESPRESSO_VERSION, true ); |
|
80 | - wp_enqueue_script( 'eed-event-single-sortable' ); |
|
77 | + wp_register_style('eed-event-single-sortable', EVENT_SINGLE_CAFF_ASSETS_URL.'eed_event_single_sortable.css', array(), EVENT_ESPRESSO_VERSION); |
|
78 | + wp_enqueue_style('eed-event-single-sortable'); |
|
79 | + wp_register_script('eed-event-single-sortable', EVENT_SINGLE_CAFF_ASSETS_URL.'eed_event_single_sortable.js', array('jquery-ui-sortable'), EVENT_ESPRESSO_VERSION, true); |
|
80 | + wp_enqueue_script('eed-event-single-sortable'); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -91,21 +91,21 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public static function template_settings_form() { |
93 | 93 | $config = EE_Registry::instance()->CFG->template_settings; |
94 | - $config = isset( $config->EED_Event_Single ) && $config->EED_Event_Single instanceof EE_Event_Single_Config ? $config->EED_Event_Single : new EE_Event_Single_Config(); |
|
95 | - $config->use_sortable_display_order = isset( $config->use_sortable_display_order ) ? $config->use_sortable_display_order : false; |
|
96 | - $config = apply_filters( 'FHEE__EED_Event_Single__template_settings_form__event_list_config', $config ); |
|
94 | + $config = isset($config->EED_Event_Single) && $config->EED_Event_Single instanceof EE_Event_Single_Config ? $config->EED_Event_Single : new EE_Event_Single_Config(); |
|
95 | + $config->use_sortable_display_order = isset($config->use_sortable_display_order) ? $config->use_sortable_display_order : false; |
|
96 | + $config = apply_filters('FHEE__EED_Event_Single__template_settings_form__event_list_config', $config); |
|
97 | 97 | |
98 | 98 | $event_single_order_array = array(); |
99 | - $event_single_order_array[ $config->display_order_tickets ] = 'tickets'; |
|
100 | - $event_single_order_array[ $config->display_order_datetimes ] = 'datetimes'; |
|
101 | - $event_single_order_array[ $config->display_order_event ] = 'event'; |
|
102 | - $event_single_order_array[ $config->display_order_venue ] = 'venue'; |
|
99 | + $event_single_order_array[$config->display_order_tickets] = 'tickets'; |
|
100 | + $event_single_order_array[$config->display_order_datetimes] = 'datetimes'; |
|
101 | + $event_single_order_array[$config->display_order_event] = 'event'; |
|
102 | + $event_single_order_array[$config->display_order_venue] = 'venue'; |
|
103 | 103 | // get template parts |
104 | - $template_parts = EED_Event_Single::instance()->initialize_template_parts( $config ); |
|
104 | + $template_parts = EED_Event_Single::instance()->initialize_template_parts($config); |
|
105 | 105 | // convert to array so that we can add more properties |
106 | - $config = get_object_vars( $config ); |
|
107 | - $config[ 'event_single_display_order' ] = $template_parts->generate_sortable_list_of_template_parts( 'event-single-sortable-js', '', 'single-sortable-li single-sortable-js' ); |
|
108 | - EEH_Template::display_template( EVENT_SINGLE_CAFF_TEMPLATES_PATH . 'admin-event-single-settings.template.php', $config ); |
|
106 | + $config = get_object_vars($config); |
|
107 | + $config['event_single_display_order'] = $template_parts->generate_sortable_list_of_template_parts('event-single-sortable-js', '', 'single-sortable-li single-sortable-js'); |
|
108 | + EEH_Template::display_template(EVENT_SINGLE_CAFF_TEMPLATES_PATH.'admin-event-single-settings.template.php', $config); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | * @param array $REQ |
118 | 118 | * @return EE_Template_Config |
119 | 119 | */ |
120 | - public static function update_template_settings(EE_Template_Config $CFG, $REQ ) { |
|
121 | - if(! $CFG->EED_Event_Single instanceof EE_Event_Single_Config){ |
|
120 | + public static function update_template_settings(EE_Template_Config $CFG, $REQ) { |
|
121 | + if ( ! $CFG->EED_Event_Single instanceof EE_Event_Single_Config) { |
|
122 | 122 | $CFG->EED_Event_Single = new EE_Event_Single_Config(); |
123 | 123 | } |
124 | 124 | $display_order_event = $CFG->EED_Event_Single->display_order_event !== null |
@@ -134,11 +134,11 @@ discard block |
||
134 | 134 | ? $CFG->EED_Event_Single->display_order_venue |
135 | 135 | : EED_Event_Single::EVENT_VENUES_PRIORITY; |
136 | 136 | $CFG->EED_Event_Single = new EE_Event_Single_Config(); |
137 | - $CFG->EED_Event_Single->display_status_banner_single = ! empty( $REQ['display_status_banner_single'] ) |
|
137 | + $CFG->EED_Event_Single->display_status_banner_single = ! empty($REQ['display_status_banner_single']) |
|
138 | 138 | && $REQ['display_status_banner_single']; |
139 | - $CFG->EED_Event_Single->display_venue = ! empty( $REQ['display_venue'] ) && $REQ['display_venue']; |
|
140 | - $CFG->EED_Event_Single->use_sortable_display_order = ! empty( $REQ[ 'EED_Events_Single_use_sortable_display_order' ] ) |
|
141 | - ? absint( $REQ[ 'EED_Events_Single_use_sortable_display_order' ] ) |
|
139 | + $CFG->EED_Event_Single->display_venue = ! empty($REQ['display_venue']) && $REQ['display_venue']; |
|
140 | + $CFG->EED_Event_Single->use_sortable_display_order = ! empty($REQ['EED_Events_Single_use_sortable_display_order']) |
|
141 | + ? absint($REQ['EED_Events_Single_use_sortable_display_order']) |
|
142 | 142 | : 0; |
143 | 143 | $CFG->EED_Event_Single->display_order_event = $CFG->EED_Event_Single->use_sortable_display_order |
144 | 144 | ? $display_order_event |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $CFG->EED_Event_Single->display_order_venue = $CFG->EED_Event_Single->use_sortable_display_order |
153 | 153 | ? $display_order_venue |
154 | 154 | : EED_Event_Single::EVENT_VENUES_PRIORITY; |
155 | - do_action( 'AHEE__EED_Event_Single__update_template_settings__after_update', $CFG, $REQ ); |
|
155 | + do_action('AHEE__EED_Event_Single__update_template_settings__after_update', $CFG, $REQ); |
|
156 | 156 | return $CFG; |
157 | 157 | } |
158 | 158 | |
@@ -166,23 +166,23 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public static function update_event_single_order() { |
168 | 168 | $config_saved = false; |
169 | - $template_parts = sanitize_text_field( $_POST[ 'elements' ] ); |
|
170 | - if ( ! empty( $template_parts ) ) { |
|
171 | - $template_parts = explode( ',', trim( $template_parts, ',' ) ); |
|
172 | - foreach ( $template_parts as $key => $template_part ) { |
|
169 | + $template_parts = sanitize_text_field($_POST['elements']); |
|
170 | + if ( ! empty($template_parts)) { |
|
171 | + $template_parts = explode(',', trim($template_parts, ',')); |
|
172 | + foreach ($template_parts as $key => $template_part) { |
|
173 | 173 | $template_part = "display_order_$template_part"; |
174 | - $priority = ( $key * 10 ) + EED_Event_Single::EVENT_DETAILS_PRIORITY; |
|
174 | + $priority = ($key * 10) + EED_Event_Single::EVENT_DETAILS_PRIORITY; |
|
175 | 175 | EE_Registry::instance()->CFG->template_settings->EED_Event_Single->{$template_part} = $priority; |
176 | - do_action( "AHEE__EED_Event_Single__update_event_single_order__$template_part", $priority ); |
|
176 | + do_action("AHEE__EED_Event_Single__update_event_single_order__$template_part", $priority); |
|
177 | 177 | } |
178 | - $config_saved = EE_Registry::instance()->CFG->update_espresso_config( false, false ); |
|
178 | + $config_saved = EE_Registry::instance()->CFG->update_espresso_config(false, false); |
|
179 | 179 | } |
180 | - if ( $config_saved ) { |
|
181 | - EE_Error::add_success( __( 'Display Order has been successfully updated.', 'event_espresso' ) ); |
|
180 | + if ($config_saved) { |
|
181 | + EE_Error::add_success(__('Display Order has been successfully updated.', 'event_espresso')); |
|
182 | 182 | } else { |
183 | - EE_Error::add_error( __( 'Display Order was not updated.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
183 | + EE_Error::add_error(__('Display Order was not updated.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
184 | 184 | } |
185 | - echo wp_json_encode( EE_Error::get_notices( false )); |
|
185 | + echo wp_json_encode(EE_Error::get_notices(false)); |
|
186 | 186 | exit(); |
187 | 187 | } |
188 | 188 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * @param WP $WP |
196 | 196 | * @return void |
197 | 197 | */ |
198 | - public function run( $WP ) { |
|
198 | + public function run($WP) { |
|
199 | 199 | } |
200 | 200 | |
201 | 201 |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | </label> |
19 | 19 | </th> |
20 | 20 | <td> |
21 | - <?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging ); ?> |
|
21 | + <?php echo EEH_Form_Fields::select_input('use_full_logging', $values, $use_full_logging); ?> |
|
22 | 22 | <p class="description"> |
23 | 23 | <span class="reminder-spn"> |
24 | 24 | <?php _e('Please use caution when using this feature. These files may be publicly available.', 'event_espresso'); ?> |
25 | 25 | </span><br/> |
26 | - <?php echo sprintf( __('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/' . EE_Registry::instance()->CFG->admin->log_file_name() . '</b>' ); ?> |
|
26 | + <?php echo sprintf(__('Once saved, this file will be available at: %s', 'event_espresso'), '<br /><b>/wp-content/uploads/espresso/logs/'.EE_Registry::instance()->CFG->admin->log_file_name().'</b>'); ?> |
|
27 | 27 | </p> |
28 | 28 | |
29 | 29 | </td> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | </label> |
38 | 38 | </th> |
39 | 39 | <td> |
40 | - <?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging ); ?> |
|
40 | + <?php echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging); ?> |
|
41 | 41 | <p class="description"> |
42 | 42 | <?php _e('Send debugging data to the remote URL below.', 'event_espresso'); ?> |
43 | 43 | </p> |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | </label> |
53 | 53 | </th> |
54 | 54 | <td> |
55 | - <input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url;?>" /> |
|
55 | + <input name="remote_logging_url" id="remote_logging_url" size="20" class="regular-text" type="text" value="<?php echo $remote_logging_url; ?>" /> |
|
56 | 56 | <p class="description"> |
57 | 57 | <?php _e('Example: http://requestb.in/MY_UNIQUE_ID', 'event_espresso'); ?> |
58 | 58 |
@@ -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 | /** |
@@ -32,15 +32,15 @@ discard block |
||
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | - public function __construct( $routing = TRUE ) { |
|
36 | - parent::__construct( $routing ); |
|
37 | - define( 'EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'about/templates/' ); |
|
35 | + public function __construct($routing = TRUE) { |
|
36 | + parent::__construct($routing); |
|
37 | + define('EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'about/templates/'); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
41 | 41 | |
42 | 42 | protected function _extend_page_config() { |
43 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'about'; |
|
43 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'about'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | protected function _set_page_routes() { |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | protected function _whats_new() { |
113 | 113 | $steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance ? $this->_get_started_steps() : FALSE; |
114 | 114 | $steps = $steps !== FALSE ? $steps : ''; |
115 | - $this->_admin_page_title = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION ); |
|
115 | + $this->_admin_page_title = sprintf(__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION); |
|
116 | 116 | $settings_message = $steps; |
117 | - $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'). $settings_message ; |
|
118 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH . 'whats_new.template.php'; |
|
119 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
117 | + $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso').$settings_message; |
|
118 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'whats_new.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH.'whats_new.template.php'; |
|
119 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
120 | 120 | $this->display_about_admin_page(); |
121 | 121 | } |
122 | 122 | |
@@ -124,32 +124,32 @@ discard block |
||
124 | 124 | protected function _overview() { |
125 | 125 | $this->_admin_page_title = __('About Event Espresso', 'event_espresso'); |
126 | 126 | $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'); |
127 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' : EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php'; |
|
128 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
127 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'ee4-overview.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' : EE_ABOUT_TEMPLATE_PATH.'ee4-overview.template.php'; |
|
128 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
129 | 129 | $this->display_about_admin_page(); |
130 | 130 | } |
131 | 131 | |
132 | 132 | protected function _credits() { |
133 | 133 | // $this->_template_args['admin_page_title'] = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION ); |
134 | 134 | $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'); |
135 | - $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php'; |
|
136 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
135 | + $template = EE_ABOUT_TEMPLATE_PATH.'credits.template.php'; |
|
136 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
137 | 137 | $this->display_about_admin_page(); |
138 | 138 | } |
139 | 139 | |
140 | 140 | protected function _decafvpro() { |
141 | - $this->_template_args['admin_page_title'] = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION ); |
|
141 | + $this->_template_args['admin_page_title'] = sprintf(__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION); |
|
142 | 142 | $this->_template_args['admin_page_subtitle'] = sprintf(__('Event Espresso lets you focus on doing %swhat you love%s — %sorganizing your events%s', 'event_espresso'), '<em>', '</em>', '<strong>', '</strong>'); |
143 | - $template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php'; |
|
144 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
143 | + $template = EE_ABOUT_TEMPLATE_PATH.'decafvpro.template.php'; |
|
144 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
145 | 145 | $this->display_about_admin_page(); |
146 | 146 | } |
147 | 147 | |
148 | 148 | protected function _reviews() { |
149 | 149 | $this->_template_args['admin_page_title'] = __('Rave Reviews About Event Espresso 4', 'event_espresso'); |
150 | 150 | $this->_template_args['admin_page_subtitle'] = __('At Event Espresso, customer satisfaction is our ultimate goal.', 'event_espresso'); |
151 | - $template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php'; |
|
152 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
151 | + $template = EE_ABOUT_TEMPLATE_PATH.'reviews.template.php'; |
|
152 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
153 | 153 | $this->display_about_admin_page(); |
154 | 154 | } |
155 | 155 | } |
@@ -1,5 +1,5 @@ |
||
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 | /** |
@@ -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 @@ |
||
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 | /** |
@@ -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 @@ |
||
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 | /** |
@@ -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 |