diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php
index cbe266bfad..89a9be2da6 100644
a
|
b
|
class WP_Theme_JSON { |
355 | 355 | * @var string[] |
356 | 356 | */ |
357 | 357 | const VALID_TOP_LEVEL_KEYS = array( |
358 | | 'blockTypes', |
359 | | 'customTemplates', |
360 | | 'description', |
361 | | 'patterns', |
362 | | 'settings', |
363 | | 'slug', |
364 | | 'styles', |
365 | | 'templateParts', |
366 | | 'title', |
367 | | 'version', |
368 | | ); |
| 358 | 'blockTypes' => 0, |
| 359 | 'customTemplates' => 1, |
| 360 | 'description' => 2, |
| 361 | 'patterns' => 3, |
| 362 | 'settings' => 4, |
| 363 | 'slug' => 5, |
| 364 | 'styles' => 6, |
| 365 | 'templateParts' => 7, |
| 366 | 'title' => 8, |
| 367 | 'version' => 9, |
| 368 | ); |
369 | 369 | |
370 | 370 | /** |
371 | 371 | * The valid properties under the settings key. |
… |
… |
class WP_Theme_JSON { |
946 | 946 | } |
947 | 947 | |
948 | 948 | // Preserve only the top most level keys. |
949 | | $output = array_intersect_key( $input, array_flip( static::VALID_TOP_LEVEL_KEYS ) ); |
| 949 | $output = array_intersect_key( $input, static::VALID_TOP_LEVEL_KEYS ); |
950 | 950 | |
951 | 951 | /* |
952 | 952 | * Remove any rules that are annotated as "top" in VALID_STYLES constant. |