Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that all terms match the Ad Layer #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion php/class-ad-layers.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,14 @@ public function set_active_ad_layer() {
continue;
}

// Check taxonomies
// Check taxonomies.
$taxonomy_match = false;
if ( ! empty( $taxonomy_terms ) ) {
foreach ( $taxonomy_terms as $taxonomy => $terms ) {
if ( has_term( $terms, $taxonomy ) ) {
$taxonomy_match = true;
} else {
$taxonomy_match = false;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a breaking change since themes might be relying on Ad Layers to match for only a single taxonomy. The code is sound, but I just wanted to mention the concern for backwards compatibilty. Maybe an Ad Layers expert can weigh in.

break;
}
}
Expand Down