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

Fix duplicate Additional CSS classes post author, etc. #39759

Merged

Conversation

shimotmk
Copy link
Contributor

What?

Fix duplicate Additional CSS classes

Why?

Duplicate class names when using custom classes
I don't think it's necessary to add a custom class in each block since it's added with get_block_wrapper_attributes.
https://developer.wordpress.org/reference/functions/get_block_wrapper_attributes/

How?

Testing Instructions

  1. Open a Post or Page.
  2. Insert a Heading post author Block.
  3. Set Additional CSS class
  4. Look at the class name on the publish screen.

Screenshots or screencast

Movie

movie.mov

Before

before

After

after

Site logo, social icon also had duplicated class names, but they were included in this branch, is it OK to include them in this branch?

@shimotmk shimotmk requested a review from ajitbohra as a code owner March 25, 2022 12:22
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 25, 2022
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @shimotmk! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Block] Post Author Affects the Post Author Block labels Mar 25, 2022
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works as expected. Thanks for contributing, @shimotmk.

@Mamaduka Mamaduka merged commit 6cc464c into WordPress:trunk Mar 25, 2022
@github-actions github-actions bot added this to the Gutenberg 13.0 milestone Mar 25, 2022
@shimotmk shimotmk deleted the fix/post-author/custom-classnames branch August 10, 2022 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Author Affects the Post Author Block First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants