← All changes
|
lib/compat/wordpress-7.1/class-gutenberg-rest-view-config-controller-7-1.php
+3
-6
23.7.2
→
trunk
View file →
| @@ -373,15 +373,15 @@ | ||
| 373 | 373 | |
| 374 | 374 | /** |
| 375 | 375 | * Returns the schema properties shared by all view types (ViewBase), excluding 'type'. |
| 376 | 376 | * |
| 377 | + * Note that `search` and `page` are not part of the schema: they are managed | |
| 378 | + * via the URL, which is their only source of truth. | |
| 379 | + * | |
| 377 | 380 | * @return array Schema properties for the base view configuration. |
| 378 | 381 | */ |
| 379 | 382 | protected function get_view_base_schema() { |
| 380 | 383 | return array( |
| 381 | - 'search' => array( | |
| 382 | - 'type' => 'string', | |
| 383 | - ), | |
| 384 | 384 | 'filters' => array( |
| 385 | 385 | 'type' => 'array', |
| 386 | 386 | 'items' => array( |
| 387 | 387 | 'type' => 'object', |
| @@ -423,11 +423,8 @@ | ||
| 423 | 423 | 'type' => 'string', |
| 424 | 424 | 'enum' => array( 'asc', 'desc' ), |
| 425 | 425 | ), |
| 426 | 426 | ), |
| 427 | - ), | |
| 428 | - 'page' => array( | |
| 429 | - 'type' => 'integer', | |
| 430 | 427 | ), |
| 431 | 428 | 'perPage' => array( |
| 432 | 429 | 'type' => 'integer', |
| 433 | 430 | ), |