@@ -74,6 +74,7 @@ |
||
74 | 74 | * [ee_tep_not_null description] |
75 | 75 | * |
76 | 76 | * @param string | array $value [description] |
77 | + * @param string $value |
|
77 | 78 | * @return bool [description] |
78 | 79 | */ |
79 | 80 | static public function ee_tep_not_null( $value ) { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'NO direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('NO direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * @param string $content content to format |
27 | 27 | * @return string formatted content |
28 | 28 | */ |
29 | - static public function admin_format_content( $content = '' ) { |
|
30 | - return wpautop( stripslashes_deep( html_entity_decode( $content, ENT_QUOTES, "UTF-8" ) ) ); |
|
29 | + static public function admin_format_content($content = '') { |
|
30 | + return wpautop(stripslashes_deep(html_entity_decode($content, ENT_QUOTES, "UTF-8"))); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | * @param boolean $protected true then we run htmlspecialchars and return |
44 | 44 | * @return string |
45 | 45 | */ |
46 | - static public function ee_tep_output_string( $string, $translate = false, $protected = false ) { |
|
47 | - if ( $protected === true ) { |
|
48 | - return htmlspecialchars( $string ); |
|
46 | + static public function ee_tep_output_string($string, $translate = false, $protected = false) { |
|
47 | + if ($protected === true) { |
|
48 | + return htmlspecialchars($string); |
|
49 | 49 | } else { |
50 | - if ( $translate === false ) { |
|
51 | - return self::ee_tep_parse_input_field_data( $string, array( '"' => '"' ) ); |
|
50 | + if ($translate === false) { |
|
51 | + return self::ee_tep_parse_input_field_data($string, array('"' => '"')); |
|
52 | 52 | } else { |
53 | - return self::ee_tep_parse_input_field_data( $string, $translate ); |
|
53 | + return self::ee_tep_parse_input_field_data($string, $translate); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | * @param array ] $parse array in the form array( 'from' => 'to', ... ) |
65 | 65 | * @return string |
66 | 66 | */ |
67 | - static public function ee_tep_parse_input_field_data( $data, $parse ) { |
|
68 | - return strtr( trim( $data ), $parse ); |
|
67 | + static public function ee_tep_parse_input_field_data($data, $parse) { |
|
68 | + return strtr(trim($data), $parse); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | * @param string | array $value [description] |
77 | 77 | * @return bool [description] |
78 | 78 | */ |
79 | - static public function ee_tep_not_null( $value ) { |
|
80 | - if ( is_array( $value ) ) { |
|
81 | - if ( count( $value ) > 0 ) { |
|
79 | + static public function ee_tep_not_null($value) { |
|
80 | + if (is_array($value)) { |
|
81 | + if (count($value) > 0) { |
|
82 | 82 | return true; |
83 | 83 | } else { |
84 | 84 | return false; |
85 | 85 | } |
86 | 86 | } else { |
87 | - if ( ( $value !== '' ) && ( strtolower( $value ) !== 'null' ) && ( strlen( trim( $value ) ) > 0 ) ) { |
|
87 | + if (($value !== '') && (strtolower($value) !== 'null') && (strlen(trim($value)) > 0)) { |
|
88 | 88 | return true; |
89 | 89 | } else { |
90 | 90 | return false; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @return string |
105 | 105 | * @deprecated v4.6.21 |
106 | 106 | */ |
107 | - static public function event_date_display( $date, $format = '' ) { |
|
107 | + static public function event_date_display($date, $format = '') { |
|
108 | 108 | EE_Error::doing_it_wrong( |
109 | 109 | __METHOD__, |
110 | 110 | __( |
@@ -1,9 +1,9 @@ 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 | $values = EEH_Form_Fields::prep_answer_options( |
4 | 4 | array( |
5 | - array( 'id' => 1, 'text' => __( 'Yes', 'event_espresso' ) ), |
|
6 | - array( 'id' => 0, 'text' => __( 'No', 'event_espresso' ) ) |
|
5 | + array('id' => 1, 'text' => __('Yes', 'event_espresso')), |
|
6 | + array('id' => 0, 'text' => __('No', 'event_espresso')) |
|
7 | 7 | ) |
8 | 8 | ); |
9 | 9 | ?> |
@@ -22,27 +22,27 @@ discard block |
||
22 | 22 | </label> |
23 | 23 | </th> |
24 | 24 | <td> |
25 | - <?php echo EEH_Form_Fields::select( 'display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single' ); ?> |
|
26 | - <p class="description"><?php _e( 'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso' ); ?></p> |
|
25 | + <?php echo EEH_Form_Fields::select('display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single'); ?> |
|
26 | + <p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso'); ?></p> |
|
27 | 27 | </td> |
28 | 28 | </tr> |
29 | 29 | |
30 | 30 | <tr> |
31 | 31 | <th> |
32 | 32 | <label for="display_venue"> |
33 | - <?php _e( 'Display Venue Details', 'event_espresso' ); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?> |
|
33 | + <?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?> |
|
34 | 34 | </label> |
35 | 35 | </th> |
36 | 36 | <td> |
37 | - <?php echo EEH_Form_Fields::select( 'display_venue', $display_venue, $values, 'display_venue', 'display_venue' ); ?> |
|
38 | - <p class="description"><?php _e( 'Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso' ); ?></p> |
|
37 | + <?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'display_venue', 'display_venue'); ?> |
|
38 | + <p class="description"><?php _e('Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso'); ?></p> |
|
39 | 39 | </td> |
40 | 40 | </tr> |
41 | 41 | |
42 | 42 | <tr> |
43 | 43 | <th> |
44 | 44 | <label for="EED_Events_Single_use_sortable_display_order"> |
45 | - <?php _e( 'Use Custom Display Order?', 'event_espresso' ); ?> |
|
45 | + <?php _e('Use Custom Display Order?', 'event_espresso'); ?> |
|
46 | 46 | </label> |
47 | 47 | </th> |
48 | 48 | <td> |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | <p class="description "> |
59 | 59 | <?php |
60 | 60 | echo sprintf( |
61 | - __( '%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Single page display, 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' ), |
|
61 | + __('%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Single page display, 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'), |
|
62 | 62 | '<span class="important-notice">', |
63 | 63 | '</span>', |
64 | 64 | '<br />' |
@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | |
71 | 71 | <tr> |
72 | 72 | <th> |
73 | - <?php _e('Display Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?> |
|
73 | + <?php _e('Display Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?> |
|
74 | 74 | </th> |
75 | 75 | <td> |
76 | 76 | |
77 | - <?php wp_nonce_field( 'espresso_update_event_single_order', 'espresso_update_event_single_order_nonce', false ); ?> |
|
77 | + <?php wp_nonce_field('espresso_update_event_single_order', 'espresso_update_event_single_order_nonce', false); ?> |
|
78 | 78 | <?php echo $event_single_display_order; ?> |
79 | 79 | |
80 | 80 | <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 single event page.', 'event_espresso'); ?></p> |
@@ -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 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * Just initializes the status of the migration |
28 | 28 | */ |
29 | 29 | public function __construct() { |
30 | - $this->_pretty_name = __( 'Update Invoice Settings', 'event_espresso' ); |
|
30 | + $this->_pretty_name = __('Update Invoice Settings', 'event_espresso'); |
|
31 | 31 | parent::__construct(); |
32 | 32 | } |
33 | 33 | |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | * @throws EE_Error |
55 | 55 | * @return int number of items ACTUALLY migrated |
56 | 56 | */ |
57 | - protected function _migration_step( $num_items = 1 ){ |
|
57 | + protected function _migration_step($num_items = 1) { |
|
58 | 58 | |
59 | 59 | $templates_relative_path = 'modules/gateways/Invoice/lib/templates/'; |
60 | - $overridden_invoice_body = EEH_Template::locate_template( $templates_relative_path . 'invoice_body.template.php', NULL, FALSE, FALSE, TRUE ); |
|
61 | - $overridden_receipt_body= EEH_Template::locate_template( $templates_relative_path . 'receipt_body.template.php', NULL, FALSE, FALSE, TRUE ); |
|
62 | - if( $overridden_invoice_body || $overridden_receipt_body ) { |
|
63 | - EE_Error::add_persistent_admin_notice( 'invoice_overriding_templates', sprintf( __( 'Note: in this version of Event Espresso, PDF and HTML Invoices and Receipts are now Messages and can be changed just like any other messages; however we noticed you had previously overriden the old default Invoice/Receipt templates. Because of this, your old Invoice/Receipt templates will continue to be used INSTEAD of the new Invoice/Receipt message equivalents (but this will be removed in an upcoming version). We recommend deleting your old Invoice/Receipt templates and using the new messages system. Then modify the new Invoice and Receipt messages\'s content in Messages -> Invoice and Messages -> Receipt.')), TRUE ); |
|
60 | + $overridden_invoice_body = EEH_Template::locate_template($templates_relative_path.'invoice_body.template.php', NULL, FALSE, FALSE, TRUE); |
|
61 | + $overridden_receipt_body = EEH_Template::locate_template($templates_relative_path.'receipt_body.template.php', NULL, FALSE, FALSE, TRUE); |
|
62 | + if ($overridden_invoice_body || $overridden_receipt_body) { |
|
63 | + EE_Error::add_persistent_admin_notice('invoice_overriding_templates', sprintf(__('Note: in this version of Event Espresso, PDF and HTML Invoices and Receipts are now Messages and can be changed just like any other messages; however we noticed you had previously overriden the old default Invoice/Receipt templates. Because of this, your old Invoice/Receipt templates will continue to be used INSTEAD of the new Invoice/Receipt message equivalents (but this will be removed in an upcoming version). We recommend deleting your old Invoice/Receipt templates and using the new messages system. Then modify the new Invoice and Receipt messages\'s content in Messages -> Invoice and Messages -> Receipt.')), TRUE); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | //regardless of whether it worked or not, we ought to continue the migration |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * ------------------------------------------------------------------------ |
23 | 23 | */ |
24 | -class EE_Template_Layout extends EE_Div_Per_Section_Layout{ |
|
24 | +class EE_Template_Layout extends EE_Div_Per_Section_Layout { |
|
25 | 25 | |
26 | 26 | protected $_layout_template_file = NULL; |
27 | 27 | protected $_layout_begin_template_file = NULL; |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | * @type array $_template_args |
43 | 43 | * } |
44 | 44 | */ |
45 | - public function __construct( $template_options = array() ) { |
|
45 | + public function __construct($template_options = array()) { |
|
46 | 46 | // loop thru incoming options |
47 | - foreach( $template_options as $key => $value ) { |
|
47 | + foreach ($template_options as $key => $value) { |
|
48 | 48 | // add underscore to $key to match property names |
49 | - $_key = '_' . $key; |
|
50 | - if ( property_exists( $this, $_key )) { |
|
49 | + $_key = '_'.$key; |
|
50 | + if (property_exists($this, $_key)) { |
|
51 | 51 | $this->{$_key} = $value; |
52 | 52 | } |
53 | 53 | } |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | * @return string |
66 | 66 | */ |
67 | 67 | public function layout_form() { |
68 | - if ( $this->_layout_template_file ) { |
|
69 | - return EEH_Template::locate_template( $this->_layout_template_file, $this->template_args(), TRUE, TRUE ); |
|
68 | + if ($this->_layout_template_file) { |
|
69 | + return EEH_Template::locate_template($this->_layout_template_file, $this->template_args(), TRUE, TRUE); |
|
70 | 70 | } else { |
71 | 71 | return parent::layout_form(); |
72 | 72 | } |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | * @return string |
80 | 80 | */ |
81 | 81 | public function layout_form_begin() { |
82 | - if($this->_layout_begin_template_file){ |
|
83 | - return EEH_Template::locate_template( $this->_layout_begin_template_file, $this->template_args(), TRUE, TRUE ); |
|
84 | - }else{ |
|
82 | + if ($this->_layout_begin_template_file) { |
|
83 | + return EEH_Template::locate_template($this->_layout_begin_template_file, $this->template_args(), TRUE, TRUE); |
|
84 | + } else { |
|
85 | 85 | return parent::layout_form_begin(); |
86 | 86 | } |
87 | 87 | } |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | * @param EE_Form_Input_Base $input |
95 | 95 | * @return string |
96 | 96 | */ |
97 | - public function layout_input( $input ) { |
|
98 | - if($this->_input_template_file){ |
|
99 | - return EEH_Template::locate_template( $this->_input_template_file, array( 'input' => $input ), TRUE, TRUE ); |
|
97 | + public function layout_input($input) { |
|
98 | + if ($this->_input_template_file) { |
|
99 | + return EEH_Template::locate_template($this->_input_template_file, array('input' => $input), TRUE, TRUE); |
|
100 | 100 | } |
101 | 101 | return parent::layout_input($input); |
102 | 102 | } |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | * @param EE_Form_Section_Proper $form_section |
110 | 110 | * @return string |
111 | 111 | */ |
112 | - public function layout_subsection( $form_section ) { |
|
113 | - if($this->_subsection_template_file){ |
|
114 | - return EEH_Template::locate_template( $this->_subsection_template_file, $this->template_args(), TRUE, TRUE ); |
|
112 | + public function layout_subsection($form_section) { |
|
113 | + if ($this->_subsection_template_file) { |
|
114 | + return EEH_Template::locate_template($this->_subsection_template_file, $this->template_args(), TRUE, TRUE); |
|
115 | 115 | } |
116 | - return parent::layout_subsection( $form_section ); |
|
116 | + return parent::layout_subsection($form_section); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | |
@@ -123,9 +123,9 @@ discard block |
||
123 | 123 | * @return string |
124 | 124 | */ |
125 | 125 | public function layout_form_end() { |
126 | - if($this->_layout_end_template_file){ |
|
127 | - return EEH_Template::locate_template( $this->_layout_end_template_file, $this->template_args(), TRUE, TRUE); |
|
128 | - }else{ |
|
126 | + if ($this->_layout_end_template_file) { |
|
127 | + return EEH_Template::locate_template($this->_layout_end_template_file, $this->template_args(), TRUE, TRUE); |
|
128 | + } else { |
|
129 | 129 | return parent::layout_form_end(); |
130 | 130 | } |
131 | 131 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | /** |
136 | 136 | * @param array $template_args |
137 | 137 | */ |
138 | - public function set_template_args( $template_args = array() ) { |
|
138 | + public function set_template_args($template_args = array()) { |
|
139 | 139 | $this->_template_args = $template_args; |
140 | 140 | } |
141 | 141 | |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * @param array $template_args |
146 | 146 | */ |
147 | - public function add_template_args( $template_args = array() ) { |
|
148 | - $this->_template_args = array_merge_recursive( $this->_template_args, $template_args ); |
|
147 | + public function add_template_args($template_args = array()) { |
|
148 | + $this->_template_args = array_merge_recursive($this->_template_args, $template_args); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | |
@@ -154,13 +154,13 @@ discard block |
||
154 | 154 | * @return array |
155 | 155 | */ |
156 | 156 | public function template_args() { |
157 | - foreach ( $this->form_section()->subsections() as $subsection_name => $subsection ) { |
|
158 | - $subsection_name = self::prep_form_subsection_key_name( $subsection_name ); |
|
159 | - if ( strpos( $subsection_name, '[' ) !== FALSE ) { |
|
160 | - $sub_name = explode( '[', $subsection_name ); |
|
161 | - $this->_template_args[ $sub_name[0] ][ rtrim( $sub_name[1], ']' ) ] = $this->layout_subsection( $subsection ); |
|
157 | + foreach ($this->form_section()->subsections() as $subsection_name => $subsection) { |
|
158 | + $subsection_name = self::prep_form_subsection_key_name($subsection_name); |
|
159 | + if (strpos($subsection_name, '[') !== FALSE) { |
|
160 | + $sub_name = explode('[', $subsection_name); |
|
161 | + $this->_template_args[$sub_name[0]][rtrim($sub_name[1], ']')] = $this->layout_subsection($subsection); |
|
162 | 162 | } else { |
163 | - $this->_template_args[ $subsection_name ] = $this->layout_subsection( $subsection ); |
|
163 | + $this->_template_args[$subsection_name] = $this->layout_subsection($subsection); |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | // d( $this->_template_args ); |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | * @param string $subsection_name |
177 | 177 | * @return string |
178 | 178 | */ |
179 | - public static function prep_form_subsection_key_name( $subsection_name = '' ) { |
|
180 | - $subsection_name = str_replace( array( '-', ' ' ), array( '', '_' ), $subsection_name ); |
|
181 | - return is_numeric( substr( $subsection_name, 0, 1 )) ? 'form_' . $subsection_name : $subsection_name; |
|
179 | + public static function prep_form_subsection_key_name($subsection_name = '') { |
|
180 | + $subsection_name = str_replace(array('-', ' '), array('', '_'), $subsection_name); |
|
181 | + return is_numeric(substr($subsection_name, 0, 1)) ? 'form_'.$subsection_name : $subsection_name; |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | |
@@ -190,8 +190,8 @@ discard block |
||
190 | 190 | * @param string $subsection_name |
191 | 191 | * @return string |
192 | 192 | */ |
193 | - public static function get_subform_name( $subsection_name = '' ) { |
|
194 | - return EE_Template_Layout::prep_form_subsection_key_name( $subsection_name ); |
|
193 | + public static function get_subform_name($subsection_name = '') { |
|
194 | + return EE_Template_Layout::prep_form_subsection_key_name($subsection_name); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public function layout_form_begin() { |
82 | 82 | if($this->_layout_begin_template_file){ |
83 | 83 | return EEH_Template::locate_template( $this->_layout_begin_template_file, $this->template_args(), TRUE, TRUE ); |
84 | - }else{ |
|
84 | + } else{ |
|
85 | 85 | return parent::layout_form_begin(); |
86 | 86 | } |
87 | 87 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | public function layout_form_end() { |
126 | 126 | if($this->_layout_end_template_file){ |
127 | 127 | return EEH_Template::locate_template( $this->_layout_end_template_file, $this->template_args(), TRUE, TRUE); |
128 | - }else{ |
|
128 | + } else{ |
|
129 | 129 | return parent::layout_form_end(); |
130 | 130 | } |
131 | 131 | } |
@@ -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 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | 11 | |
12 | 12 | /** |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @subpackage messages |
21 | 21 | * @author Darren Ethier |
22 | 22 | */ |
23 | -class EE_Pdf_messenger extends EE_messenger { |
|
23 | +class EE_Pdf_messenger extends EE_messenger { |
|
24 | 24 | |
25 | 25 | |
26 | 26 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @see abstract declaration in EE_messenger for details. |
66 | 66 | */ |
67 | 67 | protected function _set_admin_pages() { |
68 | - $this->admin_registered_pages = array( 'events_edit' => false ); |
|
68 | + $this->admin_registered_pages = array('events_edit' => false); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | protected function _set_validator_config() { |
86 | 86 | $this->_validator_config = array( |
87 | 87 | 'subject' => array( |
88 | - 'shortcodes' => array('recipient_details', 'organization', 'event', 'ticket', 'venue', 'primary_registration_details', 'event_author', 'email','event_meta', 'recipient_list', 'transaction', 'datetime_list', 'datetime') |
|
88 | + 'shortcodes' => array('recipient_details', 'organization', 'event', 'ticket', 'venue', 'primary_registration_details', 'event_author', 'email', 'event_meta', 'recipient_list', 'transaction', 'datetime_list', 'datetime') |
|
89 | 89 | ), |
90 | 90 | 'content' => array( |
91 | - 'shortcodes' => array( 'recipient_details', 'organization', 'event', 'ticket', 'venue', 'primary_registration_details', 'event_author', 'email','event_meta', 'recipient_list', 'transaction', 'datetime_list', 'datetime') |
|
91 | + 'shortcodes' => array('recipient_details', 'organization', 'event', 'ticket', 'venue', 'primary_registration_details', 'event_author', 'email', 'event_meta', 'recipient_list', 'transaction', 'datetime_list', 'datetime') |
|
92 | 92 | ), |
93 | 93 | 'attendee_list' => array( |
94 | 94 | 'shortcodes' => array('attendee', 'event_list', 'ticket_list'), |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | 'required' => array('[EVENT_LIST]') |
100 | 100 | ), |
101 | 101 | 'ticket_list' => array( |
102 | - 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list','primary_registration_details', 'recipient_details'), |
|
102 | + 'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'primary_registration_details', 'recipient_details'), |
|
103 | 103 | 'required' => array('[TICKET_LIST]') |
104 | 104 | ), |
105 | 105 | 'datetime_list' => array( |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function enqueue_scripts_styles() { |
121 | 121 | parent::enqueue_scripts_styles(); |
122 | - do_action( 'AHEE__EE_Pdf_messenger__enqueue_scripts_styles'); |
|
122 | + do_action('AHEE__EE_Pdf_messenger__enqueue_scripts_styles'); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | |
@@ -245,18 +245,18 @@ discard block |
||
245 | 245 | */ |
246 | 246 | protected function _send_message() { |
247 | 247 | $this->_template_args = array( |
248 | - 'page_title' => html_entity_decode( stripslashes( $this->_subject ), ENT_QUOTES, "UTF-8"), |
|
249 | - 'base_css' => $this->get_variation( $this->_tmp_pack, $this->_incoming_message_type->name, TRUE, 'base', $this->_variation ), |
|
250 | - 'print_css' => $this->get_variation( $this->_tmp_pack, $this->_incoming_message_type->name, TRUE, 'print', $this->_variation ), |
|
251 | - 'main_css' => $this->get_variation( $this->_tmp_pack, $this->_incoming_message_type->name, TRUE, 'main', $this->_variation ), |
|
252 | - 'extra_css' => EE_LIBRARIES_URL . 'messages/defaults/default/variations/pdf_base_default.css', |
|
253 | - 'main_body' => apply_filters( 'FHEE__EE_Pdf_messenger___send_message__main_body', wpautop(stripslashes_deep( html_entity_decode($this->_content, ENT_QUOTES,"UTF-8" ) )), $this->_content ) |
|
248 | + 'page_title' => html_entity_decode(stripslashes($this->_subject), ENT_QUOTES, "UTF-8"), |
|
249 | + 'base_css' => $this->get_variation($this->_tmp_pack, $this->_incoming_message_type->name, TRUE, 'base', $this->_variation), |
|
250 | + 'print_css' => $this->get_variation($this->_tmp_pack, $this->_incoming_message_type->name, TRUE, 'print', $this->_variation), |
|
251 | + 'main_css' => $this->get_variation($this->_tmp_pack, $this->_incoming_message_type->name, TRUE, 'main', $this->_variation), |
|
252 | + 'extra_css' => EE_LIBRARIES_URL.'messages/defaults/default/variations/pdf_base_default.css', |
|
253 | + 'main_body' => apply_filters('FHEE__EE_Pdf_messenger___send_message__main_body', wpautop(stripslashes_deep(html_entity_decode($this->_content, ENT_QUOTES, "UTF-8"))), $this->_content) |
|
254 | 254 | ); |
255 | 255 | $this->_deregister_wp_hooks(); |
256 | - add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) ); |
|
256 | + add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts_styles')); |
|
257 | 257 | $content = $this->_get_main_template(); |
258 | 258 | // die( $content ); |
259 | - $this->_do_pdf( $content ); |
|
259 | + $this->_do_pdf($content); |
|
260 | 260 | exit(0); |
261 | 261 | } |
262 | 262 | |
@@ -280,8 +280,8 @@ discard block |
||
280 | 280 | |
281 | 281 | //just add back in wp_enqueue_scripts and wp_print_footer_scripts cause that's all we want to load. |
282 | 282 | add_action('wp_head', 'wp_enqueue_scripts'); |
283 | - add_action( 'wp_footer', 'wp_print_footer_scripts' ); |
|
284 | - add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); |
|
283 | + add_action('wp_footer', 'wp_print_footer_scripts'); |
|
284 | + add_action('wp_print_footer_scripts', '_wp_footer_scripts'); |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | |
@@ -294,11 +294,11 @@ discard block |
||
294 | 294 | * @param bool $preview |
295 | 295 | * @return string |
296 | 296 | */ |
297 | - protected function _get_main_template( $preview = FALSE ) { |
|
298 | - $wrapper_template = $this->_tmp_pack->get_wrapper( 'html', 'main' ); |
|
297 | + protected function _get_main_template($preview = FALSE) { |
|
298 | + $wrapper_template = $this->_tmp_pack->get_wrapper('html', 'main'); |
|
299 | 299 | //add message type to template_args |
300 | 300 | $this->_template_args['message_type'] = $this->_incoming_message_type; |
301 | - return EEH_Template::display_template( $wrapper_template, $this->_template_args, TRUE ); |
|
301 | + return EEH_Template::display_template($wrapper_template, $this->_template_args, TRUE); |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | |
@@ -311,21 +311,21 @@ discard block |
||
311 | 311 | * |
312 | 312 | * @return void |
313 | 313 | */ |
314 | - protected function _do_pdf( $content = '' ) { |
|
315 | - $invoice_name = html_entity_decode( $this->_subject, ENT_QUOTES, "UTF-8"); |
|
314 | + protected function _do_pdf($content = '') { |
|
315 | + $invoice_name = html_entity_decode($this->_subject, ENT_QUOTES, "UTF-8"); |
|
316 | 316 | |
317 | 317 | //only load dompdf if nobody else has yet... |
318 | - if( ! defined('DOMPDF_DIR')){ |
|
318 | + if ( ! defined('DOMPDF_DIR')) { |
|
319 | 319 | define('DOMPDF_ENABLE_REMOTE', TRUE); |
320 | 320 | define('DOMPDF_ENABLE_JAVASCRIPT', FALSE); |
321 | 321 | define('DOMPDF_ENABLE_CSS_FLOAT', TRUE); |
322 | - require_once(EE_THIRD_PARTY . 'dompdf/dompdf_config.inc.php'); |
|
322 | + require_once(EE_THIRD_PARTY.'dompdf/dompdf_config.inc.php'); |
|
323 | 323 | } |
324 | 324 | $dompdf = new DOMPDF(); |
325 | 325 | $dompdf->load_html($content); |
326 | 326 | $dompdf->render(); |
327 | 327 | //forcing the browser to open a download dialog. |
328 | - $dompdf->stream($invoice_name . ".pdf", array( 'Attachment' => TRUE )); |
|
328 | + $dompdf->stream($invoice_name.".pdf", array('Attachment' => TRUE)); |
|
329 | 329 | } |
330 | 330 | |
331 | 331 |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | //namespace EventEspresso\core\libraries\templates; |
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 | |
@@ -70,23 +70,23 @@ discard block |
||
70 | 70 | * @param string $template - name or path of template to be used by EEH_Template::locate_template() |
71 | 71 | * @param int $priority - order in which template parts should be applied |
72 | 72 | */ |
73 | - public function add_template_part( $name, $label, $template, $priority ) { |
|
73 | + public function add_template_part($name, $label, $template, $priority) { |
|
74 | 74 | // SplPriorityQueue doesn't play nice with multiple items having the same priority |
75 | 75 | // so if the incoming priority is already occupied, then let's increment it by one, |
76 | 76 | // and then pass everything back into this method and try again with the new priority |
77 | - if ( isset( $this->priorities[ $priority ] ) ) { |
|
77 | + if (isset($this->priorities[$priority])) { |
|
78 | 78 | $priority++; |
79 | - $this->add_template_part( $name, $label, $template, $priority ); |
|
79 | + $this->add_template_part($name, $label, $template, $priority); |
|
80 | 80 | return; |
81 | 81 | } |
82 | 82 | // kk now we can mark this priority as being occupied |
83 | - $this->priorities[ $priority ] = true; |
|
83 | + $this->priorities[$priority] = true; |
|
84 | 84 | // create the template part and add to the queue |
85 | 85 | $this->template_parts->insert( |
86 | - new EE_Template_Part( $name, $label, $template, $priority ), |
|
86 | + new EE_Template_Part($name, $label, $template, $priority), |
|
87 | 87 | $priority |
88 | 88 | ); |
89 | - if ( $name == 'event' ) { |
|
89 | + if ($name == 'event') { |
|
90 | 90 | $this->event_desc_priority = $priority; |
91 | 91 | } |
92 | 92 | } |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | * @param string $content |
104 | 104 | * @return string |
105 | 105 | */ |
106 | - public function apply_template_part_filters( $content = '' ) { |
|
106 | + public function apply_template_part_filters($content = '') { |
|
107 | 107 | $this->template_parts->rewind(); |
108 | 108 | // loop through template parts and position content |
109 | - while ( $this->template_parts->valid() ) { |
|
109 | + while ($this->template_parts->valid()) { |
|
110 | 110 | $this->_position_template_part( |
111 | 111 | $content, |
112 | 112 | $this->template_parts->current()->template(), |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $this->template_parts->next(); |
116 | 116 | } |
117 | 117 | // now simply add our three strings of content together |
118 | - return $this->before_event_content . $this->event_content . $this->after_event_content; |
|
118 | + return $this->before_event_content.$this->event_content.$this->after_event_content; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | |
@@ -136,16 +136,16 @@ discard block |
||
136 | 136 | * @param int $priority |
137 | 137 | * @return string |
138 | 138 | */ |
139 | - protected function _position_template_part( $content, $template, $priority ) { |
|
139 | + protected function _position_template_part($content, $template, $priority) { |
|
140 | 140 | // Event Description content is the actual incoming content itself |
141 | - if ( $priority === $this->event_desc_priority ) { |
|
141 | + if ($priority === $this->event_desc_priority) { |
|
142 | 142 | $this->event_content = $content; |
143 | - } else if ( $priority < $this->event_desc_priority ) { |
|
143 | + } else if ($priority < $this->event_desc_priority) { |
|
144 | 144 | // everything BEFORE the Event Description |
145 | - $this->before_event_content .= EEH_Template::locate_template( $template ); |
|
146 | - } else if ( $priority > $this->event_desc_priority ) { |
|
145 | + $this->before_event_content .= EEH_Template::locate_template($template); |
|
146 | + } else if ($priority > $this->event_desc_priority) { |
|
147 | 147 | // everything AFTER the Event Description |
148 | - $this->after_event_content .= EEH_Template::locate_template( $template ); |
|
148 | + $this->after_event_content .= EEH_Template::locate_template($template); |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
@@ -170,15 +170,15 @@ discard block |
||
170 | 170 | $list_item_css_class = '', |
171 | 171 | $list_item_css_id_prefix = '' |
172 | 172 | ) { |
173 | - $event_archive_display_order = EEH_HTML::ul( $list_css_id, $list_css_class ); |
|
173 | + $event_archive_display_order = EEH_HTML::ul($list_css_id, $list_css_class); |
|
174 | 174 | $this->template_parts->rewind(); |
175 | 175 | // loop through template parts and add template content |
176 | - while ( $this->template_parts->valid() ) { |
|
176 | + while ($this->template_parts->valid()) { |
|
177 | 177 | $event_archive_display_order .= EEH_HTML::li( |
178 | - EEH_HTML::span( '', '', 'dashicons dashicons-arrow-up-alt2' ) . |
|
179 | - EEH_HTML::span( '', '', 'dashicons dashicons-arrow-down-alt2' ) . |
|
178 | + EEH_HTML::span('', '', 'dashicons dashicons-arrow-up-alt2'). |
|
179 | + EEH_HTML::span('', '', 'dashicons dashicons-arrow-down-alt2'). |
|
180 | 180 | $this->template_parts->current()->label(), |
181 | - $list_item_css_id_prefix . $this->template_parts->current()->name(), |
|
181 | + $list_item_css_id_prefix.$this->template_parts->current()->name(), |
|
182 | 182 | $list_item_css_class |
183 | 183 | ); |
184 | 184 | $this->template_parts->next(); |
@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | * @return string |
199 | 199 | */ |
200 | 200 | public function display_template_parts() { |
201 | - if ( WP_DEBUG ) { |
|
201 | + if (WP_DEBUG) { |
|
202 | 202 | $this->template_parts->rewind(); |
203 | - while ( $this->template_parts->valid() ) { |
|
204 | - EEH_Debug_Tools::printr( $this->template_parts->current(), 'template_part', __FILE__, __LINE__ ); |
|
203 | + while ($this->template_parts->valid()) { |
|
204 | + EEH_Debug_Tools::printr($this->template_parts->current(), 'template_part', __FILE__, __LINE__); |
|
205 | 205 | $this->template_parts->next(); |
206 | 206 | } |
207 | 207 | } |