Opened 9 years ago
Last modified 18 months ago
#36882 accepted enhancement
Add a reusable admin CSS class for destructive actions
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | needs-patch |
Focuses: | Cc: |
Description
As generally recommended, plugin authors should not use regular buttons for destructive actions, like removing something.
However, while there are standardized classes for buttons in WordPress admin (button
, button-primary
, button-secondary
), a similar standardized class is missing for the destructive link. There are several locations in the admin where such links are displayed, but these are all styled using their individual selectors. Therefore plugin authors who want to use this style must either use one of these selectors (that probably do not fit the use-case at all) or recreate the style manually. Therefore I propose to standardize these style rules for a specific class, for example something like delete-button
or delete-link
.
Change History (14)
#3
@
8 years ago
Thinking at #35126 where a specific class .button-link-delete
was added for this purpose, it just makes sense to me to do the same thing for links too.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
#7
@
8 years ago
- Milestone changed from 4.8 to 4.8.1
Per yesterday's bug scrub, we're going to punt this to 4.8.1.
#8
@
8 years ago
Worth noting [40052] introduced .button-link-delete
for <button>
elements that look like links. Something similar could be done for the links.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
#11
@
8 years ago
- Milestone changed from 4.8.1 to 4.9
Per today's bug scrub, we'll punt this as the focus for 4.8.1 is regressions only.
Related: #35126.