Changeset 58339 for trunk/src/wp-includes/class-wp-theme-json-schema.php
- Timestamp:
- 06/05/2024 08:11:03 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json-schema.php
r58328 r58339 53 53 case 1: 54 54 $theme_json = self::migrate_v1_to_v2( $theme_json ); 55 // no break55 // Deliberate fall through. Once migrated to v2, also migrate to v3. 56 56 case 2: 57 57 $theme_json = self::migrate_v2_to_v3( $theme_json ); 58 // no break59 58 } 60 59 … … 95 94 * Migrates from v2 to v3. 96 95 * 97 * - Sets settings.typography.defaultFontSizes to false. 96 * - Sets settings.typography.defaultFontSizes to false if settings.typography.fontSizes are defined. 97 * - Sets settings.spacing.defaultSpacingSizes to false if settings.spacing.spacingSizes are defined. 98 * - Prevents settings.spacing.spacingSizes from merging with settings.spacing.spacingScale by 99 * unsetting spacingScale when spacingSizes are defined. 98 100 * 99 101 * @since 6.6.0 … … 130 132 */ 131 133 if ( isset( $old['settings']['typography']['fontSizes'] ) ) { 132 if ( ! isset( $new['settings'] ) ) {133 $new['settings'] = array();134 }135 if ( ! isset( $new['settings']['typography'] ) ) {136 $new['settings']['typography'] = array();137 }138 134 $new['settings']['typography']['defaultFontSizes'] = false; 139 135 } … … 149 145 isset( $old['settings']['spacing']['spacingScale'] ) 150 146 ) { 151 if ( ! isset( $new['settings'] ) ) {152 $new['settings'] = array();153 }154 if ( ! isset( $new['settings']['spacing'] ) ) {155 $new['settings']['spacing'] = array();156 }157 147 $new['settings']['spacing']['defaultSpacingSizes'] = false; 158 148 }
Note: See TracChangeset
for help on using the changeset viewer.