Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error, when slug of font size contains a number #34110

Closed
2 tasks done
scrobbleme opened this issue Aug 17, 2021 · 1 comment
Closed
2 tasks done

Error, when slug of font size contains a number #34110

scrobbleme opened this issue Aug 17, 2021 · 1 comment
Labels
[Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed

Comments

@scrobbleme
Copy link

Description

When I create a font size with a number in the slug, i.e.

 [
            'name' => 'Size 1',
            'slug' => 'size1',
            'size' => 10,
 ],
 [
            'name' => 'Size 2',
            'slug' => 'size2size',
            'size' => 20,
 ],

it becomes:

has-size-1-font-size
has-size-2-size-font-size

The expected behavior was

has-size1-font-size
has-size2size-font-size

If this is intended, it is anything else than obvious behavior.

Step-by-step reproduction instructions

Create child theme and add something like:

add_action('after_setup_theme', function () {
    $font_sizes = [
        [
            'name' => 'Size 1',
            'slug' => 'size1',
            'size' => 50,
        ]
    ];

    add_theme_support('editor-font-sizes', $font_sizes);
}, 100);

Screenshots, screen recording, code snippet

No response

Environment info

  • Latest WordPress
  • With a child theme of Twentytwentyone with the function above as only thing added

Pre-checks

  • I have searched the existing issues.
  • I have tested with all plugins deactivated except Gutenberg.
@skorasaurus
Copy link
Member

Hi,

Thanks for reporting;
This has been already been reported at #31629. Feel free to add your reaction and follow its progress in the issue.

@skorasaurus skorasaurus added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed
Projects
None yet
Development

No branches or pull requests

2 participants