Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7571960
Fix a bug in the WP_REST_Pattern_Directory_Controller:get_items.
anton-vlasenko Apr 25, 2022
f06d3d0
Update ticket reference.
anton-vlasenko Apr 25, 2022
b504030
Fix code style.
anton-vlasenko Apr 25, 2022
b1598ab
Add `slug` to the collection parameters. Previously, it was missing.
anton-vlasenko Apr 25, 2022
e284e1e
Improve PHPDOC blocks.
anton-vlasenko Apr 25, 2022
7fb829d
Update wp-api-generated.js schema.
anton-vlasenko Apr 25, 2022
07aa848
Update wp-api-generated.js schema.
anton-vlasenko Apr 25, 2022
fd1642d
Update wp-api-generated.js schema.
anton-vlasenko Apr 25, 2022
5c9a336
Update comment.
anton-vlasenko Apr 25, 2022
5e923bc
"Slug" must be of type array.
anton-vlasenko Apr 26, 2022
c2122fb
Change the scope of the WP_REST_Pattern_Directory_Controller::get_tra…
anton-vlasenko Apr 26, 2022
005de4a
Replace array_key_exist with isset because $query_args['slug'] isn't …
anton-vlasenko Apr 26, 2022
0a2c2eb
Pass $query_args['slugs'] through wp_parse_list to ensure that it is …
anton-vlasenko Apr 27, 2022
7d1c512
Refactor WP_REST_Pattern_Directory_Controller_Test.
anton-vlasenko Apr 27, 2022
1257482
Refactor the test to use the static $controller property.
anton-vlasenko Apr 27, 2022
2c08eea
Use serialize instead of implode because transient keys must depend o…
anton-vlasenko Apr 27, 2022
0411a81
Improve WP_REST_Pattern_Directory_Controller_Test::test_transient_key…
anton-vlasenko Apr 29, 2022
5653f25
Improve WP_REST_Pattern_Directory_Controller_Test::test_transient_key…
anton-vlasenko Apr 29, 2022
0879fe0
Update the test per @costdev 's suggestion.
anton-vlasenko Apr 29, 2022
8ec23a0
Update the test per @costdev 's suggestion.
anton-vlasenko Apr 29, 2022
1d8f893
Micro-optimisations per @hellofromtonya 's suggestion here: https://g…
anton-vlasenko May 2, 2022
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
Prev Previous commit
Next Next commit
Pass $query_args['slugs'] through wp_parse_list to ensure that it is …
…an array.
  • Loading branch information
anton-vlasenko committed Apr 27, 2022
commit 0a2c2ebfbfaf9de86be352e0957942f73b253f81
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ protected function get_transient_key( $query_args ) {

if ( isset( $query_args['slug'] ) ) {
// This is an additional precaution because the "sort" function expects an array.
$query_args['slug'] = (array) $query_args['slug'];
$query_args['slug'] = wp_parse_list( $query_args['slug'] );

// Sort the array so that the transient key doesn't depend on the order of slugs.
sort( $query_args['slug'] );
Expand Down