Skip to content

Add .wp-element-button class to Login/out form button output #50466

@bgardner

Description

@bgardner

Description

To remain consistent and provide theme authors the ability to style all types of buttons in theme.json elements, I recommend adding the .wp-element-button class to the output of the Login/out block. When that block is placed onto a page, and the Settings > Display login as form is selected, the output of the button is:

<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="Log In">

Ideally it would have .wp-element-button class applied like the output of the button on the Post Comments block:

<input name="submit" type="submit" id="submit" class="wp-block-button__link wp-element-button" value="Post Comment">

Resulting in something like this:

<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary wp-element-button" value="Log In">

Additionally, the name/ids in both blocks might want to be consistent. Either "submit" or "wp-submit".

Step-by-step reproduction instructions

  1. Go to page editor, add Login/out form block.
  2. See output of button class.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.2, Gutenberg not active.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions