-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tag Processor: Remove the shorthand next_tag( $tag_name ) syntax #44595
Conversation
Unfortunately there's already a branch named If you also want to check it out locally, rename it. git checkout -b update/tag-processor-cleanup-api origin/tag-processor/cleanup-api |
if ( null !== $query ) { | ||
if ( ! is_array( $query ) || $query === $this->last_query ) { | ||
return; | ||
} |
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.
the nesting catches my attention.
I don't think we need to change this code at all because we only set the query parameters if we have an array with the given keys. isset()
is inherently safe to call.
it would be different if we did something to alert a dev of passing a non-array value, but right now there's no difference between passing a non-array and passing an array with the wrong keys.
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.
Well, good point! I just reverted this part
Oops, sorry about that! Let's close this one and continue in #45082 |
A part of #44410
What?
In @dmsnell's words:
It resonates with me, so this PR removes the shorthand syntax and renames the long
tag_name
andclass_name
keys to shorttag
andclass
ones.Before:
After:
Testing Instructions
Confirm the CI passed and that no
next_tag
,tag_name
, andclass_name
mentions were missed in this refactoring.cc @dmsnell