Completed
Branch FET-10766-extract-activation-d... (a86901)
by
unknown
187:06 queued 176:14
created
core/domain/entities/shortcodes/EspressoTicketSelector.php 1 patch
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -24,82 +24,82 @@
 block discarded – undo
24 24
 
25 25
 
26 26
 
27
-    /**
28
-     * the actual shortcode tag that gets registered with WordPress
29
-     *
30
-     * @return string
31
-     */
32
-    public function getTag()
33
-    {
34
-        return 'ESPRESSO_TICKET_SELECTOR';
35
-    }
36
-
37
-
38
-
39
-    /**
40
-     * the time in seconds to cache the results of the processShortcode() method
41
-     * 0 means the processShortcode() results will NOT be cached at all
42
-     *
43
-     * @return int
44
-     */
45
-    public function cacheExpiration()
46
-    {
47
-        return 0;
48
-    }
49
-
50
-
51
-    /**
52
-     * a place for adding any initialization code that needs to run prior to wp_header().
53
-     * this may be required for shortcodes that utilize a corresponding module,
54
-     * and need to enqueue assets for that module
55
-     *
56
-     * @return void
57
-     */
58
-    public function initializeShortcode()
59
-    {
60
-        add_filter('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true');
61
-        $this->shortcodeHasBeenInitialized();
62
-    }
63
-
64
-
65
-
66
-    /**
67
-     * callback that runs when the shortcode is encountered in post content.
68
-     * IMPORTANT !!!
69
-     * remember that shortcode content should be RETURNED and NOT echoed out
70
-     *
71
-     * @param array $attributes
72
-     * @return string
73
-     * @throws InvalidArgumentException
74
-     */
75
-    public function processShortcode($attributes = array())
76
-    {
77
-        extract($attributes, EXTR_OVERWRITE);
78
-        $event_id = isset($event_id) ? $event_id : 0;
79
-        $event = EE_Registry::instance()->load_model('Event')->get_one_by_ID($event_id);
80
-        if (! $event instanceof EE_Event) {
81
-            new ExceptionStackTraceDisplay(
82
-                new InvalidArgumentException(
83
-                    sprintf(
84
-                        esc_html__(
85
-                            'A valid Event ID is required to use the "%1$s" shortcode.%4$sAn Event with an ID of "%2$s" could not be found.%4$sPlease verify that the shortcode added to this post\'s content includes an "%3$s" argument and that it\'s value corresponds to a valid Event ID.',
86
-                            'event_espresso'
87
-                        ),
88
-                        $this->getTag(),
89
-                        $event_id,
90
-                        'event_id',
91
-                        '<br />'
92
-                    )
93
-                )
94
-            );
95
-            return '';
96
-        }
97
-        ob_start();
98
-        do_action('AHEE_event_details_before_post', $event_id);
99
-        espresso_ticket_selector($event);
100
-        do_action('AHEE_event_details_after_post');
101
-        return ob_get_clean();
102
-    }
27
+	/**
28
+	 * the actual shortcode tag that gets registered with WordPress
29
+	 *
30
+	 * @return string
31
+	 */
32
+	public function getTag()
33
+	{
34
+		return 'ESPRESSO_TICKET_SELECTOR';
35
+	}
36
+
37
+
38
+
39
+	/**
40
+	 * the time in seconds to cache the results of the processShortcode() method
41
+	 * 0 means the processShortcode() results will NOT be cached at all
42
+	 *
43
+	 * @return int
44
+	 */
45
+	public function cacheExpiration()
46
+	{
47
+		return 0;
48
+	}
49
+
50
+
51
+	/**
52
+	 * a place for adding any initialization code that needs to run prior to wp_header().
53
+	 * this may be required for shortcodes that utilize a corresponding module,
54
+	 * and need to enqueue assets for that module
55
+	 *
56
+	 * @return void
57
+	 */
58
+	public function initializeShortcode()
59
+	{
60
+		add_filter('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true');
61
+		$this->shortcodeHasBeenInitialized();
62
+	}
63
+
64
+
65
+
66
+	/**
67
+	 * callback that runs when the shortcode is encountered in post content.
68
+	 * IMPORTANT !!!
69
+	 * remember that shortcode content should be RETURNED and NOT echoed out
70
+	 *
71
+	 * @param array $attributes
72
+	 * @return string
73
+	 * @throws InvalidArgumentException
74
+	 */
75
+	public function processShortcode($attributes = array())
76
+	{
77
+		extract($attributes, EXTR_OVERWRITE);
78
+		$event_id = isset($event_id) ? $event_id : 0;
79
+		$event = EE_Registry::instance()->load_model('Event')->get_one_by_ID($event_id);
80
+		if (! $event instanceof EE_Event) {
81
+			new ExceptionStackTraceDisplay(
82
+				new InvalidArgumentException(
83
+					sprintf(
84
+						esc_html__(
85
+							'A valid Event ID is required to use the "%1$s" shortcode.%4$sAn Event with an ID of "%2$s" could not be found.%4$sPlease verify that the shortcode added to this post\'s content includes an "%3$s" argument and that it\'s value corresponds to a valid Event ID.',
86
+							'event_espresso'
87
+						),
88
+						$this->getTag(),
89
+						$event_id,
90
+						'event_id',
91
+						'<br />'
92
+					)
93
+				)
94
+			);
95
+			return '';
96
+		}
97
+		ob_start();
98
+		do_action('AHEE_event_details_before_post', $event_id);
99
+		espresso_ticket_selector($event);
100
+		do_action('AHEE_event_details_after_post');
101
+		return ob_get_clean();
102
+	}
103 103
 
104 104
 
105 105
 }
Please login to merge, or discard this patch.
acceptance_tests/Helpers/MessagesAdmin.php 1 patch
Indentation   +233 added lines, -233 removed lines patch added patch discarded remove patch
@@ -10,237 +10,237 @@
 block discarded – undo
10 10
  */
11 11
 trait MessagesAdmin
