Skip to content

Stop slugs being cast to ints when theme is exported#3371

Closed
glendaviesnz wants to merge 1 commit intoWordPress:trunkfrom
glendaviesnz:fix/slug-casting-issue
Closed

Stop slugs being cast to ints when theme is exported#3371
glendaviesnz wants to merge 1 commit intoWordPress:trunkfrom
glendaviesnz:fix/slug-casting-issue

Conversation

@glendaviesnz
Copy link
Copy Markdown

The new spacing preset slugs get cast to ints when a theme is exported as reported in WordPress/gutenberg#44546. This PR makes sure they are cast back to strings if PHP converts them to ints when they are used as array keys.

Trac ticket: https://core.trac.wordpress.org/ticket/56684

Testing

  • In a site with the 2023 theme set export the theme from the site editor
  • Make sure the exported theme.json has the settings.spacingScale slugs as strings
  • Check that the spacing presets still work as expected in post editor, site editor and frontend

@dream-encode
Copy link
Copy Markdown
Contributor

Merged into core in https://core.trac.wordpress.org/changeset/54363.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants