Skip to content

Commit 86c07de

Browse files
RELEASE: 5.0.47
1 parent f114e9a commit 86c07de

File tree

16 files changed

+426
-120
lines changed

16 files changed

+426
-120
lines changed

CHANGELOG.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Releases
88

9-
### [5.0.46]
10-
11-
#### Added
12-
- NEW
9+
### [5.0.47]
1310

1411
#### Fixed
15-
- FIX
12+
- [Dont Verify Session Save Path If Handler Does Not Use The File System (#1984)](https://github.com/eventespresso/cafe/pull/1984)
13+
- [Fix Session Save Path With open_basedir Restrictions (#1987)](https://github.com/eventespresso/cafe/pull/1987)
14+
- [Dont Allow Bypass of Ticket Selector Required Checkbox (#1989)](https://github.com/eventespresso/cafe/pull/1989)
1615

1716
#### Changed
18-
- [Add Serialized Model Protection (#1914)](https://github.com/eventespresso/cafe/pull/1914)
19-
- [Improve SessionStartHandler Error Handling (#1967)](https://github.com/eventespresso/cafe/pull/1967)
20-
- MOD
17+
- [Mark Mailchimp as Incompatible Addon (#1982)](https://github.com/eventespresso/cafe/pull/1982)
2118

22-
#### Deprecated
23-
- DEP
2419

25-
#### Removed
26-
- RMV
2720

28-
#### Security
21+
### [5.0.46]
22+
23+
#### Changed
24+
- [Add Serialized Model Protection (#1914)](https://github.com/eventespresso/cafe/pull/1914)
25+
- [Improve SessionStartHandler Error Handling (#1967)](https://github.com/eventespresso/cafe/pull/1967)
2926
- [Fix Model Cap Restriction Generation (#1975)](https://github.com/eventespresso/cafe/pull/1975)
3027

3128

3229

3330
### [5.0.45]
3431

35-
#### Added
36-
- NEW
37-
3832
#### Fixed
3933
- [Dont send address to PayPal if country code is not a 2 character ISO 3166 code (#1947)](https://github.com/eventespresso/cafe/pull/1947)
4034

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.46
1+
5.0.47

core/EE_Front_Controller.core.php

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use EventEspresso\core\exceptions\InvalidDataTypeException;
66
use EventEspresso\core\exceptions\InvalidInterfaceException;
77
use EventEspresso\core\services\loaders\LoaderFactory;
8+
use EventEspresso\core\services\notifications\AriaLiveAnnouncer;
89
use EventEspresso\core\services\request\CurrentPage;
910
use EventEspresso\core\services\request\sanitizers\AllowedTags;
1011
use EventEspresso\core\services\shortcodes\LegacyShortcodesManager;
@@ -69,25 +70,26 @@ public function __construct(
6970
$this->Module_Request_Router = $Module_Request_Router;
7071
// load other resources and begin to actually run shortcodes and modules
7172
// analyse the incoming WP request
72-
add_action('parse_request', array($this, 'get_request'), 1, 1);
73+
add_action('parse_request', [$this, 'get_request'], 1);
7374
// process request with module factory
74-
add_action('pre_get_posts', array($this, 'pre_get_posts'), 10, 1);
75+
add_action('pre_get_posts', [$this, 'pre_get_posts']);
7576
// before headers sent
76-
add_action('wp', array($this, 'wp'), 5);
77+
add_action('wp', [$this, 'wp'], 5);
7778
// primarily used to process any content shortcodes
78-
add_action('template_redirect', array($this, 'templateRedirect'), 999);
79+
add_action('template_redirect', [$this, 'templateRedirect'], 999);
7980
// header
80-
add_action('wp_head', array($this, 'header_meta_tag'), 5);
81-
add_action('wp_print_scripts', array($this, 'wp_print_scripts'), 10);
82-
add_filter('template_include', array($this, 'template_include'), 1);
81+
add_action('wp_head', [$this, 'header_meta_tag'], 5);
82+
add_action('wp_print_scripts', [$this, 'wp_print_scripts']);
83+
add_filter('template_include', [$this, 'template_include'], 1);
8384
// display errors
84-
add_action('loop_start', array($this, 'display_errors'), 2);
85+
add_action('loop_start', [$this, 'display_errors'], 2);
8586
// the content
8687
// add_filter( 'the_content', array( $this, 'the_content' ), 5, 1 );
8788
// exclude our private cpt comments
88-
add_filter('comments_clauses', array($this, 'filter_wp_comments'), 10, 1);
89-
// make sure any ajax requests will respect the url schema when requests are made against admin-ajax.php (http:// or https://)
90-
add_filter('admin_url', array($this, 'maybe_force_admin_ajax_ssl'), 200, 1);
89+
add_filter('comments_clauses', [$this, 'filter_wp_comments']);
90+
// make sure any ajax requests will respect the url schema
91+
// when requests are made against admin-ajax.php (http:// or https://)
92+
add_filter('admin_url', [$this, 'maybe_force_admin_ajax_ssl'], 200);
9193
// action hook EE
9294
do_action('AHEE__EE_Front_Controller__construct__done', $this);
9395
}
@@ -134,7 +136,7 @@ public function getLegacyShortcodesManager()
134136
* This simply makes sure that any "private" EE CPTs do not have their comments show up in any wp comment
135137
* widgets/queries done on frontend
136138
*
137-
* @param array $clauses array of comment clauses setup by WP_Comment_Query
139+
* @param array $clauses array of comment clauses setup by WP_Comment_Query
138140
* @return array array of comment clauses with modifications.
139141
* @throws InvalidArgumentException
140142
* @throws InvalidDataTypeException
@@ -148,7 +150,7 @@ public function filter_wp_comments($clauses)
148150
$custom_post_types = LoaderFactory::getLoader()->getShared(
149151
'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'
150152
);
151-
$cpts = $custom_post_types->getPrivateCustomPostTypes();
153+
$cpts = $custom_post_types->getPrivateCustomPostTypes();
152154
foreach ($cpts as $cpt => $details) {
153155
$clauses['where'] .= $wpdb->prepare(" AND $wpdb->posts.post_type != %s", $cpt);
154156
}
@@ -160,7 +162,7 @@ public function filter_wp_comments($clauses)
160162
/**
161163
* this just makes sure that if the site is using ssl that we force that for any admin ajax calls from frontend
162164
*
163-
* @param string $url incoming url
165+
* @param string $url incoming url
164166
* @return string final assembled url
165167
*/
166168
public function maybe_force_admin_ajax_ssl($url)
@@ -258,6 +260,7 @@ public function pre_get_posts($WP_Query)
258260
*/
259261
public function wp()
260262
{
263+
AriaLiveAnnouncer::setHooks();
261264
}
262265

263266

@@ -283,8 +286,8 @@ public function templateRedirect()
283286
// if we are already loading assets then just move along, otherwise check for widgets
284287
$load_assets = $load_assets || $this->espresso_widgets_in_active_sidebars();
285288
if ($load_assets) {
286-
add_action('wp_enqueue_scripts', array($this, 'enqueueStyle'), 10);
287-
add_action('wp_enqueue_scripts', array($this, 'enqueueScripts'), 10);
289+
add_action('wp_enqueue_scripts', [$this, 'enqueueStyle']);
290+
add_action('wp_enqueue_scripts', [$this, 'enqueueScripts']);
288291
}
289292

290293
if (is_singular(EspressoPostType::EVENTS)) {
@@ -304,7 +307,7 @@ public function templateRedirect()
304307
*/
305308
private function espresso_widgets_in_active_sidebars()
306309
{
307-
$espresso_widgets = array();
310+
$espresso_widgets = [];
308311
foreach ($this->Registry->widgets as $widget_class => $widget) {
309312
$id_base = EspressoWidget::getIdBase($widget_class);
310313
if (is_active_widget(false, false, $id_base)) {
@@ -389,7 +392,6 @@ public function enqueueStyle()
389392
}
390393

391394

392-
393395
/*********************************************** WP_FOOTER ***********************************************/
394396

395397

@@ -425,7 +427,7 @@ public function display_errors(WP_Query $query)
425427
} else {
426428
// block enabled themes run their query loop before headers are sent
427429
// so we need to add our notices onto the beginning of the content
428-
add_filter('the_content', [$this, 'prependNotices'], 1, 1);
430+
add_filter('the_content', [$this, 'prependNotices'], 1);
429431
}
430432
}
431433
do_action('AHEE__EE_Front_Controller__display_errors__end');
@@ -476,9 +478,9 @@ public function template_include($template_include_path = '')
476478
$this->_template_path = ! empty($this->_template_path)
477479
? basename($this->_template_path)
478480
: basename((string) $template_include_path);
479-
$template_path = EEH_Template::locate_template($this->_template_path, [], false);
481+
$template_path = EEH_Template::locate_template($this->_template_path, [], false);
480482
$this->_template_path = ! empty($template_path) ? $template_path : $template_include_path;
481-
$this->_template = basename($this->_template_path);
483+
$this->_template = basename($this->_template_path);
482484
return $this->_template_path;
483485
}
484486
return $template_include_path;
@@ -494,7 +496,6 @@ public function get_selected_template($with_path = false)
494496
return $with_path ? $this->_template_path : $this->_template;
495497
}
496498

497-
498499
/**
499500
* @param string $shortcode_class
500501
* @param WP $wp

core/services/addon/api/IncompatibleAddonHandler.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ public function deactivateIncompatibleAddons(): void
2626
'load_espresso_automated_upcoming_event_notification',
2727
'EE_AUTOMATED_UPCOMING_EVENT_NOTIFICATION_PLUGIN_FILE'
2828
);
29+
$this->deactivateIncompatibleAddon(
30+
'Mailchimp Integration',
31+
'ESPRESSO_MAILCHIMP_VERSION',
32+
'2.5.1.rc.009',
33+
'load_ee4_espresso_mailchimp_class',
34+
'ESPRESSO_MAILCHIMP_MAIN_FILE'
35+
);
2936
// $this->deactivateIncompatibleAddon(
3037
// 'WP Users Integration',
3138
// 'EE_WPUSERS_VERSION',
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace EventEspresso\core\services\notifications;
4+
5+
/**
6+
* AriaLiveAnnouncer
7+
*
8+
* @package Event Espresso
9+
* @subpackage EventEspresso\core\services\notifications
10+
* @author Brent Christensen
11+
* @since 5.0.47
12+
*/
13+
class AriaLiveAnnouncer
14+
{
15+
16+
public static function setHooks() {
17+
add_action('wp_footer', [AriaLiveAnnouncer::class, 'ariaLiveRegion'], 9999);
18+
}
19+
20+
21+
public static function ariaLiveRegion()
22+
{
23+
echo '
24+
<div id="espresso-aria-live-region"
25+
class="screen-reader-text"
26+
aria-live="polite"
27+
aria-atomic="true"
28+
></div>';
29+
}
30+
31+
}

0 commit comments

Comments
 (0)