12 12
 {
13
-    /**
14
-     * @param string $additional_params Any additional request parameters for the generated url should be included as
15
-     *                                  a string.
16
-     */
17
-    public function amOnMessagesActivityListTablePage($additional_params = '')
18
-    {
19
-        $this->actor()->amOnAdminPage(MessagesPage::messageActivityListTableUrl($additional_params));
20
-    }
21
-
22
-    /**
23
-     * @param string $additional_params Any additional request parameters for the generated url should be included as
24
-     *                                  a string.
25
-     */
26
-    public function amOnDefaultMessageTemplateListTablePage($additional_params = '')
27
-    {
28
-        $this->actor()->amOnAdminPage(MessagesPage::defaultMessageTemplateListTableUrl($additional_params));
29
-    }
30
-
31
-
32
-    /**
33
-     * @param string $additional_params Any additional request parameters for the generated url should be included as
34
-     *                                  a string.
35
-     */
36
-    public function amOnCustomMessageTemplateListTablePage($additional_params = '')
37
-    {
38
-        $this->actor()->amOnAdminPage(MessagesPage::customMessageTemplateListTableUrl($additional_params));
39
-    }
40
-
41
-
42
-    /**
43
-     * Directs to message settings page
44
-     */
45
-    public function amOnMessageSettingsPage()
46
-    {
47
-        $this->actor()->amOnAdminPage(MessagesPage::messageSettingsUrl());
48
-    }
49
-
50
-
51
-    public function activateMessageTypeForMessenger($message_type_slug, $messenger_slug = 'email')
52
-    {
53
-        $this->actor()->dragAndDrop(
54
-            MessagesPage::draggableSettingsBoxSelectorForMessageTypeAndMessenger($message_type_slug, $messenger_slug),
55
-            MessagesPage::MESSAGES_SETTINGS_ACTIVE_MESSAGE_TYPES_CONTAINER_SELECTOR
56
-        );
57
-    }
58
-
59
-
60
-    /**
61
-     * Assumes you are already on the list table page that has the ui for editing the template.
62
-     * @param string $message_type_slug
63
-     * @param string $context [optional] if you want to click directly to the given context in the editor
64
-     */
65
-    public function clickToEditMessageTemplateByMessageType($message_type_slug, $context = '')
66
-    {
67
-        $this->actor()->click(MessagesPage::editMessageTemplateClassByMessageType($message_type_slug, $context));
68
-    }
69
-
70
-
71
-    /**
72
-     * Use this action to verify that the count for the given text in the specified field is as expected.  For example
73
-     * filling the condition of, "There should only be 1 instance of `[email protected]` in all the 'to' column.
74
-     *
75
-     * @param int    $expected_occurence_count
76
-     * @param string $text_to_check_for
77
-     * @param string $field
78
-     * @param string $message_type_label
79
-     * @param string $message_status
80
-     * @param string $messenger
81
-     * @param string $context
82
-     */
83
-    public function verifyMatchingCountofTextInMessageActivityListTableFor(
84
-        $expected_occurence_count,
85
-        $text_to_check_for,
86
-        $field,
87
-        $message_type_label,
88
-        $message_status = MessagesPage::MESSAGE_STATUS_SENT,
89
-        $messenger = 'Email',
90
-        $context = 'Event Admin'
91
-    ) {
92
-        $elements = $this->actor()->grabMultiple(MessagesPage::messagesActivityListTableCellSelectorFor(
93
-            $field,
94
-            $message_type_label,
95
-            $message_status,
96
-            $messenger,
97
-            $context,
98
-            $text_to_check_for,
99
-            0
100
-        ));
101
-        $actual_count = count($elements);
102
-        $this->actor()->assertEquals(
103
-            $expected_occurence_count,
104
-            $actual_count,
105
-            sprintf(
106
-                'Expected %s of the %s text for the %s field but there were actually %s counted.',
107
-                $expected_occurence_count,
108
-                $text_to_check_for,
109
-                $field,
110
-                $actual_count
111
-            )
112
-        );
113
-    }
114
-
115
-
116
-    /**
117
-     * This will create a custom message template for the given messenger and message type from the context of the
118
-     * default (global) message template list table.
119
-     * Also takes care of verifying the template was created.
120
-     * @param string $message_type_label
121
-     * @param string $messenger_label
122
-     */
123
-    public function createCustomMessageTemplateFromDefaultFor($message_type_label, $messenger_label)
124
-    {
125
-        $this->amOnDefaultMessageTemplateListTablePage();
126
-        $this->actor()->click(
127
-            MessagesPage::createCustomButtonForMessageTypeAndMessenger(
128
-                $message_type_label,
129
-                $messenger_label
130
-            )
131
-        );
132
-        $this->actor()->seeInField('#title', 'New Custom Template');
133
-    }
134
-
135
-
136
-    /**
137
-     * This switches the context of the current messages template to the given reference.
138
-     * @param string $context_reference  This should be the visible label for the option.
139
-     */
140
-    public function switchContextTo($context_reference)
141
-    {
142
-        $this->actor()->selectOption(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR, $context_reference);
143
-        $this->actor()->click(MessagesPage::MESSAGES_CONTEXT_SWITCHER_BUTTON_SELECTOR);
144
-        $this->actor()->waitForText($context_reference, 10, 'h1');
145
-    }
146
-
147
-
148
-    /**
149
-     * This takes care of clicking the View Message icon for the given parameters.
150
-     * Assumes you are already viewing the messages activity list table.
151
-     * @param        $message_type_label
152
-     * @param        $message_status
153
-     * @param string $messenger
154
-     * @param string $context
155
-     * @param int    $number_in_set
156
-     */
157
-    public function viewMessageInMessagesListTableFor(
158
-        $message_type_label,
159
-        $message_status = MessagesPage::MESSAGE_STATUS_SENT,
160
-        $messenger = 'Email',
161
-        $context = 'Event Admin',
162
-        $number_in_set = 1
163
-    ) {
164
-        $this->actor()->click(MessagesPage::messagesActivityListTableViewButtonSelectorFor(
165
-            $message_type_label,
166
-            $message_status,
167
-            $messenger,
168
-            $context,
169
-            $number_in_set
170
-        ));
171
-    }
172
-
173
-
174
-    /**
175
-     * Takes care of deleting a message matching the given parameters via the message activity list table.
176
-     * Assumes you are already viewing the messages activity list table.
177
-     * @param        $message_type_label
178
-     * @param        $message_status
179
-     * @param string $messenger
180
-     * @param string $context
181
-     * @param int    $number_in_set
182
-     */
183
-    public function deleteMessageInMessagesListTableFor(
184
-        $message_type_label,
185
-        $message_status = MessagesPage::MESSAGE_STATUS_SENT,
186
-        $messenger = 'Email',
187
-        $context = 'Event Admin',
188
-        $number_in_set = 1
189
-    ) {
190
-        $this->actor()->moveMouseOver(
191
-            MessagesPage::messagesActivityListTableCellSelectorFor(
192
-                'to',
193
-                $message_type_label,
194
-                $message_status,
195
-                $messenger,
196
-                $context,
197
-                '',
198
-                $number_in_set
199
-            )
200
-        );
201
-        $this->actor()->waitForElementVisible(
202
-            MessagesPage::messagesActivityListTableDeleteActionSelectorFor(
203
-                $message_type_label,
204
-                $message_status,
205
-                $messenger,
206
-                $context,
207
-                $number_in_set
208
-            )
209
-        );
210
-        $this->actor()->click(
211
-            MessagesPage::messagesActivityListTableDeleteActionSelectorFor(
212
-                $message_type_label,
213
-                $message_status,
214
-                $messenger,
215
-                $context,
216
-                $number_in_set
217
-            )
218
-        );
219
-        $this->actor()->waitForText('successfully deleted');
220
-    }
221
-
222
-
223
-    /**
224
-     * Assuming you have already triggered the view modal for a single message from the context of the message activity
225
-     * list table, this will take care of validating the given text is in that window.
226
-     * @param string $text_to_view
227
-     */
228
-    public function seeTextInViewMessageModal($text_to_view, $should_not_see = false)
229
-    {
230
-        $this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
231
-        $this->actor()->switchToIframe('message-view-window');
232
-        $should_not_see ? $this->actor()->dontSee($text_to_view) : $this->actor()->see($text_to_view);
233
-        $this->actor()->switchToIframe();
234
-    }
235
-
236
-
237
-    /**
238
-     * Assuming you have already triggered the view modal for a single message from the context of the message activity
239
-     * list table, this will take care of validating the given text is NOT that window.
240
-     * @param string $text_to_view
241
-     */
242
-    public function dontSeeTextInViewMessageModal($text_to_view)
243
-    {
244
-        $this->seeTextInViewMessageModal($text_to_view, true);
245
-    }
13
+	/**
14
+	 * @param string $additional_params Any additional request parameters for the generated url should be included as
15
+	 *                                  a string.
16
+	 */
17
+	public function amOnMessagesActivityListTablePage($additional_params = '')
18
+	{
19
+		$this->actor()->amOnAdminPage(MessagesPage::messageActivityListTableUrl($additional_params));
20
+	}
21
+
22
+	/**
23
+	 * @param string $additional_params Any additional request parameters for the generated url should be included as
24
+	 *                                  a string.
25
+	 */
26
+	public function amOnDefaultMessageTemplateListTablePage($additional_params = '')
27
+	{
28
+		$this->actor()->amOnAdminPage(MessagesPage::defaultMessageTemplateListTableUrl($additional_params));
29
+	}
30
+
31
+
32
+	/**
33
+	 * @param string $additional_params Any additional request parameters for the generated url should be included as
34
+	 *                                  a string.
35
+	 */
36
+	public function amOnCustomMessageTemplateListTablePage($additional_params = '')
37
+	{
38
+		$this->actor()->amOnAdminPage(MessagesPage::customMessageTemplateListTableUrl($additional_params));
39
+	}
40
+
41
+
42
+	/**
43
+	 * Directs to message settings page
44
+	 */
45
+	public function amOnMessageSettingsPage()
46
+	{
47
+		$this->actor()->amOnAdminPage(MessagesPage::messageSettingsUrl());
48
+	}
49
+
50
+
51
+	public function activateMessageTypeForMessenger($message_type_slug, $messenger_slug = 'email')
52
+	{
53
+		$this->actor()->dragAndDrop(
54
+			MessagesPage::draggableSettingsBoxSelectorForMessageTypeAndMessenger($message_type_slug, $messenger_slug),
55
+			MessagesPage::MESSAGES_SETTINGS_ACTIVE_MESSAGE_TYPES_CONTAINER_SELECTOR
56
+		);
57
+	}
58
+
59
+
60
+	/**
61
+	 * Assumes you are already on the list table page that has the ui for editing the template.
62
+	 * @param string $message_type_slug
63
+	 * @param string $context [optional] if you want to click directly to the given context in the editor
64
+	 */
65
+	public function clickToEditMessageTemplateByMessageType($message_type_slug, $context = '')
66
+	{
67
+		$this->actor()->click(MessagesPage::editMessageTemplateClassByMessageType($message_type_slug, $context));
68
+	}
69
+
70
+
71
+	/**
72
+	 * Use this action to verify that the count for the given text in the specified field is as expected.  For example
73
+	 * filling the condition of, "There should only be 1 instance of `[email protected]` in all the 'to' column.
74
+	 *
75
+	 * @param int    $expected_occurence_count
76
+	 * @param string $text_to_check_for
77
+	 * @param string $field
78
+	 * @param string $message_type_label
79
+	 * @param string $message_status
80
+	 * @param string $messenger
81
+	 * @param string $context
82
+	 */
83
+	public function verifyMatchingCountofTextInMessageActivityListTableFor(
84
+		$expected_occurence_count,
85
+		$text_to_check_for,
86
+		$field,
87
+		$message_type_label,
88
+		$message_status = MessagesPage::MESSAGE_STATUS_SENT,
89
+		$messenger = 'Email',
90
+		$context = 'Event Admin'
91
+	) {
92
+		$elements = $this->actor()->grabMultiple(MessagesPage::messagesActivityListTableCellSelectorFor(
93
+			$field,
94
+			$message_type_label,
95
+			$message_status,
96
+			$messenger,
97
+			$context,
98
+			$text_to_check_for,
99
+			0
100
+		));
101
+		$actual_count = count($elements);
102
+		$this->actor()->assertEquals(
103
+			$expected_occurence_count,
104
+			$actual_count,
105
+			sprintf(
106
+				'Expected %s of the %s text for the %s field but there were actually %s counted.',
107
+				$expected_occurence_count,
108
+				$text_to_check_for,
109
+				$field,
110
+				$actual_count
111
+			)
112
+		);
113
+	}
114
+
115
+
116
+	/**
117
+	 * This will create a custom message template for the given messenger and message type from the context of the
118
+	 * default (global) message template list table.
119
+	 * Also takes care of verifying the template was created.
120
+	 * @param string $message_type_label
121
+	 * @param string $messenger_label
122
+	 */
123
+	public function createCustomMessageTemplateFromDefaultFor($message_type_label, $messenger_label)
124
+	{
125
+		$this->amOnDefaultMessageTemplateListTablePage();
126
+		$this->actor()->click(
127
+			MessagesPage::createCustomButtonForMessageTypeAndMessenger(
128
+				$message_type_label,
129
+				$messenger_label
130
+			)
131
+		);
132
+		$this->actor()->seeInField('#title', 'New Custom Template');
133
+	}
134
+
135
+
136
+	/**
137
+	 * This switches the context of the current messages template to the given reference.
138
+	 * @param string $context_reference  This should be the visible label for the option.
139
+	 */
140
+	public function switchContextTo($context_reference)
141
+	{
142
+		$this->actor()->selectOption(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR, $context_reference);
143
+		$this->actor()->click(MessagesPage::MESSAGES_CONTEXT_SWITCHER_BUTTON_SELECTOR);
144
+		$this->actor()->waitForText($context_reference, 10, 'h1');
145
+	}
146
+
147
+
148
+	/**
149
+	 * This takes care of clicking the View Message icon for the given parameters.
150
+	 * Assumes you are already viewing the messages activity list table.
151
+	 * @param        $message_type_label
152
+	 * @param        $message_status
153
+	 * @param string $messenger
154
+	 * @param string $context
155
+	 * @param int    $number_in_set
156
+	 */
157
+	public function viewMessageInMessagesListTableFor(
158
+		$message_type_label,
159
+		$message_status = MessagesPage::MESSAGE_STATUS_SENT,
160
+		$messenger = 'Email',
161
+		$context = 'Event Admin',
162
+		$number_in_set = 1
163
+	) {
164
+		$this->actor()->click(MessagesPage::messagesActivityListTableViewButtonSelectorFor(
165
+			$message_type_label,
166
+			$message_status,
167
+			$messenger,
168
+			$context,
169
+			$number_in_set
170
+		));
171
+	}
172
+
173
+
174
+	/**
175
+	 * Takes care of deleting a message matching the given parameters via the message activity list table.
176
+	 * Assumes you are already viewing the messages activity list table.
177
+	 * @param        $message_type_label
178
+	 * @param        $message_status
179
+	 * @param string $messenger
180
+	 * @param string $context
181
+	 * @param int    $number_in_set
182
+	 */
183
+	public function deleteMessageInMessagesListTableFor(
184
+		$message_type_label,
185
+		$message_status = MessagesPage::MESSAGE_STATUS_SENT,
186
+		$messenger = 'Email',
187
+		$context = 'Event Admin',
188
+		$number_in_set = 1
189
+	) {
190
+		$this->actor()->moveMouseOver(
191
+			MessagesPage::messagesActivityListTableCellSelectorFor(
192
+				'to',
193
+				$message_type_label,
194
+				$message_status,
195
+				$messenger,
196
+				$context,
197
+				'',
198
+				$number_in_set
199
+			)
200
+		);
201
+		$this->actor()->waitForElementVisible(
202
+			MessagesPage::messagesActivityListTableDeleteActionSelectorFor(
203
+				$message_type_label,
204
+				$message_status,
205
+				$messenger,
206
+				$context,
207
+				$number_in_set
208
+			)
209
+		);
210
+		$this->actor()->click(
211
+			MessagesPage::messagesActivityListTableDeleteActionSelectorFor(
212
+				$message_type_label,
213
+				$message_status,
214
+				$messenger,
215
+				$context,
216
+				$number_in_set
217
+			)
218
+		);
219
+		$this->actor()->waitForText('successfully deleted');
220
+	}
221
+
222
+
223
+	/**
224
+	 * Assuming you have already triggered the view modal for a single message from the context of the message activity
225
+	 * list table, this will take care of validating the given text is in that window.
226
+	 * @param string $text_to_view
227
+	 */
228
+	public function seeTextInViewMessageModal($text_to_view, $should_not_see = false)
229
+	{
230
+		$this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
231
+		$this->actor()->switchToIframe('message-view-window');
232
+		$should_not_see ? $this->actor()->dontSee($text_to_view) : $this->actor()->see($text_to_view);
233
+		$this->actor()->switchToIframe();
234
+	}
235
+
236
+
237
+	/**
238
+	 * Assuming you have already triggered the view modal for a single message from the context of the message activity
239
+	 * list table, this will take care of validating the given text is NOT that window.
240
+	 * @param string $text_to_view
241
+	 */
242
+	public function dontSeeTextInViewMessageModal($text_to_view)
243
+	{
244
+		$this->seeTextInViewMessageModal($text_to_view, true);
245
+	}
246 246
 }
