Skip to content

Commit

Permalink
Merge pull request #1068 from Automattic/alpha
Browse files Browse the repository at this point in the history
Release Mar 13
  • Loading branch information
dkoo authored Mar 14, 2023
2 parents 2d9d748 + 37c290e commit 995e8ac
Show file tree
Hide file tree
Showing 11 changed files with 919 additions and 1,285 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# [2.14.0-alpha.1](https://github.com/Automattic/newspack-popups/compare/v2.13.0...v2.14.0-alpha.1) (2023-03-03)


### Bug Fixes

* avoid notice on php 8 ([6fde157](https://github.com/Automattic/newspack-popups/commit/6fde157a8f09d3828c486dae3011a84434a23223))
* prevent PHP warning when previewing prompts ([5a85939](https://github.com/Automattic/newspack-popups/commit/5a859396e6399575b90b9b6b7550ddb2c6d89e9a))


### Features

* add popup info to donation block ([85ec525](https://github.com/Automattic/newspack-popups/commit/85ec5257e2fbdb0700f9959ea4b34dba0ab2f41a))
* add popup info to donation block ([7a01172](https://github.com/Automattic/newspack-popups/commit/7a01172655c285e6e9d51f34c494e58a1364363d))
* add popups ids to forms in prompts ([b41aff9](https://github.com/Automattic/newspack-popups/commit/b41aff913999a91cc057260d8eaee39f377319ae))
* allow overlays to be dismissed on background tap ([#1062](https://github.com/Automattic/newspack-popups/issues/1062)) ([97a040b](https://github.com/Automattic/newspack-popups/commit/97a040b3afe8f8d448eb257a1132064cc744ff71))

# [2.13.0](https://github.com/Automattic/newspack-popups/compare/v2.12.0...v2.13.0) (2023-02-21)


Expand Down
4 changes: 2 additions & 2 deletions api/campaigns/class-maybe-show-campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function __construct() {
*
* @return string|null ID of the best matching segment, or null if the client matches no segment.
*/
public function get_best_priority_segment_id( $all_segments = [], $client_id, $referer_url = '', $page_referer_url = '', $view_as_spec = false ) {
public function get_best_priority_segment_id( $all_segments, $client_id, $referer_url = '', $page_referer_url = '', $view_as_spec = false ) {
// If using "view as" feature, automatically make that the matching segment. Otherwise, find the matching segment with the best priority.
if ( $view_as_spec && isset( $view_as_spec['segment'] ) ) {
return $view_as_spec['segment'];
Expand Down Expand Up @@ -272,7 +272,7 @@ public function should_popup_be_shown( $client_id, $popup, $settings, $referer_u
$should_display = true;
}
}
} elseif ( $should_display && ! empty( $popup_segment_ids ) ) {
} elseif ( $should_display && ! empty( $popup_segment_ids ) && ! empty( $settings ) ) {
// $settings->best_priority_segment_id should always be present, but in case it's not (e.g. in a unit test), we can fetch it here.
$best_priority_segment_id = isset( $settings->best_priority_segment_id ) ?
$settings->best_priority_segment_id :
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "automattic/newspack-popups",
"description": "AMP-compatible popup notifications.",
"type": "wordpress-plugin",
"require-dev": {
"automattic/vipwpcs": "^2.0",
"wp-coding-standards/wpcs": "^2.1",
Expand Down
78 changes: 39 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 995e8ac

Please sign in to comment.