Skip to content

Commit

Permalink
Copy spacingSizes from editor-spacing-sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlende authored and ellatrix committed Jun 4, 2024
1 parent c8cdcc1 commit 5214e4f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -3595,6 +3595,13 @@ public static function get_from_editor_settings( $settings ) {
$theme_settings['settings']['spacing']['padding'] = $settings['enableCustomSpacing'];
}

if ( isset( $settings['spacingSizes'] ) ) {
if ( ! isset( $theme_settings['settings']['spacing'] ) ) {
$theme_settings['settings']['spacing'] = array();
}
$theme_settings['settings']['spacing']['spacingSizes'] = $settings['spacingSizes'];
}

return $theme_settings;
}

Expand Down

0 comments on commit 5214e4f

Please sign in to comment.