Please login to merge, or discard this patch.
caffeinated/admin/extend/about/Extend_About_Admin_Page.core.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
caffeinated/admin/extend/about/templates/ee4-overview.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <div class="changelog">
2 2
 	<h2 class="about-headline-callout"><?php esc_html_e('Welcome to Event Espresso 4!', 'event_espresso'); ?></h2>
3
-	<p><?php echo sprintf( esc_html__('Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Caffeinated/Regular version of Event Espresso, but we also have a hosted version called %sEvent Smart%s for customers that want to cut back on their hosting and security expenses.', 'event_espresso'),'<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Caffeinated">','</a>'); ?></p>
3
+	<p><?php echo sprintf(esc_html__('Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Caffeinated/Regular version of Event Espresso, but we also have a hosted version called %sEvent Smart%s for customers that want to cut back on their hosting and security expenses.', 'event_espresso'), '<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Caffeinated">', '</a>'); ?></p>
4 4
 	<h2><?php esc_html_e('Powering 40,000+ event websites; $100 million in ticket sales per year!', 'event_espresso'); ?></h2>
5
-	<p><?php echo sprintf( esc_html__('Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The lite version of the plugin provides everything that you need to manage your event using WordPress.', 'event_espresso'),'<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf" rel="nofollow">','</a>'); ?></p>
5
+	<p><?php echo sprintf(esc_html__('Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The lite version of the plugin provides everything that you need to manage your event using WordPress.', 'event_espresso'), '<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf" rel="nofollow">', '</a>'); ?></p>
6 6
 	<div class="feature-section col three-col about-updates">
7 7
 		<div class="col-1">
8 8
 			<img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/publish_meta_box.jpg">
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 	<h2 class="about-headline-callout"><?php esc_html_e('People Like You Manage Event Registration with WordPress', 'event_espresso'); ?></h2>
61 61
 	<div class="feature-section col two-col">
62 62
 		<div class="grid_6">
63
-			<p><?php echo sprintf( esc_html__('Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.', 'event_espresso'),'<strong>','</strong>'); ?></p>
63
+			<p><?php echo sprintf(esc_html__('Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.', 'event_espresso'), '<strong>', '</strong>'); ?></p>
64 64
 			<p><?php esc_html_e('Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.', 'event_espresso'); ?></p>
65 65
 		</div>
66 66
 			<div class="grid_6">
67
-			<p><?php echo sprintf( esc_html__('Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.', 'event_espresso'),'<strong>','</strong>'); ?></p>
67
+			<p><?php echo sprintf(esc_html__('Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.', 'event_espresso'), '<strong>', '</strong>'); ?></p>
68 68
 			<p><?php esc_html_e('If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.', 'event_espresso'); ?></p>
69 69
 		</div>
70 70
 	</div>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 			<h3><?php esc_html_e('Turn your blog into a complete event registration and management system', 'event_espresso'); ?></h3>
75 75
 			<p><?php esc_html_e('Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!', 'event_espresso'); ?></p>
76 76
 			<p><?php esc_html_e('With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.', 'event_espresso'); ?></p>
77
-			<p><?php echo sprintf( esc_html__('%sLearn more >>%s', 'event_espresso'), '<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">', '</a>' ); ?></p>
77
+			<p><?php echo sprintf(esc_html__('%sLearn more >>%s', 'event_espresso'), '<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">', '</a>'); ?></p>
78 78
 		</div>
79 79
 		<div><img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/single-event-page.jpg"></div>
80 80
 	</div>
Please login to merge, or discard this patch.
admin_pages/about/templates/reviews.template.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<h2 style="text-align: left;"><?php esc_html_e( 'Who uses Event Espresso?', 'event_espresso'); ?></h2>
2
-<p><?php echo sprintf( esc_html__('Event Espresso is used by over 40,000 event organizers across the world. They host %sconferences%s, %sart classes%s, training courses, concerts, fundraisers, workshops, %sfilm festivals%s, %spaint and wine%s, and more.', 'event_espresso'), '<a href="https://eventespresso.com/use-cases/conferences/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">', '</a>', '<a href="https://eventespresso.com/use-cases/art-classes/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">', '</a>','<a href="https://eventespresso.com/use-cases/film-festival-ticketing-software/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">','</a>','<a href="https://eventespresso.com/use-cases/paint-wine-party-ticketing-software/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">','</a>');?></p>
1
+<h2 style="text-align: left;"><?php esc_html_e('Who uses Event Espresso?', 'event_espresso'); ?></h2>
2
+<p><?php echo sprintf(esc_html__('Event Espresso is used by over 40,000 event organizers across the world. They host %sconferences%s, %sart classes%s, training courses, concerts, fundraisers, workshops, %sfilm festivals%s, %spaint and wine%s, and more.', 'event_espresso'), '<a href="https://eventespresso.com/use-cases/conferences/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">', '</a>', '<a href="https://eventespresso.com/use-cases/art-classes/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">', '</a>', '<a href="https://eventespresso.com/use-cases/film-festival-ticketing-software/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">', '</a>', '<a href="https://eventespresso.com/use-cases/paint-wine-party-ticketing-software/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">', '</a>'); ?></p>
3 3
 
4 4
 <div class="changelog">
5 5
 	<h2 class="about-headline-callout"><?php _e('Rave Reviews About Event Espresso 4', 'event_espresso'); ?></h2>
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 		
62 62
 	</div>
63 63
 	<?php
