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

Only use block markup for comment form button when using a block theme #37315

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

noisysocks
Copy link
Member

Description

Follows #37245.

Fixes a small bug I noticed thanks to a failing test in WordPress/wordpress-develop#2048.

Steps to reproduce the bug:

  1. Activate an older theme e.g. Twenty Ten.
  2. Go to a post on the frontend.
  3. Look at the "Post Comment" button.

It looks weird because we're erroneously changing the markup to be a Gutenberg button. We should only do that if the current theme is a block theme.

How has this been tested?

As above.

Screenshots

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta [Block] Post Comments Form Affects the Comments Form Block [Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) labels Dec 13, 2021
@aristath aristath merged commit af646e6 into trunk Dec 13, 2021
@aristath aristath deleted the fix/comment-form-button branch December 13, 2021 06:29
@github-actions github-actions bot added this to the Gutenberg 12.2 milestone Dec 13, 2021
@noisysocks noisysocks removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) [Block] Post Comments Form Affects the Comments Form Block [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