Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
/wp/v2/pattern-directory/patterns
endpoint: slug parameter has no effect on the response #2625/wp/v2/pattern-directory/patterns
endpoint: slug parameter has no effect on the response #2625Changes from 9 commits
7571960
f06d3d0
b504030
b1598ab
e284e1e
7fb829d
07aa848
fd1642d
5c9a336
5e923bc
c2122fb
005de4a
0a2c2eb
7d1c512
1257482
2c08eea
0411a81
5653f25
0879fe0
8ec23a0
1d8f893
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
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.
Yes, I've been thinking about replacing
implode
withwp_json_encode
(json_encode
is faster thanserialize
) in the scope of another PR, butserialize
will do too.The result produced by
implode
doesn't depend on the keys of the$query_args
array. Therefore, this increases the chance of collisions.Fixed in 2c08eea
P.S. I didn't change it because I was afraid that it would cause a sharp increase in the number of requests to the
wp/v2/pattern-directory/patterns
endpoint once WordPress 6.0 is released. The old values stored in the cache will be invalidated because this PR replacesimplode
withserialize
.I hope it will not happen since not all WordPress sites are updated simultaneously.