64
-		if ( !defined('EE_CAF_URL') ) {
64
+		if ( ! defined('EE_CAF_URL')) {
65 65
 			?>
66
-			<div align="right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=reviews+tab" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e( 'Upgrade Now!', 'event_espresso' ) ?></a></div>
66
+			<div align="right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=reviews+tab" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e('Upgrade Now!', 'event_espresso') ?></a></div>
67 67
 			<?php
68 68
 		}
69 69
 	?>
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 		
125 125
 	</div>
126 126
 	<?php
127
-		if ( !defined('EE_CAF_URL') ) {
127
+		if ( ! defined('EE_CAF_URL')) {
128 128
 			?>
129
-			<div align="right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=reviews+tab" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e( 'Upgrade Now!', 'event_espresso' ) ?></a></div>
129
+			<div align="right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=reviews+tab" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e('Upgrade Now!', 'event_espresso') ?></a></div>
130 130
 			<?php
131 131
 		}
132 132
 	?>
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 		</div>
180 180
 	</div>
181 181
 	<?php
182
-		if ( !defined('EE_CAF_URL') ) {
182
+		if ( ! defined('EE_CAF_URL')) {
183 183
 			?>
184
-			<div align="right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=reviews+tab" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e( 'Upgrade Now!', 'event_espresso' ) ?></a></div>
184
+			<div align="right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=reviews+tab" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e('Upgrade Now!', 'event_espresso') ?></a></div>
185 185
 			<?php
186 186
 		}
187 187
 	?>
Please login to merge, or discard this patch.
admin_pages/about/templates/ee4-overview.template.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <div class="changelog">
2 2
 	<?php
3 3
 	//maintenance mode on?
4
-	if ( EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ) {
4
+	if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) {
5 5
 		?>
6 6
 		<div class="ee-attention">
7
-			<h2 class="ee-maintenance-mode-callout"><?php  esc_html_e('Event Espresso is in full maintenance mode.' , 'event_espresso'); ?></h2>
7
+			<h2 class="ee-maintenance-mode-callout"><?php  esc_html_e('Event Espresso is in full maintenance mode.', 'event_espresso'); ?></h2>
8 8
 			<p>
9 9
 				<?php
10 10
 				printf(
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 	?>
21 21
 
22 22
 	<h2 class="about-headline-callout"><?php esc_html_e('Welcome to the Decaf (free) Version of Event Espresso 4!', 'event_espresso'); ?></h2>
23
-	<p><?php echo sprintf( esc_html__('Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Decaf version of Event Espresso, but we also have a premium version called %sEvent Espreso 4 Regular%s and a hosted version called %sEvent Smart%s (SaaS).', 'event_espresso'),'<a href="?page=espresso_about&action=decafvpro">','</a>','<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf">','</a>'); ?></p>
23
+	<p><?php echo sprintf(esc_html__('Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Decaf version of Event Espresso, but we also have a premium version called %sEvent Espreso 4 Regular%s and a hosted version called %sEvent Smart%s (SaaS).', 'event_espresso'), '<a href="?page=espresso_about&action=decafvpro">', '</a>', '<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf">', '</a>'); ?></p>
24 24
 	<h2><?php esc_html_e('Powering 40,000+ event websites; $100 million in ticket sales per year!', 'event_espresso'); ?></h2>
25
-	<p><?php echo sprintf( esc_html__('Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The Decaf (free) version of the plugin provides everything that you need to manage your event using WordPress.', 'event_espresso'),'<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=plugin_description_tab&amp;utm_content=EE4+Decaf">','</a>'); ?></p>
25
+	<p><?php echo sprintf(esc_html__('Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The Decaf (free) version of the plugin provides everything that you need to manage your event using WordPress.', 'event_espresso'), '<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=plugin_description_tab&amp;utm_content=EE4+Decaf">', '</a>'); ?></p>
26 26
 	<div class="feature-section col three-col about-updates">
27 27
 		<div class="col-1">
28 28
 			<img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/publish_meta_box.jpg">
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 	<h2 class="about-headline-callout"><?php esc_html_e('People Like You Manage Event Registration with WordPress', 'event_espresso'); ?></h2>
81 81
 	<div class="feature-section col two-col">
82 82
 		<div class="grid_6">
83
-			<p><?php echo sprintf( esc_html__('Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.', 'event_espresso'),'<strong>','</strong>'); ?></p>
83
+			<p><?php echo sprintf(esc_html__('Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.', 'event_espresso'), '<strong>', '</strong>'); ?></p>
84 84
 			<p><?php esc_html_e('Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.', 'event_espresso'); ?></p>
85 85
 		</div>
86 86
 			<div class="grid_6">
87
-			<p><?php echo sprintf( esc_html__('Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.', 'event_espresso'),'<strong>','</strong>'); ?></p>
87
+			<p><?php echo sprintf(esc_html__('Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.', 'event_espresso'), '<strong>', '</strong>'); ?></p>
88 88
 			<p><?php esc_html_e('If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.', 'event_espresso'); ?></p>
89 89
 		</div>
90 90
 	</div>
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 			<h3><?php esc_html_e('Turn your blog into a complete event registration and management system', 'event_espresso'); ?></h3>
95 95
 			<p><?php esc_html_e('Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!', 'event_espresso'); ?></p>
96 96
 			<p><?php esc_html_e('With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.', 'event_espresso'); ?></p>
97
-			<p><?php echo sprintf( esc_html__('%sLearn more >>%s', 'event_espresso'), '<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">', '</a>' ); ?></p>
97
+			<p><?php echo sprintf(esc_html__('%sLearn more >>%s', 'event_espresso'), '<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">', '</a>'); ?></p>
98 98
 		</div>
99 99
 		<div><img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/single-event-page.jpg"></div>
100 100
 	</div>
Please login to merge, or discard this patch.
admin_pages/about/templates/decafvpro.template.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<p><?php echo sprintf( esc_html__('We offer a free version of Event Espresso 4 called Decaf which is a good fit for basic events. Need more features like custom registration forms and advanced email notifications? %sUpgrade to Event Espresso 4 (Regular)%s.', 'event_espresso'),'<a href="https://eventespresso.com/pricing/?ee_ver=ee4&utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">','</a>');?><br>
1
+<p><?php echo sprintf(esc_html__('We offer a free version of Event Espresso 4 called Decaf which is a good fit for basic events. Need more features like custom registration forms and advanced email notifications? %sUpgrade to Event Espresso 4 (Regular)%s.', 'event_espresso'), '<a href="https://eventespresso.com/pricing/?ee_ver=ee4&utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular">', '</a>'); ?><br>
2 2
 
3 3
 <?php
4 4
 
@@ -8,43 +8,43 @@  discard block
 block discarded – undo
8 8
 
9 9
 $features = array(
10 10
 	'pricing-options' => array(
11
-		'label'   	=> esc_html__( 'Handle multiple dates and pricing options', 'event_espresso' ),
11
+		'label'   	=> esc_html__('Handle multiple dates and pricing options', 'event_espresso'),
12 12
 		'decaf'     	=> '<span class="dashicons dashicons-no-alt"></span>',
13 13
 		'regular'	=> '<span class="dashicons dashicons-yes"></span></i>',
14 14
 		'class'		=> 'alternate'
15 15
 	),
16 16
 	'custom-registration' => array(
17
-		'label'  	=> esc_html__( 'Create custom registration forms', 'event_espresso' ),
17
+		'label'  	=> esc_html__('Create custom registration forms', 'event_espresso'),
18 18
 		'decaf'     	=> '<span class="dashicons dashicons-no-alt"></span>',
19 19
 		'regular' 	=> '<span class="dashicons dashicons-yes"></span></i>',
20 20
 		'class'		=> 'none'
21 21
 	),
22 22
 	'advanced-notifications' => array(
23
-		'label'       => esc_html__( 'Customize advanced email notifications', 'event_espresso' ),
23
+		'label'       => esc_html__('Customize advanced email notifications', 'event_espresso'),
24 24
 		'decaf'     => '<span class="dashicons dashicons-no-alt"></span>',
25 25
 		'regular' => '<span class="dashicons dashicons-yes"></span></i>',
26 26
 		'class'		=> 'alternate'
27 27
 	),
28 28
 	'manage-taxes'    => array(
29
-		'label'       => esc_html__( 'Manage taxes', 'event_espresso' ),
29
+		'label'       => esc_html__('Manage taxes', 'event_espresso'),
30 30
 		'decaf'     => '<span class="dashicons dashicons-no-alt"></span>',
31 31
 		'regular' => '<span class="dashicons dashicons-yes"></span></i>',
32 32
 		'class'		=> 'none'
33 33
 	),
34 34
 	'typography'       => array(
35
-		'label'       => esc_html__( 'Additional payment methods available', 'event_espresso' ),
35
+		'label'       => esc_html__('Additional payment methods available', 'event_espresso'),
36 36
 		'decaf'     => '<span class="dashicons dashicons-no-alt"></span>',
37 37
 		'regular' => '<span class="dashicons dashicons-yes"></span></i>',
38 38
 		'class'		=> 'alternate'
39 39
 	),
40 40
 	'add-on-compatibility' => array(
41
-		'label'       => esc_html__( 'Compatibility with add-ons', 'event_espresso' ),
41
+		'label'       => esc_html__('Compatibility with add-ons', 'event_espresso'),
42 42
 		'decaf'     => '<span class="dashicons dashicons-no-alt"></span>',
43 43
 		'regular' => '<span class="dashicons dashicons-yes"></span></i>',
44 44
 		'class'		=> 'none'
45 45
 	),
46 46
 	'best-support' => array(
47
-		'label'       => esc_html__( 'Best in class support', 'event_espresso' ),
47
+		'label'       => esc_html__('Best in class support', 'event_espresso'),
48 48
 		'decaf'     => '<span class="dashicons dashicons-no-alt"></span>',
49 49
 		'regular' => '<span class="dashicons dashicons-yes"></span></i>',
50 50
 		'class'		=> 'alternate'
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
         <thead>
57 57
         <tr>
58 58
             <th></th>
59
-            <th><?php esc_html_e( 'Decaf', 'event_espresso' ) ?></th>
60
-            <th><?php esc_html_e( 'Regular', 'event_espresso' ) ?></th>
59
+            <th><?php esc_html_e('Decaf', 'event_espresso') ?></th>
60
+            <th><?php esc_html_e('Regular', 'event_espresso') ?></th>
61 61
         </tr>
62 62
         </thead>
63 63
         <tbody>
64
-		<?php foreach ( $features as $feature ): ?>
64
+		<?php foreach ($features as $feature): ?>
65 65
             <tr class="<?php echo $feature['class']; ?>">
66 66
                 <td class="feature">
67 67
                     <h3>
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		<?php endforeach; ?>
79 79
         <tr>
80 80
             <td></td>
81
-            <td colspan="2" class="text-right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e( 'Upgrade Now!', 'event_espresso' ) ?></a></td>
81
+            <td colspan="2" class="text-right"><a href="https://eventespresso.com/pricing/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=decaf_about_page&amp;utm_content=Decaf+vs+Regular" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span><?php esc_html_e('Upgrade Now!', 'event_espresso') ?></a></td>
82 82
         </tr>
83 83
         </tbody>
84 84
     </table>
Please login to merge, or discard this patch.
admin_pages/about/About_Admin_Page.core.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 /**
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
 		//Copied from _whats_new()
140 140
 		$steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance ? $this->_get_started_steps() : FALSE;
141 141
 		$steps = $steps !== FALSE ? $steps : '';
142
-		$this->_admin_page_title = sprintf( esc_html__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION );
142
+		$this->_admin_page_title = sprintf(esc_html__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION);
143 143
 		$settings_message = $steps;
144
-		$this->_template_args['admin_page_subtitle'] = esc_html__('Thank you for choosing Event Espresso, the most powerful, and free, Event Management plugin for WordPress.', 'event_espresso' ) . $settings_message;
145
-		$template = EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php';
146
-		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
144
+		$this->_template_args['admin_page_subtitle'] = esc_html__('Thank you for choosing Event Espresso, the most powerful, and free, Event Management plugin for WordPress.', 'event_espresso').$settings_message;
145
+		$template = EE_ABOUT_TEMPLATE_PATH.'ee4-overview.template.php';
146
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE);
147 147
 		$this->display_about_admin_page();
148 148
 	}
149 149
 
@@ -151,36 +151,36 @@  discard block
 block discarded – undo
151 151
 
152 152
 	protected function _get_started_steps() {
153 153
 		$steps = '<h2>'.esc_html__('Getting Started').'</h2>';
154
-		$step_one = '<p>'.sprintf( esc_html__('%sStep 1%s: Visit your %sOrganization Settings%s and add/update your details.', 'event_espresso'), '<strong>', '</strong>', '<a href="admin.php?page=espresso_general_settings">', '</a>') .'</strong></p>';
155
-		$step_two = '<p>'.sprintf( esc_html__('%sStep 2%s: Setup your %sPayment Methods%s.', 'event_espresso'), '<strong>', '</strong>', '<a href="admin.php?page=espresso_payment_settings">', '</a>') .'</strong></p>';
156
-		$step_three = '<p>'.sprintf( esc_html__('%sStep 3%s: Create your %sFirst Event%s.', 'event_espresso'), '<strong>', '</strong>', '<a href="admin.php?page=espresso_events&action=create_new">', '</a>') .'</strong></p>';
154
+		$step_one = '<p>'.sprintf(esc_html__('%sStep 1%s: Visit your %sOrganization Settings%s and add/update your details.', 'event_espresso'), '<strong>', '</strong>', '<a href="admin.php?page=espresso_general_settings">', '</a>').'</strong></p>';
155
+		$step_two = '<p>'.sprintf(esc_html__('%sStep 2%s: Setup your %sPayment Methods%s.', 'event_espresso'), '<strong>', '</strong>', '<a href="admin.php?page=espresso_payment_settings">', '</a>').'</strong></p>';
156
+		$step_three = '<p>'.sprintf(esc_html__('%sStep 3%s: Create your %sFirst Event%s.', 'event_espresso'), '<strong>', '</strong>', '<a href="admin.php?page=espresso_events&action=create_new">', '</a>').'</strong></p>';
157 157
 
158 158
 		//done?
159 159
 		$done_step_one = EE_Registry::instance()->CFG->organization->address_1 == '123 Onna Road' ? FALSE : TRUE;
160
-		$active_invoice_pm = EEM_Payment_Method::instance()->get_one_active( EEM_Payment_Method::scope_cart, array( array( 'PMD_type' => 'Invoice' ) ) );
161
-		$active_pms_count = EEM_Payment_Method::instance()->count_active( EEM_Payment_Method::scope_cart );
160
+		$active_invoice_pm = EEM_Payment_Method::instance()->get_one_active(EEM_Payment_Method::scope_cart, array(array('PMD_type' => 'Invoice')));
161
+		$active_pms_count = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart);
162 162
 		//done step two if a non-invoice paymetn method is active; or there is more than one PM active, or
163 163
 		//if only the invoice is active but it's clearly been updated
164
-		$done_step_two = $active_pms_count > 1  ||
165
-						 ( $active_pms_count === 1 && ! $active_invoice_pm )	||
166
-						 ( $active_invoice_pm instanceof EE_Payment_Method && (
167
-								 $active_invoice_pm->get_extra_meta( 'pdf_payee_name', TRUE, '' ) ||
168
-								 $active_invoice_pm->get_extra_meta( 'pdf_payee_email', TRUE, '' ) ||
169
-								 $active_invoice_pm->get_extra_meta( 'pdf_payee_tax_number', TRUE, '' ) ||
170
-								 $active_invoice_pm->get_extra_meta( 'pdf_payee_address', TRUE, '' ) ||
171
-								 $active_invoice_pm->get_extra_meta( 'page_extra_info', TRUE, '' )
164
+		$done_step_two = $active_pms_count > 1 ||
165
+						 ($active_pms_count === 1 && ! $active_invoice_pm) ||
166
+						 ($active_invoice_pm instanceof EE_Payment_Method && (
167
+								 $active_invoice_pm->get_extra_meta('pdf_payee_name', TRUE, '') ||
168
+								 $active_invoice_pm->get_extra_meta('pdf_payee_email', TRUE, '') ||
169
+								 $active_invoice_pm->get_extra_meta('pdf_payee_tax_number', TRUE, '') ||
170
+								 $active_invoice_pm->get_extra_meta('pdf_payee_address', TRUE, '') ||
171
+								 $active_invoice_pm->get_extra_meta('page_extra_info', TRUE, '')
172 172
 								)
173 173
 				);
174 174
 		$done_step_three = EE_Registry::instance()->load_model('Event')->count() > 0 ? TRUE : FALSE;
175 175
 
176 176
 		//if ALL steps are done, let's just return FALSE so we don't display anything
177
-		if ( $done_step_one && $done_step_two && $done_step_three )
177
+		if ($done_step_one && $done_step_two && $done_step_three)
178 178
 			return FALSE;
179 179
 
180 180
 		//now let's put it together
181
-		$steps .= sprintf( '%s' . $step_one . '%s', $done_step_one ? '<strike>' : '', $done_step_one ? '</strike>': '' );
182
-		$steps .= sprintf( '%s' . $step_two . '%s', $done_step_two ? '<strike>' : '', $done_step_two ? '</strike>': '' );
183
-		$steps .= sprintf( '%s' . $step_three . '%s', $done_step_three ? '<strike>' : '', $done_step_three ? '</strike>': '' );
181
+		$steps .= sprintf('%s'.$step_one.'%s', $done_step_one ? '<strike>' : '', $done_step_one ? '</strike>' : '');
182
+		$steps .= sprintf('%s'.$step_two.'%s', $done_step_two ? '<strike>' : '', $done_step_two ? '</strike>' : '');
183
+		$steps .= sprintf('%s'.$step_three.'%s', $done_step_three ? '<strike>' : '', $done_step_three ? '</strike>' : '');
184 184
 
185 185
 		return $steps;
186 186
 	}
@@ -188,27 +188,27 @@  discard block
 block discarded – undo
188 188
 
189 189
 
190 190
 	protected function _credits() {
191
-		$this->_template_args['admin_page_title'] = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION );
191
+		$this->_template_args['admin_page_title'] = sprintf(__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION);
192 192
 		$this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso Decaf, the most powerful, and free, Event Management plugin for WordPress.', 'event_espresso');
193
-		$template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php';
194
-		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
193
+		$template = EE_ABOUT_TEMPLATE_PATH.'credits.template.php';
194
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE);
195 195
 		$this->display_about_admin_page();
196 196
 	}
197 197
 
198 198
 	
199 199
 	protected function _decafvpro() {
200
-		$this->_template_args['admin_page_title'] = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION );
200
+		$this->_template_args['admin_page_title'] = sprintf(__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION);
201 201
 		$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>');
202
-		$template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php';
203
-		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
202
+		$template = EE_ABOUT_TEMPLATE_PATH.'decafvpro.template.php';
203
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE);
204 204
 		$this->display_about_admin_page();
205 205
 	}
206 206
 
207 207
 	protected function _reviews() {
208 208
 		$this->_template_args['admin_page_title'] = __('Rave Reviews About Event Espresso 4', 'event_espresso');
209 209
 		$this->_template_args['admin_page_subtitle'] = __('At Event Espresso, customer satisfaction is our ultimate goal.', 'event_espresso');
210
-		$template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php';
211
-		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
210
+		$template = EE_ABOUT_TEMPLATE_PATH.'reviews.template.php';
211
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE);
212 212
 		$this->display_about_admin_page();
213 213
 	}
214 214
 
Please login to merge, or discard this patch.
core/EE_Front_Controller.core.php 2 patches
Indentation   +482 added lines, -482 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use EventEspresso\widgets\EspressoWidget;
4 4
 
5 5
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
6
-    exit('No direct script access allowed');
6
+	exit('No direct script access allowed');
7 7
 }
8 8
 
9 9
 /**
@@ -26,385 +26,385 @@  discard block
 block discarded – undo
26 26
 final class EE_Front_Controller
27 27
 {
28 28
 
29
-    /**
30
-     * @var string $_template_path
31
-     */
32
-    private $_template_path;
33
-
34
-    /**
35
-     * @var string $_template
36
-     */
37
-    private $_template;
38
-
39
-    /**
40
-     * @type EE_Registry $Registry
41
-     */
42
-    protected $Registry;
43
-
44
-    /**
45
-     * @type EE_Request_Handler $Request_Handler
46
-     */
47
-    protected $Request_Handler;
48
-
49
-    /**
50
-     * @type EE_Module_Request_Router $Module_Request_Router
51
-     */
52
-    protected $Module_Request_Router;
53
-
54
-
55
-    /**
56
-     *    class constructor
57
-     *    should fire after shortcode, module, addon, or other plugin's default priority init phases have run
58
-     *
59
-     * @access    public
60
-     * @param \EE_Registry              $Registry
61
-     * @param \EE_Request_Handler       $Request_Handler
62
-     * @param \EE_Module_Request_Router $Module_Request_Router
63
-     */
64
-    public function __construct(
65
-        EE_Registry $Registry,
66
-        EE_Request_Handler $Request_Handler,
67
-        EE_Module_Request_Router $Module_Request_Router
68
-    ) {
69
-        $this->Registry              = $Registry;
70
-        $this->Request_Handler       = $Request_Handler;
71
-        $this->Module_Request_Router = $Module_Request_Router;
72
-        // determine how to integrate WP_Query with the EE models
73
-        add_action('AHEE__EE_System__initialize', array($this, 'employ_CPT_Strategy'));
74
-        // load other resources and begin to actually run shortcodes and modules
75
-        add_action('wp_loaded', array($this, 'wp_loaded'), 5);
76
-        // analyse the incoming WP request
77
-        add_action('parse_request', array($this, 'get_request'), 1, 1);
78
-        // process request with module factory
79
-        add_action('pre_get_posts', array($this, 'pre_get_posts'), 10, 1);
80
-        // before headers sent
81
-        add_action('wp', array($this, 'wp'), 5);
82
-        // primarily used to process any content shortcodes
83
-        add_action('template_redirect', array($this, 'templateRedirect'), 999);
84
-        // header
85
-        add_action('wp_head', array($this, 'header_meta_tag'), 5);
86
-        add_action('wp_print_scripts', array($this, 'wp_print_scripts'), 10);
87
-        add_filter('template_include', array($this, 'template_include'), 1);
88
-        // display errors
89
-        add_action('loop_start', array($this, 'display_errors'), 2);
90
-        // the content
91
-        // add_filter( 'the_content', array( $this, 'the_content' ), 5, 1 );
92
-        //exclude our private cpt comments
93
-        add_filter('comments_clauses', array($this, 'filter_wp_comments'), 10, 1);
94
-        //make sure any ajax requests will respect the url schema when requests are made against admin-ajax.php (http:// or https://)
95
-        add_filter('admin_url', array($this, 'maybe_force_admin_ajax_ssl'), 200, 1);
96
-        // action hook EE
97
-        do_action('AHEE__EE_Front_Controller__construct__done', $this);
98
-        // for checking that browser cookies are enabled
99
-        if (apply_filters('FHEE__EE_Front_Controller____construct__set_test_cookie', true)) {
100
-            setcookie('ee_cookie_test', uniqid('ect',true), time() + DAY_IN_SECONDS, '/');
101
-        }
102
-    }
103
-
104
-
105
-    /**
106
-     * @return EE_Request_Handler
107
-     */
108
-    public function Request_Handler()
109
-    {
110
-        return $this->Request_Handler;
111
-    }
112
-
113
-
114
-    /**
115
-     * @return EE_Module_Request_Router
116
-     */
117
-    public function Module_Request_Router()
118
-    {
119
-        return $this->Module_Request_Router;
120
-    }
121
-
122
-
123
-
124
-    /**
125
-     * @return LegacyShortcodesManager
126
-     */
127
-    public function getLegacyShortcodesManager()
128
-    {
129
-        return EE_Config::getLegacyShortcodesManager();
130
-    }
131
-
132
-
133
-
134
-
135
-
136
-    /***********************************************        INIT ACTION HOOK         ***********************************************/
137
-
138
-
139
-
140
-    /**
141
-     * filter_wp_comments
142
-     * This simply makes sure that any "private" EE CPTs do not have their comments show up in any wp comment
143
-     * widgets/queries done on frontend
144
-     *
145
-     * @param  array $clauses array of comment clauses setup by WP_Comment_Query
146
-     * @return array array of comment clauses with modifications.
147
-     */
148
-    public function filter_wp_comments($clauses)
149
-    {
150
-        global $wpdb;
151
-        if (strpos($clauses['join'], $wpdb->posts) !== false) {
152
-            $cpts = EE_Register_CPTs::get_private_CPTs();
153
-            foreach ($cpts as $cpt => $details) {
154
-                $clauses['where'] .= $wpdb->prepare(" AND $wpdb->posts.post_type != %s", $cpt);
155
-            }
156
-        }
157
-        return $clauses;
158
-    }
159
-
160
-
161
-    /**
162
-     *    employ_CPT_Strategy
163
-     *
164
-     * @access    public
165
-     * @return    void
166
-     */
167
-    public function employ_CPT_Strategy()
168
-    {
169
-        if (apply_filters('FHEE__EE_Front_Controller__employ_CPT_Strategy', true)) {
170
-            $this->Registry->load_core('CPT_Strategy');
171
-        }
172
-    }
173
-
174
-
175
-    /**
176
-     * this just makes sure that if the site is using ssl that we force that for any admin ajax calls from frontend
177
-     *
178
-     * @param  string $url incoming url
179
-     * @return string         final assembled url
180
-     */
181
-    public function maybe_force_admin_ajax_ssl($url)
182
-    {
183
-        if (is_ssl() && preg_match('/admin-ajax.php/', $url)) {
184
-            $url = str_replace('http://', 'https://', $url);
185
-        }
186
-        return $url;
187
-    }
188
-
189
-
190
-
191
-
192
-
193
-
194
-    /***********************************************        WP_LOADED ACTION HOOK         ***********************************************/
195
-
196
-
197
-    /**
198
-     *    wp_loaded - should fire after shortcode, module, addon, or other plugin's have been registered and their
199
-     *    default priority init phases have run
200
-     *
201
-     * @access    public
202
-     * @return    void
203
-     */
204
-    public function wp_loaded()
205
-    {
206
-    }
207
-
208
-
209
-
210
-
211
-
212
-    /***********************************************        PARSE_REQUEST HOOK         ***********************************************/
213
-    /**
214
-     *    _get_request
215
-     *
216
-     * @access public
217
-     * @param WP $WP
218
-     * @return void
219
-     */
220
-    public function get_request(WP $WP)
221
-    {
222
-        do_action('AHEE__EE_Front_Controller__get_request__start');
223
-        $this->Request_Handler->parse_request($WP);
224
-        do_action('AHEE__EE_Front_Controller__get_request__complete');
225
-    }
226
-
227
-
228
-
229
-    /**
230
-     *    pre_get_posts - basically a module factory for instantiating modules and selecting the final view template
231
-     *
232
-     * @access    public
233
-     * @param   WP_Query $WP_Query
234
-     * @return    void
235
-     */
236
-    public function pre_get_posts($WP_Query)
237
-    {
238
-        // only load Module_Request_Router if this is the main query
239
-        if (
240
-            $this->Module_Request_Router instanceof EE_Module_Request_Router
241
-            && $WP_Query->is_main_query()
242
-        ) {
243
-            // cycle thru module routes
244
-            while ($route = $this->Module_Request_Router->get_route($WP_Query)) {
245
-                // determine module and method for route
246
-                $module = $this->Module_Request_Router->resolve_route($route[0], $route[1]);
247
-                if ($module instanceof EED_Module) {
248
-                    // get registered view for route
249
-                    $this->_template_path = $this->Module_Request_Router->get_view($route);
250
-                    // grab module name
251
-                    $module_name = $module->module_name();
252
-                    // map the module to the module objects
253
-                    $this->Registry->modules->{$module_name} = $module;
254
-                }
255
-            }
256
-        }
257
-    }
258
-
259
-
260
-
261
-
262
-
263
-    /***********************************************        WP HOOK         ***********************************************/
264
-
265
-
266
-    /**
267
-     *    wp - basically last chance to do stuff before headers sent
268
-     *
269
-     * @access    public
270
-     * @return    void
271
-     */
272
-    public function wp()
273
-    {
274
-    }
275
-
276
-
277
-
278
-    /***********************     GET_HEADER && WP_HEAD HOOK     ***********************/
279
-
280
-
281
-
282
-    /**
283
-     * callback for the "template_redirect" hook point
284
-     * checks sidebars for EE widgets
285
-     * loads resources and assets accordingly
286
-     *
287
-     * @return void
288
-     */
289
-    public function templateRedirect()
290
-    {
291
-        global $wp_query;
292
-        if (empty($wp_query->posts)){
293
-            return;
294
-        }
295
-        // if we already know this is an espresso page, then load assets
296
-        $load_assets = $this->Request_Handler->is_espresso_page();
297
-        // if we are already loading assets then just move along, otherwise check for widgets
298
-        $load_assets = $load_assets ? $load_assets : $this->espresso_widgets_in_active_sidebars();
299
-        if ( $load_assets){
300
-            add_action('wp_enqueue_scripts', array($this, 'enqueueStyle'), 10);
301
-            add_action('wp_print_footer_scripts', array($this, 'enqueueScripts'), 10);
302
-        }
303
-    }
304
-
305
-
306
-
307
-    /**
308
-     * builds list of active widgets then scans active sidebars looking for them
309
-     * returns true is an EE widget is found in an active sidebar
310
-     * Please Note: this does NOT mean that the sidebar or widget
311
-     * is actually in use in a given template, as that is unfortunately not known
312
-     * until a sidebar and it's widgets are actually loaded
313
-     *
314
-     * @return boolean
315
-     */
316
-    private function espresso_widgets_in_active_sidebars()
317
-    {
318
-        $espresso_widgets = array();
319
-        foreach ($this->Registry->widgets as $widget_class => $widget) {
320
-            $id_base = EspressoWidget::getIdBase($widget_class);
321
-            if (is_active_widget(false, false, $id_base)) {
322
-                $espresso_widgets[] = $id_base;
323
-            }
324
-        }
325
-        $all_sidebar_widgets = wp_get_sidebars_widgets();
326
-        foreach ($all_sidebar_widgets as $sidebar_name => $sidebar_widgets) {
327
-            if (is_array($sidebar_widgets) && ! empty($sidebar_widgets)) {
328
-                foreach ($sidebar_widgets as $sidebar_widget) {
329
-                    foreach ($espresso_widgets as $espresso_widget) {
330
-                        if (strpos($sidebar_widget, $espresso_widget) !== false) {
331
-                            return true;
332
-                        }
333
-                    }
334
-                }
335
-            }
336
-        }
337
-        return false;
338
-    }
339
-
340
-
341
-
342
-
343
-    /**
344
-     *    header_meta_tag
345
-     *
346
-     * @access    public
347
-     * @return    void
348
-     */
349
-    public function header_meta_tag()
350
-    {
351
-        print(
352
-            apply_filters(
353
-                'FHEE__EE_Front_Controller__header_meta_tag',
354
-                '<meta name="generator" content="Event Espresso Version ' . EVENT_ESPRESSO_VERSION . "\" />\n")
355
-        );
356
-
357
-        //let's exclude all event type taxonomy term archive pages from search engine indexing
358
-        //@see https://events.codebasehq.com/projects/event-espresso/tickets/10249
359
-        //also exclude all critical pages from indexing
360
-        if (
361
-            (
362
-                is_tax('espresso_event_type')
363
-                && get_option( 'blog_public' ) !== '0'
364
-            )
365
-            || is_page(EE_Registry::instance()->CFG->core->get_critical_pages_array())
366
-        ) {
367
-            print(
368
-                apply_filters(
369
-                    'FHEE__EE_Front_Controller__header_meta_tag__noindex_for_event_type',
370
-                    '<meta name="robots" content="noindex,follow" />' . "\n"
371
-                )
372
-            );
373
-        }
374
-    }
375
-
376
-
377
-
378
-    /**
379
-     * wp_print_scripts
380
-     *
381
-     * @return void
382
-     */
383
-    public function wp_print_scripts()
384
-    {
385
-        global $post;
386
-        if (
387
-            isset($post->EE_Event)
388
-            && $post->EE_Event instanceof EE_Event
389
-            && get_post_type() === 'espresso_events'
390
-            && is_singular()
391
-        ) {
392
-            \EEH_Schema::add_json_linked_data_for_event($post->EE_Event);
393
-        }
394
-    }
395
-
396
-
397
-
398
-    public function enqueueStyle()
399
-    {
400
-        wp_enqueue_style('espresso_default');
401
-        wp_enqueue_style('espresso_custom_css');
402
-    }
403
-
404
-
405
-
406
-
407
-    /***********************************************        THE_CONTENT FILTER HOOK         **********************************************
29
+	/**
30
+	 * @var string $_template_path
31
+	 */
32
+	private $_template_path;
33
+
34
+	/**
35
+	 * @var string $_template
36
+	 */
37
+	private $_template;
38
+
39
+	/**
40
+	 * @type EE_Registry $Registry
41
+	 */
42
+	protected $Registry;
43
+
44
+	/**
45
+	 * @type EE_Request_Handler $Request_Handler
46
+	 */
47
+	protected $Request_Handler;
48
+
49
+	/**
50
+	 * @type EE_Module_Request_Router $Module_Request_Router
51
+	 */
52
+	protected $Module_Request_Router;
53
+
54
+
55
+	/**
56
+	 *    class constructor
57
+	 *    should fire after shortcode, module, addon, or other plugin's default priority init phases have run
58
+	 *
59
+	 * @access    public
60
+	 * @param \EE_Registry              $Registry
61
+	 * @param \EE_Request_Handler       $Request_Handler
62
+	 * @param \EE_Module_Request_Router $Module_Request_Router
63
+	 */
64
+	public function __construct(
65
+		EE_Registry $Registry,
66
+		EE_Request_Handler $Request_Handler,
67
+		EE_Module_Request_Router $Module_Request_Router
68
+	) {
69
+		$this->Registry              = $Registry;
70
+		$this->Request_Handler       = $Request_Handler;
71
+		$this->Module_Request_Router = $Module_Request_Router;
72
+		// determine how to integrate WP_Query with the EE models
73
+		add_action('AHEE__EE_System__initialize', array($this, 'employ_CPT_Strategy'));
74
+		// load other resources and begin to actually run shortcodes and modules
75
+		add_action('wp_loaded', array($this, 'wp_loaded'), 5);
76
+		// analyse the incoming WP request
77
+		add_action('parse_request', array($this, 'get_request'), 1, 1);
78
+		// process request with module factory
79
+		add_action('pre_get_posts', array($this, 'pre_get_posts'), 10, 1);
80
+		// before headers sent
81
+		add_action('wp', array($this, 'wp'), 5);
82
+		// primarily used to process any content shortcodes
83
+		add_action('template_redirect', array($this, 'templateRedirect'), 999);
84
+		// header
85
+		add_action('wp_head', array($this, 'header_meta_tag'), 5);
86
+		add_action('wp_print_scripts', array($this, 'wp_print_scripts'), 10);
87
+		add_filter('template_include', array($this, 'template_include'), 1);
88
+		// display errors
89
+		add_action('loop_start', array($this, 'display_errors'), 2);
90
+		// the content
91
+		// add_filter( 'the_content', array( $this, 'the_content' ), 5, 1 );
92
+		//exclude our private cpt comments
93
+		add_filter('comments_clauses', array($this, 'filter_wp_comments'), 10, 1);
94
+		//make sure any ajax requests will respect the url schema when requests are made against admin-ajax.php (http:// or https://)
95
+		add_filter('admin_url', array($this, 'maybe_force_admin_ajax_ssl'), 200, 1);
96
+		// action hook EE
97
+		do_action('AHEE__EE_Front_Controller__construct__done', $this);
98
+		// for checking that browser cookies are enabled
99
+		if (apply_filters('FHEE__EE_Front_Controller____construct__set_test_cookie', true)) {
100
+			setcookie('ee_cookie_test', uniqid('ect',true), time() + DAY_IN_SECONDS, '/');
101
+		}
102
+	}
103
+
104
+
105
+	/**
106
+	 * @return EE_Request_Handler
107
+	 */
108
+	public function Request_Handler()
109
+	{
110
+		return $this->Request_Handler;
111
+	}
112
+
113
+
114
+	/**
115
+	 * @return EE_Module_Request_Router
116
+	 */
117
+	public function Module_Request_Router()
118
+	{
119
+		return $this->Module_Request_Router;
120
+	}
121
+
122
+
123
+
124
+	/**
125
+	 * @return LegacyShortcodesManager
126
+	 */
127
+	public function getLegacyShortcodesManager()
128
+	{
129
+		return EE_Config::getLegacyShortcodesManager();
130
+	}
131
+
132
+
133
+
134
+
135
+
136
+	/***********************************************        INIT ACTION HOOK         ***********************************************/
137
+
138
+
139
+
140
+	/**
141
+	 * filter_wp_comments
142
+	 * This simply makes sure that any "private" EE CPTs do not have their comments show up in any wp comment
143
+	 * widgets/queries done on frontend
144
+	 *
145
+	 * @param  array $clauses array of comment clauses setup by WP_Comment_Query
146
+	 * @return array array of comment clauses with modifications.
147
+	 */
148
+	public function filter_wp_comments($clauses)
149
+	{
150
+		global $wpdb;
151
+		if (strpos($clauses['join'], $wpdb->posts) !== false) {
152
+			$cpts = EE_Register_CPTs::get_private_CPTs();
153
+			foreach ($cpts as $cpt => $details) {
154
+				$clauses['where'] .= $wpdb->prepare(" AND $wpdb->posts.post_type != %s", $cpt);
155
+			}
156
+		}
157
+		return $clauses;
158
+	}
159
+
160
+
161
+	/**
162
+	 *    employ_CPT_Strategy
163
+	 *
164
+	 * @access    public
165
+	 * @return    void
166
+	 */
167
+	public function employ_CPT_Strategy()
168
+	{
169
+		if (apply_filters('FHEE__EE_Front_Controller__employ_CPT_Strategy', true)) {
170
+			$this->Registry->load_core('CPT_Strategy');
171
+		}
172
+	}
173
+
174
+
175
+	/**
176
+	 * this just makes sure that if the site is using ssl that we force that for any admin ajax calls from frontend
177
+	 *
178
+	 * @param  string $url incoming url
179
+	 * @return string         final assembled url
180
+	 */
181
+	public function maybe_force_admin_ajax_ssl($url)
182
+	{
183
+		if (is_ssl() && preg_match('/admin-ajax.php/', $url)) {
184
+			$url = str_replace('http://', 'https://', $url);
185
+		}
186
+		return $url;
187
+	}
188
+
189
+
190
+
191
+
192
+
193
+
194
+	/***********************************************        WP_LOADED ACTION HOOK         ***********************************************/
195
+
196
+
197
+	/**
198
+	 *    wp_loaded - should fire after shortcode, module, addon, or other plugin's have been registered and their
199
+	 *    default priority init phases have run
200
+	 *
201
+	 * @access    public
202
+	 * @return    void
203
+	 */
204
+	public function wp_loaded()
205
+	{
206
+	}
207
+
208
+
209
+
210
+
211
+
212
+	/***********************************************        PARSE_REQUEST HOOK         ***********************************************/
213
+	/**
214
+	 *    _get_request
215
+	 *
216
+	 * @access public
217
+	 * @param WP $WP
218
+	 * @return void
219
+	 */
220
+	public function get_request(WP $WP)
221
+	{
222
+		do_action('AHEE__EE_Front_Controller__get_request__start');
223
+		$this->Request_Handler->parse_request($WP);
224
+		do_action('AHEE__EE_Front_Controller__get_request__complete');
225
+	}
226
+
227
+
228
+
229
+	/**
230
+	 *    pre_get_posts - basically a module factory for instantiating modules and selecting the final view template
231
+	 *
232
+	 * @access    public
233
+	 * @param   WP_Query $WP_Query
234
+	 * @return    void
235
+	 */
236
+	public function pre_get_posts($WP_Query)
237
+	{
238
+		// only load Module_Request_Router if this is the main query
239
+		if (
240
+			$this->Module_Request_Router instanceof EE_Module_Request_Router
241
+			&& $WP_Query->is_main_query()
242
+		) {
243
+			// cycle thru module routes
244
+			while ($route = $this->Module_Request_Router->get_route($WP_Query)) {
245
+				// determine module and method for route
246
+				$module = $this->Module_Request_Router->resolve_route($route[0], $route[1]);
247
+				if ($module instanceof EED_Module) {
248
+					// get registered view for route
249
+					$this->_template_path = $this->Module_Request_Router->get_view($route);
250
+					// grab module name
251
+					$module_name = $module->module_name();
252
+					// map the module to the module objects
253
+					$this->Registry->modules->{$module_name} = $module;
254
+				}
255
+			}
256
+		}
257
+	}
258
+
259
+
260
+
261
+
262
+
263
+	/***********************************************        WP HOOK         ***********************************************/
264
+
265
+
266
+	/**
267
+	 *    wp - basically last chance to do stuff before headers sent
268
+	 *
269
+	 * @access    public
270
+	 * @return    void
271
+	 */
272
+	public function wp()
273
+	{
274
+	}
275
+
276
+
277
+
278
+	/***********************     GET_HEADER && WP_HEAD HOOK     ***********************/
279
+
280
+
281
+
282
+	/**
283
+	 * callback for the "template_redirect" hook point
284
+	 * checks sidebars for EE widgets
285
+	 * loads resources and assets accordingly
286
+	 *
287
+	 * @return void
288
+	 */
289
+	public function templateRedirect()
290
+	{
291
+		global $wp_query;
292
+		if (empty($wp_query->posts)){
293
+			return;
294
+		}
295
+		// if we already know this is an espresso page, then load assets
296
+		$load_assets = $this->Request_Handler->is_espresso_page();
297
+		// if we are already loading assets then just move along, otherwise check for widgets
298
+		$load_assets = $load_assets ? $load_assets : $this->espresso_widgets_in_active_sidebars();
299
+		if ( $load_assets){
300
+			add_action('wp_enqueue_scripts', array($this, 'enqueueStyle'), 10);
301
+			add_action('wp_print_footer_scripts', array($this, 'enqueueScripts'), 10);
302
+		}
303
+	}
304
+
305
+
306
+
307
+	/**
308
+	 * builds list of active widgets then scans active sidebars looking for them
309
+	 * returns true is an EE widget is found in an active sidebar
310
+	 * Please Note: this does NOT mean that the sidebar or widget
311
+	 * is actually in use in a given template, as that is unfortunately not known
312
+	 * until a sidebar and it's widgets are actually loaded
313
+	 *
314
+	 * @return boolean
315
+	 */
316
+	private function espresso_widgets_in_active_sidebars()
317
+	{
318
+		$espresso_widgets = array();
319
+		foreach ($this->Registry->widgets as $widget_class => $widget) {
320
+			$id_base = EspressoWidget::getIdBase($widget_class);
321
+			if (is_active_widget(false, false, $id_base)) {
322
+				$espresso_widgets[] = $id_base;
323
+			}
324
+		}
325
+		$all_sidebar_widgets = wp_get_sidebars_widgets();
326
+		foreach ($all_sidebar_widgets as $sidebar_name => $sidebar_widgets) {
327
+			if (is_array($sidebar_widgets) && ! empty($sidebar_widgets)) {
328
+				foreach ($sidebar_widgets as $sidebar_widget) {
329
+					foreach ($espresso_widgets as $espresso_widget) {
330
+						if (strpos($sidebar_widget, $espresso_widget) !== false) {
331
+							return true;
332
+						}
333
+					}
334
+				}
335
+			}
336
+		}
337
+		return false;
338
+	}
339
+
340
+
341
+
342
+
343
+	/**
344
+	 *    header_meta_tag
345
+	 *
346
+	 * @access    public
347
+	 * @return    void
348
+	 */
349
+	public function header_meta_tag()
350
+	{
351
+		print(
352
+			apply_filters(
353
+				'FHEE__EE_Front_Controller__header_meta_tag',
354
+				'<meta name="generator" content="Event Espresso Version ' . EVENT_ESPRESSO_VERSION . "\" />\n")
355
+		);
356
+
357
+		//let's exclude all event type taxonomy term archive pages from search engine indexing
358
+		//@see https://events.codebasehq.com/projects/event-espresso/tickets/10249
359
+		//also exclude all critical pages from indexing
360
+		if (
361
+			(
362
+				is_tax('espresso_event_type')
363
+				&& get_option( 'blog_public' ) !== '0'
364
+			)
365
+			|| is_page(EE_Registry::instance()->CFG->core->get_critical_pages_array())
366
+		) {
367
+			print(
368
+				apply_filters(
369
+					'FHEE__EE_Front_Controller__header_meta_tag__noindex_for_event_type',
370
+					'<meta name="robots" content="noindex,follow" />' . "\n"
371
+				)
372
+			);
373
+		}
374
+	}
375
+
376
+
377
+
378
+	/**
379
+	 * wp_print_scripts
380
+	 *
381
+	 * @return void
382
+	 */
383
+	public function wp_print_scripts()
384
+	{
385
+		global $post;
386
+		if (
387
+			isset($post->EE_Event)
388
+			&& $post->EE_Event instanceof EE_Event
389
+			&& get_post_type() === 'espresso_events'
390
+			&& is_singular()
391
+		) {
392
+			\EEH_Schema::add_json_linked_data_for_event($post->EE_Event);
393
+		}
394
+	}
395
+
396
+
397
+
398
+	public function enqueueStyle()
399
+	{
400
+		wp_enqueue_style('espresso_default');
401
+		wp_enqueue_style('espresso_custom_css');
402
+	}
403
+
404
+
405
+
406
+
407
+	/***********************************************        THE_CONTENT FILTER HOOK         **********************************************
408 408
 
409 409
 
410 410
 
@@ -415,108 +415,108 @@  discard block
 block discarded – undo
415 415
     //  * @param   $the_content
416 416
     //  * @return    string
417 417
     //  */
418
-    // public function the_content( $the_content ) {
419
-    // 	// nothing gets loaded at this point unless other systems turn this hookpoint on by using:  add_filter( 'FHEE_run_EE_the_content', '__return_true' );
420
-    // 	if ( apply_filters( 'FHEE_run_EE_the_content', FALSE ) ) {
421
-    // 	}
422
-    // 	return $the_content;
423
-    // }
424
-
425
-
426
-
427
-    /***********************************************        WP_FOOTER         ***********************************************/
428
-
429
-
430
-
431
-    public function enqueueScripts()
432
-    {
433
-        wp_enqueue_script('espresso_core');
434
-    }
435
-
436
-
437
-
438
-    /**
439
-     * display_errors
440
-     *
441
-     * @access public
442
-     * @return void
443
-     * @throws DomainException
444
-     */
445
-    public function display_errors()
446
-    {
447
-        static $shown_already = false;
448
-        do_action('AHEE__EE_Front_Controller__display_errors__begin');
449
-        if (
450
-            ! $shown_already
451
-            && apply_filters('FHEE__EE_Front_Controller__display_errors', true)
452
-            && is_main_query()
453
-            && ! is_feed()
454
-            && in_the_loop()
455
-            && $this->Request_Handler->is_espresso_page()
456
-        ) {
457
-            echo EE_Error::get_notices();
458
-            $shown_already = true;
459
-            EEH_Template::display_template(EE_TEMPLATES . 'espresso-ajax-notices.template.php');
460
-        }
461
-        do_action('AHEE__EE_Front_Controller__display_errors__end');
462
-    }
463
-
464
-
465
-
466
-
467
-
468
-    /***********************************************        UTILITIES         ***********************************************/
469
-    /**
470
-     *    template_include
471
-     *
472
-     * @access    public
473
-     * @param   string $template_include_path
474
-     * @return    string
475
-     */
476
-    public function template_include($template_include_path = null)
477
-    {
478
-        if ($this->Request_Handler->is_espresso_page()) {
479
-            $this->_template_path = ! empty($this->_template_path) ? basename($this->_template_path) : basename($template_include_path);
480
-            $template_path        = EEH_Template::locate_template($this->_template_path, array(), false);
481
-            $this->_template_path = ! empty($template_path) ? $template_path : $template_include_path;
482
-            $this->_template      = basename($this->_template_path);
483
-            return $this->_template_path;
484
-        }
485
-        return $template_include_path;
486
-    }
487
-
488
-
489
-    /**
490
-     *    get_selected_template
491
-     *
492
-     * @access    public
493
-     * @param bool $with_path
494
-     * @return    string
495
-     */
496
-    public function get_selected_template($with_path = false)
497
-    {
498
-        return $with_path ? $this->_template_path : $this->_template;
499
-    }
500
-
501
-
502
-
503
-    /**
504
-     * @deprecated 4.9.26
505
-     * @param string $shortcode_class
506
-     * @param \WP    $wp
507
-     */
508
-    public function initialize_shortcode($shortcode_class = '', WP $wp = null)
509
-    {
510
-        \EE_Error::doing_it_wrong(
511
-            __METHOD__,
512
-            __(
513
-                'Usage is deprecated. Please use \EventEspresso\core\services\shortcodes\LegacyShortcodesManager::initializeShortcode() instead.',
514
-                'event_espresso'
515
-            ),
516
-            '4.9.26'
517
-        );
518
-        $this->getLegacyShortcodesManager()->initializeShortcode($shortcode_class, $wp);
519
-    }
418
+	// public function the_content( $the_content ) {
419
+	// 	// nothing gets loaded at this point unless other systems turn this hookpoint on by using:  add_filter( 'FHEE_run_EE_the_content', '__return_true' );
420
+	// 	if ( apply_filters( 'FHEE_run_EE_the_content', FALSE ) ) {
421
+	// 	}
422
+	// 	return $the_content;
423
+	// }
424
+
425
+
426
+
427
+	/***********************************************        WP_FOOTER         ***********************************************/
428
+
429
+
430
+
431
+	public function enqueueScripts()
432
+	{
433
+		wp_enqueue_script('espresso_core');
434
+	}
435
+
436
+
437
+
438
+	/**
439
+	 * display_errors
440
+	 *
441
+	 * @access public
442
+	 * @return void
443
+	 * @throws DomainException
444
+	 */
445
+	public function display_errors()
446
+	{
447
+		static $shown_already = false;
448
+		do_action('AHEE__EE_Front_Controller__display_errors__begin');
449
+		if (
450
+			! $shown_already
451
+			&& apply_filters('FHEE__EE_Front_Controller__display_errors', true)
452
+			&& is_main_query()
453
+			&& ! is_feed()
454
+			&& in_the_loop()
455
+			&& $this->Request_Handler->is_espresso_page()
456
+		) {
457
+			echo EE_Error::get_notices();
458
+			$shown_already = true;
459
+			EEH_Template::display_template(EE_TEMPLATES . 'espresso-ajax-notices.template.php');
460
+		}
461
+		do_action('AHEE__EE_Front_Controller__display_errors__end');
462
+	}
463
+
464
+
465
+
466
+
467
+
468
+	/***********************************************        UTILITIES         ***********************************************/
469
+	/**
470
+	 *    template_include
471
+	 *
472
+	 * @access    public
473
+	 * @param   string $template_include_path
474
+	 * @return    string
475
+	 */
476
+	public function template_include($template_include_path = null)
477
+	{
478
+		if ($this->Request_Handler->is_espresso_page()) {
479
+			$this->_template_path = ! empty($this->_template_path) ? basename($this->_template_path) : basename($template_include_path);
480
+			$template_path        = EEH_Template::locate_template($this->_template_path, array(), false);
481
+			$this->_template_path = ! empty($template_path) ? $template_path : $template_include_path;
482
+			$this->_template      = basename($this->_template_path);
483
+			return $this->_template_path;
484
+		}
485
+		return $template_include_path;
486
+	}
487
+
488
+
489
+	/**
490
+	 *    get_selected_template
491
+	 *
492
+	 * @access    public
493
+	 * @param bool $with_path
494
+	 * @return    string
495
+	 */
496
+	public function get_selected_template($with_path = false)
497
+	{
498
+		return $with_path ? $this->_template_path : $this->_template;
499
+	}
500
+
501
+
502
+
503
+	/**
504
+	 * @deprecated 4.9.26
505
+	 * @param string $shortcode_class
506
+	 * @param \WP    $wp
507
+	 */
508
+	public function initialize_shortcode($shortcode_class = '', WP $wp = null)
509
+	{
510
+		\EE_Error::doing_it_wrong(
511
+			__METHOD__,
512
+			__(
513
+				'Usage is deprecated. Please use \EventEspresso\core\services\shortcodes\LegacyShortcodesManager::initializeShortcode() instead.',
514
+				'event_espresso'
515
+			),
516
+			'4.9.26'
517
+		);
518
+		$this->getLegacyShortcodesManager()->initializeShortcode($shortcode_class, $wp);
519
+	}
520 520
 
521 521
 }
522 522
 // End of file EE_Front_Controller.core.php
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         do_action('AHEE__EE_Front_Controller__construct__done', $this);
98 98
         // for checking that browser cookies are enabled
99 99
         if (apply_filters('FHEE__EE_Front_Controller____construct__set_test_cookie', true)) {
100
-            setcookie('ee_cookie_test', uniqid('ect',true), time() + DAY_IN_SECONDS, '/');
100
+            setcookie('ee_cookie_test', uniqid('ect', true), time() + DAY_IN_SECONDS, '/');
101 101
         }
102 102
     }
103 103
 
@@ -289,14 +289,14 @@  discard block
 block discarded – undo
289 289
     public function templateRedirect()
290 290
     {
291 291
         global $wp_query;
292
-        if (empty($wp_query->posts)){
292
+        if (empty($wp_query->posts)) {
293 293
             return;
294 294
         }
295 295
         // if we already know this is an espresso page, then load assets
296 296
         $load_assets = $this->Request_Handler->is_espresso_page();
297 297
         // if we are already loading assets then just move along, otherwise check for widgets
298 298
         $load_assets = $load_assets ? $load_assets : $this->espresso_widgets_in_active_sidebars();
299
-        if ( $load_assets){
299
+        if ($load_assets) {
300 300
             add_action('wp_enqueue_scripts', array($this, 'enqueueStyle'), 10);
301 301
             add_action('wp_print_footer_scripts', array($this, 'enqueueScripts'), 10);
302 302
         }
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         print(
352 352
             apply_filters(
353 353
                 'FHEE__EE_Front_Controller__header_meta_tag',
354
-                '<meta name="generator" content="Event Espresso Version ' . EVENT_ESPRESSO_VERSION . "\" />\n")
354
+                '<meta name="generator" content="Event Espresso Version '.EVENT_ESPRESSO_VERSION."\" />\n")
355 355
         );
356 356
 
357 357
         //let's exclude all event type taxonomy term archive pages from search engine indexing
@@ -360,14 +360,14 @@  discard block
 block discarded – undo
360 360
         if (
361 361
             (
362 362
                 is_tax('espresso_event_type')
363
-                && get_option( 'blog_public' ) !== '0'
363
+                && get_option('blog_public') !== '0'
364 364
             )
365 365
             || is_page(EE_Registry::instance()->CFG->core->get_critical_pages_array())
366 366
         ) {
367 367
             print(
368 368
                 apply_filters(
369 369
                     'FHEE__EE_Front_Controller__header_meta_tag__noindex_for_event_type',
370
-                    '<meta name="robots" content="noindex,follow" />' . "\n"
370
+                    '<meta name="robots" content="noindex,follow" />'."\n"
371 371
                 )
372 372
             );
373 373
         }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
         ) {
457 457
             echo EE_Error::get_notices();
458 458
             $shown_already = true;
459
-            EEH_Template::display_template(EE_TEMPLATES . 'espresso-ajax-notices.template.php');
459
+            EEH_Template::display_template(EE_TEMPLATES.'espresso-ajax-notices.template.php');
460 460
         }
461 461
         do_action('AHEE__EE_Front_Controller__display_errors__end');
462 462
     }
Please login to merge, or discard this patch.