Make WordPress Core

Ticket #62067: arra_flip.patch

File arra_flip.patch, 1.1 KB (added by wpdebuglog, 6 months ago)
  • src/wp-includes/class-wp-theme-json.php

    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 { 
    355355         * @var string[]
    356356         */
    357357        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    );
    369369
    370370        /**
    371371         * The valid properties under the settings key.
    class WP_Theme_JSON { 
    946946                }
    947947
    948948                // 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 );
    950950
    951951                /*
    952952                 * Remove any rules that are annotated as "top" in VALID_STYLES constant.