-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Block Library - Query Loop]: Fix some missing term sanitizations #39970
Conversation
31093ce
to
4da26a2
Compare
$term_ids = array_map( 'intval', $terms ); | ||
$term_ids = array_filter( $term_ids ); | ||
|
||
if ( is_taxonomy_viewable( $taxonomy ) && ! empty( $terms ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_taxonomy_viewable checks if the taxonomy is publicly_queryable
. --cc @peterwilsoncc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Nik,
I added a suggestion but it's a nitpick so you could merge as is.
There are some reports of tests failing that appear unrelated so I'm presuming they're not blockers.
2ae0f0e
to
b200750
Compare
What?
Fixes a bug found by @hellofromtonya here.
It should use the sanitized value(
$term_ids
).Notes
The changes of this PR when merged, need to be added to the core PR here: WordPress/wordpress-develop#2488.
Testing instructions