diff --git src/wp-includes/class-wp.php src/wp-includes/class-wp.php
index ce88c102cf..59a5fb4ca7 100644
|
|
|
class WP {
|
| 356 | 356 | // Convert urldecoded spaces back into '+'. |
| 357 | 357 | foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy => $t ) { |
| 358 | 358 | if ( $t->query_var && isset( $this->query_vars[ $t->query_var ] ) ) { |
| 359 | | $this->query_vars[ $t->query_var ] = str_replace( ' ', '+', $this->query_vars[ $t->query_var ] ); |
| | 359 | // Query vars passed via REST API can be an array after r50157. |
| | 360 | if ( is_string( $this->query_vars[ $t->query_var ] ) ) { |
| | 361 | $this->query_vars[ $t->query_var ] = str_replace( ' ', '+', $this->query_vars[ $t->query_var ] ); |
| | 362 | } else if ( is_array( $this->query_vars[ $t->query_var ] ) && isset( $this->query_vars[ $t->query_var ]['terms'] ) && is_array( $this->query_vars[ $t->query_var ]['terms'] ) ) { |
| | 363 | foreach ( $this->query_vars[ $t->query_var ]['terms'] as $key => $term ) { |
| | 364 | $this->query_vars[ $t->query_var ]['terms'][ $key ] = str_replace( ' ', '+', $term ); |
| | 365 | } |
| | 366 | } |
| 360 | 367 | } |
| 361 | 368 | } |
| 362 | 369 | |